CN114218914A - Service matching method and related device - Google Patents
Service matching method and related device Download PDFInfo
- Publication number
- CN114218914A CN114218914A CN202111544644.3A CN202111544644A CN114218914A CN 114218914 A CN114218914 A CN 114218914A CN 202111544644 A CN202111544644 A CN 202111544644A CN 114218914 A CN114218914 A CN 114218914A
- Authority
- CN
- China
- Prior art keywords
- receipt
- detail
- field
- target
- matching
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/186—Templates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24553—Query execution of query operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Finance (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Artificial Intelligence (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the application discloses a service matching method and a related device, wherein the method comprises the following steps: form a receipt mapping field and a detail mapping field which are set in the self-defined template are combined into a receipt matching rule and a detail matching rule respectively; and generating a receipt code corresponding to each receipt flow record according to the receipt matching rule, and generating a detail code corresponding to each detail flow record according to the detail matching rule so as to complete the matching degree check of each receipt flow record under the preset label. The matching rule of the embodiment of the application is visible for the user, and the user is supported to customize the matching rule by adding the mapping field, so that when the preset field of the default template cannot generate the receipt code and the detail code which correspond to each other one by one, the user can modify the matching rule by himself to meet the service matching requirement, and meanwhile, the input cost for processing the receipt matching problem is saved.
Description
Technical Field
The embodiment of the application relates to the technical field of internet bank enterprises, in particular to a business matching method and a related device.
Background
In the enterprise payment and receipt business, a bank receipt is usually used as an original basis of a bookkeeping voucher, so that the receipt needs to be associated with a business document and the bookkeeping voucher; at present, an Enterprise Resource Planning (ERP) system generates a receipt code and a detail code according to a specific field combination rule (or called a matching rule) by means of transaction details, and can indirectly complete the association of the receipt, the business document and the accounting voucher by confirming that the receipt code and the detail code of the same transaction are completely identical and are uniquely corresponding, namely, the matching is successful.
In an actual production environment, because the matching rules are solidified in the processing flow, a client cannot change the matching rules or even cannot see the matching rules in the using process, if the matching fields forming the matching rules all select the general business fields of all banks, the matching codes (which can be divided into receipt matching codes and detail matching codes according to business types, and the receipt matching codes and the detail matching codes are used for short in the text) of different transactions can be caused to repeatedly appear, or the receipt and the detail between the same transaction are not uniquely matched, and other special conditions occur, and in the face of the special conditions, developers need to modify the matching rules, and then the client upgrades the patches to solve the problems. Therefore, it is necessary to provide a service matching method, which reduces the investment cost of the customer in processing the receipt matching problem and improves the user experience.
Disclosure of Invention
The embodiment of the application provides a service matching method and a related device, which are used for supporting a user to define a matching rule and improving the matching efficiency of receipt.
A first aspect of the embodiments of the present application provides a service matching method, including:
enabling a custom template, wherein the custom template comprises a plurality of default field sets which are also arranged in a default template, and each default field set comprises a default receipt mapping field and a default detail mapping field which are correspondingly arranged;
adding at least one target field set in the custom template, wherein each target field set comprises a target receipt mapping field and a target detail mapping field which are correspondingly arranged, so that a receipt matching rule is combined by the default receipt mapping field and the target receipt mapping field, and a detail matching rule is combined by the default detail mapping field and the target detail mapping field, and the target field set and the default field set contain different field contents;
taking the default receipt mapping field and the target receipt mapping field as receipt primary keys, acquiring a receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record under a preset label, and generating a receipt code corresponding to each receipt flow record by using the receipt field analysis key value according to the receipt matching rule;
taking the default detail mapping field and the target detail mapping field as detail primary keys, obtaining a detail field analysis key value uniquely corresponding to the detail primary key of each detail stream record under a preset label, and generating a detail code corresponding to each detail stream record by the detail field analysis key value according to the detail matching rule;
traversing and inquiring whether a detail code which is identical with and uniquely corresponding to the current receipt code exists or not so as to complete the matching degree check of the current receipt flow record under the preset label; if so, marking the current receipt flow record to be successfully matched, and checking the matching degree of the next receipt flow record; if not, marking that the matching of the current receipt flow record fails, and adjusting the receipt matching rule and the detail matching rule to recombine the receipt matching rule and the detail matching rule to check the matching degree.
Optionally, after at least one target field set is added to the custom template, before the receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record under a preset tag is obtained, the method further includes:
downloading receipt response data of each bank, wherein the receipt return fields of each receipt flow record in the receipt response data correspond to the receipt field analysis key values one by one, and the receipt return fields comprise the default receipt mapping fields and the target receipt mapping fields;
converting the receipt response data into receipt original data in a json format, wherein each receipt flow record in the receipt original data is correspondingly bound with a receipt record table primary key value obtained through query of a preset label, and the preset label is a bank number and/or a transaction date;
and storing the original receipt data and the primary key value of the receipt record table to a database.
Optionally, the obtaining of the receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record under the preset tag includes:
and searching the receipt field analysis key value uniquely corresponding to each receipt main key of each receipt flow record from the database through the receipt record table main key value.
Optionally, after at least one target field set is added to the custom template, before the obtaining of a detail field analysis key value uniquely corresponding to each detail primary key of each detail stream record under a preset tag, the method further includes:
downloading detail response data of each bank, wherein the detail return fields of each detail stream record in the detail response data correspond to the detail field analysis key values one by one, and the detail return fields comprise the default detail mapping fields and the target detail mapping fields;
converting the detail response data into detail original data in a json format, wherein each detail stream record in the detail original data is correspondingly bound with a detail record table primary key value obtained through query of a preset label, and the preset label is a bank number and/or a transaction date;
and storing the detail original data and the detail record table primary key values into a database.
Optionally, the obtaining of a detail field analysis key value uniquely corresponding to each detail primary key of each detail flow record under the preset tag includes:
and searching a detail field analysis key value uniquely corresponding to each detail primary key of each detail stream record from the database through the detail record table primary key value.
Optionally, the adjusting the receipt matching rule and the detail matching rule includes:
analyzing the reason of the failure of matching of the current return single flow record;
if the failure reason is that more than two detail codes which are the same as the current receipt code exist, newly adding a target field set in the custom template to recombine a receipt matching rule and a detail matching rule, wherein the field contents of the target field sets which are newly added in the previous and next two times are different;
if the failure reason is that the detail code which is the same as the current receipt code does not exist, the user-defined template is restored to the interface form of the default template, and the target field set is reset in the user-defined template of the current interface form so as to be recombined into the receipt matching rule and the detail matching rule, wherein the field contents of the target field set before and after resetting are different.
Optionally, the adding at least one target field set in the custom template includes:
adding a plurality of target field sets respectively comprising different target matching fields in the custom template, wherein the field types of the target receipt mapping field and the target detail mapping field in each target field set are determined by the respective target matching fields, and the target matching fields are different from the default matching fields of the default field sets.
Optionally, the receipt response data and the detail response data are structured data or unstructured data.
Optionally, the default matching field, the default receipt mapping field, and the default detail mapping field of each default field set are bank-common fields that are fixedly set, and the field types of the default receipt mapping field and the default detail mapping field in each default field set are determined by the respective default matching field.
Optionally, the ordering of each default receipt mapping field and the target receipt mapping field combined into the receipt matching rule is determined according to the setting order of the default receipt mapping field and the target receipt mapping field in the custom template.
Optionally, the order of each default detail mapping field and each target detail mapping field combined into the detail matching rule is determined according to the setting order of the default detail mapping field and the target detail mapping field in the custom template.
A second aspect of the present embodiment provides a service matching apparatus, including:
the system comprises a starting unit, a setting unit and a display unit, wherein the starting unit is used for starting a custom template, the custom template comprises a plurality of default field sets which are also arranged in a default template, and each default field set comprises a default receipt mapping field and a default detail mapping field which are correspondingly arranged;
the processing unit is used for adding at least one target field set in the custom template, wherein each target field set comprises a target receipt mapping field and a target detail mapping field which are correspondingly arranged, so that a receipt matching rule is formed by combining the default receipt mapping field and the target receipt mapping field, and a detail matching rule is formed by combining the default detail mapping field and the target detail mapping field, and the field contents of the target field set and the default field set are different;
the processing unit is further configured to take the default receipt mapping field and the target receipt mapping field as receipt primary keys, obtain a receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record under a preset label, and generate a receipt code corresponding to each receipt flow record by using the receipt field analysis key value according to the receipt matching rule;
the processing unit is further configured to use the default detail mapping field and the target detail mapping field as detail primary keys, obtain a detail field analysis key value uniquely corresponding to the detail primary key of each detail stream record under a preset label, and generate a detail code corresponding to each detail stream record by using the detail field analysis key value according to the detail matching rule;
the processing unit is further configured to query whether a detail code identical to and uniquely corresponding to the current receipt code exists in a traversal manner, so as to complete matching degree check on the current receipt flow record under the preset label; if so, marking the current receipt flow record to be successfully matched, and checking the matching degree of the next receipt flow record; if not, marking that the matching of the current receipt flow record fails, and adjusting the receipt matching rule and the detail matching rule to recombine the receipt matching rule and the detail matching rule to check the matching degree.
Optionally, the processing unit is further configured to:
downloading receipt response data of each bank, wherein the receipt return fields of each receipt flow record in the receipt response data correspond to the receipt field analysis key values one by one, and the receipt return fields comprise the default receipt mapping fields and the target receipt mapping fields;
converting the receipt response data into receipt original data in a json format, wherein each receipt flow record in the receipt original data is correspondingly bound with a receipt record table primary key value obtained through query of a preset label, and the preset label is a bank number and/or a transaction date;
and storing the original receipt data and the primary key value of the receipt record table to a database.
Optionally, the processing unit is specifically configured to retrieve, from the database, a receipt field resolving key value uniquely corresponding to each receipt primary key of each receipt flow record by using the receipt record table primary key value.
Optionally, the processing unit is further configured to:
downloading detail response data of each bank, wherein the detail return fields of each detail stream record in the detail response data correspond to the detail field analysis key values one by one, and the detail return fields comprise the default detail mapping fields and the target detail mapping fields;
converting the detail response data into detail original data in a json format, wherein each detail stream record in the detail original data is correspondingly bound with a detail record table primary key value obtained through query of a preset label, and the preset label is a bank number and/or a transaction date;
and storing the detail original data and the detail record table primary key values into a database.
Optionally, the processing unit is specifically configured to search, from the database, a detail field analysis key value uniquely corresponding to each detail primary key of each detail stream record by using the detail record table primary key value.
Optionally, the processing unit is specifically configured to:
analyzing the reason of the failure of matching of the current return single flow record;
if the failure reason is that more than two detail codes which are the same as the current receipt code exist, newly adding a target field set in the custom template to recombine a receipt matching rule and a detail matching rule, wherein the field contents of the target field sets which are newly added in the previous and next two times are different;
if the failure reason is that the detail code which is the same as the current receipt code does not exist, the user-defined template is restored to the interface form of the default template, and the target field set is reset in the user-defined template of the current interface form so as to be recombined into the receipt matching rule and the detail matching rule, wherein the field contents of the target field set before and after resetting are different.
Optionally, the processing unit is specifically configured to add a plurality of target field sets that respectively include different target matching fields in the custom template, where field types of a target receipt mapping field and a target detail mapping field in each target field set are determined by the respective target matching field, and the target matching field is different from a default matching field of the default field set.
A third aspect of the present embodiment provides a service matching apparatus, including:
the system comprises a central processing unit, a memory and an input/output interface;
the memory is a transient memory or a persistent memory;
the central processing unit is configured to communicate with the memory and execute the instructions in the memory to perform the method described in any of the specific implementations of the first aspect of the embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, including instructions that, when executed on a computer, cause the computer to perform a method as described in any particular implementation manner of the first aspect of embodiments of the present application.
A fifth aspect of embodiments of the present application provides a computer program product comprising instructions that, when run on a computer, cause the computer to perform a method as described in the first aspect of embodiments of the present application or any implementation manner of the first aspect.
According to the technical scheme, the embodiment of the application has the following advantages:
the business matching method of the embodiment of the application comprises the steps of combining receipt mapping fields (specifically comprising default receipt mapping fields and target receipt mapping fields) and detail mapping fields (specifically comprising default detail mapping fields and target detail mapping fields) which are set in a custom template into a receipt matching rule and a detail matching rule respectively; and generating a receipt code corresponding to each receipt flow record according to the receipt matching rule, and generating a detail code corresponding to each detail flow record according to the detail matching rule so as to complete the matching degree check of each receipt flow record under the preset label. The matching rule of the embodiment of the application is visible to the user, and compared with the traditional matching rule which is solidified and configured in the default template, the matching rule is customized by adding the mapping field, so that when the preset field of the default template cannot generate the receipt code and the detail code which are in one-to-one correspondence, namely the matching degree check is wrong, the user can modify the matching rule by self to meet the service matching or correlation requirement, and meanwhile, the input cost for processing the receipt matching problem is saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a schematic flowchart of a service matching method according to an embodiment of the present application;
fig. 2 is another schematic flow chart of a service matching method according to an embodiment of the present application;
fig. 3 is a schematic diagram of an architecture of a service matching method according to an embodiment of the present application;
FIG. 4 is a diagram of a custom template interface according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating matching of receipt and detail in the embodiment of the present application;
fig. 6 is a schematic structural diagram of a service matching apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a service matching apparatus according to an embodiment of the present application.
Detailed Description
Referring to fig. 1, fig. 3 to fig. 5, a first aspect of the present application provides an embodiment of a service matching method, including:
101. and starting the self-defined template.
The user-defined template comprises a plurality of default field sets which are also arranged on the default template, and each default field set comprises a default receipt mapping field and a default detail mapping field which are correspondingly arranged; the default field may specifically be a cured field preset in the default template, i.e. a field that is not modifiable by the user.
102. A set of target fields is created in the custom template.
At least one target field set is additionally arranged in the custom template, wherein each target field set comprises a target receipt mapping field and a target detail mapping field which are correspondingly arranged, so that a receipt matching rule is formed by combining a default receipt mapping field and the target receipt mapping field, and a detail matching rule is formed by combining a default detail mapping field and the target detail mapping field, and the field contents contained in the target field set and the default field set are different.
1031. And acquiring a receipt field analysis key value.
After the default receipt mapping field and the target receipt mapping field are used as the receipt primary keys, a receipt field analysis key value (or simply called a receipt field value) uniquely corresponding to each receipt primary key of each receipt flow record under a preset label is obtained to generate a receipt code.
1032. And generating a receipt code.
And generating a receipt code corresponding to each receipt flow record under the preset label according to the receipt field analysis key value according to a receipt matching rule.
1041. And acquiring a detail field analysis key value.
After the default detail mapping field and the target detail mapping field are used as the detail primary keys, a detail field analysis key value (or simply referred to as a detail field value) uniquely corresponding to the detail primary key of each detail stream record under the preset label is obtained to generate a detail code.
1042. And generating the detail codes.
Generating detail codes corresponding to all detail flow records under a preset label according to the detail field analysis key value according to a detail matching rule;
1051. and (5) checking the matching degree.
And traversing to inquire whether the detail code which is the same as and uniquely corresponds to the current receipt code exists or not so as to complete the matching degree check of the current receipt flow record under the preset label.
1052. Marking the matching success of the current echo single flow record and continuously checking the matching degree.
If the detail code which is identical with and uniquely corresponding to the current receipt code exists, the matching success of the current receipt flow record is marked, and the matching degree of the next receipt flow record is checked.
1053. And marking the matching failure of the current return single flow record and adjusting the matching rule.
If the detail code which is identical with and uniquely corresponding to the current receipt code does not exist in the query, marking the matching failure of the current receipt running water record, and modifying the receipt matching rule and the detail matching rule (specifically, the step of correspondingly adjusting the target receipt mapping field and the target detail mapping field) so as to recombine the receipt matching rule and the detail matching rule and then carry out matching degree check.
Step 1031, the execution sequence of step 1041 or 1042 is not limited, and the steps may be executed simultaneously; similarly, in step 1032, the execution sequence of step 1041 or 1042 is not limited, and it may be executed simultaneously as long as it can ensure that the receipt code and the detail code are generated for performing the subsequent matching degree check.
Referring to fig. 2 to 5, the present application provides an embodiment of a service matching method, including:
201. and starting the self-defined template.
The default matching field, the default receipt mapping field and the default detail mapping field (which can be summarized as default fields) of each default field set are all bank general fields fixedly arranged in the template, and specifically can be understood as fields fixedly preset in the template by developers and not adjustable by users; in practical applications, the default fields in each default field set are verified and configured in the template, i.e. the mapping relationship between the fields is error-free. In addition, the field type of the default receipt mapping field and the default detail mapping field in each default field set is determined by the respective default matching field, and the field type here may specifically include one or more types of a primary account number (an account number of a party who actively initiates a transaction), an account number of an opposite party, a transaction date, a transaction amount, a debit and credit relationship, and a bank serial number.
202. A set of target fields is created in the custom template.
In a specific embodiment, a plurality of target field sets respectively comprising different target matching fields are additionally arranged in a custom template, the field types of a target receipt mapping field and a target detail mapping field in each target field set are determined by respective target matching fields, and the target matching fields are different from the default matching fields of the default field set; the ordering of the default receipt mapping fields and the target receipt mapping fields combined into the receipt matching rule can be determined according to the setting sequence of the default receipt mapping fields and the target receipt mapping fields in the custom template.
Illustratively, as shown in FIG. 5, a custom set of target fields is manually entered in a custom template that includes 6 default sets of fields: firstly, creating a target matching field (inputting teller number teller), and correspondingly binding a target receipt mapping field (telId) and a target detail mapping field (teller work number telNo) which are of the same field type as the target matching field, so that a receipt matching rule in the following form is combined: accNo-oppaccNo-transDate-amino-cdFlag-serialNo-teller. It should be noted that the matching field can be understood as a virtual field defined by a person, and the receipt mapping field and the detail mapping field are entity attributes having a mapping relationship with the virtual field; illustratively, the entity attribute of the target matching field teller in the bank receipt response message is telId, the entity attribute of the target matching field teller in the bank detail response message is telNo, and a mapping relationship exists between teler-telId-telNo. In addition, because the definition of the same field (e.g., teller) may be different (e.g., as telId or telNo) in the receipt response and transaction detail response entities of the bank, the application framework needs to abstract a uniform matching field (i.e., teller) to handle the field differentiation of the interfaces of the two banks, so as to achieve the purpose of matching code consistency, and thus, by maintaining the mapping relationship between teller-telId-telNo, the field value can be obtained; obviously, the teller number is uniform here if the bank can guarantee the consistency of the interface fields on both sides.
2031. And downloading receipt response data of each bank.
In a specific embodiment, receipt response data of each bank is downloaded from each bank interface terminal, a receipt return field of each receipt flow record in the receipt response data corresponds to a receipt field analysis key value one by one, and the receipt return field includes a default receipt mapping field and a target receipt mapping field.
2032. And converting the receipt response data into receipt original data in a json format.
In practical applications, the downloaded receipt response data and the downloaded detail response data may be structured data (the structured data format includes xml and json) or unstructured data (the unstructured data format includes txt, pdf, zip and pdf), so in order to ensure the format consistency of the generated receipt code and the detail code, the receipt response data needs to be uniformly converted into the receipt original data in the json format. Each receipt flow record in the receipt original data is correspondingly bound with a receipt record table primary key value obtained through query of a preset label, and the preset label can be a bank number and/or a transaction date; the receipt recording table main key value can be specifically a receipt _ id, through which format-converted receipt original data can be associated with the receipt recording table, and the main role of association is to facilitate updating the receipt code immediately after modifying the matching rule (i.e. adjusting the target receipt mapping field and the target detail mapping field); meanwhile, when the matching rule changes, the system does not need to download data from the bank interface end again, and can directly associate the receipt original data according to the receipt _ id, so that the corresponding field value is taken out according to the new matching rule, and the receipt code is quickly updated (the receipt code can be recorded in a receipt record table of the database).
For example, the receipt flow records corresponding to a certain day of a certain bank can be screened out by specifying the bank number and the transaction date, and then the receipt _ id of the receipt record table primary key value is determined, so that the required receipt field analysis key value can be directly called from the database through the receipt record table primary key value subsequently, and the receipt code is immediately updated. It should be noted that, the data contents of the receipt original data and the receipt response data are consistent, and the two data are only converted in format; the field extraction of the file name, the summary file and the message can be carried out by using a receipt parsing adapter.
2033. And warehousing and storing the original receipt data and the primary key values of the receipt record table.
And storing the receipt original data and the receipt record table primary key value into a database, so that the receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record can be directly searched and obtained from the database through the receipt record table primary key value.
2041. And acquiring a receipt field value.
Directly searching and obtaining a receipt field analysis key value uniquely corresponding to each receipt main key of each receipt running water record from a database through the receipt record table main key value; in addition, the receipt field analysis key value is obtained from the database, and compared with the repeated downloading of the receipt response data and the format conversion from each bank interface terminal, the time cost on data calling can be reduced.
2042. And generating a receipt code.
And generating a receipt code corresponding to each receipt flow record under the preset label according to the receipt field analysis key value according to a receipt matching rule. It can be understood that the process of generating the receipt code can be regarded as replacing the respective receipt primary keys (the default receipt mapping field and the target receipt mapping field) combined into the receipt matching rule with the respective corresponding receipt field resolving key values to form the receipt code.
2051. And downloading the detail response data of each bank.
In a specific embodiment, the detail response data of each bank is downloaded from each bank interface terminal, the detail return field and the detail field resolving key value of each detail stream record in the detail response data are in one-to-one correspondence, and the detail return field comprises a default detail mapping field and a target detail mapping field.
2052. And converting the detail response data into detail original data in json format.
In practical applications, the downloaded detail response data and the detail response data may be structured data or unstructured data, so in order to ensure format consistency of the generated detail codes and the detail codes, the detail response data needs to be uniformly converted into the original detail data in the json format. Each detail stream record in the detail original data is correspondingly bound with a detail record table primary key value obtained through query of a preset label, the detail record table primary key value can be detail _ id, the detail original data after format conversion can be associated with the detail record table through the detail _ id, and the association mainly has the effect that the detail code is updated immediately after a matching rule is modified (namely a target receipt mapping field and a target detail mapping field are adjusted); meanwhile, when the matching rule changes, the system does not need to download data from the bank interface end again, the detail original data can be directly associated according to the detail _ id, and then the corresponding field value is taken out according to the new matching rule, so that the detail code can be quickly updated (the detail code can be recorded in a detail record table of the database).
Illustratively, the detail flow records corresponding to a certain day of a certain bank can be screened out by specifying the bank number and the transaction date, and then the detail record table primary key value detail _ id is determined, so that the required detail field analysis key value can be directly called from the database through the detail record table primary key value subsequently, and then the detail code is immediately updated. It should be noted that the data contents of the detail original data and the detail response data are consistent, and the two data are only converted in format; the field extraction of the file name, the summary file and the message can be carried out by using the detail analysis adapter.
2053. And storing the detail original data and the detail record table primary key values in a warehouse.
And storing the detail original data and the detail record table primary key values into a database, so that the detail field analysis key values uniquely corresponding to the detail primary keys of each detail stream record can be directly searched and obtained from the database through the detail record table primary key values.
2061. And acquiring the detail field value.
Directly searching and obtaining a detail field analysis key value uniquely corresponding to each detail primary key of each detail stream record from a database through the detail record table primary key value; in addition, the detail field analysis key value is obtained from the database, and compared with the repeated downloading of the detail response data and the format conversion from each bank interface terminal, the time cost on data calling can be reduced.
2062. And generating the detail codes.
It will be appreciated that the process of generating the detail code can be viewed as replacing each detail primary key (default detail mapping field and target detail mapping field) combined into the detail matching rule with the respective corresponding detail field resolution key value to form the detail code.
2071. And (5) checking the matching degree.
Each receipt flow record can be correspondingly bound with a receipt code belonging to the receipt flow record, each detail flow record can be correspondingly bound with a detail code belonging to the detail flow record, so that the receipt code corresponding to each receipt flow record and the detail code corresponding to the detail flow record on a certain day of a certain bank can be selected by appointing a bank number and a transaction date, and further, the matching degree check of each receipt flow record is completed.
2072. Marking the matching success of the current echo single flow record and continuously checking the matching degree.
2073. And marking the matching failure of the current return single flow record and adjusting the matching rule.
Under the condition that the matching of the current receipt running water record fails, the specific process of adjusting the receipt matching rule and the detail matching rule comprises any one of the following modes:
(1) newly added field
Analyzing the reason of the matching failure of the current single return water flow record;
if the failure reason is that more than two detail codes which are the same as the current receipt code exist, a target field set (namely a newly-added target matching field and a target receipt mapping field and a target detail mapping field which are correspondingly bound) can be newly added on the basis of the current self-defined template so as to be recombined into a receipt matching rule and a detail matching rule, and further a new receipt code and a new detail code are generated to check the matching degree between the receipt and the transaction detail; in order to ensure that the matching code with the application value is generated smoothly, the field contents contained in the target field sets newly added before and after the target field sets newly added are different, namely, the fields newly added before and after the target field sets are different.
(2) Resetting a field
Analyzing the reason of the matching failure of the current single return water flow record;
and if the failure reason is that the detail code which is the same as the current receipt code does not exist, the user-defined template is restored to the interface form of the default template, and the target field set is reset in the user-defined template of the current interface form so as to be recombined into the receipt matching rule and the detail matching rule, wherein the field contents contained in the target field set before and after resetting are different.
Steps 201 to 202 are similar to steps 101 to 102, steps 2041 to 2042 are similar to steps 1031 to 1032, and steps 2061 to 2073 are similar to steps 1041 to 1053, and detailed description is omitted. The execution sequence of any step in steps 2031 to 2042 and the execution sequence of any step in steps 2051 to 2062 are not limited, and may be executed simultaneously.
Referring to fig. 6, a second aspect of the present application provides an embodiment of a service matching apparatus, including:
a starting unit 601, configured to start a custom template, where the custom template includes multiple default field sets that are also set in a default template, and each default field set includes a default receipt mapping field and a default detail mapping field that are set correspondingly;
a processing unit 602, configured to add at least one target field set in a custom template, where each target field set includes a target receipt mapping field and a target detail mapping field that are set correspondingly, so that a receipt matching rule is composed of a default receipt mapping field and the target receipt mapping field, and a detail matching rule is composed of the default detail mapping field and the target detail mapping field, and the field contents included in the target field set and the default field set are different;
the processing unit 602 is further configured to use the default receipt mapping field and the target receipt mapping field as receipt primary keys, obtain a receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record under a preset label, and generate a receipt code corresponding to each receipt flow record by using the receipt field analysis key value according to a receipt matching rule;
the processing unit 602 is further configured to use the default detail mapping field and the target detail mapping field as detail primary keys, obtain a detail field analysis key value uniquely corresponding to the detail primary key of each detail stream record under the preset tag, and generate a detail code corresponding to each detail stream record according to a detail matching rule by using the detail field analysis key value;
the processing unit 602 is further configured to perform traversal query to determine whether a detail code identical to and uniquely corresponding to the current receipt code exists, so as to complete matching degree check on the current receipt flow record under the preset tag; if so, marking the current receipt flow record to be successfully matched, and checking the matching degree of the next receipt flow record; if not, marking that the matching of the current receipt flow record fails, and adjusting the receipt matching rule and the detail matching rule to recombine the receipt matching rule and the detail matching rule to check the matching degree.
In this embodiment of the application, operations performed by each unit of the service matching apparatus are similar to those described in any specific method embodiment of the first aspect, and details are not repeated here.
Referring to fig. 7, a service matching apparatus 700 according to the embodiment of the present application may include one or more Central Processing Units (CPUs) 701 and a memory 705, where the memory 705 stores one or more application programs or data.
The memory 705 may be volatile storage or persistent storage, among others. The program stored in the memory 705 may include one or more modules, each of which may include a series of instruction operations on a service matching device. Further, the central processor 701 may be configured to communicate with the memory 705, and execute a series of instruction operations in the memory 705 on the service matching apparatus 700.
The traffic matching device 700 may also include one or more power supplies 702, one or more wired or wireless network interfaces 703, one or more input-output interfaces 704, and/or one or more operating systems, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The central processing unit 701 may perform the operations performed by any of the specific method embodiments of the first aspect, which are not described herein again in detail.
It should be understood that, in the various embodiments of the present application, the size of the serial number of each step does not mean the execution sequence, and the execution sequence of each step should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system or apparatus, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a service server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.
Claims (10)
1. A method for service matching, comprising:
enabling a custom template, wherein the custom template comprises a plurality of default field sets which are also arranged in a default template, and each default field set comprises a default receipt mapping field and a default detail mapping field which are correspondingly arranged;
adding at least one target field set in the custom template, wherein each target field set comprises a target receipt mapping field and a target detail mapping field which are correspondingly arranged, so that a receipt matching rule is combined by the default receipt mapping field and the target receipt mapping field, and a detail matching rule is combined by the default detail mapping field and the target detail mapping field, and the target field set and the default field set contain different field contents;
taking the default receipt mapping field and the target receipt mapping field as receipt primary keys, acquiring a receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record under a preset label, and generating a receipt code corresponding to each receipt flow record by using the receipt field analysis key value according to the receipt matching rule;
taking the default detail mapping field and the target detail mapping field as detail primary keys, obtaining a detail field analysis key value uniquely corresponding to the detail primary key of each detail stream record under a preset label, and generating a detail code corresponding to each detail stream record by the detail field analysis key value according to the detail matching rule;
traversing and inquiring whether a detail code which is identical with and uniquely corresponding to the current receipt code exists or not so as to complete the matching degree check of the current receipt flow record under the preset label; if so, marking the current receipt flow record to be successfully matched, and checking the matching degree of the next receipt flow record; if not, marking that the matching of the current receipt flow record fails, and adjusting the receipt matching rule and the detail matching rule to recombine the receipt matching rule and the detail matching rule to check the matching degree.
2. The service matching method according to claim 1, wherein after at least one target field set is added to the custom template, before the receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record under a preset tag is obtained, the method further comprises:
downloading receipt response data of each bank, wherein the receipt return fields of each receipt flow record in the receipt response data correspond to the receipt field analysis key values one by one, and the receipt return fields comprise the default receipt mapping fields and the target receipt mapping fields;
converting the receipt response data into receipt original data in a json format, wherein each receipt flow record in the receipt original data is correspondingly bound with a receipt record table primary key value obtained through query of a preset label, and the preset label is a bank number and/or a transaction date;
and storing the original receipt data and the primary key value of the receipt record table to a database.
3. The service matching method according to claim 2, wherein the obtaining of the receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record under the preset label comprises:
and searching the receipt field analysis key value uniquely corresponding to each receipt main key of each receipt flow record from the database through the receipt record table main key value.
4. The service matching method according to claim 1, wherein after at least one target field set is added to the custom template, before the detail field analysis key value uniquely corresponding to each detail primary key of each detail flow record under a preset tag is obtained, the method further comprises:
downloading detail response data of each bank, wherein the detail return fields of each detail stream record in the detail response data correspond to the detail field analysis key values one by one, and the detail return fields comprise the default detail mapping fields and the target detail mapping fields;
converting the detail response data into detail original data in a json format, wherein each detail stream record in the detail original data is correspondingly bound with a detail record table primary key value obtained through query of a preset label, and the preset label is a bank number and/or a transaction date;
and storing the detail original data and the detail record table primary key values into a database.
5. The service matching method according to claim 4, wherein the obtaining of a detail field analysis key value uniquely corresponding to each detail primary key of each detail flow record under a preset label comprises:
and searching a detail field analysis key value uniquely corresponding to each detail primary key of each detail stream record from the database through the detail record table primary key value.
6. The traffic matching method according to claim 1, wherein said adjusting said receipt matching rule and said detail matching rule comprises:
analyzing the reason of the failure of matching of the current return single flow record;
if the failure reason is that more than two detail codes which are the same as the current receipt code exist, newly adding a target field set in the custom template to recombine a receipt matching rule and a detail matching rule, wherein the field contents of the target field sets which are newly added in the previous and next two times are different;
if the failure reason is that the detail code which is the same as the current receipt code does not exist, the user-defined template is restored to the interface form of the default template, and the target field set is reset in the user-defined template of the current interface form so as to be recombined into the receipt matching rule and the detail matching rule, wherein the field contents of the target field set before and after resetting are different.
7. The service matching method according to claim 1, wherein said adding at least one target field set in the custom template comprises:
adding a plurality of target field sets respectively comprising different target matching fields in the custom template, wherein the field types of the target receipt mapping field and the target detail mapping field in each target field set are determined by the respective target matching fields, and the target matching fields are different from the default matching fields of the default field sets.
8. A service matching apparatus, comprising:
the system comprises a starting unit, a setting unit and a display unit, wherein the starting unit is used for starting a custom template, the custom template comprises a plurality of default field sets which are also arranged in a default template, and each default field set comprises a default receipt mapping field and a default detail mapping field which are correspondingly arranged;
the processing unit is used for adding at least one target field set in the custom template, wherein each target field set comprises a target receipt mapping field and a target detail mapping field which are correspondingly arranged, so that a receipt matching rule is formed by combining the default receipt mapping field and the target receipt mapping field, and a detail matching rule is formed by combining the default detail mapping field and the target detail mapping field, and the field contents of the target field set and the default field set are different;
the processing unit is further configured to take the default receipt mapping field and the target receipt mapping field as receipt primary keys, obtain a receipt field analysis key value uniquely corresponding to each receipt primary key of each receipt flow record under a preset label, and generate a receipt code corresponding to each receipt flow record by using the receipt field analysis key value according to the receipt matching rule;
the processing unit is further configured to use the default detail mapping field and the target detail mapping field as detail primary keys, obtain a detail field analysis key value uniquely corresponding to the detail primary key of each detail stream record under a preset label, and generate a detail code corresponding to each detail stream record by using the detail field analysis key value according to the detail matching rule;
the processing unit is further configured to query whether a detail code identical to and uniquely corresponding to the current receipt code exists in a traversal manner, so as to complete matching degree check on the current receipt flow record under the preset label; if so, marking the current receipt flow record to be successfully matched, and checking the matching degree of the next receipt flow record; if not, marking that the matching of the current receipt flow record fails, and adjusting the receipt matching rule and the detail matching rule to recombine the receipt matching rule and the detail matching rule to check the matching degree.
9. A service matching apparatus, comprising:
the system comprises a central processing unit, a memory and an input/output interface;
the memory is a transient memory or a persistent memory;
the central processor is configured to communicate with the memory and execute the operations of the instructions in the memory to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111544644.3A CN114218914A (en) | 2021-12-16 | 2021-12-16 | Service matching method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111544644.3A CN114218914A (en) | 2021-12-16 | 2021-12-16 | Service matching method and related device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114218914A true CN114218914A (en) | 2022-03-22 |
Family
ID=80703128
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111544644.3A Pending CN114218914A (en) | 2021-12-16 | 2021-12-16 | Service matching method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114218914A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117032602A (en) * | 2023-10-10 | 2023-11-10 | 海通安恒科技股份有限公司 | Printing method and system for rapidly realizing label field mapping and label rule configuration |
-
2021
- 2021-12-16 CN CN202111544644.3A patent/CN114218914A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117032602A (en) * | 2023-10-10 | 2023-11-10 | 海通安恒科技股份有限公司 | Printing method and system for rapidly realizing label field mapping and label rule configuration |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108536459B (en) | Updating method, device, equipment and computer storage medium of financial product | |
CN110286974B (en) | Application configuration method, device, equipment and storage medium based on H5 page | |
US10614130B1 (en) | Content recommendation using layered types | |
CN109345190B (en) | Data processing method and device | |
CN111767704A (en) | Excel form template generation method and device | |
US20210124752A1 (en) | System for Data Collection, Aggregation, Storage, Verification and Analytics with User Interface | |
CN111858608A (en) | Data management method, device, server and storage medium | |
CN108960672B (en) | Quota and time-limited wind control method and device and computer readable storage medium | |
CN112988770A (en) | Method and device for updating serial number, electronic equipment and storage medium | |
US20220284371A1 (en) | Method, device and medium for a business function page | |
CN114218914A (en) | Service matching method and related device | |
AU2017351024B2 (en) | Processing application programming interface (API) queries based on variable schemas | |
CN106506661A (en) | Method, server and system for dynamically returning data | |
US20230195792A1 (en) | Database management methods and associated apparatus | |
CN115080616A (en) | Dictionary data acquisition method and device, storage medium and electronic equipment | |
CN115544132A (en) | Data import method and system and electronic equipment | |
CN110781375A (en) | User state identification determining method and device | |
WO2017072872A1 (en) | Business program generation assistance system and business program generation assistance method | |
CN112800127A (en) | Data mining analysis method and device based on transaction bill | |
CN114356252B (en) | Dynamic field printing method, system and related device | |
CN115481932B (en) | ERP system database trigger generation method, storage medium and electronic device | |
CN115879895B (en) | Protocol admittance method, device, computer equipment and storage medium | |
CN111597189B (en) | Method, device, equipment and storage medium for acquiring data | |
CN116127922B (en) | Intellectual property file processing method and device | |
CN115407992B (en) | Configuration method and device of data query menu, electronic equipment and storage medium |
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 |