Cost information determination method, device, electronic device and computer readable medium
By processing unprocessed flow data and inventory information under the new retail model, and determining inventory batch and sub-inventory cost information, the problem of inaccurate cost information under the new retail model is solved and more accurate cost calculations are achieved.
Patent Information
- Application Number
- CN202110472499.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-29
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-04-29
AI Technical Summary
Under the new retail model, all links from suppliers to warehouses and from warehouses to physical stores have an impact on the cost of goods, resulting in inaccurate cost information when using the individual pricing method.
By responding to the unprocessed flow data within the target time period, the inventory information is determined, and based on the total quantity and flow data of the inventory batch, the cost information of the target inventory information and sub-inventory information is determined, the inventory information is updated and daily settlement reports are generated, improving Accuracy of cost information.
It improves the accuracy of cost information, ensures accurate calculation of commodity costs under the new retail model, and reduces the impact of cost changes caused by unprocessed flow data.
Smart Images

Figure CN113283829B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a cost information determination method, device, electronic device, and computer-readable medium. Background Art
[0002] With the development of computer-related technology, the cost settlement method of the retail industry has undergone a major change, that is, the transition from manual calculation to computerization. At present, the existing technology often adopts the individual pricing method to achieve the cost settlement of items.
[0003] However, when the above method is adopted, the following technical problems often occur:
[0004] Under the new retail model, each link from supplier to warehouse and from warehouse to physical store will have an impact on the cost of goods. The use of individual pricing method will lead to inaccurate cost of goods. Summary of the invention
[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0006] Some embodiments of the present disclosure propose a cost information determination method, apparatus, electronic device, and computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.
[0007] In a first aspect, some embodiments of the present disclosure provide a method for determining cost information, the method comprising: in response to determining that there is unprocessed transaction data within a target time period, determining inventory information based on the transaction data; in response to determining that the total amount of an inventory batch corresponding to the inventory information is greater than a preset threshold, determining target inventory information in the inventory information corresponding to the transaction data, wherein the target inventory information includes sub-inventory information of at least one inventory batch of the same item; and determining cost information of items in the inventory batch corresponding to the sub-inventory information of the at least one inventory batch.
[0008] Optionally, the method further includes: updating the inventory information, and backing up the cost information and the updated inventory information.
[0009] Optionally, the method further comprises: generating a daily report based on the cost information and the updated inventory information.
[0010] Optionally, in response to determining that there is unprocessed transaction data within the target time period, before determining inventory information based on the transaction data, the method further includes: in response to the current time point being the same as the target time point, determining whether there is unprocessed transaction data within the target time period.
[0011] Optionally, the method further includes: checking the updated inventory information; in response to the updated inventory information failing the check, determining difference information; in response to re-determining the cost information, determining updated cost information based on the flow data, the target inventory information and the difference information.
[0012] Optionally, the sub-inventory information in the sub-inventory information of the above-mentioned at least one batch includes: the quantity of items entering the warehouse, the attribute values of items entering the warehouse; and the cost information of the items in the inventory batch corresponding to the sub-inventory information of the above-mentioned at least one inventory batch, including: selecting a sub-inventory information from the sub-inventory information of the above-mentioned at least one inventory batch as the sub-inventory information to be processed; and using the sub-inventory information that is not selected in the sub-inventory information of the above-mentioned at least one inventory batch as candidate sub-inventory information to obtain a set of candidate sub-inventory information.
[0013] Optionally, the above-mentioned determination of the cost information of the items in the inventory batch corresponding to the sub-inventory information of the above-mentioned at least one inventory batch further includes: executing the following processing steps based on the above-mentioned sub-inventory information to be processed, the above-mentioned candidate sub-inventory information set and the above-mentioned transaction data: determining the entry cost information and the exit cost information based on the above-mentioned transaction data and the item entry quantity and item entry attribute values included in the above-mentioned sub-inventory information to be processed; in response to determining that the item entry quantity included in the above-mentioned sub-inventory information to be processed is greater than or equal to the item exit quantity included in the transaction data, updating the item exit quantity included in the sub-inventory information to be processed based on the item exit quantity included in the transaction data, and ending the above-mentioned processing steps.
[0014] Optionally, the above-mentioned determination of the cost information of the items in the inventory batch corresponding to the sub-inventory information of the above-mentioned at least one inventory batch further includes: in response to determining that the number of items entering the sub-inventory information to be processed is less than the number of items leaving the sub-inventory information included in the transaction data, setting the number of items entering the sub-inventory information to be processed to a preset value; determining the difference between the number of items leaving the sub-inventory information included in the transaction data and the number of items entering the sub-inventory information to be processed as the number of items leaving the sub-inventory information in the transaction data; selecting candidate sub-inventory information from the candidate sub-inventory information set as the sub-inventory information to be processed; reorganizing the candidate sub-inventory information not selected in the candidate sub-inventory information set into a candidate sub-inventory information set; and re-executing the above-mentioned processing steps.
[0015] In a second aspect, some embodiments of the present disclosure provide a cost information determination device, the device comprising: a first determination unit, configured to, in response to determining that there is unprocessed transaction data within a target time period, determine inventory information based on the transaction data; a second determination unit, configured to, in response to determining that the total amount of an inventory batch corresponding to the inventory information is greater than a preset threshold, determine target inventory information in the inventory information corresponding to the transaction data, wherein the target inventory information includes sub-inventory information of at least one inventory batch of the same item; and a third determination unit, configured to determine the cost information of the items in the inventory batch corresponding to the sub-inventory information of the at least one inventory batch.
[0016] Optionally, the device further includes: updating the inventory information, and backing up the cost information and the updated inventory information.
[0017] Optionally, the above-mentioned device also includes: generating a daily report based on the above-mentioned cost information and the above-mentioned updated inventory information.
[0018] Optionally, in response to determining that there is unprocessed transaction data within the target time period, before determining inventory information based on the transaction data, the device further includes: in response to the current time point being the same as the target time point, determining whether there is unprocessed transaction data within the target time period.
[0019] Optionally, the device further comprises: checking the updated inventory information; in response to the updated inventory information failing the check, determining difference information; in response to re-determining the cost information, determining updated cost information based on the flow data, the target inventory information and the difference information.
[0020] Optionally, the sub-inventory information in the sub-inventory information of the above-mentioned at least one batch includes: the quantity of items entering the warehouse, and the attribute values of items entering the warehouse; and the third determination unit is further configured to: select a sub-inventory information from the sub-inventory information of the above-mentioned at least one inventory batch as the sub-inventory information to be processed; and use the sub-inventory information that is not selected in the sub-inventory information of the above-mentioned at least one inventory batch as the candidate sub-inventory information to obtain a set of candidate sub-inventory information.
[0021] Optionally, the third determination unit is further configured to: perform the following processing steps according to the sub-inventory information to be processed, the candidate sub-inventory information set and the flow data: determine the entry cost information and the exit cost information according to the flow data and the item entry quantity and item entry attribute values included in the sub-inventory information to be processed; in response to determining that the item entry quantity included in the sub-inventory information to be processed is greater than or equal to the item exit quantity included in the flow data, update the item exit quantity included in the sub-inventory information to be processed according to the item exit quantity included in the flow data, and end the above processing steps.
[0022] Optionally, the third determination unit is further configured to: in response to determining that the number of items entering the sub-inventory information to be processed is less than the number of items leaving the inventory included in the transaction data, set the number of items entering the sub-inventory information to be processed to a preset value; determine the difference between the number of items leaving the inventory included in the transaction data and the number of items entering the sub-inventory information to be processed as the number of items leaving the inventory in the transaction data; select candidate sub-inventory information from the candidate sub-inventory information set as the sub-inventory information to be processed; reorganize the candidate sub-inventory information not selected in the candidate sub-inventory information set into a candidate sub-inventory information set; and re-execute the above processing steps.
[0023] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the above-mentioned first aspect.
[0024] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the above-mentioned first aspect is implemented.
[0025] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the cost information obtained by the cost information determination method of some embodiments of the present disclosure is more accurate. Specifically, the reason for the inaccuracy of the generated cost information is that compared with the traditional retail model, in the new retail model, from the supplier to the warehouse and from the warehouse to the physical store, each intermediate replacement will affect the cost of the goods, so the cost information determined by the individual pricing method is not accurate enough. Based on this, the cost information determination method of some embodiments of the present disclosure, first, in response to determining that there is unprocessed flow data in the target time period, according to the above flow data, determines the inventory information. In actual situations, there are often some flow data that cannot be processed in time, and the flow data that cannot be processed in time will affect the various links of the item processing, which will inevitably change the cost of the item. Therefore, in order to ensure the accuracy of the cost information determined subsequently, it is necessary to process the unprocessed flow data. Secondly, in response to determining that the total amount of the inventory batch corresponding to the above inventory information is greater than the preset threshold, determine the target inventory information corresponding to the above flow data in the above inventory information, wherein the above target inventory information includes the sub-inventory information of at least one inventory batch of the same item. In actual situations, only when there are items required by the running data in the inventory, can the items be transferred according to the running data, and then the cost can be determined. Therefore, it is first necessary to determine whether the total amount of the inventory batch corresponding to the inventory information is greater than the preset threshold. When the total amount of the inventory batch corresponding to the inventory information is greater than the preset threshold, that is, there are items corresponding to the running data in the inventory, the target inventory information corresponding to the running data is determined. Finally, the cost information of the items in the inventory batch corresponding to the sub-inventory information of at least one of the above inventory batches is determined. In actual situations, there are often multiple batches of the same item in the inventory. And the cost information of different batches is not the same due to different purchase time and sales time. Therefore, it is necessary to separately determine the cost information of the inventory corresponding to the sub-inventory information of different batches corresponding to the running data. In this way, the accuracy of the generated cost information is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0027] Figure 1 is a schematic diagram of an application scenario of the cost information determination method of some embodiments of the present disclosure;
[0028] Figure 2 is a flow chart of some embodiments of the cost information determination method according to the present disclosure;
[0029] Figure 3 This is a schematic diagram of the daily report;
[0030] Figure 4 are flow charts of other embodiments of the cost information determination method according to the present disclosure;
[0031] Figure 5 is a schematic diagram of the structure of some embodiments of the cost information determination device according to the present disclosure;
[0032] Figure 6 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0033] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0034] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0035] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0036] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0037] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0038] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0039] Figure 1 It is a schematic diagram of an application scenario of the cost information determination method of some embodiments of the present disclosure.
[0040] exist Figure 1In the application scenario, first, the computing device 101 can respond to determining that there is unprocessed flow data 102 within the target time period (as an example, the flow data can be “[flow data number: 10001, flow data status identification value: “0”, document type: purchase order, item identification value: G1012, item quantity: 200 pieces]”), and determine the inventory information 103 according to the flow data 102 (as an example, the inventory information can be [{batch: batch 1, item identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 2, item identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 3, item identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 4, item identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 5, item identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 6, item identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 7, item identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 8, item identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 9, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 10, item status identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 10
[0045] ; secondly, the computing device 101 may determine the target inventory information 104 in the inventory information 103 corresponding to the above-mentioned flow data 102 in response to determining that the total amount of the inventory batch corresponding to the above-mentioned inventory information 103 is greater than a preset threshold value (as an example, the above-mentioned preset threshold value may be "0"). The above-mentioned target inventory information 104 includes at least one sub-inventory information 105 of the same item in the inventory batch; finally, the computing device 101 may determine the cost information 106 of the items in the inventory batch corresponding to the above-mentioned sub-inventory information 105 of the at least one inventory batch (as an example, the above-mentioned cost information may be [100 yuan, 640 yuan, 120 yuan]).
[0041] It should be noted that the computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.
[0042] It should be understood that Figure 1 The number of computing devices in the embodiment is only illustrative. Any number of computing devices may be provided according to implementation requirements.
[0043] Continue to refer Figure 2 , shows a process 200 of some embodiments of the cost information determination method according to the present disclosure. The cost information determination method comprises the following steps:
[0044] Step 201, in response to determining that there is unprocessed transaction data within a target time period, determine inventory information based on the transaction data.
[0045] In some embodiments, the execution subject of the cost information determination method (eg Figure 1 The computing device 101 shown in the figure can determine inventory information based on the flow data in response to determining that there is unprocessed flow data within the target time period. The flow data can represent an order. The inventory information can be inventory-related information of an item corresponding to the flow data. The execution subject can determine whether the flow data is unprocessed based on the flow data status identification value of the flow data. The flow data status identification value is used to characterize the state of the flow data. The execution subject can obtain inventory-related information of an item corresponding to the item identification value from a database based on the item identification value corresponding to the flow data, thereby determining the inventory information.
[0046] As an example, the target time period may be the time period from the last time the unprocessed running data was processed to the preset time point. The preset time point may be the time point after the preset time length from the last time the unprocessed running data was processed. The preset time length may be 24 hours. The preset time point may be 20:00 on April 7, 2021. The target time period may be 20:00 on April 6, 2021 to 20:00 on April 7, 2021.
[0047] As another example, the above-mentioned transaction data can be "[transaction data number: 10001, transaction data status identification value: "0", document type: purchase order, item identification value: G1012, item quantity: 200 pieces]". Among them, the transaction data status identification value: "0" can indicate that the transaction data is unprocessed transaction data. The above-mentioned transaction data status value can also be "1". The transaction data status value can also be "1" to indicate that the transaction data is processed transaction data. The above-mentioned item quantity can represent the order quantity of items corresponding to the transaction data. The above-mentioned document types can include but are not limited to any one of the following: purchase order, purchase return order, sales order, sales return order, sales rejection order, sales exchange incoming order, sales exchange outgoing order, damage outgoing order, inventory surplus order, inventory shortage order, collection order, transfer outgoing order and transfer incoming order.
[0048] As another example, the execution subject may obtain the inventory-related information of the item corresponding to the item identification value from the database through a SQL (Structured Query Language) statement to determine the inventory information. The SQL statement may be: "SELECT * FROM database.data table WHERE item identification value = G1012". The inventory information may be [{batch: batch 1, item identification value: G102, item quantity: 20 pieces, storage price: 20 yuan}, {batch: batch 2, item identification value: G102, item quantity: 20 pieces, storage price: 21 yuan}, {batch: batch 3, item identification value: G102, item quantity: 160 pieces, storage price: 19 yuan}, {batch: batch 4, item identification value: G102, item quantity: 20 pieces, storage price: 21 yuan}].
[0049] Step 202, in response to determining that the total amount of the inventory batch corresponding to the inventory information is greater than a preset threshold, determine the target inventory information in the inventory information corresponding to the flow data.
[0050] In some embodiments, the execution entity may determine the target inventory information corresponding to the transaction data in the inventory information in response to determining that the total amount of the inventory batch corresponding to the inventory information is greater than a preset threshold. The target inventory information may include sub-inventory information of at least one inventory batch of the same item. The sum of the number of items included in each sub-inventory information of the at least one inventory batch is the same as the number of items included in the transaction data. For example, the preset threshold may be 0.
[0051] Optionally, the sub-inventory information in the at least one batch of sub-inventory information includes: the quantity of items entering the warehouse and an attribute value of the items entering the warehouse, wherein the attribute value of the items entering the warehouse may represent the cost price of the items when entering the warehouse.
[0052] As an example, the above target inventory information can be [{Batch: Batch 1, item identification value: G102, item quantity: 20 pieces, inventory price: 20 yuan}, {Batch: Batch 2, item identification value: G102, item quantity: 20 pieces, inventory price: 21 yuan}, {Batch: Batch 3, item identification value: G102, item quantity: 160 pieces, inventory price: 19 yuan}].
[0053] As another example, the above target inventory information can be [{Batch: Batch 2, item identification value: G102, item quantity: 20 pieces, inventory price: 21 yuan}, {Batch: Batch 3, item identification value: G102, item quantity: 160 pieces, inventory price: 19 yuan}, {Batch: Batch 4, item identification value: G102, item quantity: 20 pieces, inventory price: 21 yuan}].
[0054] As another example, the above target inventory information can be [{Batch: Batch 1, item identification value: G102, item quantity: 20 pieces, inventory price: 20 yuan}, {Batch: Batch 3, item identification value: G102, item quantity: 160 pieces, inventory price: 19 yuan}, {Batch: Batch 4, item identification value: G102, item quantity: 20 pieces, inventory price: 21 yuan}].
[0055] Step 203: determine cost information of items in the inventory batch corresponding to the sub-inventory information of at least one inventory batch.
[0056] In some embodiments, the execution entity may determine the cost information of the items in the inventory batch corresponding to the sub-inventory information of at least one inventory batch by the following formula:
[0057] C = SIN x (SIP - CP).
[0058] Wherein, C represents the cost information of the items in the inventory batch corresponding to the sub-inventory information. SIN represents the number of items included in the sub-inventory information. SIP represents the entry price included in the sub-inventory information. CP represents the real-time cost of the items corresponding to the item identification value included in the sub-inventory information.
[0059] As an example, the target inventory information may be [{batch: batch 1, item identification value: G102, item quantity: 20 pieces, entry price: 20 yuan}, {batch: batch 3, item identification value: G102, item quantity: 160 pieces, entry price: 19 yuan}, {batch: batch 4, item identification value: G102, item quantity: 20 pieces, entry price: 21 yuan}]. The real-time cost of the item corresponding to the item identification value included in the sub-inventory information may be 15 yuan. The cost information may be [100 yuan, 640 yuan, 120 yuan].
[0060] Optionally, the above inventory information is updated, and the above cost information and updated inventory information are backed up.
[0061] The execution entity may update the quantity of items in the target inventory information included in the inventory information to a preset quantity value to update the inventory information. The execution entity may back up the cost information and the updated inventory information to a backup database. The backup database may be used to store backup data.
[0062] As an example, the above-mentioned preset quantity value may be 0.
[0063] Optionally, a daily report is generated based on the cost information and the updated inventory information.
[0064] The execution entity may import the cost information and the updated inventory information into a preset template report to generate the daily report. The template report may be an electronic spreadsheet.
[0065] As an example, the above daily report can be Figure 3 The above daily report may include: batch 301, item identification value 302, item quantity 303, storage price 304, cost information 305 and real-time cost 306.
[0066] Optionally, first, the execution subject may also check the updated inventory information. The execution subject may check the updated inventory information by comparing the updated inventory information with the difference in the data in the inventory management system. The inventory management system may include but is not limited to: WMS (Warehouse Management System), financial inventory management system and ERP (Enterprise Resource Planning) system. Secondly, the execution subject may determine the difference information in response to the updated inventory information failing to pass the check. The difference information may characterize the difference between the updated inventory information and the data in the inventory management system. For example, the entry price of "Batch 1" stored in the inventory management system is 19.5 yuan. The entry price of "Batch 1" in the updated inventory information is 20 yuan. Then the difference information may be "[Batch: Batch 2, entry price: 19.5 yuan, status: redetermine cost information]". Finally, the execution subject may determine the updated cost information in response to the redetermining of the cost information according to the flow data, the target inventory information and the difference information. The execution subject may determine whether to redetermine the cost information according to the state of the difference information. The execution subject may first update the target inventory information according to the difference information. For example, the entry price of the sub-target inventory information of the batch "Batch 1" in the target inventory information may be updated to 19.5 yuan. Then, the updated cost information is determined by the formula in step 203.
[0067] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the cost information obtained by the cost information determination method of some embodiments of the present disclosure is more accurate. Specifically, the reason for the inaccuracy of the generated cost information is that compared with the traditional retail model, in the new retail model, from the supplier to the warehouse and from the warehouse to the physical store, each intermediate replacement will affect the cost of the goods, so the cost information determined by the individual pricing method is not accurate enough. Based on this, the cost information determination method of some embodiments of the present disclosure, first, in response to determining that there is unprocessed flow data in the target time period, according to the above flow data, determines the inventory information. In actual situations, there are often some flow data that cannot be processed in time, and the flow data that cannot be processed in time will affect the various links of the item processing, which will inevitably change the cost of the item. Therefore, in order to ensure the accuracy of the cost information determined subsequently, it is necessary to process the unprocessed flow data. Secondly, in response to determining that the total amount of the inventory batch corresponding to the above inventory information is greater than the preset threshold, determine the target inventory information corresponding to the above flow data in the above inventory information, wherein the above target inventory information includes the sub-inventory information of at least one inventory batch of the same item. In actual situations, only when there are items required by the running data in the inventory, can the items be transferred according to the running data, and then the cost can be determined. Therefore, it is first necessary to determine whether the total amount of the inventory batch corresponding to the inventory information is greater than the preset threshold. When the total amount of the inventory batch corresponding to the inventory information is greater than the preset threshold, that is, there are items corresponding to the running data in the inventory, the target inventory information corresponding to the running data is determined. Finally, the cost information of the items in the inventory batch corresponding to the sub-inventory information of at least one of the above inventory batches is determined. In actual situations, there are often multiple batches of the same item in the inventory. And the cost information of different batches is not the same due to different purchase time and sales time. Therefore, it is necessary to separately determine the cost information of the inventory corresponding to the sub-inventory information of different batches corresponding to the running data. In this way, the accuracy of the generated cost information is greatly improved.
[0068] Further references Figure 4 , which shows a process 400 of another embodiment of the cost information determination method. The process 400 of the cost information determination method includes the following steps:
[0069] Step 401, in response to the current time point being the same as the target time point, determining whether there is unprocessed pipeline data within the target time period.
[0070] In some embodiments, the execution subject of the cost information determination method (eg Figure 1The computing device 101 shown in the figure can determine whether there is unprocessed running water data within the target time period in response to the current time point being the same as the target time point. The above-mentioned target time point can be a fixed time point every day. The above-mentioned target time period can be a time period from the last time the unprocessed running water data was processed to a preset time point. The above-mentioned preset time point can be a time point after a preset time length from the last time the unprocessed running water data was processed. The above-mentioned execution subject can determine whether there is unprocessed running water data within the target time period by executing SQL statements on the running water data database and returning the results.
[0071] As an example, the target time point may be 21:00 every day. The preset time period may be 24 hours.
[0072] As another example, the above SQL statement may be: "SELECT * FRORM running data database WHERE running data state identification value == "0" AND running data generation time BETWEEN target time period".
[0073] As another example, the above return result may be "NULL", which means that there is no unprocessed flow data in the above target time period.
[0074] Step 402, in response to determining that there is unprocessed transaction data within the target time period, determine inventory information based on the transaction data.
[0075] Step 403, in response to determining that the total amount of the inventory batch corresponding to the inventory information is greater than a preset threshold, determining target inventory information in the inventory information corresponding to the flow data.
[0076] In some embodiments, the specific implementation of steps 402-403 and the technical effects thereof can be referred to in Figure 2 The corresponding steps 201 and 202 in the embodiments are not described in detail here.
[0077] Step 404: Select one sub-inventory information from the sub-inventory information of at least one inventory batch as the sub-inventory information to be processed.
[0078] In some embodiments, the execution entity may randomly select a sub-inventory information from the sub-inventory information of the at least one inventory batch as the sub-inventory information to be processed.
[0079] As an example, the execution entity may randomly select a sub-inventory information from the sub-inventory information of the at least one inventory batch. For example, the sub-inventory information may be [{batch: batch 1, item identification value: G102, item quantity: 20 pieces, entry price: 20 yuan}, {batch: batch 2, item identification value: G102, item quantity: 20 pieces, entry price: 21 yuan}, {batch: batch 3, item identification value: G102, item quantity: 160 pieces, entry price: 19 yuan}]. The above sub-inventory information to be processed may be {batch: batch 1, item identification value: G102, item quantity: 20 pieces, entry price: 20 yuan}.
[0080] Optionally, the execution entity may select sub-inventory information with the smallest timestamp from the sub-inventory information of the at least one inventory batch according to the inventory entry timestamp corresponding to the sub-inventory information in the sub-inventory information of the at least one inventory batch, as the sub-inventory information to be processed.
[0081] Step 405: Sub-inventory information that is not selected from the sub-inventory information of at least one inventory batch is used as candidate sub-inventory information to obtain a candidate sub-inventory information set.
[0082] In some embodiments, the execution entity may use the sub-inventory information that is not selected from the sub-inventory information of the at least one inventory batch as candidate sub-inventory information to obtain a candidate sub-inventory information set.
[0083] As an example, the candidate sub-inventory information set may be [{batch: Batch 2, item identification value: G102, item quantity: 20 pieces, entry price: 21 yuan}, {batch: Batch 3, item identification value: G102, item quantity: 160 pieces, entry price: 19 yuan}].
[0084] Step 406, based on the sub-inventory information to be processed, the candidate sub-inventory information set and the flow data, the following processing steps are performed:
[0085] Step 4061, determining the inbound cost information and the outbound cost information according to the inventory quantity and the inbound attribute values of the items included in the flow data and the sub-inventory information to be processed.
[0086] In some embodiments, the execution entity may determine the inbound cost information and the outbound cost information according to the inventory quantity and the inbound attribute value of the item included in the flow data and the sub-inventory information to be processed by the following formula:
[0087]
[0088] Among them, SIC represents the above-mentioned inbound cost information. SCOC represents the above-mentioned outbound cost information. SN represents the inventory quantity. CP represents the real-time cost of the item corresponding to the item identification value included in the sub-inventory information to be processed. SIN represents the inbound quantity of the item. SIP represents the inbound attribute value of the item. SON represents the outbound quantity of the item. SOP represents the outbound attribute value of the item. Among them, the inbound attribute value of the item can represent the inbound price of the item. The outbound attribute value of the item can represent the outbound price of the item.
[0089] Step 4062, in response to determining that the item inbound quantity included in the sub-inventory information to be processed is greater than or equal to the item outbound quantity included in the transaction data, the item outbound quantity included in the sub-inventory information to be processed is updated according to the item outbound quantity included in the transaction data, and the processing step ends.
[0090] In some embodiments, in response to determining that the number of items entering the sub-inventory information to be processed is greater than or equal to the number of items leaving the sub-inventory information included in the transaction data, the execution subject may update the number of items leaving the sub-inventory information to be processed according to the number of items leaving the sub-inventory information included in the transaction data, and terminate the processing step. The execution subject may determine the difference between the number of items leaving the sub-inventory information to be processed and the number of items leaving the sub-inventory information included in the transaction data as the number of items leaving the sub-inventory information to be processed, thereby updating the number of items leaving the sub-inventory information to be processed.
[0091] As an example, the above-mentioned running data may be "[running data number: 10001, running data status identification value: "0", document type: purchase order, item identification value: G1012, item quantity: 200 pieces]". The above-mentioned sub-inventory information to be processed may be {batch: batch 5, item identification value: G102, item quantity: 220 pieces, entry price: 20 yuan}. The updated sub-inventory information to be processed may be {batch: batch 5, item identification value: G102, item quantity: 20 pieces, entry price: 20 yuan}.
[0092] Step 4063, in response to determining that the number of items entering the sub-inventory information to be processed is less than the number of items leaving the inventory included in the transaction data, the number of items entering the sub-inventory information to be processed is set to a preset value; the difference between the number of items leaving the inventory included in the transaction data and the number of items entering the sub-inventory information to be processed is determined as the number of items leaving the inventory in the transaction data; candidate sub-inventory information is selected from the candidate sub-inventory information set as the sub-inventory information to be processed; the candidate sub-inventory information not selected in the candidate sub-inventory information set is reorganized into a candidate sub-inventory information set; and the processing steps are re-executed.
[0093] In some embodiments, in response to determining that the number of items entering the sub-inventory information to be processed is less than the number of items leaving the inventory in the transaction data, the execution subject may set the number of items entering the sub-inventory information to be processed to a preset value; determine the difference between the number of items leaving the inventory in the transaction data and the number of items entering the sub-inventory information to be processed as the number of items leaving the inventory in the transaction data; select candidate sub-inventory information from the candidate sub-inventory information set as the sub-inventory information to be processed; reorganize the candidate sub-inventory information not selected in the candidate sub-inventory information set into the candidate sub-inventory information set; and re-execute the processing step. Among them, the execution subject may randomly select candidate sub-inventory information from the candidate sub-inventory information set as the sub-inventory information to be processed.
[0094] As an example, the above-mentioned flow data may be "[flow data number: 10001, flow data status identification value: "0", document type: purchase order, item identification value: G1012, item quantity: 200 pieces]". The above-mentioned sub-inventory information to be processed may be {batch: batch 1, item identification value: G102, item quantity: 20 pieces, entry price: 20 yuan}. The above-mentioned preset threshold may be "0". The above-mentioned execution entity may determine 180 pieces as the number of items out of the flow data.
[0095] from Figure 4 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, the present disclosure adds a method for determining the inbound cost information and the outbound cost information. By subdividing the cost information into inbound cost information and outbound cost information, the obtained cost information is more refined. In addition, the formula in step 4061 introduces real-time cost, so that real-time inbound cost information and outbound cost information can be obtained.
[0096] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a cost information determination device, and these device embodiments are Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0097] like Figure 5As shown, the cost information determination device 500 of some embodiments includes: a first determination unit 501, configured to determine inventory information based on the transaction data in response to determining that there is unprocessed transaction data within a target time period; a second determination unit 502, configured to determine target inventory information in the inventory information corresponding to the transaction data in response to determining that the total amount of the inventory batch corresponding to the inventory information is greater than a preset threshold, wherein the target inventory information includes sub-inventory information of at least one inventory batch of the same item; and a third determination unit 503, configured to determine the cost information of the items in the inventory batch corresponding to the sub-inventory information of the at least one inventory batch.
[0098] In some optional implementations of some embodiments, the apparatus 500 further includes: updating the inventory information, and backing up the cost information and the updated inventory information.
[0099] In some optional implementations of some embodiments, the apparatus 500 further includes: generating a daily report based on the cost information and the updated inventory information.
[0100] In some optional implementations of some embodiments, in response to determining that there is unprocessed transaction data within the target time period, before determining the inventory information based on the transaction data, the device 500 further includes: in response to the current time point being the same as the target time point, determining whether there is unprocessed transaction data within the target time period.
[0101] In some optional implementations of some embodiments, the above-mentioned device 500 also includes: checking the above-mentioned updated inventory information; in response to the above-mentioned updated inventory information failing the verification, determining difference information; in response to re-determining the above-mentioned cost information, determining updated cost information based on the above-mentioned flow data, the above-mentioned target inventory information and the above-mentioned difference information.
[0102] In some optional implementations of some embodiments, the sub-inventory information in the above-mentioned at least one batch of sub-inventory information includes: the number of items entering the warehouse, and the attribute values of the items entering the warehouse; and the third determination unit 503 is further configured to: select a sub-inventory information from the sub-inventory information of the above-mentioned at least one inventory batch as the sub-inventory information to be processed; and use the sub-inventory information that is not selected from the sub-inventory information of the above-mentioned at least one inventory batch as candidate sub-inventory information to obtain a set of candidate sub-inventory information.
[0103] In some optional implementations of some embodiments, the third determination unit 503 is further configured to: perform the following processing steps based on the sub-inventory information to be processed, the candidate sub-inventory information set and the flow data: determine the entry cost information and the exit cost information based on the flow data and the item entry quantity and item entry attribute values included in the sub-inventory information to be processed; in response to determining that the item entry quantity included in the sub-inventory information to be processed is greater than or equal to the item exit quantity included in the flow data, update the item exit quantity included in the sub-inventory information to be processed based on the item exit quantity included in the flow data, and end the above processing steps.
[0104] In some optional implementations of some embodiments, the third determination unit 503 is further configured to: in response to determining that the number of items entering the sub-inventory information to be processed is less than the number of items leaving the inventory included in the transaction data, set the number of items entering the sub-inventory information to be processed to a preset value; determine the difference between the number of items leaving the inventory included in the transaction data and the number of items entering the sub-inventory information to be processed as the number of items leaving the inventory in the transaction data; select candidate sub-inventory information from the candidate sub-inventory information set as the sub-inventory information to be processed; reorganize the candidate sub-inventory information not selected in the candidate sub-inventory information set into a candidate sub-inventory information set; and re-execute the above processing steps.
[0105] It is understood that the units described in the device 500 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 500 and the units included therein, and will not be described in detail here.
[0106] Reference below Figure 6 , which shows an electronic device (such as Figure 1 A schematic diagram of the structure of the computing device 101)600 is shown. Figure 6 The electronic 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 disclosure.
[0107] like Figure 6As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0108] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0109] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure 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 some such embodiments, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0110] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure 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 (RAM), 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 some embodiments of the present disclosure, 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 some embodiments of the present disclosure, 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 suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0111] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0112] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to determining that there is unprocessed flow data in the target time period, determine the inventory information according to the flow data; in response to determining that the total amount of the inventory batch corresponding to the inventory information is greater than a preset threshold, determine the target inventory information in the inventory information corresponding to the flow data, wherein the target inventory information includes sub-inventory information of at least one inventory batch of the same item; determine the cost information of the items in the inventory batch corresponding to the sub-inventory information of the at least one inventory batch.
[0113] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] 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 disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / 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.
[0115] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The units described may also be set in a processor, for example, may be described as: a processor includes a first determination unit, a second determination unit, and a third determination unit. The names of these units do not constitute limitations on the units themselves in certain cases, for example, the third determination unit may also be described as "determining the cost information of items in the inventory batch corresponding to the target inventory information, wherein the target inventory information is a unit of sub-inventory information in the sub-inventory information of at least one inventory batch".
[0116] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0117] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for determining cost information, include: In response to determining that there is unprocessed flow data within the target time period, determining inventory information based on the flow data, wherein the flow data represents an order; In response to determining that the total amount of the inventory batch corresponding to the inventory information is greater than a preset threshold, determining target inventory information in the inventory information corresponding to the transaction data, wherein the target inventory information includes sub-inventory information of at least one inventory batch of the same item, wherein the sub-inventory information includes: the item entry quantity and the item entry attribute value; Determining the cost information of the items in the inventory batch corresponding to the sub-inventory information of the at least one inventory batch, wherein the process includes: performing the following processing steps according to the sub-inventory information to be processed, the candidate sub-inventory information set and the flow data: Determine the inbound cost information and the outbound cost information according to the inventory quantity and the inbound attribute value of the items included in the flow data and the sub-inventory information to be processed; In response to determining that the item inbound quantity included in the sub-inventory information to be processed is greater than or equal to the item outbound quantity included in the transaction data, updating the item outbound quantity included in the sub-inventory information to be processed according to the item outbound quantity included in the transaction data, and ending the processing step; In response to determining that the number of items entering the sub-inventory information to be processed is less than the number of items leaving the inventory included in the transaction data, the number of items entering the sub-inventory information to be processed is set to a preset value; the difference between the number of items leaving the inventory included in the transaction data and the number of items entering the sub-inventory information to be processed is determined as the number of items leaving the inventory in the transaction data; candidate sub-inventory information is selected from the candidate sub-inventory information set as the sub-inventory information to be processed; the candidate sub-inventory information not selected in the candidate sub-inventory information set is reorganized into a candidate sub-inventory information set; and the processing steps are re-executed.
2. The method according to claim 1, in, The method further comprises: The inventory information is updated, and the cost information and the updated inventory information are backed up.
3. The method according to claim 2, in, The method further comprises: A daily report is generated based on the cost information and the updated inventory information.
4. The method according to claim 1, in, Before determining inventory information based on the unprocessed transaction data in response to determining that there is unprocessed transaction data within the target time period, the method further includes: In response to the current time point being the same as the target time point, it is determined whether there is any unprocessed pipeline data within the target time period.
5. The method according to claim 2, in, The method further comprises: verifying the updated inventory information; In response to the updated inventory information failing verification, determining discrepancy information; In response to re-determining the cost information, updating the cost information is determined based on the flow data, the target inventory information and the difference information.
6. The method according to claim 1, in, The determining cost information of items in the inventory batch corresponding to the sub-inventory information of the at least one inventory batch includes: Selecting one sub-inventory information from the sub-inventory information of the at least one inventory batch as the sub-inventory information to be processed; Sub-inventory information that is not selected from the sub-inventory information of the at least one inventory batch is used as candidate sub-inventory information to obtain a candidate sub-inventory information set.
7. A cost information determination device, include: A first determining unit is configured to determine inventory information based on the unprocessed flow data in response to determining that there is unprocessed flow data within the target time period, wherein the flow data represents an order; A second determining unit is configured to determine, in response to determining that the total amount of the inventory batch corresponding to the inventory information is greater than a preset threshold, target inventory information in the inventory information corresponding to the flow data, wherein the target inventory information includes sub-inventory information of at least one inventory batch of the same item, wherein the sub-inventory information includes: the item entry quantity and the item entry attribute value; The third determining unit is configured to determine the cost information of the items of the inventory batch corresponding to the sub-inventory information of the at least one inventory batch, which includes: performing the following processing steps according to the sub-inventory information to be processed, the candidate sub-inventory information set and the flow data: Determine the inbound cost information and the outbound cost information according to the inventory quantity and the inbound attribute value of the items included in the flow data and the sub-inventory information to be processed; In response to determining that the item inbound quantity included in the sub-inventory information to be processed is greater than or equal to the item outbound quantity included in the transaction data, updating the item outbound quantity included in the sub-inventory information to be processed according to the item outbound quantity included in the transaction data, and ending the processing step; In response to determining that the number of items entering the sub-inventory information to be processed is less than the number of items leaving the inventory included in the transaction data, the number of items entering the sub-inventory information to be processed is set to a preset value; the difference between the number of items leaving the inventory included in the transaction data and the number of items entering the sub-inventory information to be processed is determined as the number of items leaving the inventory in the transaction data; candidate sub-inventory information is selected from the candidate sub-inventory information set as the sub-inventory information to be processed; the candidate sub-inventory information not selected in the candidate sub-inventory information set is reorganized into a candidate sub-inventory information set; and the processing steps are re-executed.
8. An electronic device, include: one or more processors; a storage device having one or more programs stored thereon; 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 to 6.
9. A computer readable medium having a computer program stored thereon, in, When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
