CN115470278A - Account checking file importing method and device, storage medium and processor - Google Patents

Account checking file importing method and device, storage medium and processor Download PDF

Info

Publication number
CN115470278A
CN115470278A CN202211132031.3A CN202211132031A CN115470278A CN 115470278 A CN115470278 A CN 115470278A CN 202211132031 A CN202211132031 A CN 202211132031A CN 115470278 A CN115470278 A CN 115470278A
Authority
CN
China
Prior art keywords
reconciliation
file
matching
row
detail
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211132031.3A
Other languages
Chinese (zh)
Inventor
樊雨送
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202211132031.3A priority Critical patent/CN115470278A/en
Publication of CN115470278A publication Critical patent/CN115470278A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a reconciliation file importing method and device, a storage medium and a processor, and relates to the technical field of computers. The account checking file importing method comprises the following steps: acquiring an institution account checking file; analyzing a predefined reconciliation format description file to obtain a reconciliation object list; preprocessing the mechanism account checking file in a natural language text analysis mode to obtain different account checking linguistic data; and matching the reconciliation linguistic data with the reconciliation objects in the reconciliation object list, and importing the obtained reconciliation data into a central database. The reconciliation format description file is defined by the reconciliation file importing method, the reconciliation process is based on the reconciliation format description file, the reconciliation data processing is around the reconciliation format description file, the data processing process is simplified, the reconciliation file is preprocessed in a natural language text matching mode, and the matching process of the processed reconciliation forecast is simple and is not easy to make mistakes.

Description

Reconciliation file importing method and device, storage medium and processor
Technical Field
The application relates to the technical field of computers, in particular to a reconciliation file importing method based on natural language text matching, a reconciliation file importing device based on natural language text matching, a storage medium and a processor.
Background
One problem that often faces in the financial field is how to import reconciliation files in csv format into a central database; the reconciliation file format in the financial institution is complex, the fields are numerous, the analysis difficulty is high, the analysis is performed based on jxls toolkit development codes in a common way, but the following problems exist:
1. specific positions of each field in the csv file need to be known definitely and then read by hard coding in java language, which results in poor code readability;
2. the reconciliation files are often provided with a plurality of fields, usually, not less than twenty fields are involved, and the error rate is high due to a large amount of hard coding; meanwhile, in order to verify the correctness of the codes, a great number of test cases need to be written to cover the branches, so that the test workload is greatly increased;
3. the difference between different reconciliation files is large, each reconciliation file needs to be analyzed independently, and the repeated coding workload is large.
Based on this, a method capable of quickly and well importing the account checking file is urgently needed to be researched.
Disclosure of Invention
The embodiment of the application aims to provide a reconciliation file importing method, a reconciliation file importing device, a storage medium and a processor.
In order to achieve the above object, a first aspect of the present application provides a reconciliation file importing method based on natural language text matching, where the reconciliation file importing method includes:
acquiring an institution account checking file;
analyzing a predefined reconciliation format description file to obtain a reconciliation object list;
preprocessing the institution reconciliation file by adopting a natural language text analysis mode to obtain different reconciliation linguistic data;
and matching the reconciliation linguistic data with the reconciliation objects in the reconciliation object list, and importing the obtained reconciliation data into a central database. The reconciliation format description file is defined by the reconciliation file importing method, the reconciliation process is based on the reconciliation format description file, the reconciliation data processing surrounds the reconciliation format description file, the data processing process is simplified, the reconciliation file is preprocessed in a natural language text matching mode, and the processed reconciliation forecast matching process is simple and is not easy to make mistakes.
In the embodiment of the application, the reconciliation format description file comprises field names corresponding to the fields, variable names corresponding to the fields and field types corresponding to the fields; the field names corresponding to the fields, the variable names corresponding to the fields and the field types corresponding to the fields are in one-to-one correspondence. The field name, the variable name and the field type represent one attribute of each field, and the defined format description file highly summarizes data contained in the reconciliation file.
In the embodiment of the application, the reconciliation format description file defines the field names corresponding to the fields by adopting a natural language and describes the field types corresponding to the fields by adopting placeholders. The field names of the fields are defined by the natural language, readability is higher, the field types are described by the placeholders, direct replacement in the assignment process is facilitated, and the error rate in the data importing process is reduced.
In this embodiment of the present application, parsing a predefined reconciliation format description file to obtain a reconciliation object list includes:
dividing the reconciliation format description file into a summary line and a detail line;
traversing the reconciliation format description file, and dividing the reconciliation format description file into different fields;
sequentially acquiring field names from different fields of the summary row to serve as reconciliation objects, and constructing a summary row reconciliation object list according to the acquisition sequence and the acquired reconciliation objects;
and sequentially acquiring field names from different fields of the detail lines as reconciliation objects, and constructing a detail line reconciliation object list according to the acquisition sequence and the acquired reconciliation objects. The reconciliation format description files are analyzed in sequence and the reconciliation object list is constructed in sequence, so that the basis of importing the reconciliation data can be provided.
In this embodiment of the present application, the mechanism reconciliation file is preprocessed in a natural language text parsing manner, so as to obtain different reconciliation linguistic data, including:
analyzing the mechanism reconciliation file and dividing the reconciliation file into a summary line and a plurality of detail lines;
and performing word segmentation processing on the summary line and the plurality of detail lines respectively according to the field names to obtain the summary line represented by different fields and the plurality of detail lines represented by different fields as reconciliation materials. The mechanism account checking file comprises field names and different fields, each line in the mechanism account checking file is subjected to word segmentation processing to obtain the field corresponding to each field name, each field serving as an account checking corpus corresponds to one field name, and data can be conveniently imported according to the field names in the follow-up process.
In this embodiment of the present application, the matching the reconciliation corpus with the reconciliation object in the reconciliation object list, and importing the obtained reconciliation data into a central database includes:
matching the reconciliation corpus of the gathering bank with the reconciliation objects in the reconciliation object list of the gathering bank;
under the condition of successful matching, performing type conversion on the reconciliation corpus of the gathering line according to the field type corresponding to the reconciliation object in the reconciliation object list of the gathering line;
under the condition that the type conversion is successful, assigning account reconciliation linguistic data of the summary row to account reconciliation objects in the summary row account reconciliation object list one by one;
matching the reconciliation corpus of any detailed row with the reconciliation objects in the detailed row reconciliation object list;
under the condition that the matching is successful, performing type conversion on the reconciliation corpus of the detail row according to the field type corresponding to the reconciliation object in the detail row reconciliation object list;
under the condition that the type conversion is successful, assigning the reconciliation linguistic data of the detail lines to the reconciliation objects in the detail line reconciliation object list one by one, storing the assignment results of the detail lines in a linked list, and performing matching and assignment processing on the reconciliation linguistic data of other detail lines one by one;
the linked list is stored in a central database. The account checking linguistic data and the account checking object are matched, so that the corresponding relation between the account checking linguistic data and the account checking object list can be effectively built, if the corresponding relation is established, value assignment can be carried out, the detailed line assignment result is stored in the linked list, and the linked list is stored in the central database as account checking data and can be called at any time.
In this embodiment of the present application, the matching the reconciliation corpus of the gathering bank with the reconciliation object in the reconciliation object list of the gathering bank includes:
matching the field names corresponding to the reconciliation corpus of the gathering bank with the reconciliation objects in the reconciliation object list of the gathering bank in sequence, and if the field names are all consistent, successfully matching;
the matching of the reconciliation corpus of any detail line with the reconciliation object in the detail line reconciliation object list comprises the following steps:
and matching the field names corresponding to the reconciliation corpus of any detail line with the reconciliation objects in the reconciliation object list of the detail line in sequence, wherein if all the field names are consistent, the matching is successful. Whether the reconciliation corpus is matched with the reconciliation object can be determined by matching the reconciliation corpus with the field name of the reconciliation object and the sequence of the field name, and the field name and the sequence can both correspond to each other, so that the assignment process can be simplified, and assignment errors can be avoided.
In an embodiment of the present application, the method further includes:
checking whether the total number of strokes of the summary row is equal to the number of objects in the linked list, and if not, generating an alarm prompt;
and checking whether the sum of the summary bank sum and the sum of the sums of the objects in the linked list is equal or not, and if not, generating an alarm prompt. The detailed line data in the linked list is checked according to the summary line, so that omission of the detailed line can be avoided, and whether errors exist in the imported data can be checked according to the total amount.
The second aspect of the present application provides a reconciliation file importing apparatus based on natural language text matching, the reconciliation file importing apparatus comprising:
the acquisition unit is used for acquiring the institution reconciliation file;
the analysis unit is used for analyzing the predefined reconciliation format description file to obtain a reconciliation object list;
the processing unit is used for preprocessing the mechanism account checking file in a natural language text analysis mode to obtain different account checking linguistic data;
and the account checking import unit is used for matching the account checking linguistic data with the account checking objects in the account checking object list and importing the obtained account checking data into a central database. The device defines account checking format description files, account checking processes are all based on the account checking format description files, account checking data processing is all around the account checking format description files, the data processing process is simplified, a natural language text matching mode is adopted for account checking file preprocessing, the processed account checking expected matching process is simple and is not prone to errors
In an embodiment of the present application, the parsing unit includes:
the splitting module is used for dividing the reconciliation format description file into a summary line and a detail line; traversing the reconciliation format description file, and dividing the reconciliation format description file into different fields;
the account checking object list building module is used for sequentially acquiring field names from different fields of the summary row to serve as account checking objects and building a summary row account checking object list; and sequentially acquiring field names from different fields of the detail lines as reconciliation objects, and constructing a detail line reconciliation object list. The reconciliation format description files are analyzed in sequence and a reconciliation object list is constructed in sequence, so that a basis for importing the reconciliation data can be provided.
In an embodiment of the present application, the reconciliation importing unit includes:
the summary row reconciliation import module is used for matching the reconciliation corpuses of the summary row with the reconciliation objects in the summary row reconciliation object list, and performing type conversion on the reconciliation corpuses of the summary row according to the field types corresponding to the reconciliation objects in the summary row reconciliation object list under the condition of successful matching; assigning reconciliation linguistic data of the summary row to reconciliation objects in the summary row reconciliation object list one by one under the condition that the type conversion is successful;
the detail line reconciliation import module is used for matching the reconciliation corpus of any detail line with the reconciliation object in the detail line reconciliation object list; and under the condition of successful matching, performing type conversion on the reconciliation corpus of the detail row according to the field type corresponding to the reconciliation object in the detail row reconciliation object list, under the condition of successful type conversion, assigning the reconciliation corpus of the detail row to the reconciliation object in the detail row reconciliation object list one by one, storing the assignment result of the detail row in a linked list, and storing the linked list in a central database. The summary row reconciliation import module and the detail row reconciliation import module can effectively build a corresponding relation between the reconciliation corpus and the reconciliation object list by matching the reconciliation corpus with the reconciliation object, if the corresponding relation is established, an assignment can be carried out, the detail row assignment result is stored in a linked list, and the linked list is stored in a central database as reconciliation data and can be called at any time.
In this embodiment of the application, the reconciliation import unit further includes:
an inspection module to:
checking whether the total number of strokes of the summary row is equal to the number of objects in the linked list or not, and if not, generating an alarm prompt; and checking whether the sum of the total amount of the summary row is equal to the sum of the amounts of the objects in the linked list, and if not, generating an alarm prompt. The inspection module can be according to gathering the row and checking the detail row data in the linked list and can avoid the detail row to omit, also can check whether there is the error in the data of importing according to the total amount of money.
A third aspect of the present application provides a processor configured to execute the reconciliation file import method based on natural language text matching.
A fourth aspect of the present application provides a machine-readable storage medium having stored thereon instructions, which when executed by a processor, cause the processor to be configured to perform the reconciliation file import method based on natural language text matching.
A fifth aspect of the present application provides a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the reconciliation file import method based on natural language text matching.
Through the technical scheme, the financial reconciliation file importing method based on text matching is universal, the mechanism reconciliation file is processed in a natural language text analysis mode, the processing mode can be applied to high-cohesion reconciliation file analysis, the defined reconciliation format description file is simple and clear, the contents of the reconciliation file can be completely reflected, the readability is higher, the reconciliation file processing accuracy is higher, the reconciliation file importing mode is strong in universality and wide in practicability.
Additional features and advantages of embodiments of the present application will be described in detail in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the detailed description serve to explain the embodiments of the application and not to limit the embodiments of the application. In the drawings:
FIG. 1 is a schematic diagram of an application environment of a reconciliation file import method based on natural language text matching provided by the present application;
FIG. 2 is a flowchart of a reconciliation file import method based on natural language text matching according to an embodiment of the present application;
fig. 3 is a flowchart of parsing a predefined reconciliation format description file by using a reconciliation file importing method based on natural language text matching according to an embodiment of the present application;
fig. 4 is a block diagram of a reconciliation file importing apparatus based on natural language text matching according to an embodiment of the present application.
Description of the reference numerals
101-terminal, 102-central database.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present application clearer and more fully described below with reference to the accompanying drawings in the embodiments of the present application, it should be understood that the detailed description and specific embodiments described herein are only used for illustrating and explaining the embodiments of the present application and are not used for limiting the embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making creative efforts shall fall within the protection scope of the present application.
It should be noted that if directional indications (such as up, down, left, right, front, back, 8230; \8230;) are referred to in the embodiments of the present application, the directional indications are only used to explain the relative positional relationship between the components, the motion situation, etc. in a specific posture (as shown in the attached drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description relating to "first", "second", etc. in the embodiments of the present application, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between the embodiments may be combined with each other, but must be based on the realization of the technical solutions by a person skilled in the art, and when the technical solutions are contradictory to each other or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope claimed in the present application.
The reconciliation file importing method based on natural language text matching can be applied to the application environment shown in FIG. 1. Wherein the terminal 101 communicates with the central database 102 via a network. The reconciliation file importing method based on natural language text matching is arranged on the terminal 101, and the mechanism reconciliation file is converted into a format corresponding to the central database 102 by the method, and then the converted reconciliation data is transmitted to the central database 102 for storage through a network. The terminal 101 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the central database 102 may be implemented by an independent database or a database cluster composed of a plurality of databases.
In other embodiments, the reconciliation file importing method based on natural language text matching in the present application may be arranged on a front-end server of a central database, and the received reconciliation file is processed on the front-end server and then transmitted to the central database for storage.
Fig. 2 is a flowchart of a reconciliation file importing method based on natural language text matching according to an embodiment of the present application, and as shown in fig. 2, the reconciliation file importing method includes:
the method comprises the following steps: and acquiring the institution reconciliation file. In this embodiment of the present application, the institution reconciliation file refers to a CSV format reconciliation file, and the institution reconciliation file is uploaded by a financial institution, generally stored in a corresponding memory or a database after being uploaded, and waits to be imported into a central database. Acquiring an institution reconciliation file is typically a retrieval of the corresponding institution reconciliation file from a corresponding database or memory.
Step two: and analyzing the predefined reconciliation format description file to obtain a reconciliation object list.
In this embodiment of the present application, the reconciliation format description file includes a field name corresponding to each field, a variable name corresponding to each field, and a field type corresponding to each field, where the field name corresponding to each field, the variable name corresponding to each field, and the field type corresponding to each field are in one-to-one correspondence. The field name, the variable name and the field type represent one attribute of each field, and the defined format description file highly summarizes data contained in the reconciliation file. Different fields may be of the same field type.
In the embodiment of the application, the reconciliation format description file is a JSON format file. JSON format file is strong in universality.
In the embodiment of the application, the reconciliation format description file defines the field names corresponding to the fields by adopting a natural language and describes the field types corresponding to the fields by adopting placeholders. In the reconciliation format description file, the different fields are separated by symbols, and in one embodiment, each field is enclosed in double brackets and separated from other fields. The field names of the fields are defined by the natural language, readability is stronger, the field types are described by the placeholders, direct replacement is facilitated in the assignment process, and the error rate in the data importing process is reduced.
In some embodiments, as shown in fig. 3, parsing the predefined reconciliation format description file to obtain a reconciliation object list includes:
s201: and dividing the reconciliation format description file into a summary line and a detail line. The mechanism reconciliation file comprises a summary line and a detail line, wherein the summary line is the first line of the mechanism reconciliation file, the total stroke number and the total amount of the reconciliation file are mainly recorded, the detail line is arranged below the summary line, each line represents a transaction detail, and the reconciliation format description file also comprises the summary line and the detail line which respectively correspond to the summary line and the detail line of the mechanism reconciliation file. The contents of the summary line and the detail line are different, and the summary line and the detail line cannot be mixed in use, so that the reconciliation format description file is divided into the summary line and the detail line to be analyzed respectively.
S202: and traversing the reconciliation format description file, and dividing the reconciliation format description file into different fields. The summary and detail lines are all word-segmented in the same way. As previously described, in the reconciliation format description file, different fields are separated by symbols, and thus, in some embodiments, different fields are judged according to the separation symbols and then divided. It should be noted that, in the embodiment of the present application, the division result needs to be stored according to the position of the field in the reconciliation format description file, and word order exchange cannot be performed, so that the sequence of the field names sequentially acquired subsequently can be completely consistent with the reconciliation format description file.
S203: and sequentially acquiring field names from different fields of the summary row to serve as reconciliation objects, and constructing a summary row reconciliation object list according to the acquisition sequence and the acquired reconciliation objects.
S204: and sequentially acquiring field names from different fields of the detail line as reconciliation objects, and constructing a detail line reconciliation object list according to the acquisition sequence and the acquired reconciliation objects.
In this embodiment, the order of the reconciliation objects in the summary row object list is the same as the order of the reconciliation objects in the reconciliation object description file, and the order of the reconciliation objects in the detail row reconciliation object list is the same as the order of the reconciliation objects in the reconciliation object description file.
Step three: and preprocessing the mechanism account checking file in a natural language text analysis mode to obtain different account checking linguistic data. The natural language text analysis commonly uses processing modes such as word segmentation, word deactivation, keyword extraction and the like, and the word segmentation processing is mainly used in the application.
In this embodiment of the present application, the mechanism reconciliation file is preprocessed in a natural language text parsing manner, so as to obtain different reconciliation linguistic data, including:
and analyzing the mechanism account checking file and dividing the mechanism account checking file into a summary line and a plurality of detail lines. As mentioned above, the institution reconciliation file includes a summary line and a detail line, the summary line is the first line of the institution reconciliation file, and mainly records the total number of strokes and the total amount of money of the reconciliation file, the detail line is below the summary line, and each line represents a transaction detail.
And performing word segmentation processing on the summary line and the plurality of detail lines respectively according to the field names to obtain the summary line represented by different fields and the plurality of detail lines represented by different fields as reconciliation materials. The contents of the summary lines and the detail lines are different and cannot be confused in the processing process, so that different line division is performed in the preprocessing process, and word segmentation processing is performed simultaneously, and errors of the summary line materials or the detail line materials after word segmentation can be effectively avoided. The mechanism account checking file comprises field names and different fields, each line in the mechanism account checking file is subjected to word segmentation processing to obtain the field corresponding to each field name, each field serving as account checking material corresponds to one field name, and data can be conveniently imported according to the field names in the follow-up process.
Step four: and matching the reconciliation linguistic data with the reconciliation objects in the reconciliation object list, and importing the obtained reconciliation data into a central database.
In this embodiment of the present application, the matching the reconciliation corpus with the reconciliation object in the reconciliation object list, and importing the obtained reconciliation data into a central database includes:
firstly, processing a summary bank, and matching reconciliation linguistic data of the summary bank with reconciliation objects in a summary bank reconciliation object list;
under the condition of successful matching, performing type conversion on the reconciliation corpus of the gathering line according to the field type corresponding to the reconciliation object in the reconciliation object list of the gathering line;
under the condition that the type conversion is successful, assigning account reconciliation linguistic data of the summary row to account reconciliation objects in the summary row account reconciliation object list one by one; and if the matching is unsuccessful or the type conversion is failed, giving an error alarm.
Then detail line processing is carried out, and reconciliation linguistic data of any detail line are matched with reconciliation objects in the detail line reconciliation object list;
under the condition that matching is successful, performing type conversion on the reconciliation corpus of the detail line according to the field type corresponding to the reconciliation object in the detail line reconciliation object list;
under the condition that the type conversion is successful, assigning the reconciliation linguistic data of the detail lines to the reconciliation objects in the detail line reconciliation object list one by one, storing the assignment results of the detail lines in a linked list, and if the matching is unsuccessful or the type conversion is failed, giving an error alarm; matching and assigning the reconciliation linguistic data of other detail lines one by one; the linked list is stored in a central database. The correspondence between the reconciliation corpus and the reconciliation object list can be effectively established by matching the reconciliation corpus with the reconciliation object, if the correspondence is established, the assignment can be carried out, the assignment result of the detailed lines is stored in the linked list, and the linked list is stored in the central database as the reconciliation data and can be called at any time.
In this embodiment of the present application, the matching the reconciliation corpus of the gathering bank with the reconciliation object in the reconciliation object list of the gathering bank includes:
matching the field names corresponding to the reconciliation corpus of the gathering bank with the reconciliation objects in the reconciliation object list of the gathering bank in sequence, wherein if all the field names are consistent, the matching is successful, otherwise, the matching is failed;
the matching of the reconciliation corpus of any detail line with the reconciliation object in the detail line reconciliation object list comprises the following steps:
and matching the field names corresponding to the reconciliation corpus of any detail row with the reconciliation objects in the reconciliation object list of the detail row in sequence, wherein if all the field names are consistent, the matching is successful, and otherwise, the matching is failed.
The summary behavior example is used for explanation, and it is assumed that the first reconciliation object in the reconciliation object list is the total number of strokes and the second reconciliation object is the total amount, then matching is successful only if the field name corresponding to the first reconciliation corpus of the reconciliation bank is the total number of strokes and the field name corresponding to the second reconciliation corpus is the total amount, and matching fails in other cases. That is, in the process of performing matching, in addition to whether the field names and the reconciliation objects are the same, whether the order of the field names is the same as the order of the reconciliation objects in the reconciliation object list is also compared.
Whether the reconciliation corpus is matched with the reconciliation object can be determined by matching the reconciliation corpus with the field name of the reconciliation object and the sequence of the field name, and the field name and the sequence can both correspond to each other, so that the assignment process can be simplified, and assignment errors can be avoided.
The reconciliation format description file is defined by the reconciliation file importing method, the reconciliation process is based on the reconciliation format description file, the reconciliation data processing is around the reconciliation format description file, the data processing process is simplified, the reconciliation file is preprocessed in a natural language text matching mode, and the matching process of the processed reconciliation forecast is simple and is not easy to make mistakes.
In some other embodiments, the method further comprises:
checking whether the total number of strokes of the summary row is equal to the number of objects in the linked list or not, and if not, generating an alarm prompt;
checking the total sum of the summary bank and the linked list whether the sum of the sums of the money amounts of the objects is equal, and if the values are not equal, generating an alarm prompt. According to the method, the detailed line data is imported and then is stored separately in the linked list, after the data import is completed, the detailed line data in the linked list is checked according to the summary line, so that omission of the detailed line can be avoided, and whether errors exist in the imported data can be checked according to the total amount.
It should be understood that although the steps in the flowcharts of fig. 2 and 3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. For example, step two in fig. 2 may precede step one; for another example, step three and step two in fig. 2 may be performed simultaneously. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The method of the present application is described below with reference to a specific reconciliation format import file and a specific CSV file.
The embodiment provides a common reconciliation format description file, the file name can be defined by self according to the requirement, the file format is required to be in json format, and in a specific embodiment, the file name is as follows: tradedesc. The reconciliation format description file content is as follows:
Figure BDA0003850489640000141
in the above example, each field is enclosed in double braces, separated from other fields, each field including a field name, a variable name, and a field type. For example: { { transaction ID | tradeId | String } } denotes that the field name is transaction ID, the corresponding variable name is tradeId, and the type of the field is String.
In the reconciliation format description file above, the first line is the summary line, the detail line starts from the second line of the file, knows the end of the file, and the detail line is enclosed by { { loop-start } } and { { loop-end } }. { { loop-start } } and { { loop-end } } occur in pairs; the description of the detailed lines is contained between the two.
Before data import, the reconciliation format description file needs to be analyzed to obtain a reconciliation object list.
The embodiment of the application provides a typical mechanism account checking file, the file name is set by each mechanism according to requirements, and the file name of the mechanism account checking file example is as follows: 20210603, trade. The content of the institution reconciliation file is as follows:
Figure BDA0003850489640000142
Figure BDA0003850489640000151
firstly, dividing the reconciliation file of the mechanism into two parts for analysis:
firstly, analyzing a summary line, namely a first line, and performing word segmentation to obtain 108 and 300000.00;
then, matching field names, and assigning values after successful matching; obtaining the total number of strokes and the total amount:
totalCount=108
totalAmount=300000.00
each detail line is then parsed, and the particular field participle is segmented, e.g.,
XXX,2021060300080001,208810031233,208810031234,2088100312330156,2088100312340156,20210603,140001,1000.00,S
this line of resolution yields:
<String>,<String>,<String>,<String>,<String>,<String>,<String>,<String>,<String>,<String>;
then matching the field names corresponding to the reconciliation corpus obtained by word segmentation with the reconciliation objects in the detail row reconciliation object list, and if the matching is successful, performing type conversion;
the upper row:
< String >, < String >, < String > will be converted to:
<String>,<String>,<String>,<String>,<String>,<String>,<Date>,<Time>,<Money>,<String>。
after the conversion is successful, fields obtained by analysis are assigned to variables one by one, and the result after assignment is as follows:
instId=ccb,
tradeId=2021060300080001,
payerUserId=208810031233,
payeeUserId=208810031234,
payerAccountNo=2088100312330156,
payeeAccountNo=2088100312340156,
tradeDate=2021-06-03,
tradeTime=14:00:01,
tradeAmount=1000.00,
status=S。
and then storing the detail line into a linked list, and continuing to convert the next detail line until the detail lines are completely processed, thus obtaining a linked list.
Then checking whether the total number of the summary lines is equal to the number of the objects in the linked list or not, and if not, giving an alarm to prompt that the number of the summary lines is not matched with the number of the detail lines;
and checking whether the total sum of the summary row is equal to the sum of the sums of the objects in the linked list, and if not, giving an alarm to prompt that the total sum of the summary row is not matched with the sum of the sums of the detailed rows.
It should be noted that the reconciliation corpus stated in the present application refers to specific contents obtained by performing word segmentation on each line in the institution reconciliation file, for example: detail lines:
XXX,2021060300080001,208810031233,208810031234,2088100312330156,2088100312340156,20210603,140001,1000.00, S, and the reconciliation linguistic data obtained after the word segmentation comprises: XXX,2021060300080001,208810031233,208810031234,2088100312330156,2088100312340156,20210603,140001,1000.00, S.
The method can realize the import of the mechanism reconciliation file based on the simple reconciliation format description file, the import process is based on a core method, the complexity of programming or testing is reduced, the reconciliation description file can be redefined according to the mechanism reconciliation file, the content needing to be adjusted or changed for analyzing different mechanism reconciliation files is less under the condition that the total method is not changed, and the workload is reduced.
A second aspect of the present application provides a reconciliation file importing apparatus based on natural language text matching, as shown in fig. 4, the reconciliation file importing apparatus includes:
the acquisition unit is used for acquiring the institution reconciliation file;
the analysis unit is used for preprocessing in a natural language text analysis mode to obtain a reconciliation object list;
the processing unit is used for preprocessing the mechanism account checking file in a natural language text analysis mode to obtain different account checking linguistic data;
and the account checking import unit is used for matching the account checking linguistic data with the account checking objects in the account checking object list and importing the obtained account checking data into a central database. The device defines account checking format description files, the account checking process is based on the account checking format description files, the account checking data processing surrounds the account checking format description files, the data processing process is simplified, the account checking files are preprocessed in a natural language text matching mode, and the processed account checking expected matching process is simple and is not prone to errors
In an embodiment of the present application, the parsing unit includes:
the splitting module is used for dividing the reconciliation format description file into a summary line and a detail line; traversing the reconciliation format description file, and dividing the reconciliation format description file into different fields;
the account checking object list building module is used for sequentially acquiring field names from different fields of the summary row to serve as account checking objects and building a summary row account checking object list; and sequentially acquiring field names from different fields of the detail line as reconciliation objects, and constructing a detail line reconciliation object list. The reconciliation format description files are analyzed in sequence and the reconciliation object list is constructed in sequence, so that the basis of importing the reconciliation data can be provided.
In this embodiment of the present application, the reconciliation import unit includes:
the summary row reconciliation import module is used for matching the reconciliation corpuses of the summary row with the reconciliation objects in the summary row reconciliation object list, carrying out type conversion on the reconciliation corpuses of the summary row according to the field types corresponding to the reconciliation objects in the summary row reconciliation object list under the condition of successful matching, and assigning the reconciliation corpuses of the summary row to the reconciliation objects in the summary row reconciliation object list one by one under the condition of successful type conversion;
and the detail row reconciliation import module is used for matching the reconciliation corpus of any detail row with the reconciliation object in the detail row reconciliation object list, carrying out type conversion on the reconciliation corpus of the detail row according to the field type corresponding to the reconciliation object in the detail row reconciliation object list under the condition of successful matching, assigning the reconciliation corpus of the detail row to the reconciliation object in the detail row reconciliation object list one by one under the condition of successful type conversion, storing the assignment result of the detail row in the linked list, and storing the linked list in the central database. The summary row reconciliation import module and the detail row reconciliation import module can effectively build a corresponding relation between the reconciliation corpus and the reconciliation object list by matching the reconciliation corpus and the reconciliation object, and can assign values if the corresponding relation is established, and the detail row assignment result is stored in a linked list and can be called at any time.
In some other embodiments, the reconciliation import unit further comprises:
an inspection module to:
checking whether the total number of strokes of the summary row is equal to the number of objects in the linked list or not, and if not, generating an alarm prompt; <xnotran> , , . </xnotran> The inspection module can be according to gathering the row and checking the detail row data in the linked list and can avoid the detail row to omit, also can check whether there is the error in the data of importing according to the total amount of money.
The reconciliation file importing device based on natural language text matching comprises a processor and a memory, wherein the acquisition unit, the analysis unit, the processing unit, the reconciliation importing unit and the like are all stored in the memory as program units, and the processor executes the program modules stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more, and account checking file import based on natural language text matching is achieved by adjusting kernel parameters.
The embodiment of the application provides a processor which is configured to execute the reconciliation file importing method based on natural language text matching.
The embodiment of the application provides a machine-readable storage medium, wherein the machine-readable storage medium stores instructions, and the instructions, when executed by a processor, enable the processor to be configured to execute the reconciliation file importing method based on natural language text matching.
The embodiment of the application provides a computer program product, which comprises a computer program, and is characterized in that the computer program realizes the reconciliation file import method based on natural language text matching when being executed by a processor.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, which include both non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (15)

1. A reconciliation file importing method based on natural language text matching is characterized by comprising the following steps:
acquiring an institution reconciliation file;
analyzing a predefined reconciliation format description file to obtain a reconciliation object list;
preprocessing the institution reconciliation file by adopting a natural language text analysis mode to obtain different reconciliation linguistic data;
and matching the reconciliation linguistic data with the reconciliation objects in the reconciliation object list, and importing the obtained reconciliation data into a central database.
2. The reconciliation file importing method based on natural language text matching according to claim 1, wherein the reconciliation format description file comprises:
the field name corresponding to each field, the variable name corresponding to each field and the field type corresponding to each field; the field names corresponding to the fields, the variable names corresponding to the fields and the field types corresponding to the fields are in one-to-one correspondence.
3. The reconciliation file importing method based on natural language text matching of claim 2, wherein the reconciliation format description file defines field names corresponding to the fields by using a natural language and describes field types corresponding to the fields by using placeholders.
4. The reconciliation file importing method based on natural language text matching according to claim 2, wherein parsing the predefined reconciliation format description file to obtain a reconciliation object list comprises:
dividing the reconciliation format description file into a summary line and a detail line;
traversing the reconciliation format description file, and dividing the reconciliation format description file into different fields;
sequentially acquiring field names from different fields of the summary row to serve as reconciliation objects, and constructing a summary row reconciliation object list according to the acquisition sequence and the acquired reconciliation objects;
and sequentially acquiring field names from different fields of the detail line as reconciliation objects, and constructing a detail line reconciliation object list according to the acquisition sequence and the acquired reconciliation objects.
5. The reconciliation file importing method based on natural language text matching according to claim 4, wherein the preprocessing the mechanism reconciliation file by adopting a natural language text parsing mode to obtain different reconciliation linguistic data comprises:
analyzing the mechanism account checking file and dividing the mechanism account checking file into a summary line and a plurality of detail lines;
and performing word segmentation processing on the summary line and the plurality of detail lines respectively according to the field names to obtain the summary line represented by different fields and the plurality of detail lines represented by different fields as reconciliation materials.
6. The method for importing reconciliation files based on natural language text matching according to claim 5, wherein the step of matching the reconciliation corpus with the reconciliation objects in the reconciliation object list and importing the obtained reconciliation data into a central database comprises the steps of:
matching the reconciliation corpus of the gathering bank with the reconciliation objects in the reconciliation object list of the gathering bank;
under the condition of successful matching, performing type conversion on the reconciliation corpus of the gathering line according to the field type corresponding to the reconciliation object in the reconciliation object list of the gathering line;
assigning reconciliation linguistic data of the summary row to reconciliation objects in the summary row reconciliation object list one by one under the condition that the type conversion is successful;
matching the reconciliation corpus of any detail row with the reconciliation object in the detail row reconciliation object list;
under the condition that matching is successful, performing type conversion on the reconciliation corpus of the detail line according to the field type corresponding to the reconciliation object in the detail line reconciliation object list;
under the condition that the type conversion is successful, assigning account checking linguistic data of the detail lines to account checking objects in a detail line account checking object list one by one, and storing the assignment results of the detail lines in a linked list; matching and assigning the reconciliation linguistic data of other detail lines one by one;
the linked list is stored in a central database.
7. The reconciliation file importing method based on natural language text matching according to claim 6, wherein the matching the reconciliation corpus of the summary row with the reconciliation objects in the summary row reconciliation object list comprises:
matching the field names corresponding to the reconciliation corpora of the summary row with the reconciliation objects in the reconciliation object list of the summary row in sequence, and if all the field names are consistent, successfully matching;
the matching of the reconciliation corpus of any detail line with the reconciliation object in the detail line reconciliation object list comprises the following steps:
and matching the names corresponding to the reconciliation corpus of any detail row with the reconciliation objects in the reconciliation object list of the detail row in sequence, wherein if the reconciliation objects are all consistent, the matching is successful.
8. The reconciliation file import method based on natural language text matching of claim 7, wherein the method further comprises:
checking whether the total number of strokes of the summary row is equal to the number of objects in the linked list, and if not, generating an alarm prompt;
<xnotran> , , . </xnotran>
9. A reconciliation file importing apparatus based on natural language text matching, the reconciliation file importing apparatus comprising:
the acquisition unit is used for acquiring the institution reconciliation file;
the analysis unit is used for analyzing the predefined reconciliation format description file to obtain a reconciliation object list;
the processing unit is used for preprocessing the mechanism account checking file in a natural language text analysis mode to obtain different account checking linguistic data;
and the account checking import unit is used for matching the account checking linguistic data with the account checking objects in the account checking object list and importing the obtained account checking data into a central database.
10. The reconciliation file importing apparatus based on natural language text matching of claim 9, wherein the parsing unit comprises:
the splitting module is used for dividing the reconciliation format description file into a summary line and a detail line; traversing the reconciliation format description file, and dividing the reconciliation format description file into different fields;
the account checking object list building module is used for sequentially acquiring field names from different fields of the summary row to serve as account checking objects and building a summary row account checking object list; and sequentially acquiring field names from different fields of the detail line as reconciliation objects, and constructing a detail line reconciliation object list.
11. The reconciliation file importing apparatus based on natural language text matching according to claim 9, wherein the reconciliation importing unit comprises:
the summary row reconciliation import module is used for matching the reconciliation materials of the summary row with the reconciliation objects in the summary row reconciliation object list, carrying out type conversion on the reconciliation materials of the summary row according to the field types corresponding to the reconciliation objects in the summary row reconciliation object list under the condition of successful matching, and assigning the reconciliation materials of the summary row to the reconciliation objects in the summary row reconciliation object list one by one under the condition of successful type conversion;
and the detail row reconciliation import module is used for matching the reconciliation linguistic data of any detail row with the reconciliation objects in the detail row reconciliation object list, carrying out type conversion on the reconciliation linguistic data of the detail row according to the field types corresponding to the reconciliation objects in the detail row reconciliation object list under the condition of successful matching, assigning the reconciliation linguistic data of the detail row to the reconciliation objects in the detail row reconciliation object list one by one under the condition of successful type conversion, storing the assignment results of the detail row in a linked list, and storing the linked list in the central database.
12. The reconciliation file importing apparatus based on natural language text matching of claim 11, wherein the reconciliation importing unit further comprises:
an inspection module to:
checking whether the total number of strokes of the summary row is equal to the number of objects in the linked list or not, and if not, generating an alarm prompt; and checking whether the sum of the summary bank is equal to the sum of the sums of the objects in the linked list, and if not, generating an alarm prompt.
13. A processor configured to perform the reconciliation file import method based on natural language text matching of any one of claims 1 to 8.
14. A machine-readable storage medium having instructions stored thereon, which when executed by a processor, cause the processor to be configured to perform the reconciliation file import method based on natural language text matching of any of claims 1 to 8.
15. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the reconciliation file import method based on natural language text matching according to any one of claims 1 to 8.
CN202211132031.3A 2022-09-16 2022-09-16 Account checking file importing method and device, storage medium and processor Pending CN115470278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211132031.3A CN115470278A (en) 2022-09-16 2022-09-16 Account checking file importing method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211132031.3A CN115470278A (en) 2022-09-16 2022-09-16 Account checking file importing method and device, storage medium and processor

Publications (1)

Publication Number Publication Date
CN115470278A true CN115470278A (en) 2022-12-13

Family

ID=84332536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211132031.3A Pending CN115470278A (en) 2022-09-16 2022-09-16 Account checking file importing method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN115470278A (en)

Similar Documents

Publication Publication Date Title
US11301484B2 (en) Systems and methods for type coercion
EP3353672B1 (en) Method and apparatus for transferring data between databases
US20150026556A1 (en) Systems and Methods for Extracting Table Information from Documents
CN112527970B (en) Data dictionary standardization processing method, device, equipment and storage medium
CN107391532B (en) Data filtering method and device
CN111274045A (en) Multi-platform docking method and device, computer equipment and readable storage medium
CN113505580A (en) Method and device for analyzing table file
US11544669B2 (en) Computing framework for compliance report generation
CN113312344B (en) Data serialization and deserialization method, device, system, medium and product
CN114595199A (en) File analysis method and device, computer equipment and storage medium
CN110046153B (en) Account fund checking method, device and equipment
CN107025233B (en) Data feature processing method and device
CN115470278A (en) Account checking file importing method and device, storage medium and processor
CN111475503A (en) Virtual knowledge graph construction method and device
CN110377561A (en) A kind of file management method and device
CN113515528B (en) Asset screening system and method based on big data and ORACLE mass data
CN110502483B (en) Data processing method, data processing device, computer equipment and storage medium
CN110866606B (en) Processing method and device for data information and ordering voice instruction
CN113220187B (en) Micro banking business interaction method and related equipment
CN117827902A (en) Service data processing method, device, computer equipment and storage medium
CN117971806A (en) Data migration method and device, storage medium and electronic equipment
CN117093759A (en) Data processing method, device, computer equipment and storage medium
CN117521667A (en) Semantic information processing method, semantic information processing device, computer equipment, storage medium and product
CN117521610A (en) Data processing method, computer device, and readable storage medium
CN116360758A (en) Method and device for integrating zero codes among heterogeneous systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination