A resource allocation method and device
By obtaining resource change messages and combining actual transaction situations, resource amounts are intelligently allocated, which solves the problem of independent management of online storage units and unreasonable resource allocation, and realizes intelligent allocation and efficient utilization of resources.
Patent Information
- Application Number
- CN201911055041.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-31
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2039-10-31
AI Technical Summary
In the prior art, online storage units are independent of each other, and unified management or information interaction cannot be achieved, and the amount of resources is not intelligently allocated in combination with actual transaction conditions, resulting in unreasonable resource allocation.
By obtaining resource change messages, determine the corresponding storage unit, use the resource amount as the total resource amount of the object in all corresponding storage units, obtain the resource allocation ratio, calculate the resource allocation amount based on the total resource amount, and update the corresponding storage unit Resource quantity.
Intelligent resource allocation is realized, and the problems of high transaction volume but no resources are avoided and storage units with low transaction volume but occupying too many resources are improved, and resource utilization efficiency is improved.
Smart Images

Figure CN112749865B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a resource allocation method and device. Background Art
[0002] Currently, resource transactions have introduced an online and offline joint venture model, which is mainly reflected in the areas of object procurement, processing, distribution, and daily management. The same offline transaction venue may be associated with multiple online storage units, and the amount of resources set in the online storage unit will directly affect the user's transaction volume.
[0003] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems:
[0004] 1. Online storage units are independent of each other, and different resource management methods need to be set for different online storage units, making it impossible to achieve unified management or information exchange;
[0005] 2. The resource volume of each object in the online storage unit depends on manual settings, and the actual transaction situation of the object in each online storage unit is not taken into account, resulting in the phenomenon that some storage units have high transaction volumes but no resources, while some storage units have low transaction volumes but occupy more resources. Summary of the invention
[0006] In view of this, an embodiment of the present invention provides a resource allocation method and device, which can at least solve the problem in the prior art that the resource amount of objects in online storage units is not intelligently allocated and adjusted in combination with their actual transaction conditions.
[0007] To achieve the above object, according to one aspect of an embodiment of the present invention, a resource allocation method is provided, comprising:
[0008] Obtain a resource change message, and obtain a resource amount of the object in the first storage unit according to an identifier of the object in the resource change message and an identifier of the first storage unit where the object is located;
[0009] Determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units;
[0010] The resource allocation ratio of the object in each second storage unit is obtained, and the resource allocation amount of each second storage unit to the object is obtained in combination with the total resource amount, and the resource amount of the object in the corresponding second storage unit is updated based on the obtained resource allocation amount.
[0011] Optionally, obtaining the resource allocation ratio of the object in each second storage unit includes:
[0012] According to the identifier of each object in the first storage unit, historical transaction information of each object in each second storage unit within a predetermined historical period is obtained to obtain the total historical transaction amount of all objects in the first storage unit in each second storage unit;
[0013] The sum of all historical transaction totals is counted, the proportion of each historical transaction total in the sum of the historical transaction totals is determined, and the obtained proportion is used as the resource allocation ratio of the object in the corresponding second storage unit.
[0014] Optionally, obtaining the resource allocation ratio of the object in each second storage unit includes:
[0015] Acquire historical transaction information of the object in each second storage unit within a predetermined historical period, and obtain the historical transaction volume of the object in each second storage unit;
[0016] The sum of all historical transaction volumes is counted, the proportion of each historical transaction volume in the sum of the historical transaction volumes is determined, and the obtained proportion is used as the resource allocation ratio of the object in the corresponding second storage unit.
[0017] Optionally, after updating the resource amount of the object in the corresponding second storage unit based on the obtained resource allocation amount, the method further includes:
[0018] receiving transaction information on the object, and obtaining the transaction amount of the object in the transaction information; wherein the transaction information includes transaction information on the object in the first storage unit and / or transaction information on the object in at least one corresponding second storage unit;
[0019] The resource amount of the object in the first storage unit is updated using the transaction amount to obtain an updated resource amount, and then a resource change message for the object in the first storage unit is generated.
[0020] To achieve the above object, according to another aspect of an embodiment of the present invention, a resource allocation device is provided, comprising:
[0021] A message access module, used to obtain a resource change message, and obtain the resource amount of the object in the first storage unit according to the identifier of the object in the resource change message and the identifier of the first storage unit where the object is located;
[0022] A storage unit determination module, used to determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units;
[0023] The resource update module is used to obtain the resource allocation ratio of the object in each second storage unit, combine the total resources, obtain the resource allocation amount of each second storage unit for the object, and update the resource amount of the object in the corresponding second storage unit based on the obtained resource allocation amount.
[0024] Optionally, the resource updating module is used to:
[0025] According to the identifier of each object in the first storage unit, historical transaction information of each object in each second storage unit within a predetermined historical period is obtained to obtain the total historical transaction amount of all objects in the first storage unit in each second storage unit;
[0026] The sum of all historical transaction totals is counted, the proportion of each historical transaction total in the sum of the historical transaction totals is determined, and the obtained proportion is used as the resource allocation ratio of the object in the corresponding second storage unit.
[0027] Optionally, the resource updating module is used to:
[0028] Acquire historical transaction information of the object in each second storage unit within a predetermined historical period, and obtain the historical transaction volume of the object in each second storage unit;
[0029] The sum of all historical transaction volumes is counted, the proportion of each historical transaction volume in the sum of the historical transaction volumes is determined, and the obtained proportion is used as the resource allocation ratio of the object in the corresponding second storage unit.
[0030] Optionally, a message generation module is also included, for:
[0031] receiving transaction information on the object, and obtaining the transaction amount of the object in the transaction information; wherein the transaction information includes transaction information on the object in the first storage unit and / or transaction information on the object in at least one corresponding second storage unit;
[0032] The resource amount of the object in the first storage unit is updated using the transaction amount to obtain an updated resource amount, and then a resource change message for the object in the first storage unit is generated.
[0033] To achieve the above objective, according to another aspect of an embodiment of the present invention, a resource allocation electronic device is provided.
[0034] The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the resource allocation methods described above.
[0035] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the resource allocation methods described above is implemented.
[0036] According to the solution provided by the present invention, an embodiment of the above invention has the following advantages or beneficial effects: the resource system allocates a corresponding number of resources to update the resource quantity according to the resource allocation ratio of each second storage unit to the same object in the same first storage unit, thereby realizing the intelligent allocation of resources of the second storage unit; and through different management modes, the effect of "the more capable, the more work" or "information sharing" is achieved, avoiding the problem of no resources in storage units with higher transaction volume and resources occupied in storage units with lower transaction volume.
[0037] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0039] Figure 1 is a main flow chart of a resource allocation method according to an embodiment of the present invention;
[0040] Figure 2 is a flow chart of an optional resource allocation method according to an embodiment of the present invention;
[0041] Figure 3 is a flowchart of another optional resource allocation method according to an embodiment of the present invention;
[0042] Figure 4 is a flowchart of another optional resource allocation method according to an embodiment of the present invention;
[0043] Figure 5 is a schematic diagram of main modules of a resource allocation device according to an embodiment of the present invention;
[0044] Figure 6 is a schematic diagram of a main architecture of a specific resource allocation according to an embodiment of the present invention;
[0045] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0046] Figure 8 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0048] It should be noted that the first storage unit in the present invention can be an offline resource trading place or WMS (Warehouse Management System), supermarket, store, etc.; the second storage unit is an online resource trading platform or an online store set up in an APP application that can provide consumers with online browsing, selection, ordering, delivery and other services. The same first storage unit can correspond to multiple second storage units.
[0049] In addition, the objects involved in the present invention may be selectable objects such as snacks, books, fresh food, shoes and bags, cosmetics, clothing, etc. The same first storage unit may contain only one type of object or multiple types of objects, and the present invention does not limit this.
[0050] See also Figure 1 , which shows a main flow chart of a resource allocation method provided by an embodiment of the present invention, comprising the following steps:
[0051] S101: Obtain a resource change message, and obtain the resource amount of the object in the first storage unit according to an identifier of the object in the resource change message and an identifier of the first storage unit where the object is located;
[0052] S102: Determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units;
[0053] S103: Obtain the resource allocation ratio of the object in each second storage unit, and obtain the resource allocation amount of each second storage unit for the object in combination with the total resource amount, and update the resource amount of the object in the corresponding second storage unit based on the obtained resource allocation amount.
[0054] In the above implementation, for step S101, the resource system AIC (All-channel Inventory Control) is located between the first storage unit and the second storage unit, and is used to manage the resource amount of the object in the second storage unit based on the resource amount of the object in the first storage unit.
[0055] There are many situations that may cause changes in the object resources in the first storage unit (taking a store as an example):
[0056] 1) After the object in the purchase order is put into storage at the store, the resource change MQ (Message Queue) will be transmitted to the resource system;
[0057] 2) When users return goods to suppliers, these returned objects will also transmit resource change MQ to the resource system;
[0058] 3) Stores or objects in stores can be put on and taken off shelves;
[0059] 4) Inventory gains and losses;
[0060] 5) Locking and releasing;
[0061] 6)Move database;
[0062] 7) Transfer of catering raw materials;
[0063] 8) Processing plan;
[0064] …
[0065] A first storage unit may contain multiple objects, and the user may control the delisting and listing of objects in each storage unit (including the second storage unit and the first storage unit) through the object system, for example, newly listing object 1 and delisting object 2. Therefore, the resource change message may be a resource change for an existing object, or may be a message for delisting an object in the first storage unit or listing a new object. Whether an object is newly listed or delisted, its resources will change, for example, the resource amount of the delisted object will be cleared to 0, and the resource amount of the newly listed object will be the resource amount in the message.
[0066] The resource system is provided with a data access module for receiving the above resource change message. The system may also be provided with an object resource table for each first storage unit for storing the identifier of the first storage unit, the objects stored in the first storage unit, the identifier of each object, and the current resource quantity. When the system receives the MQ, it will update the resource quantity of the object in the table based on the resource quantity of the object in the first storage unit.
[0067] Taking an offline store as an example, the resource status of each object in the store is shown in Table 1:
[0068] Table 1 Object resource table in offline stores
[0069]
[0070] The same object may be traded in multiple first storage units, and the same second storage unit may trade the same type of objects, such as cups, belonging to different first storage units. To avoid object confusion, the setting of the object identifier in the first storage unit may include the identifier of the first storage unit where it is located, such as the identifier X-1 of object 1 in Table 1, where X is the identifier of store 1.
[0071] Therefore, after receiving the resource change message sent by the first storage unit, the system can obtain the identifier of the first storage unit where the object is located according to the identifier of the object in the message, and then obtain the resource amount of the object in the first storage unit.
[0072] In addition, the resource change message sent by the first storage unit to the resource system may also carry the identifier of the first storage unit, such as store 1-X. In this case, the identifier of the object may not include the identifier of the first storage unit. However, in order to avoid confusion between objects of the same type in different first storage units, in addition to the identifier of the object, the identifier of the first storage unit also needs to be considered in the subsequent resource allocation process.
[0073] For step S102, the same object in the first storage unit may be traded in multiple second storage units, and the transaction situations of the objects in the first storage unit in each second storage unit may be different. For example, the second storage unit 1 trades object 1 and object 2 in store 1, while the second storage unit 2 trades object 2 and object 3 in store 1.
[0074] For the convenience of query, the corresponding relationship between the first storage unit and the second storage unit can also be stored in the resource system, as shown in Table 2:
[0075] Table 2 Correspondence between the second storage unit and the first storage unit
[0076]
[0077] Taking store 1 as an example, the second storage unit 1, the second storage unit 2 and the second storage unit 3 can be considered as a whole, then the total amount of resources of these second storage units for a specific object in store 1 is equal to the amount of resources of the object in store 1, for example 100.
[0078] In actual operation, in addition to considering the actual resources of the object currently in the first storage unit, it is also necessary to consider the pre-occupied resources, in-transit resources, etc., and finally calculate the amount of resources that the user is allowed to trade (that is, the total amount of resources that can be traded).
[0079] However, since this situation requires many considerations, the resource amount of the second storage unit needs to be updated in real time. Therefore, the present invention is mainly explained with the former situation, that is, the resource amount of the object in the first storage unit = the total resource amount of the object in all second storage units corresponding to the first storage unit.
[0080] For step S103, a resource allocation ratio module is stored in the resource system to store the resource allocation ratio of each object in each first storage unit in each second storage unit. Among them, jmq, hadoop, kafka, rabbitmq, spark and other technologies can be selected for resource allocation, and the present invention does not limit this.
[0081] The resource allocation modes in the present invention are divided into two types: self-management mode and sharing mode:
[0082] 1. Self-management mode: You need to set the resource ratio for each second storage unit
[0083] The resource allocation ratios of each second storage unit for the same object in the same second storage unit are different, so the resource allocation amounts of the object allocated to each second storage unit are also different. The resource allocation ratio at this time reflects the actual transaction situation of each second storage unit for the same object (see the subsequent Figure 2 and Figure 3 As shown in the description), the resulting resource allocation corresponds to the actual transaction situation, achieving the effect of "those who are capable get more".
[0084] For example, as shown in Table 3, for the second storage unit 1, the obtained resource allocation amount is 100*0.2=20:
[0085] Table 3 Resource allocation of different second storage units for object 1
[0086]
[0087] 2. Shared mode: All second storage units share information, that is, the resource volume of the same object in the same first storage unit in all corresponding second storage units is the same
[0088] The resource allocation ratio of each second storage unit for the same object in the same second storage unit is the same and is 1 (different from the equal distribution). At this time, no matter which second storage unit the user trades in, the resources are equal and available, avoiding the problem of no resources during transactions, and there will be no problem of occupying resources for the second storage unit with lower transaction volume.
[0089] When a transaction / delisting / adding of an object in one of the storage units (including the second storage unit and the first storage unit) causes a resource change, it needs to be synchronized to other storage units in a timely manner to ensure that the resource amount of the object in each storage unit is synchronized. For example, as shown in Table 4, for the second storage unit 1, the resource allocation amount obtained at this time is: 100*1=100:
[0090] Table 4 Resource quantity of the second storage unit
[0091]
[0092]
[0093] From the above, it can be seen that the sum of resource allocation amounts of all second storage units for the same object in the same first storage unit in the self-management mode is the resource amount, while the resource allocation amounts in each second storage unit in the sharing mode are equal, thereby achieving resource sharing.
[0094] Some second storage units are equipped with independent resource management systems, for example, the first storage unit 2 independently manages resource pre-occupancy and release, etc. Therefore, after determining the resource allocation amount of these second storage units for the object, the resource system needs to exchange information with the resource management system of the second storage unit to achieve resource synchronization.
[0095] In addition, the determination of the resource allocation amount of each second storage unit for the same object in the same first storage unit can be performed in the resource trading system (such as 7FRESH). In addition, the user can also adjust the on-shelf and off-shelf status of each second storage unit through the storage unit management system:
[0096] 1) De-shelfing of the second storage unit
[0097] ① Self-management mode: The same object in the first storage unit can be traded in multiple second storage units. It is possible that the object is removed from one of the second storage units or one of the second storage units is removed from the shelf.
[0098] If the second storage unit is not taken off the shelf but the object is taken off the shelf, the resource system will add the resource amount of the object in the second storage unit to the resource amount of other second storage units according to the resource allocation ratio; if the second storage unit is taken off the shelf, the resource system needs to allocate the resource amount of all objects in the second storage unit belonging to the first storage unit according to the resource allocation ratio of each object in other second storage units.
[0099] ② Sharing mode: Since the resource amount of the object in the second storage unit corresponds to the resource amount in the first storage unit, the removal of one of the second storage units will not affect the change of the resource amount in other second storage units.
[0100] 2) Second storage unit is put on the shelf
[0101] ① Self-management mode: The resource allocation of the second storage unit for the object can be calculated from the transaction resource system according to a default ratio (e.g. 10%), and dynamically allocated to the resource amount of the newly listed second storage unit, while adaptively adjusting the resource amount of other second storage units for the object;
[0102] ② Sharing mode: directly synchronize the total amount of resources obtained to the resource amount of the newly-listed second storage unit to achieve information sharing.
[0103] It should be noted that for the self-management mode, since the sum of the resource allocation ratios of all second storage units (corresponding to the first storage unit) for the same object in the same first storage unit is 1, when one of the second storage units is removed from the shelf or a new second storage unit is put on the shelf, it is necessary to adaptively adjust the resource allocation ratio of the second storage unit, and then redetermine the resource allocation amount and update it.
[0104] According to the method provided in the above embodiment, the resource system allocates and updates the corresponding amount of resources according to the resource allocation ratio of each second storage unit to the same object in the same first storage unit, thereby realizing intelligent allocation of resources of the second storage unit; and through different management modes, the effect of "the more capable, the more work" or "information sharing" is realized, avoiding the problem of no resources in storage units with higher transaction volume or too many resources being occupied in storage units with lower transaction volume, thereby increasing the transaction volume of the object.
[0105] See also Figure 2 , shows a schematic diagram of an optional resource allocation method according to an embodiment of the present invention, comprising the following steps:
[0106] S201: Obtain a resource change message, and obtain the resource amount of the object in the first storage unit according to an identifier of the object in the resource change message and an identifier of the first storage unit where the object is located;
[0107] S202: Determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units;
[0108] S203: acquiring historical transaction information of each object in each second storage unit within a predetermined historical period according to the identifier of each object in the first storage unit, and obtaining the total historical transaction amount of all objects in the first storage unit in each second storage unit;
[0109] S204: Counting the sum of all historical transaction totals, determining the proportion of each historical transaction total in the sum of the historical transaction totals, and using the obtained proportion as the resource allocation ratio of the object in the corresponding second storage unit;
[0110] S205: Obtain the resource allocation amount of each second storage unit for the object according to the resource allocation ratio of the object in each second storage unit in combination with the total amount of resources, and update the resource amount of the object in the corresponding second storage unit based on the obtained resource allocation amount.
[0111] In the above embodiment, for steps S201, S202 and S205, see Figure 1 The description of steps S101 to S103 is not repeated here.
[0112] In the above implementation, for step S203, the resource transaction indicator analysis module in the resource system, with the first storage unit (such as a store) as the dimension, periodically pulls the resource transaction flow table from the data platform of each second storage unit, and extracts the resource transaction detail flow (i.e., historical transaction information) from the flow table to perform resource transaction analysis and statistics; wherein, the timing time can be configured, for example, extracting the order volume in the past week or month at 4 a.m. every day.
[0113] The resource transaction index analysis module exchanges information with the object system, the store WMS outbound management message system, the warehouse quotation batch resources, etc., performs data analysis on the transaction information, and obtains the historical transaction volume of each object in the same first storage unit in each second storage unit.
[0114] The following is a specific example in combination with Table 1 and Table 2:
[0115] Assume that in the past week, the historical transaction volume of each object in each second storage unit in store 1 is (as shown in Table 5):
[0116] Table 5 Historical transaction volume of each object in each second storage unit
[0117]
[0118] The second storage unit here is only the second storage unit corresponding to the store 1, and the same object in the store 1 can be traded in some of the second storage units. For example, object 3 is only traded in the second storage units 1 and 2. At this time, its historical transaction volume in the second storage unit 3 can be set to 0.
[0119] Taking the store as the dimension, the total historical transaction volume of all objects in the same store in each second storage unit is calculated, as shown in Table 6:
[0120] Table 6 Determination of the total historical transaction volume based on stores
[0121]
[0122] For step S204, the total historical transaction volume of all objects in the same first storage unit in all second storage units is counted. For example, in Table 6, the total historical transaction volume of all objects in store 1 in second storage units 1-3 is 140+80+60=280.
[0123] Calculate the total historical transaction volume of all objects in the same first storage unit in each second storage unit / the sum of the total historical transaction volume in all second storage units. For example, the proportions in Table 6 are: 140 / 280=50%, 80 / 280=28.6%, 60 / 280=21.4%, or directly compare the obtained total historical transaction volume, for example, 140:80:60=7:4:3.
[0124] The resource allocation ratios of all objects in the same first storage unit in each second storage unit are obtained through the obtained proportions, and the resource allocation ratios of all objects in the first storage unit in the same second storage unit are the same.
[0125] Furthermore, the duration for collecting historical transaction information may be determined for specific scenarios, for example, only historical transaction information during a promotional period may be selected to implement data analysis of transaction volumes in various promotional scenarios.
[0126] The method provided in the above embodiment takes the first storage unit as the dimension to determine the resource allocation ratios of all objects in the same first storage unit in each second storage unit, thereby realizing a unified setting of the resource allocation ratios of all objects in the same first storage unit. The obtained resource allocation ratios fully consider the actual transaction conditions of the objects in different second storage units, thereby achieving the effect of those who are more capable doing more work.
[0127] See also Figure 3 , shows a schematic diagram of another optional resource allocation method according to an embodiment of the present invention, comprising the following steps:
[0128] S301: Obtain a resource change message, and obtain the resource amount of the object in the first storage unit according to an identifier of the object in the resource change message and an identifier of the first storage unit where the object is located;
[0129] S302: Determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units;
[0130] S303: Acquire historical transaction information of the object in each second storage unit within a predetermined historical period, and obtain the historical transaction volume of the object in each second storage unit;
[0131] S304: Counting the sum of all historical transaction volumes, determining the proportion of each historical transaction volume in the sum of historical transaction volumes, and using the obtained proportion as the resource allocation ratio of the object in the corresponding second storage unit;
[0132] S305: Obtain the resource allocation amount of each second storage unit for the object according to the resource allocation ratio of the object in each second storage unit in combination with the total amount of resources, and update the resource amount of the object in the corresponding second storage unit based on the obtained resource allocation amount.
[0133] In the above embodiment, for steps S301, S302 and S305, see Figure 1 The description of steps S101 to S103 is not repeated here.
[0134] In the above implementation, for step S303, a plurality of objects may be stored in the first storage unit. In the same second storage unit, some objects may have a higher transaction volume while others may have a lower transaction volume. Therefore, a resource allocation ratio may be set for each object.
[0135] Taking the first storage unit and a specific object in the first storage unit as dimensions, the resource transaction indicator analysis module in the full resource system periodically extracts resource transaction detail flows (i.e., historical transaction information) from the data platforms of each second storage unit to obtain the historical transaction volume of the object in each second storage unit.
[0136] As shown in Table 7, taking store 1 in Table 1 and Table 2 as an example, the historical transaction volume of object 1 in each second storage unit in store 1 in the past week is obtained as follows:
[0137] Table 7 Historical transaction volume of object 1 in each second storage unit
[0138]
[0139] For step S304, the sum of historical transaction volumes of the same object in the same first storage unit in all second storage units is counted. For example, the sum of historical transaction volumes of object 1 in store 1 in all second storage units 1-3 in Table 7 is 50+10+20=80.
[0140] Calculate the historical transaction volume of the same object in the same first storage unit in each second storage unit / the sum of the historical transaction volumes in all second storage units. Taking Table 7 as an example, the obtained proportions are: 50 / 80=62.5%, 10 / 80=12.5%, 20 / 80=25%, or directly compare the obtained historical transaction volumes, for example, 50:10:20=5:1:2.
[0141] The resource allocation ratio of each object in the same first storage unit in the corresponding second storage unit can be determined according to the above method, so as to achieve personalized setting of the resource allocation ratio of each object.
[0142] The method provided in the above embodiment takes the first storage unit and the specific object stored in the first storage unit as dimensions, and only obtains the historical transaction volume of the object in each second storage unit, rather than the total historical transaction volume of all objects in the first storage unit in each second storage unit. Therefore, the obtained resource allocation ratio is only for the object, thereby realizing the personalized setting of the resource allocation ratio of the object in different second storage units.
[0143] See also Figure 4 , shows a schematic diagram of a flow chart of another optional resource allocation method according to an embodiment of the present invention, comprising the following steps:
[0144] S401: Obtain a resource change message, and obtain the resource amount of the object in the first storage unit according to an identifier of the object in the resource change message and an identifier of the first storage unit where the object is located;
[0145] S402: Determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units;
[0146] S403: Obtain resource allocation ratios of the object in each second storage unit, and obtain resource allocation amounts of each second storage unit for the object in combination with the total amount of resources, and update the resource amounts of the object in the corresponding second storage unit based on the obtained resource allocation amounts;
[0147] S404: receiving transaction information on the object, and obtaining a transaction amount of the object in the transaction information; wherein the transaction information includes transaction information on the object in the first storage unit and / or transaction information on the object in at least one corresponding second storage unit;
[0148] S405: Using the transaction volume, the resource volume of the object in the first storage unit is updated to obtain an updated resource volume, and then a resource change message for the object in the first storage unit is generated.
[0149] In the above embodiment, for steps S401 and S402, see Figure 1 For the description of steps S101 and S102, see step S403. Figure 1 Step S103, Figure 2 Steps S203 and S204 are shown. Figure 3 The description of steps S303 and S304 is not repeated here.
[0150] In the above implementation, in step S404, for the resource change message, in addition to Figure 1 In addition to the object warehousing, return and exchange, and object / storage unit on-shelf and off-shelf described in step S101, a resource change message may also be generated according to the transaction status of the object in each storage unit.
[0151] Taking a store as an example, the transaction of an object is usually carried out in the form of an order. For example, a total of 20 objects 1 in store 1 were shipped from the second storage unit 1 on August 25, 2019. The resource system can be associated with the order production center to monitor / obtain the transaction information of each object in each first storage unit and each second storage unit in real time to obtain the current transaction volume. Among them, for the same object in the same store, the transaction information includes the offline transaction information of the object in the store and the online transaction information of the object in the second storage unit corresponding to the store.
[0152] For step S405, no matter what kind of transaction the object is, it is finally completed in the first storage unit, so the outbound quantity of the object directly affects the resource quantity of the object in the first storage unit.
[0153] For example, object 1 is placed on the shelf of store 1 for trading. If a user purchases object 1, the resource quantity of the object in the second storage unit and the first storage unit will change accordingly. It should be noted that if offline orders are not considered, overselling may occur. That is, when a user places an order online, it is shown that there are resources, but the actual store may have sold out or the resource quantity is insufficient, which affects the user experience.
[0154] All transaction information will be sent to the resource system. The transaction volume of the object will be obtained by parsing the transaction information. According to the identifier of the object and the identifier of the first storage unit where the object is located, the resource volume of the object in the first storage unit will be deducted, and then a resource change message corresponding to the first storage unit and the object will be generated. After that, the resources of the object in each storage unit will be recalculated and synchronized.
[0155] In actual operation, resource synchronization can be divided into several situations:
[0156] 1) Only the order in the first storage unit
[0157] The resource amount needs to be updated according to the transaction volume in the order, and then the resource allocation ratio of the object in the first storage unit in the corresponding second storage unit is combined to re-determine the resource allocation amount of each second storage unit for the object and update it synchronously.
[0158] Furthermore, a certain resource allocation ratio can be set for the first storage unit. For example, there are 500 objects 1 in store 1, 100 of which are allocated to the first storage unit, and the remaining 400 are allocated by all second storage units corresponding to store 1. Therefore, for offline orders, the object transaction volume is updated by the allocated volume in store 1.
[0159] 2) Only the orders in the second storage unit
[0160] ① Sharing mode, all resource changes caused need to be synchronized to all other storage units; for example, there are a total of 20 objects 1 in transaction store 1 in the second storage unit 1, and the original number was 100. At this time, the resource quantity of the object in the second storage units 1-3 corresponding to store 1 is synchronized to 100-20=80.
[0161] ② Self-management mode: after one of the second storage units takes out an object, the resource amount of the object in other second storage units is adaptively adjusted. Taking the second storage unit 1 as an example, there are 20 objects 1 in transaction store 1 (originally 100). If the resource amount of the object in the original second storage units 2 and 3 is 200, then the total resource amount is 100-20+200+200=480. Then, according to the resource allocation ratio of each second storage unit for the object of 1:2:2, the resource allocation amount is recalculated, which is 96, 192 and 192 respectively.
[0162] In addition, you can also only change the resource quantity of the object in the storage unit where the transaction occurs. Similarly, for the above example, only change the resource quantity of the object in the second storage unit 1 to 100-20=80, and the resource quantity of the object in the other second storage units 2 and 3 remains 200.
[0163] The method provided in the above embodiment, when updating the resource quantity of an object in each second storage unit, if an object is removed from the warehouse in one of the second storage units, can generate a resource change message to update the resource quantity of the object only in the second storage unit or in all the second storage units according to its transaction volume, thereby realizing a cyclic update of the resource quantity of the object in the second storage unit.
[0164] See also Figure 5 , shows a schematic diagram of main modules of a resource allocation device 500 provided in an embodiment of the present invention, including:
[0165] The message access module 501 is used to obtain a resource change message, and obtain the resource amount of the object in the first storage unit according to the identifier of the object in the resource change message and the identifier of the first storage unit where the object is located;
[0166] A storage unit determination module 502 is used to determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units;
[0167] The resource update module 503 is used to obtain the resource allocation ratio of the object in each second storage unit, and obtain the resource allocation amount of each second storage unit for the object in combination with the total resource amount, and update the resource amount of the object in the corresponding second storage unit based on the obtained resource allocation amount.
[0168] Optionally, the resource updating module 503 is used to:
[0169] According to the identifier of each object in the first storage unit, historical transaction information of each object in each second storage unit within a predetermined historical period is obtained to obtain the total historical transaction amount of all objects in the first storage unit in each second storage unit;
[0170] The sum of all historical transaction totals is counted, the proportion of each historical transaction total in the sum of the historical transaction totals is determined, and the obtained proportion is used as the resource allocation ratio of the object in the corresponding second storage unit.
[0171] Optionally, the resource updating module 503 is used to:
[0172] Acquire historical transaction information of the object in each second storage unit within a predetermined historical period, and obtain the historical transaction volume of the object in each second storage unit;
[0173] The sum of all historical transaction volumes is counted, the proportion of each historical transaction volume in the sum of the historical transaction volumes is determined, and the obtained proportion is used as the resource allocation ratio of the object in the corresponding second storage unit.
[0174] Optionally, it further includes a message generating module 504 (not shown in the figure), which is used to:
[0175] receiving transaction information on the object, and obtaining the transaction amount of the object in the transaction information; wherein the transaction information includes transaction information on the object in the first storage unit and / or transaction information on the object in at least one corresponding second storage unit;
[0176] The resource amount of the object in the first storage unit is updated using the transaction amount to obtain an updated resource amount, and then a resource change message for the object in the first storage unit is generated.
[0177] In addition, the specific implementation content of the device described in the embodiment of the present invention has been described in detail in the method described above, so the repeated content will not be described again here.
[0178] See also Figure 6 , showing a schematic diagram of the overall architecture of online and offline transactions as an example, including a data platform, an object system, an order production center, a resource system, and a resource management system of multiple online storage units; wherein:
[0179] 1) Data platform, used to store transaction records of each object in each online storage unit and connected to the resource transaction indicator analysis module in the resource system;
[0180] 2) Object system, which is used to manage the online storage units, offline storage units, and the on-shelf and off-shelf status of objects in each storage unit;
[0181] 3) Order production center, used to receive orders for objects in various offline storage units and online storage units;
[0182] 4) Resource system, including resource allocation ratio module, message intervention module, resource transaction index analysis module, resource update module (including message parsing and processing module, message persistence module and storage unit resource synchronization module)
[0183] ① Resource allocation ratio module, which is used to manage the resource allocation ratio of objects in a unified offline storage unit in each online storage unit;
[0184] ②Message access module, mainly used to receive resource change messages of objects, including user order deduction resource interface, object status change MQ listener, and store WMS message MQ listener;
[0185] ③ Resource transaction indicator analysis module, which is used to extract resource transaction flow details from the data platform and count the historical transaction volume of the same object in the same offline storage unit in the corresponding online storage units;
[0186] ④ A message parsing and processing module, which is used to determine the resource allocation amount in each online storage unit according to the resource amount of the object in the offline storage unit and the resource allocation ratio of the object in the online storage unit corresponding to the offline storage unit;
[0187] ⑤ The message persistence module saves the resource allocation of each online storage unit for the object into the database;
[0188] ⑥ Storage unit resource synchronization module, used to synchronize the resource allocation of each online storage unit for the object to the resource modules of each online storage unit;
[0189] 5) The resource management system of the online storage unit is used to receive the resource amount transmitted by the resource system to the resource module of the corresponding online storage unit for updating.
[0190] Figure 7 An exemplary system architecture 700 is shown in which embodiments of the present invention may be applied.
[0191] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705 (just an example). Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0192] The user can use the terminal devices 701, 702, 703 to interact with the server 705 through the network 704 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 701, 702, 703.
[0193] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0194] The server 705 may be a server that provides various services, such as a backend management server (only for example) that supports shopping websites browsed by users using the terminal devices 701, 702, and 703. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only for example) to the terminal device.
[0195] It should be noted that the resource allocation method provided in the embodiment of the present invention is generally executed by the server 705 , and accordingly, the resource allocation device is generally disposed in the server 705 .
[0196] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0197] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0198] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RMI) 803. In the RMI 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RMI 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0199] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as an LXN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0200] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.
[0201] It should be noted that 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 above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RRAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0202] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0203] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a message access module, a storage unit determination module, and a resource update module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the resource update module may also be described as a "resource allocation and synchronization module".
[0204] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0205] Obtain a resource change message, and obtain a resource amount of the object in the first storage unit according to an identifier of the object in the resource change message and an identifier of the first storage unit where the object is located;
[0206] Determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units;
[0207] The resource allocation ratio of the object in each second storage unit is obtained, and the resource allocation amount of each second storage unit to the object is obtained in combination with the total resource amount, and the resource amount of the object in the corresponding second storage unit is updated based on the obtained resource allocation amount.
[0208] According to the technical solution of the embodiment of the present invention, the resource system allocates and updates the corresponding amount of resources according to the resource allocation ratio of each second storage unit to the same object in the same first storage unit, thereby realizing the intelligent allocation of resources of the second storage unit; and through different management modes, the effect of "the more capable, the more work" or "information sharing" is realized, avoiding the problem of no resources in storage units with higher transaction volumes or too many resources being occupied in storage units with lower transaction volumes.
[0209] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A resource allocation method, characterized in that: include: Obtain a resource change message, and obtain a resource amount of the object in the first storage unit according to an identifier of the object in the resource change message and an identifier of the first storage unit where the object is located; Determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units; Obtaining the resource allocation ratio of the object in each second storage unit, combining the total amount of resources, obtaining the resource allocation amount of each second storage unit for the object, and updating the resource amount of the object in the corresponding second storage unit based on the obtained resource allocation amount; wherein obtaining the resource allocation ratio of the object in each second storage unit includes: According to the identifier of each object in the first storage unit, historical transaction information of each object in each second storage unit within a predetermined historical period is obtained to obtain the total historical transaction amount of all objects in the first storage unit in each second storage unit; or historical transaction information of the object in each second storage unit within a predetermined historical period is obtained to obtain the historical transaction amount of the object in each second storage unit; The sum of all historical transaction volumes is counted, the proportion of each historical transaction volume in the sum of the historical transaction volumes is determined, and the obtained proportion is used as the resource allocation ratio of the object in the corresponding second storage unit.
2. The method according to claim 1, characterized in that After the resource amount of the object in the corresponding second storage unit is updated based on the obtained resource allocation amount, the method further includes: receiving transaction information on the object, and obtaining a transaction volume of the object in the transaction information; wherein the transaction information includes transaction information on the object in the first storage unit and / or transaction information on the object in at least one corresponding second storage unit; The resource amount of the object in the first storage unit is updated using the transaction amount to obtain an updated resource amount, and then a resource change message for the object in the first storage unit is generated.
3. A resource allocation device, characterized in that: include: A message access module, used to obtain a resource change message, and obtain the resource amount of the object in the first storage unit according to the identifier of the object in the resource change message and the identifier of the first storage unit where the object is located; A storage unit determination module, used to determine a second storage unit corresponding to the first storage unit, and use the resource amount as the total amount of resources of the object in all corresponding second storage units; A resource update module, used to obtain the resource allocation ratio of the object in each second storage unit, and obtain the resource allocation amount of each second storage unit to the object in combination with the total resource amount, and update the resource amount of the object in the corresponding second storage unit based on the obtained resource allocation amount; wherein, obtaining the resource allocation ratio of the object in each second storage unit includes: According to the identifier of each object in the first storage unit, historical transaction information of each object in each second storage unit within a predetermined historical period is obtained to obtain the total historical transaction amount of all objects in the first storage unit in each second storage unit; or historical transaction information of the object in each second storage unit within a predetermined historical period is obtained to obtain the historical transaction amount of the object in each second storage unit; The sum of all historical transaction volumes is counted, the proportion of each historical transaction volume in the sum of the historical transaction volumes is determined, and the obtained proportion is used as the resource allocation ratio of the object in the corresponding second storage unit.
4. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-2.
5. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
A method and platform for automatically allocate commodity inventory
CN109472443A