A cost acquisition method, device, equipment and storage medium

By distributing the original data stream to multiple distributed computing nodes for cost calculation, the problem of excessive time and low efficiency caused by a single node dependency bottleneck is solved, and efficient cost calculation is achieved.

CN114090255BActive Publication Date: 2025-02-18KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111406295.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2025-02-18
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

During the cost calculation process of common enterprise management systems, large data volumes are processed in batches on a single node, resulting in a bottleneck of dependence on a single node, which takes too long and has low cost calculation efficiency.

Method used

By receiving the original data stream, processing it into multiple copies of data according to preset rules, and distributing the data to multiple distributed computing nodes, instructing each node to use its own stored algorithm model to perform cost calculations, and finally obtain and convert the output data stream into pre- Set form.

Benefits of technology

It effectively avoids the bottleneck of dependence of a single node, shortens time-consuming and improves cost calculation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090255B_ABST
    Figure CN114090255B_ABST
Patent Text Reader

Abstract

The present invention discloses a cost acquisition method, device, equipment and storage medium, the method comprising: an input adapter receives an original data stream, processes the received original data stream into multiple copies of data according to preset rules, and distributes the processed multiple copies of data to multiple distributed computing nodes; each distributed computing node uses each algorithm model stored in itself to perform cost calculation based on the distributed data, and obtains corresponding calculation results as output data streams; an output adapter obtains the output data stream and converts the output data stream into a preset form. It can be seen that the present application implements cost calculation in distributed parallel by multiple distributed computing nodes, which is different from implementing cost calculation in batches and serially on a single node for large amounts of data, and can effectively avoid the problem of single node dependence bottleneck, thereby greatly shortening the time consumption and improving the efficiency of cost calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and more specifically, to a cost acquisition method, device, equipment and storage medium. Background Art

[0002] In the cost calculation process of common enterprise management systems, large amounts of data are processed serially in batches on a single node, which can lead to a single-node dependency bottleneck, excessive time consumption, and low cost calculation efficiency. Summary of the invention

[0003] The purpose of the present invention is to provide a cost acquisition method, device, equipment, storage medium and computer program product, which can effectively avoid the problem of single node dependence bottleneck, thereby greatly shortening the time consumption and improving the cost calculation efficiency.

[0004] In order to achieve the above object, the present invention provides the following technical solutions:

[0005] A cost acquisition method, comprising:

[0006] Receive the original data stream, and process the received original data stream into multiple copies of data according to preset rules;

[0007] Distribute the processed data to multiple distributed computing nodes, instruct each distributed computing node to use each algorithm model stored in itself to perform cost calculation based on the distributed data, and obtain corresponding calculation results as output data streams;

[0008] The output data stream obtained by each distributed computing node is obtained, and the output data stream is converted into data information in a preset format.

[0009] Preferably, the received original data stream is processed into multiple copies of data according to a preset rule, including:

[0010] Useless data in the received original data stream is filtered out according to the filtering rules, the original data stream after filtering out the useless data is divided into multiple data according to the grouping principle, and each data is divided into multiple batches of data according to the batching principle; wherein, the same data needs to be distributed to the same distributed computing node, and the multiple batches of data contained in the same data can be cost calculated in batches.

[0011] Preferably, instructing each distributed computing node to use each algorithm model stored in itself to perform cost calculation based on the distributed data includes:

[0012] Instruct each distributed computing node to assign each batch of data in the distributed data to each algorithm model contained in itself for parallel cost calculation, and / or assign each batch of data in the distributed data to the corresponding algorithm model in sequence for serial cost calculation.

[0013] Preferably, converting the output data stream into data information in a preset format includes:

[0014] The current business is determined, and the output data stream is converted into data information in a form having a mapping relationship with the current business.

[0015] Preferably, before the received original data stream is processed into multiple copies of data according to a preset rule, the method further includes:

[0016] A legitimacy check is performed on the original data stream. If the legitimacy check passes, a step of processing the received original data stream into multiple copies of data according to a preset rule is executed; otherwise, cost calculation based on the obtained original data stream is rejected.

[0017] Preferably, it also includes:

[0018] If the legality check passes, determine whether the current low-order code corresponding layer is the top layer, if yes, determine to complete the cost calculation, otherwise, obtain part of the data of the current low-order code corresponding layer from the original data stream, and use the obtained part of the data as the original data stream to execute the step of processing the received original data stream into multiple copies of data according to preset rules;

[0019] After converting the output data stream into a preset form, the method further includes:

[0020] Return to the step of determining whether the layer corresponding to the current low-order code is the topmost layer.

[0021] Preferably, after determining that the cost calculation is completed, the method further includes:

[0022] A corresponding cost information report is generated based on all the acquired output data streams, and the cost information report is output to the business.

[0023] A cost acquisition device, comprising:

[0024] The receiving module is used to: receive the original data stream, and process the received original data stream into multiple copies of data according to preset rules;

[0025] The calculation module is used to distribute the processed data to multiple distributed computing nodes, instruct each distributed computing node to use each algorithm model stored in itself to perform cost calculation based on the distributed data, and obtain corresponding calculation results as output data streams;

[0026] The conversion module is used to obtain the output data stream obtained by each distributed computing node and convert the output data stream into a preset form.

[0027] A computer device comprising:

[0028] Memory for storing computer programs;

[0029] A processor is used to implement the steps of the cost acquisition method as described in any one of the above items when executing the computer program.

[0030] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above cost acquisition methods.

[0031] A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the cost acquisition method as described in any one of the above items are implemented.

[0032] The present invention provides a cost acquisition method, device, equipment, storage medium and computer program product, the method comprising: receiving an original data stream, processing the received original data stream into multiple copies of data according to preset rules; distributing the processed multiple copies of data to multiple distributed computing nodes, instructing each distributed computing node to use each algorithm model stored in itself to perform cost calculation based on the distributed data, and obtaining corresponding calculation results as output data streams; obtaining the output data stream obtained by each distributed computing node, and converting the output data stream into data information in a preset form. In the present application, after receiving the original data stream, the original data stream is processed into multiple copies of data, and the multiple copies of data are distributed to multiple distributed computing nodes, and the multiple distributed computing nodes use the algorithm model stored in themselves to implement the corresponding cost calculation based on the distributed data, and obtain the desired output data stream, and then convert the output data stream into data information in a preset form, so as to facilitate the subsequent corresponding acquisition and analysis of the output data stream. It can be seen that the present application implements cost calculation in a distributed and parallel manner by multiple distributed computing nodes, which is different from implementing cost calculation in batches and serially on a single node for large amounts of data, and can effectively avoid the problem of bottlenecks caused by single node dependence, thereby greatly shortening the time consumption and improving the efficiency of cost calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0034] Figure 1 A flow chart of a cost acquisition method provided by an embodiment of the present invention;

[0035] Figure 2A schematic diagram of a specific implementation of a cost acquisition method provided by an embodiment of the present invention;

[0036] Figure 3 A schematic diagram of the structure of a cost acquisition device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] See also Figure 1 , which shows a flow chart of a cost acquisition method provided by an embodiment of the present invention, which may specifically include:

[0039] S11: receiving an original data stream, and processing the received original data stream into multiple copies of data according to a preset rule.

[0040] A data stream (or streaming data) refers to a series of dynamic data collections that are infinite in time and quantity. The value of data decreases with the passage of time, so it must be calculated in real time to give a response in seconds; streaming computing is the processing of data streams, which is real-time computing; the cost acquisition method provided in the embodiment of the present application is to process the original data stream, because it is a streaming cost acquisition method.

[0041] Cost accounting objects are objects for measuring costs in an enterprise, such as cost centers, production orders, maintenance orders, sales orders, service orders, operating activities, products, services, projects, etc. From the perspective of cost accounting, they are divided into intermediate cost objects and final cost objects. The cost of intermediate cost objects must finally be transferred to final cost objects; cost centers are centers that bear the responsibility for controlling and assessing costs and expenses. They are responsible units for collecting and allocating expenses, controlling and assessing costs, and are responsible units that have controllable costs. The original data flow is a data flow containing various data required for cost calculation, including but not limited to the planned output, completed output, material consumption, resource consumption, manufacturing expenses and other initial data sets of products. Among them, cost is the monetary expression and objectification of resources that must be consumed when carrying out production and operation activities or achieving certain goals. Cost calculation refers to the accounting for the occurrence of production costs and the formation of product costs. It is the basic link of cost management. There are many methods for cost calculation, generally type method, step method, batch method, classification method, etc. In an embodiment of the present application, after receiving the original data stream, the received original data stream can be divided into multiple copies of data according to rules (preset rules) set in advance according to actual needs, and these multiple copies of data can be distributed to multiple distributed computing nodes, so as to utilize these multiple distributed computing nodes to implement cost calculation based on the distributed data in distributed parallel.

[0042] S12: Distribute the processed multiple copies of data to multiple distributed computing nodes, instruct each distributed computing node to use each algorithm model stored in itself to perform cost calculation based on the distributed data, and obtain corresponding calculation results as output data streams.

[0043] In the embodiment of the present application, multiple distributed computing nodes are provided. After the original data stream is divided into multiple data portions, each data portion can be distributed to the corresponding multiple distributed computing nodes in a one-to-one correspondence, or each data portion can be distributed to at least one corresponding distributed computing node in a many-to-one manner (that is, at least two data portions are distributed to a single distributed computing node, and at this time, the number of distributed computing nodes to which the data is distributed is less than the number of data portions into which the original data is divided). Of course, the distribution of the multiple data portions into which the original data stream is divided can also be comprehensively realized in accordance with the above two methods at the same time, all of which are within the protection scope of the present invention, thereby realizing distributed parallel cost calculation of the original data stream.

[0044] In addition, the algorithms required for cost calculation (such as accumulation, etc.) can be pre-encapsulated as corresponding algorithm models (data processing calculation engine), and then these algorithm models can be added to each distributed computing node, that is, each distributed computing node contains the algorithm models encapsulated by each algorithm required for cost calculation; therefore, after receiving the distributed data, any distributed computing node can use one or more algorithm models contained in itself to implement the corresponding cost calculation for the distributed data, so as to obtain the expected output data stream after performing corresponding calculations on all distributed data.

[0045] S13: Obtain the output data stream obtained by each distributed computing node, and convert the output data stream into data information in a preset format.

[0046] After the distributed computing node to which the data is distributed obtains the corresponding output data stream, the output data stream can be converted into data information in a preset format as required, so as to facilitate subsequent operations such as obtaining and analyzing the output data stream. The preset format includes but is not limited to documents, reports, etc.

[0047] After receiving the original data stream in this application, the original data stream is processed into multiple copies of data, and the multiple copies of data are distributed to multiple distributed computing nodes. The multiple distributed computing nodes use their own stored algorithm models to implement corresponding cost calculations based on the distributed data to obtain the desired output data stream, and then convert the output data stream into data information in a preset form, so as to facilitate the subsequent acquisition and analysis of the output data stream. It can be seen that this application implements cost calculation in a distributed and parallel manner by multiple distributed computing nodes, which is different from implementing cost calculation in batches and serially on a single node for large amounts of data. It can effectively avoid the problem of single node dependence bottleneck, thereby greatly shortening the time consumption and improving the efficiency of cost calculation.

[0048] A cost acquisition method provided by an embodiment of the present invention processes a received original data stream into multiple copies of data according to a preset rule, which may include:

[0049] Useless data in the received original data stream is filtered out according to the filtering rules, the original data stream after filtering out the useless data is divided into multiple data according to the grouping principle, and each data is divided into multiple batches of data according to the batching principle; wherein, the same data needs to be distributed to the same distributed computing node, and the multiple batches of data contained in the same data can be cost calculated in batches.

[0050] It should be noted that after receiving the original data stream, the original data stream will be processed according to grouping, filtering, batching and other rules (such as cost center + cost object, cost object + material, cost object + cost project work order number, etc.) and then passed to multiple distributed computing nodes. Specifically, filtering is to delete useless data (which can be set according to actual needs) that is not needed for cost calculation contained in the original data stream, so as to avoid the waste of resources caused by the processing of useless data; grouping is to divide the original data stream into multiple copies of data, each of which can correspond to a product or a project, etc., so that each copy of data can realize cost calculation independently without being affected by other data, so that each copy of data can be distributed to different distributed computing nodes to ensure distributed parallel computing; batching is to divide the same data into multiple batches of data. Since multiple batches of data in the same data may affect each other when realizing cost calculation, it is necessary to instruct the distributed computing nodes to process the multiple batches of data in the data in sequence in order to realize effective cost calculation. In other specific implementations, the multiple copies of data divided into the original data stream can also be processed in batches to obtain multiple batches of data groups, and a single batch of data groups contains at least one copy of the data divided into the original data stream, so that each copy of data in the same batch is distributed to the distributed computing nodes at the same time, and data in different batches are distributed to the distributed computing nodes at different times, further ensuring the effective implementation of cost calculation; of course, other settings made according to actual needs are also within the protection scope of the present invention.

[0051] A cost acquisition method provided by an embodiment of the present invention instructs each distributed computing node to perform cost calculation based on distributed data using each algorithm model stored in itself, which may include:

[0052] Instruct each distributed computing node to assign each batch of data in the distributed data to each algorithm model contained in itself for parallel cost calculation, and / or assign each batch of data in the distributed data to the corresponding algorithm model in sequence for serial cost calculation.

[0053] It should be noted that when dividing the same data into multiple batches of data, any distributed computing node in the embodiment of the present application can use multiple algorithm models to realize parallel calculation of multiple batches of data in the same distributed data at the same time, can use corresponding algorithm models to realize serial calculation of multiple batches of data in the same distributed data in sequence, and can also realize the cost calculation of the distributed data in a comprehensive manner according to the above two methods at the same time. Of course, other settings can also be made according to actual needs, which are all within the protection scope of the present invention; thereby making cost calculation more flexible and more in line with actual needs.

[0054] A cost acquisition method provided by an embodiment of the present invention converts an output data stream into data information in a preset format, which may include:

[0055] Determine the current business and convert the output data stream into data information in a form that has a mapping relationship with the current business.

[0056] In the embodiment of the present application, multiple customizable converters (such as domain model converters, business object model converters and other custom model converters, etc.) can be provided. The function of these multiple converters is to convert the data of the output data stream into different forms (such as business document data packets in different forms) to facilitate the business code to perform corresponding logical processing on it. Specifically, the current business can be determined first, and then the converter with a mapping relationship with the current business can be determined, and then the converter with a mapping relationship with the current business can be used to convert the output data stream into a corresponding form to cope with different business needs. In addition, the above-mentioned mapping relationship can also be configured or updated according to actual needs to meet real-time actual needs.

[0057] A cost acquisition method provided by an embodiment of the present invention may further include, before processing the received original data stream into multiple copies of data according to a preset rule:

[0058] Performing a validity check on the original data stream. If the validity check passes, executing the step of processing the received original data stream into multiple copies of data according to a preset rule. Otherwise, refusing to implement cost calculation based on the obtained original data stream.

[0059] A cost acquisition method provided by an embodiment of the present invention may further include:

[0060] If the legality check passes, determine whether the current low-order code corresponding layer is the top layer. If so, determine that the cost calculation is completed. Otherwise, obtain part of the data of the current low-order code corresponding layer from the original data stream, and use the obtained part of the data as the original data stream to execute the step of processing the received original data stream into multiple copies of data according to preset rules;

[0061] After converting the output data stream into a preset form, it can also include:

[0062] Return to the step of determining whether the level corresponding to the current low-order code is the topmost level.

[0063] At the beginning of cost calculation, the embodiment of the present application first performs a validity check on the original data stream (including whether the original data stream has been reviewed, whether the original data stream is the latest data stream, etc.). If the validity check on the original data stream passes (such as the original data stream has been reviewed, the original data stream is the latest data stream, etc.), it means that cost calculation can be implemented based on the original data stream. Otherwise, cost calculation based on the original data stream is rejected, thereby ensuring the validity of the data stream used to implement cost calculation. After determining that cost calculation can be implemented based on the original data stream, the low-order code of the material can be calculated on the original data stream to obtain the current low-order code, and determine whether the corresponding level of the current low-order code is the topmost layer. If the corresponding level of the current low-order code is not the topmost layer, it means that the cost calculation needs to continue to be implemented. Therefore, the data information of the corresponding level of the calculated low-order code in the original data stream is obtained, and this part of the data information is used as the original data stream to execute the steps and subsequent steps of processing it into multiple copies of data. If the corresponding level of the current low-order code is the topmost layer, it means that the cost calculation has been completed. In addition, after obtaining the output data stream obtained by cost calculation, After that, it will return to execute the steps of obtaining the current low-order code and judging whether the corresponding level of the current low-order code is the top level. At this time, the data belonging to the corresponding level of the current low-order code will be obtained from both the original data stream and the output data stream, and each time the data belonging to the corresponding level of the current low-order code is obtained, the obtained data will be used as a new original data stream to execute the steps of processing it into multiple copies of data and subsequent steps; thus, through this cyclic iterative calculation method, from the bottom layer of the low-order code to the top layer of the low-order code, the cost calculation of the original data stream corresponding to the corresponding level is completed in sequence to obtain the final cost; the validity and integrity of the cost calculation are ensured. Among them, when obtaining the data information of the corresponding level of the calculated low-order code in the original data stream, it can be achieved based on filtering conditions such as materials.

[0064] Among them, materials refer to all materials (regardless of whether they come from means of production or means of living), fuels, parts, semi-finished products, outsourced parts, and scraps, scraps and various wastes that are inevitably generated in the production process, which are circulated in the production field except the final products. The low-order code of a material refers to the lowest order that a certain material has ever appeared in all product structures (cost BOM, i.e. cost bill of materials, which is a file that describes the product structure in data format, is a product structure data file that can be recognized by computers, and is also the dominant file of ERP); in simple terms, when producing a certain product, the low-order code level of the material to be processed in the first step is the lowest, the low-order code level of the material to be processed in the second step (i.e. the material obtained by the first step) is higher than the low-order code level of the material to be processed in the first step, the low-order code level of the material to be processed in the third step (i.e. the material obtained by the second step) is higher than the low-order code level of the material to be processed in the second step, and so on; thus, realizing cost calculation from the bottom to the top can make the cost calculation process more in line with the product production process, thereby improving the effectiveness of cost calculation.

[0065] It should be noted that after determining that the cost calculation is completed, it can also include: generating a corresponding cost information report based on all the output data streams obtained, and outputting the cost information report to the business. Specifically, in the embodiment of the present application, after completing the cost calculation, all the output data streams output by the output adapter can also be cached, and a corresponding cost information report can be generated based on the cached data to implement the calculation report processing, and finally the cost information report can be output to the business to facilitate the business to implement operations such as analysis and use of the cost information report. In addition, after obtaining the output data stream, the accounting service can also be called to implement the processing of the output data stream for subsequent use.

[0066] In a specific implementation, a cost acquisition method provided by an embodiment of the present invention can be implemented with an input adapter, a distributed computing node, an output adapter, and a main control node as the execution subjects of corresponding steps; in this case, the cost acquisition method may include:

[0067] The input adapter receives the original data stream, processes the received original data stream into multiple copies of data according to preset rules, and distributes the processed multiple copies of data to multiple distributed computing nodes; each distributed computing node uses the algorithm models stored in itself to perform cost calculation based on the distributed data, and obtains the corresponding calculation results as the output data stream; the output adapter obtains the output data stream and converts the output data stream into data information in a preset form.

[0068] The input adapter processes the received original data stream into multiple copies of data according to preset rules, which may include: the input adapter filters out useless data in the received original data stream according to the filtering rules, divides the original data stream after filtering out the useless data into multiple copies of data according to the grouping principle, and divides each copy of the data into multiple batches of data according to the batching principle; wherein the same copy of data needs to be distributed to the same distributed computing node, and the multiple batches of data contained in the same copy of data can be cost calculated in batches.

[0069] Each distributed computing node uses the algorithm models stored in itself to perform cost calculation based on the distributed data, which may include: each distributed computing node assigns each batch of data in the distributed data to each algorithm model contained in itself for parallel cost calculation, and / or assigns each batch of data in the distributed data to the corresponding algorithm model in sequence for serial cost calculation.

[0070] The output adapter converts the output data stream into data information in a preset form, which may include: the output adapter determines the current business, and converts the output data stream into data information in a form that has a mapping relationship with the current business.

[0071] Before the input adapter receives the original data stream, it may also include: the main control node obtains the original data stream, performs a legality check on the obtained original data stream, and if the legality check passes, passes the original data stream to the input adapter, otherwise, refuses to implement cost calculation based on the obtained original data stream.

[0072] Before the main control node passes the acquired original data stream to the input adapter, the main control node may further include: if the legality check passes, the main control node determines whether the layer corresponding to the current low-order code is the topmost layer, if so, determines to complete the cost calculation, otherwise, obtains part of the data of the layer corresponding to the current low-order code from the original data stream, and uses the obtained part of the data as the original data stream to execute the step of passing the original data stream to the input adapter;

[0073] After the output adapter converts the output data stream into a preset format, the method may further include: the main control node acquires the output data stream, and executes a step in which the main control node determines whether the layer corresponding to the current low-order code is the topmost layer.

[0074] After the main control node determines that the cost calculation is completed, the method may further include: the main control node generates a corresponding cost information report based on all acquired output data streams, and outputs the cost information report to the service.

[0075] Specifically, Figure 2As shown; wherein, obtaining the specified level of cost objects and materials is to obtain the data information of the corresponding level of the current low-order code from the original data stream (or the original data stream and the output data stream). The streaming computing framework includes an input adapter, an output adapter and an algorithm model. The algorithm model belongs to a distributed computing node, and the distributed computing node can cache the intermediate data of the cost calculation using a cache service.

[0076] This application mainly solves the problem of low efficiency of cost calculation under large amounts of data, and solves the problem of complex algorithms in the cost calculation process under large amounts of data. At the same time, in conjunction with the algorithm model, it can cope with all scenarios of enterprise cost calculation; in the face of massive data, it takes advantage of the distributed computing framework, adjusts the task parallelism for elastic scaling, rationally utilizes resources, and reduces enterprise costs; supports real-time cost calculation under large amounts of data, greatly improving the performance of cost calculation; supports complex algorithms, which can be configured as models, supporting reuse and configuration; there is no need to write complex and error-prone multi-threaded code.

[0077] The embodiment of the present invention also provides a cost acquisition device, such as Figure 3 As shown, it may include:

[0078] The receiving module 11 is used to: receive the original data stream, and process the received original data stream into multiple copies of data according to a preset rule;

[0079] The calculation module 12 is used to distribute the processed multiple copies of data to multiple distributed computing nodes, instruct each distributed computing node to use each algorithm model stored in itself to perform cost calculation based on the distributed data, and obtain corresponding calculation results as output data streams;

[0080] The conversion module 13 is used to obtain the output data stream obtained by each distributed computing node and convert the output data stream into a preset format.

[0081] An embodiment of the present invention further provides a computer device, which may include:

[0082] Memory for storing computer programs;

[0083] A processor is used to implement the steps of any of the above cost acquisition methods when executing a computer program.

[0084] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above cost acquisition methods can be implemented.

[0085] An embodiment of the present invention further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the cost acquisition method as described in any one of the above items are implemented.

[0086] It should be noted that the description of the relevant parts of the cost acquisition device, equipment, storage medium, and computer program product provided in the embodiment of the present invention can be found in the detailed description of the corresponding parts of the cost acquisition method provided in the embodiment of the present invention, which will not be repeated here. In addition, the parts of the above technical solutions provided in the embodiment of the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0087] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A cost acquisition method, characterized in that: include: Receive the original data stream, perform a validity check on the original data stream, and if the validity check passes, calculate the low-order code of the material on the original data stream to obtain the current low-order code. If the layer corresponding to the current low-order code is not the top layer, obtain part of the data of the layer corresponding to the current low-order code from the original data stream, and use the obtained part of the data as the original data stream, and process the original data stream into multiple copies of data according to preset rules; Distribute the processed data to multiple distributed computing nodes, instruct each distributed computing node to use each algorithm model stored in itself to perform cost calculation based on the distributed data, and obtain corresponding calculation results as output data streams; Acquire the output data stream obtained by each distributed computing node, and convert the output data stream into data information in a preset form; Return to the step of determining whether the level corresponding to the current low-order code is the topmost level.

2. The method according to claim 1, characterized in that The received original data stream is processed into multiple copies of data according to preset rules, including: Useless data in the received original data stream is filtered out according to the filtering rules, the original data stream after filtering out the useless data is divided into multiple data according to the grouping principle, and each data is divided into multiple batches of data according to the batching principle; wherein, the same data needs to be distributed to the same distributed computing node, and the multiple batches of data contained in the same data can be cost calculated in batches.

3. The method according to claim 2, characterized in that Instruct each distributed computing node to use each algorithm model stored in itself to perform cost calculation based on the distributed data, including: Instruct each distributed computing node to assign each batch of data in the distributed data to each algorithm model contained in itself for parallel cost calculation, and / or assign each batch of data in the distributed data to the corresponding algorithm model in sequence for serial cost calculation.

4. The method according to claim 3, characterized in that Converting the output data stream into data information in a preset format includes: The current business is determined, and the output data stream is converted into data information in a form having a mapping relationship with the current business.

5. The method according to claim 4, characterized in that The original data stream is subjected to a validity check, which also includes: If the legality check fails, the cost calculation based on the acquired original data stream is rejected.

6. The method according to claim 1, characterized in that Also includes: If the current low-order code corresponds to a layer at the topmost level, it is determined that the cost calculation is completed.

7. The method according to claim 6, characterized in that After the cost calculation is completed, it also includes: A corresponding cost information report is generated based on all the acquired output data streams, and the cost information report is output to the business.

8. A cost acquisition device, characterized in that: include: A receiving module is used to: receive an original data stream, perform a validity check on the original data stream, and if the validity check passes, calculate the low-order code of the material on the original data stream to obtain the current low-order code; if the layer corresponding to the current low-order code is not the top layer, obtain part of the data of the layer corresponding to the current low-order code from the original data stream, and use the obtained part of the data as the original data stream, and process the original data stream into multiple copies of data according to preset rules; The calculation module is used to distribute the processed data to multiple distributed computing nodes, instruct each distributed computing node to use each algorithm model stored in itself to perform cost calculation based on the distributed data, and obtain corresponding calculation results as output data streams; The conversion module is used to: obtain the output data stream obtained by each distributed computing node, convert the output data stream into a preset form, and return to execute the step of determining whether the layer corresponding to the current low-order code is the topmost layer.

9. A computer device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the cost acquisition method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the cost acquisition method according to any one of claims 1 to 7 are implemented.

11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the cost acquisition method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Data processing method and device, computer equipment and storage medium

    CN109857565A