An account data processing method, device and equipment, and a storage medium
By calculating the similarity of names and address information of counterparties in the accounting data, related entities in the accounting data are automatically merged, which solves the problem of inconsistent names of counterparties in the accounting data that leads to confusion in the accounts, and improves the accuracy and efficiency of grouping and merging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ZIJING TECH CO LTD
- Filing Date
- 2023-09-22
- Publication Date
- 2026-07-10
AI Technical Summary
In existing technologies, human error or errors in invoice display can lead to inconsistencies in the names of counterparties in accounting data, resulting in chaotic accounting entries for counterparties. Manual grouping and merging is inefficient and inaccurate.
By calculating the similarity of names of business partners, minimum edit distance, and phonetic-graphic similarity, and combining this with address information, the system automatically filters and merges related business partners in accounting data, improving the accuracy and efficiency of grouping and merging.
This greatly improves the accuracy and efficiency of grouping and merging business partners in the accounting system, reduces labor costs, and avoids omissions caused by manual judgment.
Smart Images

Figure CN117216277B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial management technology, specifically to a method, apparatus, equipment, and storage medium for processing accounting data. Background Technology
[0002] In accounting systems, to facilitate bookkeeping, the same company or enterprise with financial transactions is assigned a single unit code. However, during the bookkeeping process, due to human error, invoice display errors, or historical changes in the counterparty, the same counterparty or company may be registered as different companies with multiple unit codes, leading to confusion in the accounting data. For example, "Qingdao Kangbo ABC Company" and "Qingdao Kangbo ABC Company" are actually the same company, but due to an invoice display error, they are recorded as different companies. The two counterparties should be merged into the correct "Qingdao Kangbo ABC Company". Similarly, "Shandong Hengxin ABC Company" and "Qingdao Hengxin ABC Company" are different companies. The original "Qingdao Hengxin ABC Company" has changed its name, but it is recorded as a different company, with the original city prefix changed to the province prefix. The two counterparties should be merged into the renamed "Shandong Hengxin ABC Company".
[0003] To clean up outstanding accounts receivable and payable in accounting data, accountants often need to group these messy entities into groups, then merge them. For each set of accounts, the entities in each group need to be manually analyzed to determine if there are more than two entities in the same group. In this way, entities in the same group can be merged and cleaned up.
[0004] However, this manual cleanup method is often time-consuming, as it involves identifying potentially grouped counterparties from hundreds or even thousands of existing business partners. For example, manually grouping and merging around 400 business partners typically takes several minutes or even more than ten minutes. Furthermore, simply comparing the names of two business partners manually to determine if they belong to the same group has a limited scope of application, often missing many potential partners that need merging but were not detected, resulting in a low accuracy rate for grouping mergeable business partners in the accounting data. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide an accounting data processing method, apparatus, device and storage medium to solve the problems of low efficiency and low accuracy caused by manual grouping and merging when grouping and merging different names of counterparties in accounting data according to whether they are the same counterparty in the existing financial system.
[0006] According to a first aspect of the present invention, an accounting data processing method is provided, comprising:
[0007] Obtain basic information about business partners included in the accounting data, including their names and addresses;
[0008] Calculate the first matching degree of the names between each pair of the communicating units, and filter the communicating units based on the first matching degree to obtain relevant communicating units;
[0009] Based on the addresses of the relevant business partners, filter the relevant business partners to obtain those that can be merged;
[0010] Merge the accounting data corresponding to the entities that can be merged.
[0011] Preferably, the step of calculating the first matching degree of the names between each pair of the communicating units, and filtering the communicating units using the first matching degree to obtain relevant communicating units, includes:
[0012] The names of the communicating units are vector-encoded to obtain the corresponding text vectors;
[0013] Based on the text vectors of the communicating units, calculate the similarity, minimum edit distance, and phonetic-graphic similarity between each pair of the communicating units;
[0014] Determine whether the similarity of the names between any two of the communicating units is greater than a first preset threshold. If it is not greater than the first preset threshold, filter out the pair of communicating units consisting of the two communicating units to obtain the first related communicating units.
[0015] Determine whether the minimum edit distance between the names of the two communicating units is greater than a second preset threshold. If it is greater than the second preset threshold, filter out the pair of communicating units composed of the two communicating units to obtain the second related communicating units.
[0016] Determine whether the similarity of the phonetic and graphic codes of the names of the two communicating units is less than a third preset threshold. If it is less than the third preset threshold, filter out the pairs of communicating units formed by the two communicating units to obtain the relevant communicating units.
[0017] Preferably, the method further includes:
[0018] For all pairs of counterparties consisting of the first relevant counterparties, perform pairwise comparisons. If two pairs of counterparties contain the same counterparties, determine that the two pairs of counterparties belong to the same relevant counterparty group.
[0019] Preferably, before determining whether the phonetic-graphic similarity of the names between any two of the communicating units is less than a third preset threshold, the method further includes:
[0020] Compare the minimum edit distances of all pairs of related units in the related unit group, and select the smallest minimum edit distance as the edit distance of the related unit group;
[0021] Count the number of business pairs contained in the aforementioned business pair group;
[0022] Based on the edit distance of the relevant inter-unit group and the number of inter-unit pairs it contains, determine whether the relevant inter-unit group meets the preset conditions. If it does not meet the preset conditions, then remove all inter-unit pairs from the relevant inter-unit group.
[0023] Preferably, the method for calculating the phonetic-graphic similarity of the names between any two communicating units is as follows:
[0024] Based on the text vector of the communicating unit, the character set of the communicating unit is obtained;
[0025] Based on the character sets of the trading partners, calculate the character set difference between each pair of names of the trading partners;
[0026] The character set difference between the names of the two communicating units is converted to obtain the corresponding phonetic-graphic code;
[0027] Based on the corresponding phonetic and graphic codes between each pair of the communicating units, the similarity of the phonetic and graphic codes of the names between each pair of the communicating units is calculated.
[0028] Preferably, filtering the relevant business partners based on their addresses to obtain mergeable business partners includes:
[0029] Based on the addresses of the relevant business partners, determine the lowest-level address of the business partner;
[0030] Determine whether the lowest-level addresses of two related business partners are the same. If they are not the same, determine that the two related business partners are unrelated business partners.
[0031] Filter out all irrelevant business partners to obtain the business partners that can be merged.
[0032] Preferably, before obtaining the basic information of the counterparties included in the accounting data, the method further includes:
[0033] Retrieve the original names of counterparties in the accounting data;
[0034] The original names of the business partners are preprocessed and special characters are removed to obtain the names of the business partners.
[0035] According to a second aspect of the present invention, an accounting data processing apparatus is provided, comprising:
[0036] The information acquisition module is used to acquire basic information of counterparties included in the accounting data, including name and address;
[0037] The first matching degree calculation module is used to calculate the first matching degree between the names of the two entities and filter the entities based on the first matching degree to obtain the relevant entities.
[0038] The related business unit filtering module is used to filter the related business units according to the addresses of the business units in the related business units to obtain the business units that can be merged;
[0039] The data merging module is used to merge the accounting data corresponding to the mergeable counterparties.
[0040] According to a third aspect of the present invention, an accounting data processing device is provided, comprising:
[0041] Memory, on which executable programs are stored;
[0042] A processor for executing the executable program in the memory to implement the steps of any of the methods described above.
[0043] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a computer to perform the steps of any of the methods described above.
[0044] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0045] By acquiring basic information about counterparties in the accounting data, including their names and addresses, and calculating the first degree of name matching between each pair of counterparties, the system filters counterparties based on this first degree of matching to obtain relevant counterparties. Then, based on the addresses of these relevant counterparties, it filters them again to obtain mergeable counterparties. The accounting data corresponding to these mergeable counterparties is then merged, significantly improving the accuracy and efficiency of grouping and merging counterparties in the accounting system. This allows financial personnel to merge accounting data based on mergeable counterparties, reducing significant labor costs and avoiding omissions of mergeable counterparties due to manual judgment. This effectively solves the problem of low efficiency and low accuracy in existing financial systems when manually grouping and merging counterparties with different names based on whether they belong to the same counterparty.
[0046] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0048] Figure 1 This is a flowchart illustrating an accounting data processing method according to an exemplary embodiment;
[0049] Figure 2 This is a block diagram illustrating an accounting data processing apparatus according to an exemplary embodiment. Detailed Implementation
[0050] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0051] This invention provides a method for processing accounting data, see [link to relevant documentation]. Figure 1 , Figure 1 This is a flowchart illustrating an accounting data processing method according to an exemplary embodiment, the method comprising:
[0052] Step S11: Obtain the basic information of the counterparties included in the accounting data, wherein the basic information includes name and address;
[0053] Step S12: Calculate the first matching degree of the names between each pair of the communicating units, and filter the communicating units by the first matching degree to obtain the relevant communicating units;
[0054] Step S13: Filter the relevant business partners according to their addresses to obtain mergeable business partners;
[0055] Step S14: Merge the accounting data corresponding to the mergeable counterparties.
[0056] Specifically, the accounting data includes basic information on multiple business partners, which are entities that have business dealings with the company. The basic information of a business partner includes its name and address. For example, a business partner might be named "Qingdao Compaq ABC Company" and located in Qingdao City, Shandong Province.
[0057] For multiple counterparties in accounting data, due to human error, invoice display errors, or historical changes in counterparties, the same counterparty may be registered as different companies in the accounting data, leading to confusion in the accounting records. For example, a counterparty "Qingdao Kangbo ABC Company" may be registered as two different counterparties in the accounting data: "Qingdao Kangbo ABC Company" and "Qingdao Kangbo ABC Company." This discrepancy arises from an invoice display error. To resolve this issue, it is necessary to search through the multiple counterparties in the accounting data and analyze whether the two counterparties listed are actually the same entity.
[0058] The accounting data is paired up to obtain counterparty pairs. The names of each pair of counterparties are compared to determine if they are related. The relationship is determined by calculating the first degree of match between their names. If the names are unrelated, the pair is filtered out. If they are related, the pair is retained; these remaining pairs are the related counterparty pairs.
[0059] There are several ways to calculate the first matching degree, including the similarity of names between two communicating units, the minimum edit distance, and phonetic-graphic similarity.
[0060] For the relevant business partners obtained, further judgment can be made based on their addresses to determine whether two of them can be merged. When two relevant business partners share the same address, the correlation between them is further confirmed. When two relevant business partners do not share the same address, they can be considered not truly related and filtered out. After filtering, the remaining relevant business partners are those that can be merged.
[0061] Mergeable counterparties are those that are the same entity. Merging the accounting data of these entities involves combining their records, thus resolving the issue of inconsistent accounting entries for the same entity. Furthermore, after identifying the merging counterparties, manual verification can be performed to improve the accuracy of the merger.
[0062] It is understood that the technical solution provided in this embodiment obtains the basic information of the counterparties included in the accounting data, including their names and addresses, calculates the first matching degree between the names of each counterparty, filters the counterparties based on the first matching degree to obtain relevant counterparties, filters the relevant counterparties based on their addresses to obtain mergeable counterparties, and merges the accounting data corresponding to the mergeable counterparties. This greatly improves the accuracy and efficiency of grouping and merging counterparties in the accounting system, enabling financial personnel to merge accounting data based on mergeable counterparties, reducing a large amount of labor costs, avoiding omissions of mergeable counterparties due to manual judgment, and thus effectively solving the problem of low efficiency and low accuracy caused by manual grouping and merging when grouping and merging counterparties with different names according to whether they are the same counterparty in the existing financial system.
[0063] Preferably, in step S12, calculating the first matching degree of the names between each pair of the communicating units, and filtering the communicating units using the first matching degree to obtain relevant communicating units, includes:
[0064] S121, The names of the communicating units are vector-encoded to obtain the corresponding text vectors;
[0065] S122, Based on the text vectors of the communicating units, calculate the similarity of the names, minimum edit distance, and phonetic-graphic similarity between each pair of the communicating units;
[0066] S123, determine whether the similarity of the names between any two of the communicating units is greater than a first preset threshold. If it is not greater than the first preset threshold, filter out the pair of communicating units composed of the two communicating units to obtain the first related communicating units.
[0067] S124, determine whether the minimum edit distance between the names of the two communicating units is greater than a second preset threshold. If it is greater than the second preset threshold, filter out the communicating unit pairs composed of the two communicating units to obtain the second related communicating unit.
[0068] S125, determine whether the similarity of the phonetic and graphic codes of the names between any two communicating units is less than a third preset threshold. If it is less than the third preset threshold, filter out the pairs of communicating units formed by the two communicating units to obtain the relevant communicating units.
[0069] Specifically, the process of calculating the first degree of name matching between any two business partners, filtering business partners based on this first degree of matching, and obtaining relevant business partners includes:
[0070] Vector-encode the name of any obtained business partner to obtain the corresponding text vector. Among them, vector encoding can convert the text information of the name of the business partner into a high-dimensional vector. For example, after vector-encoding the name "Wuquan Machinery" through the SimBert model, a 768-dimensional high-dimensional vector [-0.7044, -0.1474, -0.2010,...] can be obtained. Similarly, the text vectors of all business partners in the accounting data can be obtained.
[0071] It should be noted that the present invention does not specifically limit the specific method of vector encoding.
[0072] According to the obtained text vectors of the business partners, calculate the text similarity degree of the business partners by the distance between two text vectors. The smaller the distance between the text vectors, the higher the similarity between the two text vectors. Calculate the similarity between each two text vectors, and use the similarity between the two text vectors as the similarity of the names between the corresponding two business partners.
[0073] It should be noted that calculating the similarity between text vectors is a prior art. For example, the similarity between text vectors can be calculated through the cosine similarity formula. The present invention does not specifically limit this.
[0074] According to the obtained text vectors of the business partners, calculate the minimum edit distance between two texts. The minimum edit distance refers to the minimum number of edit operations required to convert one of the two strings into the other, and the minimum edit distance can be used to measure the similarity between two business partners. Use the minimum edit distance between two texts as the minimum edit distance of the names between the corresponding two business partners. [[ID=!13]]
[0075] It should be noted that calculating the minimum edit distance between texts is a prior art, and the present invention does not specifically limit this.
[0076] For the obtained business partners above, calculate the difference set of the character sets between each two business partners, and according to the difference set of the character sets, calculate the phonetic shape code similarity of the names between these two business partners, and use the phonetic shape code similarity to measure the similarity between these two business partners.
[0077] After calculating the similarity of the names between each two business partners, judge whether the similarity of the names between these two business partners is greater than the first preset threshold. If it is not greater than the first preset threshold, it is considered that there is no correlation between these two business partners and they are filtered out. If it is greater than the first preset threshold, it is considered that there is a correlation between these two business partners and they are left. After judging and filtering the similarity of the names between all pairs of business partners, the remaining ones are the first related business partners.
[0078] In a specific example, for business partners A, B, C, and D, the similarity between business partners A and B is 0.94, between B and C is 0.92, between A and C is 0.89, between A and D is 0.71, between B and D is 0.63, and between C and D is 0.62. Assuming a first preset threshold of 0.9, business partners A and B are considered the first most relevant business partners, as are business partners B and C; the remaining pairs of business partners are filtered out.
[0079] It should be noted that the first preset threshold can be set in advance according to the actual situation.
[0080] After calculating the minimum edit distance between the names of all pairs of related entities, for all first-related related entities, it is determined whether the minimum edit distance between the names of these two entities is greater than a second preset threshold. If it is greater than the second preset threshold, the two entities are considered to be unrelated and are filtered out. If it is not greater than the second preset threshold, the two entities are considered to be related and are retained. The entities retained are the second-related related entities.
[0081] It should be noted that the second preset threshold can be 3, or it can be set in advance according to the actual situation. This invention does not impose any specific limitations on it.
[0082] After calculating the phonetic and graphic similarity of the names of the two related entities, for all second-related entities, it is determined whether the phonetic and graphic similarity of the names of the two entities is less than a third preset threshold. If it is less than the third preset threshold, it is considered that there is no correlation between the two entities and they are filtered out. If it is not less than the third preset threshold, it is considered that there is a correlation between the two entities and they are kept.
[0083] After judging similarity, minimum edit distance, and phonetic-graphic similarity, the last remaining entities are the relevant counterparts.
[0084] Following the example above, if the minimum edit distance between communicating unit A and communicating unit B is not greater than the second preset threshold, and the similarity of their phonetic and graphic codes is not less than the third preset threshold, then communicating unit A and communicating unit B are related communicating units. If the minimum edit distance between communicating unit B and communicating unit C is not greater than the second preset threshold, and the similarity of their phonetic and graphic codes is not less than the third preset threshold, then communicating unit B and communicating unit C are also related communicating units.
[0085] Preferably, the method further includes:
[0086] For all pairs of counterparties consisting of the first relevant counterparties, perform pairwise comparisons. If two pairs of counterparties contain the same counterparties, determine that the two pairs of counterparties belong to the same relevant counterparty group.
[0087] Specifically, when two related entities are paired, a pair of related entities is obtained. Each pair of related entities is then compared pairwise to determine if they belong to the same group. If two pairs contain the same related entities, they are considered to belong to the same related entity group. If two pairs do not contain the same related entities, they are considered not to belong to the same related entity group.
[0088] Continuing with the example above, business partner A and business partner B are the first related business partners, forming a business partner pair. Business partner B and business partner C are the first related business partners, forming another business partner pair. Since both business partner pairs contain the same business partner B, these two business partner pairs can be classified into the same related business partner group.
[0089] Preferably, in step S125, before determining whether the phonetic-graphic similarity of the names between any two of the communicating units is less than a third preset threshold, the method further includes:
[0090] Compare the minimum edit distances of all pairs of related units in the related unit group, and select the smallest minimum edit distance as the edit distance of the related unit group;
[0091] Count the number of business pairs contained in the aforementioned business pair group;
[0092] Based on the edit distance of the relevant inter-unit group and the number of inter-unit pairs it contains, determine whether the relevant inter-unit group meets the preset conditions. If it does not meet the preset conditions, then remove all inter-unit pairs from the relevant inter-unit group.
[0093] Specifically, after obtaining the second relevant trading unit, before determining whether the similarity of the phonetic and graphic codes of the names of each pair of trading units is less than the third preset threshold, the second relevant trading unit can be processed and filtered.
[0094] For the second set of related business partners obtained above, which includes multiple pairs of business partners, when two pairs of business partners contain the same business partner, these two pairs of business partners are grouped into the same related business partner group. This process is repeated for all pairs of business partners in the second set of related business partners to obtain multiple related business partner groups.
[0095] Within the same related business unit group, compare the minimum edit distances of all business unit pairs in the group, and take the smallest minimum edit distance as the edit distance of the related business unit group. Count the number of business unit pairs contained in the related business unit group, and determine whether the edit distance and the number of business unit pairs of the related business unit group meet preset conditions. If both the edit distance and the number of business unit pairs of the related business unit group meet the preset conditions, then the second related business unit in the related business unit group is considered to be related. If either the edit distance or the number of business unit pairs of the related business unit group does not meet the preset conditions, then the second related business unit in this related business unit group is considered to be unrelated, this related business unit group does not meet the preset conditions, and all business units in this related business unit group are filtered out.
[0096] It should be noted that the preset conditions can be: the edit distance of the relevant inter-unit groups is 1, and the number of inter-unit pairs included is 1. The preset conditions can also be set in advance according to the actual situation; this invention does not impose specific limitations on this.
[0097] Preferably, in step S122, the method for calculating the phonetic-graphic similarity of the names between each pair of communicating units is as follows:
[0098] Based on the text vector of the communicating unit, the character set of the communicating unit is obtained;
[0099] Based on the character sets of the trading partners, calculate the character set difference between each pair of names of the trading partners;
[0100] The character set difference between the names of the two communicating units is converted to obtain the corresponding phonetic-graphic code;
[0101] Based on the corresponding phonetic and graphic codes between each pair of the communicating units, the similarity of the phonetic and graphic codes of the names between each pair of the communicating units is calculated.
[0102] Specifically, the similarity of the phonetic and graphic codes of the names of any two entities can be calculated using the following method:
[0103] For each communicating party, the character set of the communicating party is calculated based on the text vector of the communicating party.
[0104] In a specific example, for text 1: "hello world" and text 2: "how are you", we can obtain the character sets of the two texts: {'h','e','l','o','w','r','d',",'a','y','u'} and {'h','o','w',",'a','r','e','y','u'}.
[0105] For each pair of business partners, the difference in the character sets of their names is calculated based on their character sets, and this difference is used as the distinction between the names of the two business partners.
[0106] Following the example above, we obtain the difference sets {'l','d'} and {'h'} corresponding to the two texts.
[0107] It should be noted that in Python, the set() function and the "-" operator can be used to calculate the difference between the character sets corresponding to each pair of trading units, and this invention does not impose any specific limitations on this.
[0108] The character set difference between the names of the two communicating units is converted to obtain the corresponding phonetic-graphic code.
[0109] Following the example above, we can obtain the phonetic codes for the two texts as "L300" and "H000".
[0110] Based on the corresponding phonetic and graphic codes between two communicating entities, the similarity between the phonetic and graphic codes of their names is calculated.
[0111] Using the above method, the phonetic-graphic similarity between the names of each pair of communicating units can be calculated.
[0112] It should be noted that the similarity between the phonetic and shape codes of two communicating units can be achieved using the "soundex" library and the edit distance algorithm in Python, and this invention does not impose any specific limitations on this.
[0113] Preferably, in step S13, filtering the relevant business partners based on their addresses to obtain mergeable business partners includes:
[0114] Based on the addresses of the relevant business partners, determine the lowest-level address of the business partner;
[0115] Determine whether the lowest-level addresses of two related business partners are the same. If they are not the same, determine that the two related business partners are unrelated business partners.
[0116] Filter out all irrelevant business partners to obtain the business partners that can be merged.
[0117] Specifically, based on the addresses of relevant business partners, the relevant business partners are filtered to obtain those that can be merged, including:
[0118] For each group of related business partners, the similarity of all pairs of related business partners in the group is compared, and the largest similarity is taken as the similarity of the group.
[0119] For any group of related business partners, determine whether the similarity of the group is lower than a preset threshold. If the similarity of the group is lower than the preset threshold, it is considered that all related business partners in the group are not similar, and all related business partners contained therein are filtered out. If the similarity of the group is not lower than the preset threshold, it is considered that all related business partners in the group are similar, and all related business partners contained therein are retained for further evaluation.
[0120] Furthermore, the relevant business partners in the remaining relevant business partner groups are compared to determine if the lowest-level addresses of two such partners are identical. If they are inconsistent, the two partners are deemed irrelevant and filtered out. If they are identical, the two partners are considered relevant and retained. When business partners have multiple regional levels, the lowest-level address is used. For example, when a business partner has a province, city, and district, the district is the lowest-level address.
[0121] By performing the same operation on all relevant business partners, we can select business partners who are in the same region or who are in different or different regions.
[0122] After filtering out all irrelevant business partners, the remaining business partners in each relevant business partner group are the ones that can be merged.
[0123] Preferably, in step S11, before obtaining the basic information of the counterparty included in the accounting data, the method further includes:
[0124] Retrieve the original names of counterparties in the accounting data;
[0125] The original names of the business partners are preprocessed and special characters are removed to obtain the names of the business partners.
[0126] Specifically, obtain the original names of the counterparties in the accounting data. The original names may contain special characters, such as tabs, newlines, spaces, and other characters that may cause interference.
[0127] The original names of business partners are preprocessed and special characters are cleaned. All special characters that cause interference are removed, and the case of Chinese and English letters, parentheses, etc. are uniformly converted to obtain the names of business partners.
[0128] It can also identify counterparties. When a counterparty is a default counterparty in the accounting set, the name of this counterparty generally does not need to be merged. The original name of this counterparty can be deleted without further filtering and merging.
[0129] It is understood that the technical solution provided in this embodiment obtains the basic information of the counterparties included in the accounting data, including their names and addresses, calculates the first matching degree between the names of each counterparty, filters the counterparties based on the first matching degree to obtain relevant counterparties, filters the relevant counterparties based on their addresses to obtain mergeable counterparties, and merges the accounting data corresponding to the mergeable counterparties. This greatly improves the accuracy and efficiency of grouping and merging counterparties in the accounting system, enabling financial personnel to merge accounting data based on mergeable counterparties, reducing a large amount of labor costs, avoiding omissions of mergeable counterparties due to manual judgment, and thus effectively solving the problem of low efficiency and low accuracy caused by manual grouping and merging when grouping and merging counterparties with different names according to whether they are the same counterparty in the existing financial system.
[0130] This invention provides an accounting data processing device, see below. Figure 2 , Figure 2 This is a block diagram illustrating an accounting data processing apparatus according to an exemplary embodiment, comprising:
[0131] The information acquisition module 21 is used to acquire basic information of the counterparty included in the accounting data, the basic information including name and address;
[0132] The first matching degree calculation module 22 is used to calculate the first matching degree between the names of the two entities and filter the entities through the first matching degree to obtain the relevant entities.
[0133] The related business unit filtering module 23 is used to filter the related business units according to the addresses of the business units in the related business units to obtain the business units that can be merged;
[0134] The data merging module 24 is used to merge the accounting data corresponding to the mergeable counterparties.
[0135] Preferably, the step of calculating the first matching degree of the names between each pair of the communicating units, and filtering the communicating units using the first matching degree to obtain relevant communicating units, includes:
[0136] The names of the communicating units are vector-encoded to obtain the corresponding text vectors;
[0137] Based on the text vectors of the communicating units, calculate the similarity, minimum edit distance, and phonetic-graphic similarity between each pair of the communicating units;
[0138] Determine whether the similarity of the names between any two of the communicating units is greater than a first preset threshold. If it is not greater than the first preset threshold, filter out the pair of communicating units consisting of the two communicating units to obtain the first related communicating units.
[0139] Determine whether the minimum edit distance between the names of the two communicating units is greater than a second preset threshold. If it is greater than the second preset threshold, filter out the pair of communicating units composed of the two communicating units to obtain the second related communicating units.
[0140] Determine whether the similarity of the phonetic and graphic codes of the names of the two communicating units is less than a third preset threshold. If it is less than the third preset threshold, filter out the pairs of communicating units formed by the two communicating units to obtain the relevant communicating units.
[0141] Preferably, the method further includes:
[0142] For all pairs of counterparties consisting of the first relevant counterparties, perform pairwise comparisons. If two pairs of counterparties contain the same counterparties, determine that the two pairs of counterparties belong to the same relevant counterparty group.
[0143] Preferably, before determining whether the phonetic-graphic similarity of the names between any two of the communicating units is less than a third preset threshold, the method further includes:
[0144] Compare the minimum edit distances of all pairs of related units in the related unit group, and select the smallest minimum edit distance as the edit distance of the related unit group;
[0145] Count the number of business pairs contained in the aforementioned business pair group;
[0146] Based on the edit distance of the relevant inter-unit group and the number of inter-unit pairs it contains, determine whether the relevant inter-unit group meets the preset conditions. If it does not meet the preset conditions, then remove all inter-unit pairs from the relevant inter-unit group.
[0147] Preferably, the method for calculating the phonetic-graphic similarity of the names between any two communicating units is as follows:
[0148] Based on the text vector of the communicating unit, the character set of the communicating unit is obtained;
[0149] Based on the character sets of the trading partners, calculate the character set difference between each pair of names of the trading partners;
[0150] The character set difference between the names of the two communicating units is converted to obtain the corresponding phonetic-graphic code;
[0151] Based on the corresponding phonetic and graphic codes between each pair of the communicating units, the similarity of the phonetic and graphic codes of the names between each pair of the communicating units is calculated.
[0152] Preferably, filtering the relevant business partners based on their addresses to obtain mergeable business partners includes:
[0153] Based on the addresses of the relevant business partners, determine the lowest-level address of the business partner;
[0154] Determine whether the lowest-level addresses of two related business partners are the same. If they are not the same, determine that the two related business partners are unrelated business partners.
[0155] Filter out all irrelevant business partners to obtain the business partners that can be merged.
[0156] Preferably, before obtaining the basic information of the counterparties included in the accounting data, the method further includes:
[0157] Retrieve the original names of counterparties in the accounting data;
[0158] The original names of the business partners are preprocessed and special characters are removed to obtain the names of the business partners.
[0159] It is understood that the technical solution provided in this embodiment, by obtaining the basic information of the counterparties in the accounting data mentioned in the above embodiment, including the name and address, calculating the first matching degree between the names of the counterparties, filtering the counterparties through the first matching degree to obtain relevant counterparties, filtering the relevant counterparties based on the addresses of the counterparties, obtaining mergeable counterparties, and merging the accounting data corresponding to the mergeable counterparties, greatly improves the accuracy and efficiency of grouping and merging counterparties in the accounting system. This allows financial personnel to merge accounting data based on mergeable counterparties, reducing a large amount of labor costs and avoiding omissions of mergeable counterparties due to manual judgment. Thus, it effectively solves the problem of low efficiency and low accuracy caused by manual grouping and merging when grouping and merging counterparties with different names according to whether they are the same counterparty in the existing financial system.
[0160] The present invention also provides an accounting data processing device, comprising:
[0161] Memory, on which executable programs are stored;
[0162] A processor for executing the executable program in the memory to implement the steps of any of the methods described above.
[0163] Furthermore, the present invention also provides a computer-readable storage medium storing computer instructions for causing a computer to perform the steps of any of the methods described above. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.
[0164] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0165] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.
[0166] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0167] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0168] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0169] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0170] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0171] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0172] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for processing accounting data, characterized in that, include: Obtain basic information about business partners included in the accounting data, including their names and addresses; Calculate the first matching degree of the names between each pair of the communicating units, and filter the communicating units based on the first matching degree to obtain relevant communicating units, including: The names of the communicating units are vector-encoded to obtain the corresponding text vectors; Based on the text vectors of the communicating units, calculate the similarity, minimum edit distance, and phonetic-graphic similarity between each pair of the communicating units; Determine whether the similarity of the names between any two of the communicating units is greater than a first preset threshold. If it is not greater than the first preset threshold, filter out the pair of communicating units consisting of the two communicating units to obtain the first related communicating units. For all pairs of counterparties consisting of the first relevant counterparties, perform pairwise comparisons. If two pairs of counterparties contain the same counterparties, determine that the two pairs of counterparties belong to the same relevant counterparty group. Determine whether the minimum edit distance between the names of the two communicating units is greater than a second preset threshold. If it is greater than the second preset threshold, filter out the pair of communicating units composed of the two communicating units to obtain the second related communicating units. Compare the minimum edit distances of all pairs of related units in the related unit group, and select the smallest minimum edit distance as the edit distance of the related unit group; count the number of pairs of related units contained in the related unit group; based on the edit distance and the number of pairs of related units contained in the related unit group, determine whether the related unit group meets the preset conditions; if it does not meet the preset conditions, remove all pairs of related units from the related unit group. Determine whether the similarity of the phonetic and graphic codes of the names between any two communicating units is less than a third preset threshold. If it is less than the third preset threshold, filter out the pairs of communicating units formed by the two communicating units to obtain the relevant communicating units. Based on the addresses of the relevant business partners, the relevant business partners are filtered to obtain mergeable business partners, including: Based on the addresses of the relevant business partners, determine the lowest-level address of the business partner; Determine whether the lowest-level addresses of two related business partners are the same. If they are not the same, determine that the two related business partners are unrelated business partners. Filter out all irrelevant business partners to obtain the business partners that can be merged. Merge the accounting data corresponding to the entities that can be merged.
2. The method according to claim 1, characterized in that, The method for calculating the phonetic-graphic similarity of the names between any two entities is as follows: Based on the text vector of the communicating unit, the character set of the communicating unit is obtained; Based on the character sets of the trading partners, calculate the character set difference between each pair of names of the trading partners; The character set difference between the names of the two communicating units is converted to obtain the corresponding phonetic-graphic code; Based on the corresponding phonetic and graphic codes between each pair of the communicating units, the similarity of the phonetic and graphic codes of the names between each pair of the communicating units is calculated.
3. The method according to claim 1, characterized in that, Prior to obtaining the basic information of counterparties included in the accounting data, the method further includes: Retrieve the original names of counterparties in the accounting data; The original names of the business partners are preprocessed and special characters are removed to obtain the actual names of the business partners.
4. An accounting data processing device, characterized in that, include: The information acquisition module is used to acquire basic information of counterparties included in the accounting data, including name and address; The first matching degree calculation module is used to calculate the first matching degree between the names of the communicating units in pairs, and to filter the communicating units based on the first matching degree to obtain relevant communicating units, including: The names of the communicating units are vector-encoded to obtain the corresponding text vectors; Based on the text vectors of the communicating units, calculate the similarity, minimum edit distance, and phonetic-graphic similarity between each pair of the communicating units; Determine whether the similarity of the names between any two of the communicating units is greater than a first preset threshold. If it is not greater than the first preset threshold, filter out the pair of communicating units consisting of the two communicating units to obtain the first related communicating units. For all pairs of counterparties consisting of the first relevant counterparties, perform pairwise comparisons. If two pairs of counterparties contain the same counterparties, determine that the two pairs of counterparties belong to the same relevant counterparty group. Determine whether the minimum edit distance between the names of the two communicating units is greater than a second preset threshold. If it is greater than the second preset threshold, filter out the pair of communicating units composed of the two communicating units to obtain the second related communicating units. Compare the minimum edit distances of all pairs of related units in the related unit group, and select the smallest minimum edit distance as the edit distance of the related unit group; count the number of pairs of related units contained in the related unit group; based on the edit distance and the number of pairs of related units contained in the related unit group, determine whether the related unit group meets the preset conditions; if it does not meet the preset conditions, remove all pairs of related units from the related unit group. Determine whether the similarity of the phonetic and graphic codes of the names between any two communicating units is less than a third preset threshold. If it is less than the third preset threshold, filter out the pairs of communicating units formed by the two communicating units to obtain the relevant communicating units. The related business partner filtering module is used to filter the related business partners based on their addresses to obtain mergeable business partners, including: Based on the addresses of the relevant business partners, determine the lowest-level address of the business partner; Determine whether the lowest-level addresses of two related business partners are the same. If they are not the same, determine that the two related business partners are unrelated business partners. Filter out all irrelevant business partners to obtain the business partners that can be merged. The data merging module is used to merge the accounting data corresponding to the mergeable counterparties.
5. An accounting data processing device, characterized in that, include: Memory, on which executable programs are stored; A processor for executing the executable program in the memory to implement the steps of the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the steps of the method according to any one of claims 1 to 3.