Inventory data processing method, electronic device, storage medium and program product

Through an inventory data processing method, accounting rules and data affecting unit inventory cost processing is used to process inventory transaction data, which solves the problem of low inventory cost accounting efficiency in the existing technology, and realizes flexible and efficient inventory data processing .

CN119443591APending Publication Date: 2025-02-14KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411446798.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art is less efficient in inventory cost accounting, especially when business needs change, and the code needs to be frequently modified to adapt to new logic, resulting in reduced computing efficiency.

Method used

Through an inventory data processing method, accounting rules and data affecting unit inventory cost processing is used to process inventory transaction data, thereby achieving efficient processing of inventory data. The method includes obtaining pending inventory transaction data, costing according to accounting rules, calculating unit inventory costs, and cost correction processing for other data.

Benefits of technology

It realizes that when business needs change, the inventory data processing logic is changed without frequent modification of code, which improves the efficiency and flexibility of inventory cost accounting, and reduces the risks brought by business changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443591A_ABST
    Figure CN119443591A_ABST
Patent Text Reader

Abstract

The invention provides an inventory data processing method, electronic equipment, a readable storage medium and a computer program product. The inventory data processing method comprises the steps of obtaining to-be-processed inventory transaction data corresponding to an inventory article according to a processing instruction; accounting cost data in the inventory transaction data to be processed according to an accounting rule to obtain inventory transaction data after accounting; cost calculation is carried out according to the data influencing the unit inventory cost in the inventory transaction data after accounting, and the unit inventory cost of the inventory articles is obtained; performing cost correction processing on other data according to the unit inventory cost to obtain a processing result; wherein the other data are data which do not influence unit inventory cost but influence the overall inventory cost in the inventory transaction data after accounting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to technical fields such as data processing, and more particularly to an inventory data processing method, electronic equipment, storage medium, and program product. Background Art

[0002] Inventory cost accounting is a key link in enterprise management, involving the cost calculation and management of inventory items. It not only directly affects the company's financial statements, profit accounting and tax declaration, but also largely determines the company's pricing strategy, inventory management efficiency and overall operating cost control. Therefore, accurate and effective inventory cost accounting is crucial to the long-term development of the company.

[0003] Inventory cost accounting methods include First In First Out (FIFO), Last In First Out (LIFO), weighted average, moving weighted average, individual pricing, etc. The existing technology generally adopts one of the above methods to calculate inventory cost according to business conditions.

[0004] Generally, the corresponding code is written according to the business requirements to implement inventory cost accounting; however, once the business requirements change, it may lead to changes in the logic of inventory cost calculation. Therefore, it is usually necessary to modify the inventory cost accounting code, and the efficiency of inventory cost accounting is low. Summary of the invention

[0005] In order to solve at least one of the above technical problems, the present disclosure provides an inventory data processing method, an electronic device, a storage medium and a program product.

[0006] According to one aspect of the present disclosure, there is provided an inventory data processing method, comprising: Obtaining pending inventory transaction data corresponding to the inventory items according to the processing instructions; Calculate the cost data in the inventory transaction data to be processed according to the calculation rules to obtain calculated inventory transaction data; Cost calculation is performed based on the data affecting the unit inventory cost in the calculated inventory transaction data to obtain the unit inventory cost of the inventory item; Performing cost correction processing on other data according to the unit inventory cost to obtain processing results; The other data are data in the calculated inventory transaction data that do not affect the unit inventory cost but affect the overall inventory cost.

[0007] According to at least one embodiment of the present disclosure, the inventory data processing method further includes, after obtaining the processing result: Verifying the processing result to obtain a verification result; and / or, The processing result, the cost calculation method corresponding to the cost calculation and the data affecting the unit inventory cost are recorded.

[0008] According to the inventory data processing method of at least one embodiment of the present disclosure, the cost calculation is performed based on the data affecting the unit inventory cost in the calculated inventory transaction data, including: Acquire data affecting unit inventory cost from the calculated inventory transaction data; Obtaining a cost calculation method for the inventory items; Cost calculation is performed on the data affecting the unit inventory cost according to the cost calculation method.

[0009] According to the inventory data processing method of at least one embodiment of the present disclosure, the accounting rules include: One or more of the following: purchase receipt accounting rules, loss report delivery accounting rules, return delivery accounting rules, surplus receipt accounting rules, shortage delivery accounting rules, transfer delivery accounting rules and transfer receipt accounting rules.

[0010] According to at least one embodiment of the present disclosure, a method for processing inventory data, The purchase warehousing accounting rules include accounting based on purchase costs; The accounting rules for loss report outbound, surplus inventory entry accounting rules or shortage inventory outbound accounting rules include cost accounting based on the previous accounting period corresponding to the submission date of the loss report, surplus inventory or shortage inventory; The transfer out accounting rules include cost accounting based on the previous accounting cycle corresponding to the transfer out date; The transfer-in accounting rules include cost accounting based on corresponding transfer-out.

[0011] According to the inventory data processing method of at least one embodiment of the present disclosure, the step of obtaining the to-be-processed inventory transaction data corresponding to the inventory items according to the processing instruction includes: Get business data; Processing the business data to obtain an inventory ledger; The to-be-processed inventory transaction data corresponding to the inventory item is obtained from the inventory ledger according to the processing instruction.

[0012] According to the inventory data processing method of at least one embodiment of the present disclosure, the step of obtaining the to-be-processed inventory transaction data corresponding to the inventory item from the inventory ledger according to the processing instruction includes: Performing a consistency check on the inventory ledger according to the master document dimension of the inventory ledger to obtain a consistency check result; The to-be-processed inventory transaction data corresponding to the inventory item is obtained from the inventory ledger according to the consistency check result and the processing instruction.

[0013] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the inventory data processing method of any one embodiment of the present disclosure.

[0014] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the inventory data processing method of any embodiment of the present disclosure is implemented.

[0015] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the inventory data processing method according to any one of the embodiments of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0017] Figure 1 The process of the inventory data processing method according to one embodiment of the present disclosure is as follows: Figure 1 .

[0018] Figure 2 The process of the inventory data processing method according to one embodiment of the present disclosure is as follows: Figure 2 .

[0019] Figure 3 The process of the inventory data processing method according to one embodiment of the present disclosure is as follows: Figure 3 .

[0020] Figure 4 The process of the inventory data processing method according to one embodiment of the present disclosure is as follows: Figure 4 .

[0021] Figure 5 yes Figure 1 The flowchart of the cost calculation method in the inventory data processing method is shown.

[0022] Figure 6 yes Figure 5 The flowchart of the mobile weighted calculation method in the cost calculation method shown.

[0023] Figure 7 yes Figure 1A flowchart of a method for obtaining data to be processed in the inventory data processing method.

[0024] Figure 8 yes Figure 7 The flowchart of the verification acquisition method in the method for obtaining data to be processed is shown.

[0025] Fig. 9 It is a schematic diagram of an application scenario of the inventory data processing method according to an embodiment of the present disclosure.

[0026] Fig.10 It is a schematic block diagram of the structure of an inventory data processing device according to another embodiment of the present disclosure.

[0027] Fig.11 It is a schematic block diagram of the structure of an electronic device equipped with an inventory data processing device according to another embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0029] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0030] With the development of smart retail, especially the development of smart retail in the online and offline integrated model, the requirements for commodity inventory management are getting higher and higher. Daily inventory affairs such as purchasing, sales, sales returns, cross-company transfers, and inventory gains and losses will lead to increases and decreases in commodity inventory and fluctuations in inventory costs. For complex business scenarios, how to accurately calculate inventory value and inventory costs has become an urgent problem to be solved. For inventory items with high demand for raw materials and frequent purchases, the moving weighted average method is usually used to calculate inventory costs; however, with the development of technology and the market, it is necessary to continuously expand the business scope and service capabilities to adapt to changing needs, and the expansion of business will lead to code modifications for inventory cost accounting, and the efficiency of inventory cost accounting is low.

[0031] To this end, the present disclosure proposes an inventory data processing method, which performs cost processing on inventory transaction data to be processed through accounting rules and data that affects unit inventory costs, thereby realizing inventory data processing. When a user needs to process the inventory data of a certain inventory item, a processing instruction of the inventory item can be sent to an electronic device such as a server, and the electronic device such as the server performs a corresponding processing operation after receiving the processing instruction. The processing instruction can be a periodic instruction or an instruction input by the user according to actual needs.

[0032] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the inventory data processing method implemented in the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are defined as follows: Inventory transaction data refers to the data of various transaction activities related to inventory recorded in the inventory management process. These data record the inflow and outflow of inventory goods, as well as related business operations such as warehousing, outbound, adjustment, transfer, etc.

[0033] Inventory ledger is a book that records the inflow, outflow and balance of inventory in detail. It is used to track the quantity, cost and inventory status of inventory items, helping companies manage and control inventory.

[0034] In inventory cost calculation, the primary unit dimension refers to the main dimension or benchmark used to calculate and track inventory costs. This dimension is usually selected by the enterprise based on its operating characteristics to determine the basis for calculating and allocating inventory costs. The primary unit dimension can be a single factor or a combination of multiple factors.

[0035] Figure 1 FIG. 1 is a schematic diagram showing the overall process of an inventory data processing method M100 according to an embodiment of the present disclosure. Figure 1 The method shown includes steps S110 to S140. The method can be executed by an electronic device such as a server.

[0036] Specifically, Figure 1 The methods shown include: Step S110, obtaining to-be-processed inventory transaction data corresponding to the inventory items according to the processing instruction.

[0037] In some embodiments of the present disclosure, when a user needs to process inventory data for a certain inventory item, he can input a corresponding processing instruction, so that step S110 obtains the corresponding inventory transaction data to be processed according to the processing instruction. The processing instruction is generally carried out periodically. In addition to the cycle, special events, major business activities, system switching, abnormal situations, and audit and financial needs can also be used as key moments for inventory data processing; through the initial inventory processing at these key moments, the accuracy of inventory data can be ensured.

[0038] Figure 1 The inventory items in step S110 shown may be raw materials (such as iron ore and coal in steel mills; steel, rubber, plastic, etc. in automobile manufacturing plants), work-in-progress (such as partially assembled vehicles on an automobile assembly line, or fabrics being cut and sewn in a garment factory), finished products (such as factory-made refrigerators, washing machines, mobile phones, etc.), and other items used to support production and sales.

[0039] pass Figure 1 The inventory transaction data to be processed obtained in step S110 shown may include data of various transaction activities related to inventory during the processing period corresponding to the processing instruction. The starting point of the processing period corresponding to the processing instruction is the time of the last inventory data processing before receiving the processing instruction; the end point of the processing period corresponding to the processing instruction is the time of receiving the processing instruction or the end point of the cycle corresponding to the time of receiving the processing instruction. For example, if inventory data is processed every two days from August 10 to 19 with zero o'clock as the boundary, when the processing instruction corresponds to August 21, the processing period corresponding to the processing instruction is from zero o'clock on August 20 to 24 o'clock on August 21.

[0040] Step S120, calculating the cost data in the inventory transaction data to be processed according to the calculation rules to obtain calculated inventory transaction data.

[0041] In some embodiments of the present disclosure, by calculating the cost data in the inventory transaction data to be processed in step S120, the specific cost corresponding to each inventory transaction data can be preliminarily calculated to obtain the calculated inventory transaction data. The specific process of calculating the cost data of a certain transaction data to be processed in step S120 may include: first, calculating the unit cost including or excluding tax in the inventory transaction data to be processed according to the calculation rules to obtain the specific value corresponding to the unit cost including or excluding tax; then modifying the value corresponding to the amount including or excluding tax according to the product of the specific value corresponding to the unit cost including or excluding tax and the quantity in the inventory transaction data to be processed.

[0042] For the convenience of accounting, in addition to calculating specific costs according to the accounting rules, this accounting can also mark the quantity, amount and other data corresponding to inventory transactions that will result in inventory reduction, such as sales, loss report, and inventory shortage, with a negative sign to indicate a reduction in quantity, amount, etc.

[0043] Step S130, performing cost calculation based on the data affecting the unit inventory cost in the calculated inventory transaction data to obtain the unit inventory cost of the inventory items.

[0044] In some embodiments of the present disclosure, the method used for cost calculation in step S130 can be preset. The data affecting the unit inventory cost may include sales outbound, return outbound, damage outbound, overstocking inbound, shortage outbound, transfer inbound, transfer outbound, etc.; for different methods, the data affecting the unit inventory cost may be different; for example, for the first-in-first-out method and the last-in-first-out method, sales outbound will cause the unit inventory cost to change, so the data affecting the unit inventory cost of the first-in-first-out method and the last-in-first-out method include the data corresponding to sales outbound; while for the moving weighted average method, sales outbound will not cause the unit inventory cost to change, so the data affecting the unit inventory cost of the moving weighted average method does not include the data corresponding to sales outbound.

[0045] In particular, in order to improve the flexibility and configurability of the system, step S130 can perform cost calculation through an expression engine.

[0046] Step S140, performing cost correction processing on other data according to the unit inventory cost to obtain a processing result.

[0047] In some embodiments of the present disclosure, the cost correction process in step S140 may be performed by copying the unit inventory cost calculated in step S130 to the corresponding position of other data, and adaptively modifying relevant data such as amount, etc. The other data in step S140 is data in the calculated inventory transaction data that does not affect the unit inventory cost but affects the overall inventory cost; such as the corresponding data of the requisition return warehouse, sales return warehouse, requisition outbound, after-sales outbound and sales outbound.

[0048] The inventory data processing method provided by the present disclosure processes inventory data through the accounting rules corresponding to the current business needs and the data affecting the unit inventory cost. When the business needs change, the processing logic of the inventory data can be changed by modifying the accounting rules and the data affecting the unit inventory cost according to the changed business needs, so as to realize the inventory data processing corresponding to the changed business needs. This method solves the problem that the inventory cost accounting is generally realized by writing the corresponding code according to the business needs in the prior art. However, once the business needs change, it may lead to the logical change of the inventory cost calculation, so it is usually necessary to modify the code of the inventory cost accounting, and the efficiency of the inventory cost accounting is low. In addition, the inventory data processing method can also be used to perform a preview of the inventory data processing before the business needs change, thereby reducing the risks brought by the business changes.

[0049] The inventory data processing method provided by the present disclosure can use the processing result and the amount including or excluding tax to calculate the overall inventory cost after obtaining the processing result in step S140. The calculation result of the overall inventory cost can be used for financial management or inventory control.

[0050] Furthermore, if Figure 2 As shown, the inventory data processing method provided by the present disclosure may further include, after obtaining the processing result in step S140: Step S150, verify the processing result to obtain a verification result.

[0051] In some embodiments of the present disclosure, step S150 can be used to verify the accuracy, calculation method, abnormal fluctuation, validity, etc. of the processing result.

[0052] By verifying the processing result in step S150, the accuracy of inventory cost accounting can be ensured, thereby ensuring the reliability of financial management and the inventory control effect.

[0053] When the verification result obtained in step S150 is a verification failure, Figure 3 As shown, the inventory data processing method of the present disclosure may also include: Step S160, executing verification failure processing operation.

[0054] In some embodiments of the present disclosure, the verification failure processing operation in step S160 can be an error prompt (informing relevant personnel via email, message or other means), data correction, problem recording, etc.

[0055] Executing the verification failure processing operation in step S160 helps to timely discover and handle abnormal situations caused by inventory data processing, thereby ensuring the accuracy of inventory data processing.

[0056] Furthermore, if Figure 4 As shown, the inventory data processing method provided by the present disclosure may further include, after obtaining the processing result in step S140: Step S170, recording the processing results, the cost calculation method corresponding to the cost calculation, and the data affecting the unit inventory cost.

[0057] In some embodiments of the present disclosure, after the processing result is obtained through step S140, the data used for inventory data processing is recorded through step S170, which can help identify and analyze the root cause of the data problem and trace the cause and process of the error.

[0058] The inventory data processing method provided by the present disclosure, Figure 2 or Figure 3 The verification process shown and Figure 4 The data recording process shown can be performed separately or simultaneously. When performed simultaneously, if the verification result obtained in step S150 is a verification failure, a verification failure processing operation can be performed in step S160 in combination with the data recorded in step S170.

[0059] Regarding step S130, in some embodiments of the present disclosure, it may include the following steps: Figure 5 Steps S131 to S133 are shown.

[0060] Step S131, obtaining data affecting the unit inventory cost from the calculated inventory transaction data.

[0061] In some embodiments of the present disclosure, step S131 can obtain data affecting unit inventory cost according to the content of the "inventory management operation" field in the calculated inventory transaction data. For different businesses, different operations corresponding to data affecting unit inventory cost can be set, and then the set operations are matched with the content of the "inventory management operation" field, and the successfully matched data is used as the data affecting unit inventory cost.

[0062] Step S132, obtaining the cost calculation method of the inventory items.

[0063] In some embodiments of the present disclosure, the cost calculation method in step S132 includes first-in-first-out method, last-in-first-out method, weighted average method, moving weighted average method or individual pricing method, etc.

[0064] Step S133, performing cost calculation on the data affecting the unit inventory cost according to the cost calculation method.

[0065] In the process of implementing cost calculation through steps S131 to S133, the data affecting the unit inventory cost is used as a factor in cost calculation. When the business changes, the data affecting the unit inventory cost can be changed, which facilitates inventory cost processing.

[0066] When the cost calculation method obtained in step S132 is the moving weighted average method, Figure 6 As shown, step S133 may include: step S1331, obtaining the initial inventory cost and initial inventory quantity corresponding to the processing instruction; step S1332, obtaining the variable inventory cost and variable inventory quantity according to the data affecting the unit inventory cost; step S1333, using the moving weighted average method to calculate the cost according to the initial inventory cost, the initial inventory quantity, the variable inventory cost and the variable inventory quantity. Among them, the initial inventory cost or quantity corresponding to the processing instruction is the total cost or total number of the inventory at the beginning of the processing cycle corresponding to the processing instruction; the variable inventory cost and variable inventory quantity obtained by step S1332 may be multiple entries; the process of calculating the cost by step S1333 may be to divide the sum of the initial inventory cost and all variable inventory costs by the sum of the initial inventory quantity and all variable inventory quantities.

[0067] In some embodiments of the present disclosure, the accounting rules in step S120 may include one or more of the following: purchase entry accounting rules, damage report exit accounting rules, return exit accounting rules, surplus entry accounting rules, shortage exit accounting rules, transfer exit accounting rules, and transfer entry accounting rules. Among them, the purchase entry accounting rules include accounting based on the purchase cost; the damage report exit accounting rules, surplus entry accounting rules, or shortage exit accounting rules include cost accounting based on the previous accounting period corresponding to the date of submission of damage report, surplus, or shortage; the transfer exit accounting rules include cost accounting based on the previous accounting period corresponding to the execution date of transfer exit; the transfer entry accounting rules include cost accounting based on the corresponding transfer exit cost.

[0068] When reporting loss, inventory surplus, inventory shortage and transfer out of warehouse, the cost accounting of the previous accounting cycle can reduce the dependency between accounting costs when the inventory transaction corresponding to the current accounting cycle includes both outbound and inbound, thereby reducing the coupling degree and improving the accuracy of cost accounting. In addition, by controlling the preliminary accounting process through accounting rules, the inventory data processing method provided by the present disclosure can be applied to the processing of some special business data, such as inter-warehouse transfer, reporting loss, inventory surplus and shortage and outbound on the first day.

[0069] Taking inter-warehouse transfer as an example, when transferring out, the cost accounting of the previous accounting period corresponding to the date of transfer out is used, and when transferring in, the cost accounting of the corresponding transfer out is used, so that no circular dependency is formed during inter-warehouse transfer, thereby reducing the coupling degree of cost accounting; this solves the problem in the prior art that inter-warehouse transfer is calculated using the unit price of the day's outbound shipment, resulting in low accounting accuracy.

[0070] Regarding step S110, in some embodiments of the present disclosure, it may include the following steps: Figure 7 Steps S111 to S113 are shown.

[0071] Step S111, obtaining business data.

[0072] In some embodiments of the present disclosure, various business activities such as purchasing, sales, returns, etc. will generate business data, and these business data are the basis for updating the inventory ledger. The way of obtaining business data through step S111 may include: obtaining business data through data warehouse tools (such as Hive ETL (Extract, Transform, Load), Snowflake, Teradata, etc.); and / or obtaining business data through logs (such as binary logs (binlog), MongoDB, MariaDB, etc.); and / or obtaining business data through application programming interfaces; and / or obtaining business data through business push; and / or obtaining business data through message queues, etc.

[0073] Step S112, processing the business data to obtain an inventory ledger.

[0074] In some embodiments of the present disclosure, the business data is processed through step S112, including one or more of data cleaning, data conversion, data integration and data reduction. After obtaining the business data through step S111, step S112 can first integrate the business data from different sources into a unified data set through data integration; detect and correct errors, missing values, outliers, etc. in the data set through data cleaning, and data cleaning can use predefined rules or patterns to identify and process data; in the data cleaning process, the processing of missing values ​​usually involves data completion, and the processing of outliers usually involves data correction; manage the fields in the data set through data reduction, integrate the same fields, and eliminate redundant or irrelevant fields; convert the above-mentioned processed business data into ledger records through data conversion to obtain an inventory ledger. Among them, the predefined rules may include integrity rules, format consistency rules, numerical range rules, business action rules, etc.

[0075] In particular, in order to improve the flexibility, maintainability and extensibility of the rules, the defined rules can be managed through the rule engine.

[0076] After obtaining abnormal data such as abnormal value data and rule abnormal data through the above processing, the abnormal data can also be marked to find potential problems. The user can also be prompted with data abnormalities so that the user can verify the abnormal data to prevent normal data from being identified as abnormal, resulting in wrong decisions.

[0077] Step S113, obtaining the to-be-processed inventory transaction data corresponding to the inventory items from the inventory ledger according to the processing instruction.

[0078] In some embodiments of the present disclosure, the inventory ledger generally records and updates inventory changes, that is, the inventory ledger obtained in step S112 records complete inventory changes. When obtaining the inventory transaction data to be processed in step S113, it can be obtained from the inventory ledger in the inventory accounting time period corresponding to the processing instruction.

[0079] In some embodiments of the present disclosure, steps S110 to S113 obtain the inventory transaction data to be processed through business data, so that the inventory data processing method can be connected to various businesses, thereby achieving more comprehensive inventory data processing.

[0080] In particular, in order to improve the data processing speed, step S110 can directly obtain the inventory transaction data to be processed from the preset inventory ledger according to the processing instruction; the preset inventory ledger can update the inventory change situation in real time according to the business data. The preset inventory ledger can be set locally or on other devices.

[0081] like Figure 8 As shown, step S113 may include: Step S1131, performing consistency check on the inventory ledger according to the master document dimension of the inventory ledger to obtain a consistency check result.

[0082] In some embodiments of the present disclosure, step S1131 can perform consistency verification on the inventory ledger and the original business data through a BCP (Bulk Copy Program) tool, a SQL Server Integration Services (SSIS) tool, an Apache NiFi tool, or the like.

[0083] Figure 8 The main order dimension of the inventory ledger in step S1131 shown may correspond to fields such as inventory management operation, amount, unit cost, etc.

[0084] Step S1132, obtaining the to-be-processed inventory transaction data corresponding to the inventory items from the inventory ledger according to the consistency check result and the processing instruction.

[0085] In some embodiments of the present disclosure, when the consistency check result obtained by step S1131 is a passed check, step S1132 can directly obtain the pending inventory transaction data corresponding to the inventory item from the inventory ledger according to the processing instruction; when the consistency check result obtained by step S1131 is a failed check, step S1132 can first repair the inventory ledger, and then obtain the pending inventory transaction data corresponding to the inventory item from the repaired inventory ledger according to the processing instruction.

[0086] In some embodiments of the present disclosure, by performing verification according to the main single dimension in step S1131, the verification scope can be reduced, thereby improving the verification efficiency.

[0087] Fig. 9 An exemplary flow chart of the inventory data processing method according to the present disclosure is shown, including: 1. Obtain business data through data warehouse tools, application programming interfaces, etc.

[0088] In some embodiments of the present disclosure, the business data obtained through this step may include inventory-related data directly related to inventory management (such as purchase inbound, sales outbound, loss-reported outbound, inventory surplus inbound, inventory shortage outbound, etc.) and inventory-irrelevant data that does not directly affect inventory but may be related to other business processes (such as financial data, customer relationship management data, supply chain management data, marketing data, etc.). When processing inventory data, the business data obtained through this step can be full business data; in particular, in order to increase the speed of inventory data processing, in addition to the processing of pending inventory transaction data, the business data obtained through this step during subsequent inventory data processing can be incremental business data.

[0089] Take the following business data obtained through this step as an example: 2023-10-01 06:45:00 Purchase and put into storage 30 units of commodity A, the amount including tax is 350, the amount excluding tax is 320; 2023-10-01 06:50:00 50 B items are shipped out of the warehouse; 2023-10-01 07:45:00 Marketing data adjustment; 2023-10-01 08:45:00 8 A products were put into storage; 2023-10-01 09:45:00 6 B products were shipped out at a loss; 2023-10-02 06:00:00 Purchase and store 100 units of commodity A, the amount including tax is 1100, and the amount excluding tax is 1000; 2023-10-02 06:30:00 Purchase and put into storage 50 units of commodity B, the amount including tax is 590, the amount excluding tax is 530; 2023-10-02 07:00:00 The requisition form returns 5 A products into the warehouse; 2023-10-02 07:30:00 User basic information adjustment; 2023-10-02 08:00:00 Sales returns 4 A products into storage; 2023-10-02 08:30:00 Staff information adjusted; 2023-10-02 09:00:00 6 A products are taken out of the warehouse; 2023-10-02 09:30:00 6 B products are sold and shipped out; 2023-10-02 10:00:00 After-sales delivery of 8 A products; 2023-10-02 11:00:00 2 A products are sold and shipped out; 2023-10-02 12:00:00 5 A products are returned and shipped out; 2023-10-02 13:00:00 4 A products were reported damaged and shipped out; 2023-10-02 14:00:00 5 A products were put into storage; 2023-10-02 15:00:00 3 A products were shipped out at a loss; 2023-10-02 16:00:00 10 units of product A are transferred to the warehouse; 2023-10-02 17:00:00 5 A products were transferred out of the warehouse.

[0090] Among them, transfers into warehouse, transfers out of warehouse, purchases into warehouse, etc. are inventory-related data; marketing data, basic user information, employee information, etc. are inventory-irrelevant data.

[0091] 2. Process the business data to obtain the inventory ledger.

[0092] In some embodiments of the present disclosure, business data is processed through this step, such as cleaning, conversion, integration, and specification, and inventory-irrelevant data can be eliminated, and inventory-related data can be sorted out, and the resulting inventory ledger can be as shown in Table 1. The inventory ledger can record the inventory ledgers of different commodities in a unified manner as shown in Table 1, or can record them separately; the fields of the inventory ledger can be adjusted as needed.

[0093] Table 1 In some embodiments of the present disclosure, in addition to obtaining the inventory ledger in real time through the above two steps, in order to improve the efficiency of inventory data processing, an inventory ledger can also be set in advance; the inventory ledger is synchronously updated after the inventory-related business data is generated; the inventory ledger can be set on electronic devices such as servers that implement inventory data processing, and can also be set on other computers, servers and other electronic devices.

[0094] 3. Obtain the pending inventory transaction data corresponding to the inventory items from the inventory ledger according to the processing instructions.

[0095] In some embodiments of the present disclosure, inventory data processing can be performed periodically, such as hourly, daily, weekly, etc.; for example, if inventory data processing is performed daily, the processing instruction in this step can correspond to the inventory data processing instruction of commodity A corresponding to 2023-10-02; at this time, the inventory transaction data to be processed obtained through this step can be as shown in Table 2, and the fields in Table 2 can be adjusted as needed.

[0096] Table 2 In some embodiments of the present disclosure, in addition to periodic processing instructions, the processing instructions in this step can also be user-triggered processing instructions at key moments such as special events, major business activities, system switching, abnormal situations, and audit and financial needs. The processing instructions are used to instruct the server and other electronic devices to process what data objects at what period.

[0097] For example, starting from 2024-08-01, inventory data processing will be performed at 24:00 every Sunday, that is, inventory data processing will be performed at 24:00 on August 4, 11, 18, and 25; during the inventory data processing, the beginning cost used for the next inventory data processing will be the ending cost obtained from the previous inventory data processing. Taking August 11 as an example, its beginning cost is the ending cost of August 4; if a major event is held from August 7 to 9, and inventory data processing is performed at 24:00 on August 9, then the corresponding inventory beginning cost on August 9 will be the ending cost of August 4, and the beginning cost of August 11 should be the ending cost of August 9.

[0098] 4. Calculate the cost data in the inventory transaction data to be processed according to the accounting rules to obtain the calculated inventory transaction data.

[0099] In some embodiments of the present disclosure, when it is necessary to calculate the tax-inclusive inventory cost, this step can be used to perform a preliminary calculation of the tax-inclusive unit cost in the inventory transaction data to be processed according to the accounting rules, and the tax-inclusive amount can be adaptively modified according to the product of the tax-inclusive unit cost and the quantity. For example, the tax-inclusive unit cost at the end of the period on the day before the submission date of the loss-reported outbound shipment is used as the tax-inclusive unit cost of the loss-reported outbound shipment; the tax-inclusive unit cost at the end of the period on the day before the submission date of the surplus inbound shipment is used as the tax-inclusive unit cost of the surplus inbound shipment; the tax-inclusive unit cost at the end of the period on the day before the submission date of the shortage-reported outbound shipment is used as the tax-inclusive unit cost of the shortage-reported outbound shipment; the tax-inclusive unit cost at the end of the period on the day before the outbound shipment operation date of the transfer outbound shipment is used as the tax-inclusive unit cost of the transfer outbound shipment; the tax-inclusive unit cost of the corresponding outbound shipment of the transfer inbound shipment is used as the tax-inclusive unit cost of the transfer inbound shipment, etc. When calculating the tax-exclusive unit cost, the calculation method is similar to the above process.

[0100] In particular, for the first day's outbound data, that is, when the first day of an empty warehouse includes both purchases and outbound, the unit cost of a certain purchase inbound with or without tax can be used as the unit cost of outbound, such as the unit cost of the first purchase inbound with tax as the unit cost of outbound, etc. For return outbound data, the unit cost at the end of the period on the day before the return outbound submission date can be used as the unit cost of the return outbound.

[0101] By using the previous day's end-of-period unit cost as the cost accounting basis, the impact of data fluctuations on the same day can be avoided, the complexity of data processing can be reduced, and data processing efficiency can be improved.

[0102] Through the above process, preliminary cost accounting is carried out, and the calculated inventory transaction data can be shown in Table 3.

[0103] Table 3 5. Perform cost calculation based on the data that affects the unit inventory cost in the calculated inventory transaction data to obtain the unit inventory cost of the inventory items.

[0104] Taking Table 3 as an example, when the moving weighted average method is used for cost calculation through this step, the data affecting the unit inventory cost may include: data corresponding to purchase receipt, return shipment, loss report shipment, surplus receipt, shortage shipment, transfer receipt and transfer shipment.

[0105] For example, if the beginning cost amount (the ending tax-inclusive cost on 2023-10-01) is 900 and the beginning quantity is 91, the cost can be calculated through this step as follows: , that is, the tax-inclusive unit cost obtained through this step is The method of calculating the unit cost excluding tax is similar to the above process, taking the unit cost excluding tax as 9.741 as an example.

[0106] 6. Perform cost correction on other data based on unit inventory cost to obtain processing results.

[0107] In some embodiments of the present disclosure, this step can be used to copy the tax-inclusive unit cost and tax-exclusive unit cost obtained in the previous step to the corresponding positions of other data, and the amount can be adaptively modified according to the product of the unit cost and the quantity. Taking Table 3 as an example, this step copies 10.741 and 9.741 to the tax-inclusive unit price field and tax-exclusive unit price field corresponding to the requisition return entry, sales return entry, requisition out, after-sales out and sales out in Table 3 respectively; and modify the value corresponding to the tax-inclusive amount according to the product of the value of the tax-inclusive unit price and the quantity, and modify the value corresponding to the tax-exclusive amount according to the product of the value of the tax-exclusive unit price and the quantity. The processing result obtained by this step can be shown in Table 4.

[0108] Table 4 7. Verify the processing result to obtain the verification result.

[0109] In some embodiments of the present disclosure, this step may perform rule verification on the values ​​of fields such as quantity, amount including tax, amount excluding tax, unit cost including tax, unit cost excluding tax, etc. in the processing results, such as determining whether it is a negative number.

[0110] 8. Record the processing results, the cost calculation method corresponding to the cost calculation, and the data affecting the unit inventory cost.

[0111] In some embodiments of the present disclosure, after the processing results are obtained through the above steps, the overall tax-inclusive inventory cost of commodity A can be calculated according to the processing results: the end-of-period tax-inclusive cost of 900 on 2023-10-01 + the tax-inclusive amount of purchase warehousing 1100 + the tax-inclusive amount of return warehousing on the requisition form 53.705 + the tax-inclusive amount of sales return warehousing 42.964 - the tax-inclusive amount of requisition out of the warehouse 64.446 - the tax-inclusive amount of after-sales out of the warehouse 85.928 - the tax-inclusive amount of sales out of the warehouse 21.482 - the tax-inclusive amount of return out of the warehouse 50 - the tax-inclusive amount of loss out of the warehouse 40 + the tax-inclusive amount of surplus warehousing 50 - the tax-inclusive amount of loss out of the warehouse 30 + the tax-inclusive amount of transfer warehousing 150 - the tax-inclusive amount of transfer out of the warehouse 50 = 1954.813. The overall tax-inclusive inventory cost can be used as a reference for tax declaration, and the final selling price can also be determined based on the overall tax-inclusive cost.

[0112] In some embodiments of the present disclosure, after obtaining the processing results through the above steps, the overall tax-exclusive inventory cost of commodity A can be calculated according to the processing results: the tax-exclusive cost at the end of 2023-10-01 830 + the tax-exclusive amount of purchase incoming 1000 + the tax-exclusive amount of return incoming on the requisition form 48.705 + the tax-exclusive amount of sales return incoming 38.964 - the tax-exclusive amount of outgoing 58.446 - the tax-exclusive amount of after-sales outgoing 77.928 - the tax-exclusive amount of sales outgoing 19.482 - the tax-exclusive amount of return outgoing 45 - the tax-exclusive amount of loss outgoing 36 + the tax-exclusive amount of surplus incoming 45 - the tax-exclusive amount of shortage outgoing 27 + the tax-exclusive amount of transfer incoming 140 - the tax-exclusive amount of transfer outgoing 45 = 1793.813. The overall inventory cost excluding tax can be used as the basis for cost control; the overall inventory cost excluding tax can also be used for financial management to reflect the company's asset status; the overall inventory cost excluding tax can also be used for cost analysis to understand the factors that affect inventory costs.

[0113] Based on any of the above embodiments, the present disclosure further provides an inventory data processing device 100 (corresponding to an inventory data processing method).

[0114] Fig.10 It is a schematic block diagram of the structure of an inventory data processing device 100 according to an embodiment of the present disclosure.

[0115] like Fig.10 As shown, the inventory data processing device 100 includes: The data acquisition module 110 is used to acquire the to-be-processed inventory transaction data corresponding to the inventory items according to the processing instructions.

[0116] The cost accounting module 120 is used to calculate the cost data in the inventory transaction data to be processed according to the accounting rules to obtain the calculated inventory transaction data.

[0117] The cost calculation module 130 is used to perform cost calculation based on the data affecting the unit inventory cost in the calculated inventory transaction data to obtain the unit inventory cost of the inventory items.

[0118] A correction processing module 140 is used to perform cost correction processing on other data according to the unit inventory cost to obtain a processing result; Among them, other data refers to the data in the calculated inventory transaction data that does not affect the unit inventory cost but affects the overall inventory cost.

[0119] Each of the above modules can be implemented by a computer program module. Fig. 9 The inventory data processing apparatus 100 shown may be implemented based on a computer program module architecture.

[0120] The execution subject of the inventory data processing method in the specific implementation manner of the present disclosure may be an electronic device such as a server.

[0121] Therefore, based on any of the above embodiments, the present disclosure further provides an electronic device, which can execute the inventory data processing method of any of the above embodiments of the present disclosure, and the inventory data processing device of any of the above embodiments can be configured on the electronic device.

[0122] Fig.11 1 is a schematic block diagram of the structure of an electronic device 1000 equipped with an inventory data processing device 100 according to an embodiment of the present disclosure.

[0123] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.

[0124] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.

[0125] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0126] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.

[0127] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0128] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0129] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0132] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.

[0133] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0134] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A method for processing inventory data, characterized in that: include: Obtaining pending inventory transaction data corresponding to the inventory items according to the processing instructions; Calculate the cost data in the inventory transaction data to be processed according to the calculation rules to obtain calculated inventory transaction data; Cost calculation is performed based on the data affecting the unit inventory cost in the calculated inventory transaction data to obtain the unit inventory cost of the inventory item; as well as Performing cost correction processing on other data according to the unit inventory cost to obtain processing results; The other data are data in the calculated inventory transaction data that do not affect the unit inventory cost but affect the overall inventory cost.

2. The inventory data processing method according to claim 1, characterized in that: After getting the processing results, it also includes: Verifying the processing result to obtain a verification result; and / or The processing result, the cost calculation method corresponding to the cost calculation and the data affecting the unit inventory cost are recorded.

3. The inventory data processing method according to claim 1 or 2, characterized in that: The cost calculation according to the data affecting the unit inventory cost in the calculated inventory transaction data includes: Acquire data affecting unit inventory cost from the calculated inventory transaction data; obtaining a cost calculation method for the inventory item; and Cost calculation is performed on the data affecting the unit inventory cost according to the cost calculation method.

4. The inventory data processing method according to claim 1 or 2, characterized in that: The accounting rules include: One or more of the following: purchase receipt accounting rules, loss report delivery accounting rules, return delivery accounting rules, surplus receipt accounting rules, shortage delivery accounting rules, transfer delivery accounting rules and transfer receipt accounting rules.

5. The inventory data processing method according to claim 4, characterized in that: The purchase warehousing accounting rules include accounting based on purchase costs; The accounting rules for loss report outbound, surplus inventory entry accounting rules or shortage inventory outbound accounting rules include cost accounting based on the previous accounting period corresponding to the submission date of the loss report, surplus inventory or shortage inventory; The transfer out accounting rules include cost accounting based on the previous accounting cycle corresponding to the transfer out date; The transfer-in accounting rules include cost accounting based on corresponding transfer-out.

6. The inventory data processing method according to claim 1 or 2, characterized in that: The step of obtaining the to-be-processed inventory transaction data corresponding to the inventory items according to the processing instruction includes: Get business data; Processing the business data to obtain an inventory ledger; and The to-be-processed inventory transaction data corresponding to the inventory item is obtained from the inventory ledger according to the processing instruction.

7. The inventory data processing method according to claim 6, characterized in that: The obtaining, from the inventory ledger, the to-be-processed inventory transaction data corresponding to the inventory item according to the processing instruction includes: Performing a consistency check on the inventory ledger according to the master document dimension of the inventory ledger to obtain a consistency check result; and The to-be-processed inventory transaction data corresponding to the inventory item is obtained from the inventory ledger according to the consistency check result and the processing instruction.

8. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the inventory data processing method according to any one of claims 1 to 7.

9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which are used to implement the inventory data processing method according to any one of claims 1 to 7 when executed by a processor.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the inventory data processing method according to any one of claims 1 to 7 is implemented.