A write-off method, device and medium based on unsupervised learning
By adopting unsupervised learning in the ERP system, and using clustering algorithm to classify and optimize the verification documents, the problem of inefficient monthly settlement tasks in the ERP system is solved, automatic verification is realized, and verification is improved efficiency.
Patent Information
- Application Number
- CN202410222488.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-02-28
AI Technical Summary
The monthly tasks in the existing ERP system require a lot of manpower to operate, and the automation process relies on the matching of strong identification elements and planning task modification, resulting in inefficiency and cumbersomeness.
Using a written-off method based on unsupervised learning, by obtaining documents to be written off and setting accounting dimensions and weight coefficients, the documents are classified using clustering algorithms, and the weight coefficients are improved to optimize the clustering results, and automated written-offs are realized.
The number of modifications to manpower operations and planned tasks is reduced, the verification efficiency is improved, and the verification of similar documents is automatically achieved through clustering and processing of similar documents.
Smart Images

Figure CN118096069B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine learning, and in particular to a write-off method, device and medium based on unsupervised learning. Background Art
[0002] In the Enterprise Resource Planning (ERP) system, there are a large number of business documents, and monthly settlement is the most arduous task for each enterprise unit at the end of the month, one of which is to write off and clear accounts.
[0003] The existing information system is achieved by manually matching the business documents to be written off, or by batch planning tasks. The former requires a lot of repetitive manual operations, which is inefficient and cumbersome; the latter requires strong identification of certain matching elements, such as business units, in order for the system to run automatically. Once the business changes, the planned task program needs to be modified synchronously. Summary of the invention
[0004] In order to solve the above problems, this application proposes a write-off method based on unsupervised learning, including:
[0005] Obtain the document to be written off, and based on the document to be written off, set the corresponding accounting dimension and the weight coefficient corresponding to the accounting dimension;
[0006] Based on an unsupervised learning clustering algorithm, clustering processing is performed on the documents to be written off according to the accounting dimensions and the weight coefficients;
[0007] Based on the clustering results, write-off operations are performed on the documents to be written off in each cluster.
[0008] In one example, the method further includes:
[0009] Determine whether there are designated documents to be written off that are incorrectly clustered in the clustering results;
[0010] Determine the dimension values of each accounting dimension corresponding to all designated documents to be written off, and determine the first designated accounting dimension corresponding to the dimension values having the largest number of identical values;
[0011] Increase the weight coefficient of the first specified accounting dimension.
[0012] In one example, increasing the weight coefficient of the first specified accounting dimension specifically includes:
[0013] Based on the same number of the dimension values, determining an increased value of the weight coefficient;
[0014] The same number is positively correlated with the increased value, and the increased value has an upper limit for a single increase.
[0015] In one example, obtaining the documents to be written off includes:
[0016] Confirm that the user has logged into the ERP system and starts the write-off module;
[0017] In a resource pool storing documents to be written off, a preset number of documents to be written off are taken out in order from high to low according to the priority of each document to be written off; wherein the priority is determined based on the dimension value corresponding to the second specified accounting dimension and the weight coefficient.
[0018] In one example, clustering processing is performed on the documents to be written off based on the accounting dimension and the weight coefficient based on an unsupervised learning clustering algorithm, specifically including:
[0019] Taking each document to be written off as a node, determining the spatial position of the node according to the dimension value of the accounting dimension, and calculating the distance value between each node based on the weight coefficient;
[0020] By using the K-means algorithm, all nodes are divided into several sets to achieve clustering processing of the documents to be written off.
[0021] In one example, based on the clustering results, the write-off operation is performed on the documents to be written off in each cluster, specifically including:
[0022] Based on the clustering results, the documents to be written off in each set are grouped as a write-off batch;
[0023] For each write-off batch of documents to be written off, a unified write-off operation is performed to reduce the amount of the matched documents to be written off by the same amount;
[0024] If there is still a balance in the amount of the document to be written off after the equal amount reduction, it will continue to be a document to be written off, and the priority of the document to be written off in the resource pool will be increased.
[0025] In one example, the spatial position of the node is represented by a vector in JSON format, and each node uses the document internal code of its corresponding document to be cancelled as a unique identifier.
[0026] In one example, the accounting dimensions include system prefabricated dimensions and user-defined dimensions;
[0027] The system prefabricated dimensions include: at least one of: unit, trading unit, nature of payment, amount, contract, and project; the custom dimensions include: tax rate;
[0028] The weight coefficient of the unit is 1 by default, and the weight coefficient of the amount and the transaction unit is less than 1 by default.
[0029] On the other hand, the present application also proposes a write-off device based on unsupervised learning, comprising:
[0030] at least one processor; and,
[0031] a memory communicatively connected to the at least one processor; wherein,
[0032] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the unsupervised learning-based write-off method as described in any of the above examples.
[0033] On the other hand, the present application also proposes a non-volatile computer storage medium storing computer executable instructions, characterized in that the computer executable instructions are set to: the unsupervised learning-based write-off method described in any of the above examples.
[0034] The write-off method based on unsupervised learning proposed in this application can bring the following beneficial effects:
[0035] By clustering the documents to be written off, similar documents to be written off can be processed in batches. In this way, when processing each batch of documents to be written off, since the similarity between the documents in each batch is very high, whether it is done manually or through planned tasks, it can reduce repetitive human operations, or keep the business unchanged, reduce the number of times the planned task program is modified, and improve the efficiency of writing off. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0037] Figure 1 Schematic diagram of the process of the write-off method based on unsupervised learning in the embodiment of the present application;
[0038] Figure 2 A schematic diagram of a process of write-off based on unsupervised learning in one scenario in an embodiment of the present application;
[0039] Figure 3 It is a schematic diagram of a write-off device based on unsupervised learning in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0041] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0042] like Figure 1 and Figure 2 As shown, the embodiment of the present application provides a write-off method based on unsupervised learning, including:
[0043] S101: Obtain a document to be written off, and based on the document to be written off, set a corresponding accounting dimension and a weight coefficient corresponding to the accounting dimension.
[0044] Generally speaking, a write-off module is built into the ERP system to perform write-off operations. After the user logs in to the ERP system, the write-off module is started. At this time, the system takes out a preset number of documents to be written off from the resource pool storing the documents to be written off. After the current batch of documents to be written off is written off, the next batch of documents to be written off is taken out for write-off. If the total amount in the resource pool does not reach the preset amount, all of them are taken out at once.
[0045] The document to be written off is set with corresponding accounting dimensions, and a weight coefficient is set for each accounting dimension. For example, the accounting dimensions include system pre-made dimensions and user-defined dimensions. The system pre-made dimensions include at least one of: unit, trade unit, nature of payment, amount, contract, and project, and the user-defined dimensions include: tax rate.
[0046] In order to achieve a relatively high clustering accuracy, it is necessary to adjust the weight coefficient of each accounting dimension. The higher the weight coefficient, the greater the possibility of belonging to the same cluster. Through different weights, clustering results that meet different requirements can be found. For example, if the finance department requires that both parties to the write-off must be from the same unit, the unit weight can be set to 1 by default. The amount, the transaction unit, etc. are not mandatory, but the closer the better. In this case, a decimal weight less than 1 can be set by default according to the actual situation.
[0047] At this time, the priority of each document to be written off can be determined based on the dimension value corresponding to the second specified accounting dimension and the weight coefficient. Then, according to the priority of each document to be written off, a preset number of documents to be written off are taken out in order from high to low.
[0048] For example, the second designated accounting dimension is set to the transaction unit and amount, and the corresponding dimension values are assigned to different transaction units in advance, and the more important the transaction unit, the higher the dimension value. The weight coefficient of the transaction unit is 0.5, and the weight coefficient of the amount is 1. The amount of document A to be written off is 10,000 yuan. When it is in units of 10,000 yuan, its dimension value is 1, and the dimension value corresponding to its transaction unit is 1, so its corresponding priority score is 1*1+1*0.5=1.5. The amount of document B to be written off is 5,000 yuan, and the dimension value corresponding to the transaction unit is 1.5, so its corresponding priority score is 0.5*1+1.5*0.5=1.25. Therefore, the priority score of document A to be written off is higher, and its priority is also higher.
[0049] S102: Based on an unsupervised learning clustering algorithm, cluster the documents to be written off according to the accounting dimensions and the weight coefficients.
[0050] The clustering algorithm of unsupervised learning can be the K-means algorithm, whose core logic is to divide N points into K sets so that the sum of squares of all sets is minimized, and the effect achieved is that each point belongs to the cluster center closest to it. This is consistent with the goal of document write-off in ERP: find the same or similar documents in certain dimensions as a write-off batch, and then perform the write-off operation.
[0051] S103: Based on the clustering results, write-off operations are performed on the documents to be written off in each cluster.
[0052] The write-off operation includes reducing the amount of the matched documents by an equal amount. For example, if the receivables are RMB 100 and the receipts are RMB 80, once the match is successful, RMB 80 can be written off. The final result is that the receivable balance is RMB 20 and the receipt balance is RMB 0, indicating that the receipt write-off is completed, and there is still a balance in the receivables, waiting for the next round of matching and write-off until the balance is 0.
[0053] By clustering the documents to be written off, similar documents to be written off can be processed in batches. In this way, when processing each batch of documents to be written off, since the similarity between the documents in each batch is very high, whether it is done manually or through planned tasks, it can reduce repetitive human operations, or keep the business unchanged, reduce the number of times the planned task program is modified, and improve the efficiency of writing off.
[0054] In one embodiment, if the clustering algorithm has a high accuracy during the write-off process, and the clustering result is close to the result of manual matching, the write-off amount can be directly filled in to perform the write-off operation. If it is determined that there are incorrectly clustered designated documents to be written off in the clustering result, for example, a document to be written off is obviously clustered in the wrong set, then the document to be written off can be deleted before the write-off, and it can be used as feedback for the clustering algorithm so that the clustering algorithm can perform self-learning based on the feedback.
[0055] For the clustering algorithm, if the verification result is consistent with the clustering result of the algorithm, it means that the clustering algorithm does not need to be adjusted. If the verification result is inconsistent with the clustering result, at this time, the clustering algorithm performs self-learning, and the weight coefficient of the clustering algorithm needs to be adjusted.
[0056] Specifically, the dimension values of each accounting dimension corresponding to all the incorrectly clustered designated documents to be written off are determined, and the first designated accounting dimension corresponding to the dimension values with the largest number of identical values is determined. For example, if the dimension value corresponding to the accounting dimension of the transaction unit of all incorrectly clustered designated documents to be written off is a specific unit, then the transaction unit is the first designated accounting dimension, indicating that the weight coefficient of the first designated accounting dimension is too low, resulting in errors in clustering, so the weight coefficient of the first designated accounting dimension is increased.
[0057] Furthermore, when increasing the weight coefficient, the increase value of the weight coefficient can be determined based on the same number of dimension values. Among them, the same number is positively correlated with the increase value, and the increase value has a single increase upper limit. For example, the total number of documents to be written off is 1000, and the same number of the first designated accounting dimension of the trading unit is 10. At this time, based on its quantity proportion and the preset constant coefficient, the increase value of the weight coefficient is calculated to be 0.05. The preset upper limit of a single increase is 0.1, which does not exceed the upper limit of a single increase, so the increase value is set to 0.05.
[0058] In one embodiment, during clustering, each document to be written off is taken as a node, the spatial position of the node is determined according to the dimension value of the accounting dimension, and the distance value between each node is obtained based on the weight coefficient. Through the K-means algorithm, all nodes are divided into several sets to realize clustering processing of the documents to be written off.
[0059] The spatial position of the node is represented by a vector in JSON format, and each node uses the document internal code of the corresponding document to be written off as a unique identifier.
[0060] Furthermore, when executing the write-off operation, based on the clustering results, the documents to be written off in each set are regarded as a write-off batch. At this time, a unified write-off operation is performed for the documents to be written off in each write-off batch to reduce the amount of the matching documents to be written off by an equal amount. The unified write-off operation can be implemented based on manual or scheduled task programs. If there is still a balance in the amount of the document to be written off after the equal amount reduction, it will continue to be a document to be written off, and the priority of the document to be written off in the resource pool will be increased, so that the document to be written off will be selected first at the next write-off, so that it can be written off as soon as possible.
[0061] like Figure 3 As shown, in one embodiment, the present application also provides a write-off device based on unsupervised learning, including:
[0062] at least one processor; and,
[0063] a memory communicatively connected to the at least one processor; wherein,
[0064] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the unsupervised learning-based write-off method as described in any of the above embodiments.
[0065] In one embodiment, the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to be: the write-off method based on unsupervised learning described in any of the above embodiments.
[0066] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0067] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0068] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0069] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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.
[0070] 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.
[0071] 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 A step that specifies a function in one or more boxes.
[0072] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0073] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0074] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0075] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0076] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A write-off method based on unsupervised learning, It is characterized in that include: Obtain the document to be written off, and based on the document to be written off, set the corresponding accounting dimension and the weight coefficient corresponding to the accounting dimension; The accounting dimensions include system prefabricated dimensions and user-defined dimensions; The system pre-made dimensions include: at least one of: unit, trade unit, nature of payment, amount, contract, and project; the custom dimensions include: tax rate; the weight coefficient of the unit is 1 by default, and the weight coefficients of the amount and the trade unit are less than 1 by default; Based on an unsupervised learning clustering algorithm, clustering processing is performed on the documents to be written off according to the accounting dimensions and the weight coefficients; Based on the clustering results, write-off operations are performed on the documents to be written off in each cluster; Obtain documents to be written off, including: Confirm that the user has logged into the ERP system and starts the write-off module; In a resource pool storing documents to be written off, a preset number of documents to be written off are taken out in order from high to low according to the priority of each document to be written off; wherein the priority is determined based on the dimension value corresponding to the second specified accounting dimension and the weight coefficient; Based on the clustering algorithm of unsupervised learning, the documents to be written off are clustered by the accounting dimension and the weight coefficient, specifically including: Taking each document to be written off as a node, determining the spatial position of the node according to the dimension value of the accounting dimension, and calculating the distance value between each node based on the weight coefficient; By using the K-means algorithm, all nodes are divided into several sets to achieve clustering processing of the documents to be written off; Based on the clustering results, write-off operations are performed on the documents to be written off in each cluster, including: Based on the clustering results, the documents to be written off in each set are grouped as a write-off batch; For each write-off batch of documents to be written off, a unified write-off operation is performed to reduce the amount of the matched documents to be written off by the same amount; If there is still a balance in the amount of the document to be written off after the equal amount reduction, it will continue to be a document to be written off, and the priority of the document to be written off in the resource pool will be increased.
2. The method according to claim 1, It is characterized in that The method further comprises: Determine whether there are designated documents to be written off that are incorrectly clustered in the clustering results; Determine the dimension values of each accounting dimension corresponding to all designated documents to be written off, and determine the first designated accounting dimension corresponding to the dimension values having the largest number of identical values; Increase the weight coefficient of the first specified accounting dimension.
3. The method according to claim 2, It is characterized in that Increasing the weight coefficient of the first designated accounting dimension specifically includes: Based on the same number of the dimension values, determining an increased value of the weight coefficient; The same number is positively correlated with the increased value, and the increased value has an upper limit for a single increase.
4. The method according to claim 1, It is characterized in that The spatial position of the node is represented by a vector in JSON format, and each node uses the document internal code of its corresponding document to be written off as a unique identifier.
5. A write-off device based on unsupervised learning, It is characterized in that include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the unsupervised learning-based write-off method as described in any one of claims 1 to 4.
6. A non-volatile computer storage medium storing computer executable instructions, It is characterized in that The computer executable instructions are configured as: the write-off method based on unsupervised learning as described in any one of claims 1 to 4.
