Method, device and storage medium for determining the number of objects
By setting up a generalized allocation function module on the server, the device of the object allocation node can call the module for object number allocation, solving the problem of high code development and maintenance costs in the existing technology, and achieving efficient and reusable object number allocation Function.
Patent Information
- Application Number
- CN202011125044.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-20
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2040-10-20
AI Technical Summary
In the prior art, each delivery node needs to develop its own code files, resulting in high code development and maintenance costs.
By setting up a general configurable allocation function module on the server, the device of the object allocation node can call the module for the allocation of objects, reducing the need for code development and maintenance.
The allocation of objects to be allocated by the object allocation node is realized, which reduces the cost of code development and maintenance, and enhances the reusability of the number of objects allocation functions.
Smart Images

Figure CN113762673B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a method, device and storage medium for determining the number of objects. Background Art
[0002] In the current supply chain system, there are more and more inventory nodes involved in goods, such as suppliers, stores or intermediate warehouses. When the quantity of goods at the downstream node (i.e. the node to which the goods are allocated) is insufficient, how to allocate the quantity of goods to the downstream node (i.e., distribute the goods) is a problem that each inventory node has to face. For example, suppliers need to distribute goods to the stores that deliver them, intermediate warehouses need to distribute goods to the stores that transfer them, and there may also be a need to distribute goods when transferring goods between stores.
[0003] In the prior art, each distribution node (including inventory nodes or other nodes that need distribution) needs to develop its own code file to implement distribution of goods after determining the quantity of goods to be distributed to downstream nodes based on the quantity of goods at the distribution node and pre-stored distribution rules. The distribution rules for different distribution nodes are different.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: each distribution node needs to develop its own code file, and the code development and maintenance costs are high. Summary of the invention
[0005] The embodiments of the present invention provide a method, device and storage medium for determining the number of objects, so as to solve the problem of high code development and maintenance costs in the existing goods distribution method.
[0006] In one aspect, an embodiment of the present invention provides a method for determining the number of objects, including:
[0007] receiving an allocation service invocation request sent by a first device, the allocation service invocation request including a service allocation identifier and allocation rule data of an object to be allocated, the first device being a device corresponding to an object allocation node;
[0008] According to the correspondence between the stored service allocation identifier and the allocation rule, obtaining the target allocation rule corresponding to the service allocation identifier of the object to be allocated;
[0009] The number of the objects to be allocated allocated to each downstream node is determined according to the target allocation rule and the allocation rule data, and the number of the objects to be allocated allocated to each downstream node is sent to the first device.
[0010] Optionally, determining the number of the objects to be allocated to each downstream node according to the target allocation rule and the allocation rule data includes:
[0011] Determine the allocation rule of each downstream node according to the target allocation rule, and determine the allocation rule data of each downstream node according to the allocation rule data;
[0012] The number of the objects to be allocated allocated to each downstream node is determined according to the allocation rule of each downstream node, the allocation rule data of each downstream node and the total number of the objects to be allocated.
[0013] One embodiment of the above invention has the following advantages or beneficial effects: receiving the allocation service call request sent by the first device through the server, obtaining the target allocation rule corresponding to the business allocation identifier of the object to be allocated according to the correspondence between the stored business allocation identifier and the allocation rule, then determining the allocation rule of each downstream node according to the target allocation rule, determining the allocation rule data of each downstream node according to the allocation rule data, determining the number of objects to be allocated allocated to each downstream node according to the allocation rule of each downstream node, the allocation rule data of each downstream node and the total number of objects to be allocated, and finally sending the number of objects to be allocated allocated to each downstream node to the first device. Thus, the allocation of the objects to be allocated by the device corresponding to the object allocation node is realized, and different object allocation nodes can call the allocation function module set by the server to realize the allocation of the objects to be allocated by the object allocation node, and only one code file needs to be developed, which reduces the cost of code development and maintenance and enhances the reusability of the object quantity allocation function.
[0014] Optionally, the method further includes:
[0015] After receiving the allocation rule configuration request sent by the first device, push rule configuration information to the first device;
[0016] In response to a user selecting an allocation rule operation through a rule configuration page, obtaining an allocation rule selected by the user for the first device, the rule configuration page being displayed for the first device according to the rule configuration information;
[0017] Generate a corresponding service allocation identifier according to the allocation rule, and store the corresponding relationship between the service allocation identifier and the allocation rule;
[0018] Send the service allocation identifier to the first device.
[0019] An embodiment of the above invention has the following advantages or beneficial effects: when the object quantity is allocated for the first time through the first device, an allocation rule configuration request is sent to the server, the server pushes the rule configuration information to the first device, the first device receives the rule configuration information pushed by the server and displays the rule configuration page, so that the user can select the allocation rule operation through the rule configuration page displayed by the first device, the server responds to the operation and obtains the allocation rule selected by the user, and then generates a corresponding business allocation identifier according to the allocation rule, and stores the correspondence between the business allocation identifier and the allocation rule. Finally, the server sends the business allocation identifier to the first device, so that when the first device needs to allocate the object quantity, it can call the object allocation function according to the business allocation identifier and the allocation rule data. Different object allocation nodes can call the allocation function module set by the server to realize the allocation of the object to be allocated by the object allocation node. Only one code file needs to be developed, which reduces the cost of code development and maintenance and enhances the reusability of the object quantity allocation function.
[0020] Optionally, the allocation rule includes an allocation rule of at least one object type, and generating a corresponding service allocation identifier according to the allocation rule includes:
[0021] Generate a corresponding business allocation identifier according to the allocation rule of each object type.
[0022] An embodiment of the above invention has the following advantages or beneficial effects: different allocation rules can be configured for different object types, and the allocation rule of each object type generates a corresponding business allocation identifier, which is flexible and can adapt to more business scenarios.
[0023] Optionally, the rule configuration information includes allocation rule options and object allocation node options;
[0024] The allocation rule included in the allocation rule option is at least one of the following configuration rules:
[0025] Allocation according to the proportion of planned replenishment quantity of downstream nodes, allocation according to the historical number of purchases of downstream nodes, allocation according to the purchase quantity within the historical time period of downstream nodes, allocation according to the average sales volume within the historical time period of downstream nodes, allocation according to the inventory quantity of downstream nodes, allocation according to the proportion of predicted average sales volume within the preset time of downstream nodes.
[0026] Optionally, the rule configuration information also includes priority configuration options for downstream nodes.
[0027] An embodiment of the above invention has the following advantages or beneficial effects: by adding a priority configuration option of the downstream node, the allocation rule can include multiple configuration rules and the priority of the downstream node accordingly, and when the number of objects to be allocated to each downstream node cannot be determined according to the multiple configuration rules and the allocation rule data, the number of objects to be allocated to each downstream node can be determined according to the priority of the downstream node and the total number of objects to be allocated. More flexibility.
[0028] Optionally, the target allocation rule includes a plurality of configuration rules and priorities of downstream nodes, and determining the number of the objects to be allocated to each downstream node according to the target allocation rule and the allocation rule data includes:
[0029] When the number of the objects to be allocated allocated to each downstream node cannot be determined according to the multiple configuration rules and the allocation rule data, the number of the objects to be allocated allocated to each downstream node is determined according to the priority of the downstream node and the total number of the objects to be allocated.
[0030] One embodiment of the above invention has the following advantages or beneficial effects: when the number of objects to be allocated to each downstream node cannot be determined based on multiple configuration rules and allocation rule data, the number of objects to be allocated to each downstream node can be determined based on the priority of the downstream node and the total number of objects to be allocated, which is more flexible.
[0031] On the other hand, an embodiment of the present invention provides a device for determining the number of objects, including:
[0032] A receiving module, configured to receive an allocation service call request sent by a first device, wherein the allocation service call request includes a service allocation identifier and allocation rule data of an object to be allocated, and the first device is a device corresponding to an object allocation node;
[0033] An acquisition module, used for acquiring a target allocation rule corresponding to the business allocation identifier of the object to be allocated according to the correspondence between the stored business allocation identifier and the allocation rule;
[0034] A processing module, configured to determine the number of the objects to be allocated to each downstream node according to the target allocation rule and the allocation rule data;
[0035] A sending module is used to send the number of the objects to be allocated allocated to each downstream node to the first device.
[0036] Optionally, the processing module is used to: determine an allocation rule for each downstream node according to the target allocation rule, and determine allocation rule data for each downstream node according to the allocation rule data;
[0037] The number of the objects to be allocated allocated to each downstream node is determined according to the allocation rule of each downstream node, the allocation rule data of each downstream node and the total number of the objects to be allocated.
[0038] Optionally, the sending module is further used to: push rule configuration information to the first device after the receiving module receives the allocation rule configuration request sent by the first device;
[0039] The processing module is further used for: in response to a user selecting an allocation rule operation through a rule configuration page, obtaining an allocation rule selected by the user for the first device, the rule configuration page being displayed by the first device according to the rule configuration information;
[0040] Generate a corresponding service allocation identifier according to the allocation rule, and store the corresponding relationship between the service allocation identifier and the allocation rule;
[0041] The sending module is further used to: send the service allocation identifier to the first device.
[0042] Optionally, the allocation rule includes an allocation rule for at least one object type, and the processing module is used to generate a corresponding service allocation identifier according to the allocation rule for each object type.
[0043] Optionally, the rule configuration information includes allocation rule options and object allocation node options;
[0044] The allocation rule included in the allocation rule option is at least one of the following configuration rules:
[0045] Allocation according to the proportion of planned replenishment quantity of downstream nodes, allocation according to the historical number of purchases of downstream nodes, allocation according to the purchase quantity within the historical time period of downstream nodes, allocation according to the average sales volume within the historical time period of downstream nodes, allocation according to the inventory quantity of downstream nodes, allocation according to the proportion of predicted average sales volume within the preset time of downstream nodes.
[0046] Optionally, the rule configuration information also includes priority configuration options for downstream nodes.
[0047] Optionally, the target allocation rule includes multiple configuration rules and priorities of downstream nodes, and the processing module is used to:
[0048] When the number of the objects to be allocated allocated to each downstream node cannot be determined according to the multiple configuration rules and the allocation rule data, the number of the objects to be allocated allocated to each downstream node is determined according to the priority of the downstream node and the total number of the objects to be allocated.
[0049] On the other hand, an embodiment of the present invention provides a server, including: a memory and a processor;
[0050] A memory is used to store instructions executable by the processor;
[0051] Wherein, the processor is configured to:
[0052] receiving an allocation service invocation request sent by a first device, the allocation service invocation request including a service allocation identifier and allocation rule data of an object to be allocated, the first device being a device corresponding to an object allocation node;
[0053] According to the correspondence between the stored service allocation identifier and the allocation rule, obtaining the target allocation rule corresponding to the service allocation identifier of the object to be allocated;
[0054] The number of the objects to be allocated allocated to each downstream node is determined according to the target allocation rule and the allocation rule data, and the number of the objects to be allocated allocated to each downstream node is sent to the first device.
[0055] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the method for determining the number of objects described in the first aspect and each possible design.
[0056] The method, device and storage medium for determining the number of objects provided by the embodiment of the present invention receive an allocation service call request sent by a first device through a server, the allocation service call request includes a business allocation identifier and allocation rule data of the object to be allocated, then obtain the target allocation rule corresponding to the business allocation identifier of the object to be allocated according to the correspondence between the stored business allocation identifier and the allocation rule, then determine the number of objects to be allocated allocated to each downstream node according to the target allocation rule and the allocation rule data, and finally send the number of objects to be allocated allocated to each downstream node to the first device. When the object allocation node needs to allocate the number of objects, the device corresponding to the object allocation node (i.e., the first device) implements the call of the allocation function module set by the server by sending the allocation service call request to the server, thereby implementing the allocation of the objects to be allocated by the device corresponding to the object allocation node, and different object allocation nodes can call the allocation function module set by the server to implement the allocation of the objects to be allocated by the object allocation node, and only one code file needs to be developed, which reduces the cost of code development and maintenance and enhances the reusability of the object number allocation function. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0058] Figure 1 is a schematic diagram of an application scenario of the method for determining the number of objects provided by an embodiment of the present invention;
[0059] Figure 2 A flowchart of an embodiment of a method for determining the number of objects provided by an embodiment of the present invention;
[0060] Figure 3 A flowchart of an embodiment of a method for determining the number of objects provided by an embodiment of the present invention;
[0061] Figure 4 A flowchart of an embodiment of a method for determining the number of objects provided by an embodiment of the present invention;
[0062] Figure 5 A schematic diagram of a rule configuration page;
[0063] Figure 6 A schematic diagram of a rule configuration page;
[0064] Figure 7 A schematic diagram of the structure of a device for determining the number of objects provided by an embodiment of the present invention;
[0065] Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present invention.
[0066] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0067] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0068] First, some terms in the embodiments of the present invention are explained below to facilitate understanding by those skilled in the art.
[0069] 1. Object allocation node refers to a node that has object allocation requirements. The object here can be, for example, goods. The object allocation node can be, for example, an inventory node or other nodes that need to distribute goods (hereinafter referred to as distribution nodes). For example, suppliers, stores or intermediate warehouses can all be object allocation nodes. If the object is goods, the corresponding object allocation node can be called a distribution node. It is understandable that the object can also be other.
[0070] 2. Downstream nodes refer to nodes that are assigned objects. For example, if a supplier needs to distribute goods to distribution stores, the supplier is the object allocation node and the store is the downstream node. Another example is that if an intermediate warehouse needs to distribute goods to allocated stores, the intermediate warehouse is the object allocation node and the store is the downstream node. Usually there are one or more downstream nodes.
[0071] Before introducing the technical solution of the embodiment of the present invention, the problems existing in the prior art and the technical conception process of the embodiment of the present invention are first explained.
[0072] In the prior art, each distribution node needs to develop its own code file, and the software module composed of the code file is set in the device corresponding to the distribution node. The device corresponding to the distribution node determines the quantity of goods allocated to the downstream node according to the quantity of goods at the distribution node and the pre-stored allocation rules. Since each distribution node needs to develop its own code file, the code development and maintenance costs are high. To solve this problem, the embodiment of the present invention provides a method, device and storage medium for determining the number of objects. By setting a universal and configurable allocation function module on the server, the allocation function module can be a software module or a hardware module. When the object allocation node needs to allocate the number of objects, the device corresponding to the object allocation node can call the allocation function module through the server. Specifically, when the number of objects needs to be allocated, the device corresponding to the object allocation node sends an allocation service call request to the server, and the allocation service call request includes the business allocation identifier and allocation rule data of the object to be allocated. Then the server determines the number of objects to be allocated to each downstream node according to the allocation service call request, and sends the number of objects to be allocated to each downstream node to the device corresponding to the object allocation node. Thus, the allocation of objects to be allocated by the devices corresponding to the object allocation nodes is realized. Different object allocation nodes can call the allocation function module to realize the allocation of objects to be allocated by the object allocation nodes. Only one code file needs to be developed, which reduces the cost of code development and maintenance and enhances the reusability of the object quantity allocation function.
[0073] For example, Figure 1 Schematic diagram of an application scenario of the method for determining the number of objects provided by an embodiment of the present invention. Figure 1 As shown, the application scenario may include: at least one terminal device ( Figure 1Three terminal devices are shown, namely terminal device 111, terminal device 112, and terminal device 113, a network 12, and a server 13. Each terminal device and the server 13 can communicate through the network 12.
[0074] Optionally, the user can use a terminal device, specifically an application (Application, APP) or a website installed on the terminal device to determine the number of objects, etc. The terminal device in the embodiment of the present application is a terminal device corresponding to the object allocation node. For example, a supplier needs to distribute goods to the distribution store, and another example is that the intermediate warehouse needs to distribute goods to the allocation store. These are all scenarios where the object allocation node (such as a supplier or an intermediate warehouse) needs to allocate the number of objects. For example, when the object allocation node needs to allocate the number of objects, it can be specifically sent to the server through the terminal device. The allocation service call request includes the business allocation identifier and allocation rule data of the object to be allocated. After the server determines the number of objects to be allocated to each downstream node according to the allocation service call request, the number of objects to be allocated to each downstream node is sent to the terminal device. The server can specifically execute the method for determining the number of objects provided in the following embodiment of the present invention to realize the allocation of the objects to be allocated by the object allocation node, such as realizing the allocation of goods by the distribution node.
[0075] It should be noted that the attached Figure 1 This is only a schematic diagram of an application scenario provided by an embodiment of the present invention. Figure 1 does not limit the equipment included in Figure 1 The positional relationship between the devices in the Figure 1 In the application scenario shown, a data storage device may also be included. The data storage device may be an external memory relative to the server 13 or an internal memory integrated in the server 13 .
[0076] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the embodiments of the present invention solve the above technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0077] Figure 2 This is a flow chart of an embodiment of a method for determining the number of objects provided by an embodiment of the present invention. The execution subject of this embodiment may be a server, such as Figure 2 As shown, the method of this embodiment may include:
[0078] S101. Receive an allocation service call request sent by a first device, where the allocation service call request includes a service allocation identifier and allocation rule data of an object to be allocated, and the first device is a device corresponding to an object allocation node.
[0079] Specifically, the first device is a device corresponding to an object allocation node, and the object allocation node is a node that has an object (for example, goods) allocation demand, such as an inventory node or other node that needs to distribute goods. The object allocation node is specifically, for example, a supplier, a store or an intermediate warehouse.
[0080] When the object allocation node needs to allocate the number of objects, the first device corresponding to the object allocation node may send an allocation service call request to the server. After receiving the allocation service call request, the server executes the process of S102.
[0081] Among them, the allocation service call request includes the business allocation identifier and allocation rule data of the object to be allocated. The business allocation identifier can be a coded string or other identifiers. The allocation rule data is data corresponding to the allocation rule. For example, the allocation rule is allocated according to the planned replenishment ratio of the downstream node, and the corresponding allocation rule data is the planned replenishment ratio of the downstream node. For example, if there are 2 downstream nodes, the planned replenishment ratio of the 2 downstream nodes is, for example, 1:1 or 1:2. For another example, the allocation rule is allocated according to the average sales volume of the downstream node in the historical time period, and the corresponding allocation rule data is the average sales volume of the downstream node in the historical time period. For example, the allocation quantity can be N times the average sales volume, and N can be 1 or other values. For another example, the allocation rule is allocated according to the inventory quantity of the downstream node, and the corresponding allocation rule data is the inventory quantity of the downstream node. If the inventory quantity is small, the allocation quantity is large, and if the inventory quantity is large, the allocation quantity is small.
[0082] Among them, the first device is the device corresponding to the object allocation node, the business allocation identifier corresponds to the allocation rule, the first device knows the allocation rule and correspondingly knows the allocation rule data. When sending an allocation service call request to the server, the business allocation identifier and the allocation rule data corresponding to the allocation rule are carried in the allocation service call request and sent to the server.
[0083] S102: According to the stored correspondence between the service allocation identifier and the allocation rule, obtain the target allocation rule corresponding to the service allocation identifier of the object to be allocated.
[0084] Specifically, the server stores the correspondence between different business allocation identifiers and allocation rules, which may be, for example, a mapping relationship table. The server may search for the allocation rule corresponding to the business allocation identifier of the object to be allocated from the stored correspondence between the business allocation identifiers and the allocation rules, that is, the target allocation rule. The following table 1 is an example of the correspondence between a business allocation identifier and an allocation rule:
[0085] Table 1
[0086] Business allocation identifier Allocation rules Business allocation identifier 1 Allocate according to the planned replenishment ratio of downstream nodes Business allocation identifier 2 Distribution based on the average sales volume of downstream nodes in the historical time period Business allocation identifier 3 Allocation based on the purchase quantity of the downstream node in the historical time period Business allocation identifier 4 Distribute according to the predicted average sales ratio of downstream nodes within the preset time
[0087] As shown in Table 1, the business allocation identifiers are 1, 2, 3, and 4 as examples. The business allocation identifiers can also be character strings. It can be understood that the business allocation identifiers of different first devices are unique. For example, if the business allocation identifier of the object to be allocated is business allocation identifier 1, and the allocation rule corresponding to business allocation identifier 1 is allocation based on the planned replenishment quantity ratio of the downstream node, then the target allocation rule is allocation based on the planned replenishment quantity ratio of the downstream node.
[0088] Optionally, the allocation rule may further include the priority of the downstream node. For example, when there are three downstream nodes, the allocation rule may further include the priority of the downstream node. When the priority of the downstream node is included, when the number of objects to be allocated to each downstream node cannot be determined according to the allocation rule, the number of objects to be allocated to each downstream node may be determined according to the priority of the downstream node and the total number of objects to be allocated.
[0089] Furthermore, the object may be, for example, goods, and different objects have different types. For example, goods can be divided into types such as fruits and clothes. Therefore, different object types may have different business allocation identifiers, that is, different object types may have different allocation rules, or the same allocation rules, so that the object quantity can be allocated according to the object type.
[0090] S103: Determine the number of objects to be allocated to each downstream node according to the target allocation rule and the allocation rule data, and send the number of objects to be allocated to each downstream node to the first device.
[0091] Specifically, after the target allocation rule is determined, the number of objects to be allocated to each downstream node can be determined according to the target allocation rule and the allocation rule data. For example, the target allocation rule is to allocate according to the planned replenishment quantity ratio of the downstream nodes, and the corresponding allocation rule data is the planned replenishment quantity ratio of the downstream nodes. If there are two downstream nodes, and the planned replenishment quantity ratio of the two downstream nodes is, for example, 1:1, then according to the total number of objects to be allocated and the planned replenishment quantity ratio of the two downstream nodes of 1:1, it can be determined that the number of objects to be allocated to each of the two downstream nodes is half of the total number of objects to be allocated.
[0092] The method for determining the number of objects provided in this embodiment receives an allocation service call request sent by a first device through a server, the allocation service call request includes a business allocation identifier and allocation rule data of the object to be allocated, then obtains the target allocation rule corresponding to the business allocation identifier of the object to be allocated according to the correspondence between the stored business allocation identifier and the allocation rule, then determines the number of objects to be allocated allocated to each downstream node according to the target allocation rule and the allocation rule data, and finally sends the number of objects to be allocated allocated to each downstream node to the first device. When the object allocation node needs to allocate the number of objects, the device corresponding to the object allocation node (i.e., the first device) implements the call of the allocation function module set by the server by sending an allocation service call request to the server, thereby implementing the allocation of the objects to be allocated by the device corresponding to the object allocation node, and different object allocation nodes can call the allocation function module set by the server to implement the allocation of the objects to be allocated by the object allocation node, and only one code file needs to be developed, which reduces the cost of code development and maintenance and enhances the reusability of the object number allocation function.
[0093] Figure 3 This is a flow chart of an embodiment of a method for determining the number of objects provided by an embodiment of the present invention. The execution subject of this embodiment may be a server, such as Figure 3 As shown, the method of this embodiment is Figure 2 On the basis of the method shown, further, as an implementable manner, in S103, the number of objects to be allocated to each downstream node is determined according to the target allocation rule and the allocation rule data, which may be specifically:
[0094] S1031. Determine an allocation rule for each downstream node according to the target allocation rule, and determine allocation rule data for each downstream node according to the allocation rule data.
[0095] Specifically, since the downstream nodes of the object allocation node may be one or more, the allocation rule of each downstream node is first determined according to the target allocation rule, and the allocation rule data of each downstream node is determined according to the allocation rule data. For example, if there are 3 downstream nodes of the object allocation node and the target allocation rule is to allocate according to the planned replenishment quantity ratio of the downstream nodes, then the allocation rule of each downstream node is determined to be allocated according to the planned replenishment quantity ratio of each downstream node in the 3 downstream nodes. For example, if the allocation rule data is 1:2:3, the allocation rule data of each downstream node in the 3 downstream nodes are 1 / 6, 2 / 6 and 3 / 6 respectively. For another example, if there are 3 downstream nodes of the object allocation node and the target allocation rule is to allocate according to the historical purchase frequency of the downstream nodes, then the allocation rule of each downstream node is determined to be allocated according to the historical purchase frequency of each downstream node in the 3 downstream nodes, the allocation rule data is the historical purchase frequency of the downstream nodes, and the allocation rule data of each downstream node in the 3 downstream nodes is the historical purchase frequency of each downstream node.
[0096] S1032: Determine the number of objects to be allocated to each downstream node according to the allocation rule of each downstream node, the allocation rule data of each downstream node and the total number of objects to be allocated, and then send the number of objects to be allocated to each downstream node to the first device.
[0097] Specifically, for each downstream node of the object allocation node, after the allocation rules of each downstream node and the allocation rule data of each downstream node are determined through S1031, the number of objects to be allocated to each downstream node can be determined based on the allocation rules of each downstream node, the allocation rule data of each downstream node and the total number of objects to be allocated.
[0098] In this embodiment, the server receives the allocation service call request sent by the first device, obtains the target allocation rule corresponding to the business allocation identifier of the object to be allocated according to the correspondence between the stored business allocation identifier and the allocation rule, and then determines the allocation rule of each downstream node according to the target allocation rule, determines the allocation rule data of each downstream node according to the allocation rule data, determines the number of objects to be allocated allocated to each downstream node according to the allocation rule of each downstream node, the allocation rule data of each downstream node and the total number of objects to be allocated, and finally sends the number of objects to be allocated allocated to each downstream node to the first device. Thus, the allocation of the objects to be allocated by the device corresponding to the object allocation node is realized, and different object allocation nodes can call the allocation function module set by the server to realize the allocation of the objects to be allocated by the object allocation node. Only one code file needs to be developed, which reduces the cost of code development and maintenance and enhances the reusability of the object quantity allocation function.
[0099] exist Figure 2 or Figure 3 In the illustrated embodiment, the correspondence between the business allocation identifier and the allocation rule is stored in the server. When the object allocation node distributes the goods for the first time, the user can configure the allocation rule through the first device according to the rule configuration page displayed by the server according to the rule configuration information pushed by the server. The correspondence between the business allocation identifier and the allocation rule is obtained and stored in the server. The server also sends the unique business allocation identifier generated after the allocation rule configuration is completed to the object allocation node. When the object allocation node needs to allocate the number of objects later, it can directly call the allocation function module of the server according to the business allocation identifier to allocate the number of objects. Figure 4 Describes the configuration process of allocation rules in detail.
[0100] Figure 4 This is a flow chart of an embodiment of a method for determining the number of objects provided by an embodiment of the present invention. The execution subject of this embodiment may be a server, such as Figure 4 As shown, the method of this embodiment is Figure 2 or Figure 3 On the basis of the method shown, further, it may also include:
[0101] S104: After receiving the allocation rule configuration request sent by the first device, push rule configuration information to the first device.
[0102] Specifically, when the first device distributes goods for the first time, a rule configuration page can be displayed to the user based on the rule configuration information pushed by the server, and the user operates the first device to configure the distribution rules. Optionally, the first device can initiate a distribution rule configuration request to the server via Hypertext Transfer Protocol (HTTP), and the server pushes the rule configuration information to the first device. The first device receives the rule configuration information pushed by the server and displays the rule configuration page. For example, the first device can be displayed on the display screen of the first device via a browser.
[0103] Optionally, the rule configuration information includes an allocation rule option and an object allocation node option, and the allocation rule included in the allocation rule option is at least one of the following configuration rules:
[0104] Allocation based on the proportion of planned replenishment quantity of downstream nodes, allocation based on the historical number of purchases of downstream nodes, allocation based on the purchase quantity within the historical time period of downstream nodes, allocation based on the average sales volume within the historical time period of downstream nodes, allocation based on the inventory quantity of downstream nodes, and allocation based on the predicted average sales volume proportion within the preset time of downstream nodes. It can be understood that the content displayed on the rule configuration page is the content included in the rule configuration information, for example, the allocation rule options and object allocation node options can be displayed.
[0105] The allocation rule may include one or more configuration rules. Optionally, the rule configuration information may also include a priority configuration option for the downstream node. By adding a priority configuration option for the downstream node, the allocation rule may include multiple configuration rules and the priority of the downstream node. When the number of objects to be allocated to each downstream node cannot be determined based on multiple configuration rules and allocation rule data, the number of objects to be allocated to each downstream node may be determined based on the priority of the downstream node and the total number of objects to be allocated. This is more flexible.
[0106] Figure 5 A schematic diagram of a rule configuration page, such as Figure 5 As shown, the content displayed on the rule configuration page may include the allocation rule name (this item is optional and can be named by the user), object allocation node options (for the user to check), and allocation rule options (for the user to check). The object allocation node options may include, for example, the name of the intermediate warehouse, the name of the supplier, and the name of the store. The allocation rule options include, for example, the planned replenishment volume ratio, the 7-day forecast average sales ratio, the 28-day forecast average sales ratio, the 7-day historical average sales ratio, and the 28-day historical average sales ratio. Optional, such as Figure 5 As shown, the content displayed on the rule configuration page may also include priority configuration options for downstream nodes. For example, the priority configuration options for downstream nodes include store name, store ID, and priority options. For example, there are 4 downstream nodes and 4 corresponding priorities. The above options are all used for users to select and configure the allocation rules.
[0107] S105. In response to the user selecting an allocation rule operation through a rule configuration page, the allocation rule selected by the user for the first device is obtained, and the rule configuration page is displayed for the first device according to the rule configuration information.
[0108] Specifically, for example, a user selects an allocation rule operation through a rule configuration page, and the server responds to the operation and obtains the allocation rule selected by the user.
[0109] S106: Generate a corresponding service allocation identifier according to the allocation rule, and store the corresponding relationship between the service allocation identifier and the allocation rule.
[0110] Specifically, for the same object allocation node, the allocation rules for different object types may be the same. In an implementable manner, the allocation rules for different object types may also be different. At the same time, the allocation rules include allocation rules for at least one object type. Accordingly, the corresponding business allocation identifier is generated according to the allocation rules. It can be: the corresponding business allocation identifier is generated according to the allocation rules of each object type.
[0111] When the server stores the correspondence between the service allocation identifier and the allocation rule, it may be stored in a database.
[0112] Figure 6 A schematic diagram of a rule configuration page, such as Figure 6 As shown, for example, when the object is a commodity, the allocation rule can be called a commodity allocation rule. The types of commodities can include supermarket miscellaneous goods, daily necessities, and aquatic products. Taking these two commodity types as an example, each of these two commodity types corresponds to a commodity allocation rule. Figure 6 The allocation rules shown are distribution rules, for example, the distribution rules are named supermarket miscellaneous distribution rules and daily aquatic product distribution rules. Each distribution rule has a warehouse ID, warehouse name, operator, and last operation time, as well as operation options, including editing and deleting each distribution rule. You can also enter the distribution name to query the created distribution rules, create a new distribution rule corresponding to the commodity type, or delete the created distribution rules in batches.
[0113] In this embodiment, different allocation rules can be configured for different object types, and the allocation rule of each object type generates a corresponding business allocation identifier, which is flexible and can adapt to more business scenarios.
[0114] S107: Send a service allocation identifier to the first device.
[0115] The method for determining the number of objects provided in this embodiment is that when the first device allocates the number of objects for the first time, an allocation rule configuration request is sent to the server, the server pushes the rule configuration information to the first device, the first device receives the rule configuration information pushed by the server and displays the rule configuration page, so that the user can select the allocation rule operation through the rule configuration page displayed by the first device, the server responds to the operation and obtains the allocation rule selected by the user, and then generates a corresponding business allocation identifier according to the allocation rule, and stores the correspondence between the business allocation identifier and the allocation rule, and finally the server sends the business allocation identifier to the first device, so that when the first device needs to allocate the number of objects, it can call the object allocation function according to the business allocation identifier and the allocation rule data, different object allocation nodes can call the allocation function module set by the server to realize the allocation of the object to be allocated by the object allocation node, and only one code file needs to be developed, which reduces the cost of code development and maintenance and enhances the reusability of the object quantity allocation function.
[0116] Figure 7 A schematic diagram of a device for determining the number of objects provided by an embodiment of the present invention is shown in FIG. Figure 7 As shown, the device of this embodiment may include: a receiving module 21, an acquiring module 22, a processing module 23 and a sending module 24.
[0117] The receiving module 21 is used to receive an allocation service call request sent by a first device, the allocation service call request includes a service allocation identifier and allocation rule data of an object to be allocated, and the first device is a device corresponding to the object allocation node.
[0118] The acquisition module 22 is used to acquire the target allocation rule corresponding to the service allocation identifier of the object to be allocated according to the correspondence between the stored service allocation identifier and the allocation rule.
[0119] The processing module 23 is used to determine the number of objects to be allocated to each downstream node according to the target allocation rule and the allocation rule data.
[0120] The sending module 24 is used to send the number of objects to be allocated allocated to each downstream node to the first device.
[0121] Optionally, the processing module 23 is used to: determine the allocation rule of each downstream node according to the target allocation rule, and determine the allocation rule data of each downstream node according to the allocation rule data;
[0122] The number of objects to be allocated allocated to each downstream node is determined according to the allocation rule of each downstream node, the allocation rule data of each downstream node and the total number of objects to be allocated.
[0123] Optionally, the sending module 24 is further used to: push rule configuration information to the first device after the receiving module receives the allocation rule configuration request sent by the first device;
[0124] The processing module 23 is further used for: in response to the user selecting an allocation rule operation through the rule configuration page, obtaining the allocation rule selected by the user for the first device, and the rule configuration page is displayed for the first device according to the rule configuration information;
[0125] Generate a corresponding business allocation identifier according to the allocation rule, and store the corresponding relationship between the business allocation identifier and the allocation rule;
[0126] The sending module 24 is further configured to send a service allocation identifier to the first device.
[0127] Optionally, the allocation rule includes an allocation rule for at least one object type, and the processing module 23 is used to generate a corresponding service allocation identifier according to the allocation rule for each object type.
[0128] Optionally, the rule configuration information includes allocation rule options and object allocation node options;
[0129] The allocation rule option includes an allocation rule that is at least one of the following configuration rules:
[0130] Allocation according to the proportion of planned replenishment quantity of downstream nodes, allocation according to the historical number of purchases of downstream nodes, allocation according to the purchase quantity within the historical time period of downstream nodes, allocation according to the average sales volume within the historical time period of downstream nodes, allocation according to the inventory quantity of downstream nodes, allocation according to the proportion of predicted average sales volume within the preset time of downstream nodes.
[0131] Optionally, the rule configuration information also includes a priority configuration option for the downstream node.
[0132] Optionally, the target allocation rule includes multiple configuration rules and priorities of downstream nodes, and the processing module 23 is used to:
[0133] When the number of objects to be allocated to each downstream node cannot be determined according to the multiple configuration rules and allocation rule data, the number of objects to be allocated to each downstream node is determined according to the priority of the downstream node and the total number of objects to be allocated.
[0134] The device provided in the embodiment of the present invention can execute the above method embodiment. Its specific implementation principle and technical effects can be found in the above method embodiment, which will not be described in detail in this embodiment.
[0135] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the processing module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0136] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0137] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0138] Figure 8 A schematic diagram of the structure of a server provided in an embodiment of the present invention, such as Figure 8 As shown, the server of this embodiment includes a memory 30 and a processor 31, wherein:
[0139] The memory 30 is a memory for storing processor executable instructions;
[0140] Among them, the processor 31 is configured to: receive an allocation service call request sent by a first device, the allocation service call request includes a business allocation identifier and allocation rule data of an object to be allocated, the first device is a device corresponding to an object allocation node, and according to the correspondence between the stored business allocation identifier and the allocation rule, obtain the target allocation rule corresponding to the business allocation identifier of the object to be allocated, determine the number of objects to be allocated allocated to each downstream node according to the target allocation rule and the allocation rule data, and send the number of objects to be allocated allocated to each downstream node to the first device.
[0141] Optionally, the server of this embodiment may further include a receiver 32 and a transmitter 33. Optionally, the receiver 32 may be used to receive an allocation service call request sent by the first device, and the transmitter 33 may be used to send the number of the objects to be allocated allocated to each downstream node to the first device.
[0142] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-readable storage medium is run on a computer, the computer executes the method of the above embodiment.
[0143] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0144] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for determining the number of objects, characterized in that: Applicable to servers, including: Receiving an allocation service call request sent by a first device, the allocation service call request including a service allocation identifier and allocation rule data of an object to be allocated, the first device being a device corresponding to an object allocation node; According to the correspondence between the stored service allocation identifier and the allocation rule, a target allocation rule corresponding to the service allocation identifier of the object to be allocated is obtained; wherein the allocation rule data includes data of the downstream node of the first device that matches the target allocation rule; Determine the number of the objects to be allocated allocated to each downstream node according to the target allocation rule and the allocation rule data, and send the number of the objects to be allocated allocated to each downstream node to the first device; The method also includes: after receiving an allocation rule configuration request sent by the first device, pushing rule configuration information to the first device; in response to a user selecting an allocation rule operation through a rule configuration page, obtaining the allocation rule selected by the user for the first device, and the rule configuration page is displayed for the first device according to the rule configuration information; generating a corresponding business allocation identifier according to the allocation rule, and storing the corresponding relationship between the business allocation identifier and the allocation rule; and sending the business allocation identifier to the first device.
2. The method according to claim 1, characterized in that: The step of determining the number of the objects to be allocated to each downstream node according to the target allocation rule and the allocation rule data includes: Determine the allocation rule of each downstream node according to the target allocation rule, and determine the allocation rule data of each downstream node according to the allocation rule data; The number of the objects to be allocated allocated to each downstream node is determined according to the allocation rule of each downstream node, the allocation rule data of each downstream node and the total number of the objects to be allocated.
3. The method according to claim 1, characterized in that The allocation rule includes an allocation rule of at least one object type, and generating a corresponding service allocation identifier according to the allocation rule includes: Generate a corresponding business allocation identifier according to the allocation rule of each object type.
4. The method according to claim 1, characterized in that The rule configuration information includes allocation rule options and object allocation node options; The allocation rule included in the allocation rule option is at least one of the following configuration rules: Allocation according to the proportion of planned replenishment quantity of downstream nodes, allocation according to the historical purchase times of downstream nodes, allocation according to the purchase quantity within the historical time period of downstream nodes, allocation according to the average sales volume within the historical time period of downstream nodes, allocation according to the inventory quantity of downstream nodes, allocation according to the proportion of predicted average sales volume within the preset time of downstream nodes.
5. The method according to claim 4, characterized in that The rule configuration information also includes priority configuration options for downstream nodes.
6. The method according to claim 1, characterized in that The target allocation rule includes a plurality of configuration rules and priorities of downstream nodes, and determining the number of the objects to be allocated to each downstream node according to the target allocation rule and the allocation rule data includes: When the number of the objects to be allocated allocated to each downstream node cannot be determined according to the multiple configuration rules and the allocation rule data, the number of the objects to be allocated allocated to each downstream node is determined according to the priority of the downstream node and the total number of the objects to be allocated.
7. A device for determining the number of objects, characterized in that: Applicable to servers, including: A receiving module, configured to receive an allocation service call request sent by a first device, wherein the allocation service call request includes a service allocation identifier and allocation rule data of an object to be allocated, and the first device is a device corresponding to an object allocation node; An acquisition module, configured to acquire a target allocation rule corresponding to the business allocation identifier of the object to be allocated according to the correspondence between the stored business allocation identifier and the allocation rule; wherein the allocation rule data includes data of a downstream node of the first device that matches the target allocation rule; A processing module, configured to determine the number of the objects to be allocated to each downstream node according to the target allocation rule and the allocation rule data; A sending module, configured to send the number of the objects to be allocated allocated to each downstream node to the first device; The sending module is further configured to push rule configuration information to the first device after the receiving module receives the allocation rule configuration request sent by the first device; The processing module is further configured to, in response to a user selecting an allocation rule operation through a rule configuration page, obtain an allocation rule selected by the user for the first device, the rule configuration page being displayed by the first device according to the rule configuration information; generate a corresponding service allocation identifier according to the allocation rule, and store a corresponding relationship between the service allocation identifier and the allocation rule; The sending is further used to send the service allocation identifier to the first device.
8. A server, characterized in that: include: Memory and processor; A memory is used to store instructions executable by the processor; Wherein, the processor is configured to: Receiving an allocation service call request sent by a first device, the allocation service call request including a service allocation identifier and allocation rule data of an object to be allocated, the first device being a device corresponding to an object allocation node; According to the correspondence between the stored service allocation identifier and the allocation rule, a target allocation rule corresponding to the service allocation identifier of the object to be allocated is obtained; wherein the allocation rule data includes data of the downstream node of the first device that matches the target allocation rule; Determine the number of the objects to be allocated allocated to each downstream node according to the target allocation rule and the allocation rule data, and send the number of the objects to be allocated allocated to each downstream node to the first device; The processor is also configured to: after receiving an allocation rule configuration request sent by the first device, push rule configuration information to the first device; in response to a user selecting an allocation rule operation through a rule configuration page, obtain the allocation rule selected by the user for the first device, and the rule configuration page is displayed for the first device according to the rule configuration information; generate a corresponding business allocation identifier according to the allocation rule, and store the corresponding relationship between the business allocation identifier and the allocation rule; and send the business allocation identifier to the first device.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method for determining the number of objects as described in any one of claims 1 to 6.
10. A computer program product comprising: A computer program, characterized in that when the computer program is executed by a processor, it is used to implement the method for determining the number of objects as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for automatically distributing tasks
CN108229792A
Method and system for realizing intelligent replenishment of chain merchants
CN111401636A
Allocating inventory based on allocation priorities
US20030105684A1
Method, apparatus, and system for scheduling logistic resources
US20190026691A1