Document field matching method and device and electronic equipment

By constructing a method of describing language matrix and calculating field similarity, the document fields are automatically matched, which solves the problem of waste of human resources and low matching efficiency in the prior art, and achieves efficient and accurate document field matching.

CN119443077APending Publication Date: 2025-02-14ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310985782.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-07
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, the document field matching process wastes a lot of human resources, resulting in low matching efficiency.

Method used

By determining the first description language matrix based on the first field and its multidimensional data information, and determining the second description language matrix based on the second field and its multidimensional data information, the field similarity is calculated through multiple description language matrices, and the document field is automatically matched by the document field. .

Benefits of technology

The comprehensiveness and accuracy of document field matching is achieved, reducing human resources participation and improving matching efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443077A_ABST
    Figure CN119443077A_ABST
Patent Text Reader

Abstract

The invention provides a document field matching method and device and electronic equipment, and relates to the technical field of data processing.The method comprises the steps that a first description language matrix is determined based on a first field and multi-dimensional data information corresponding to the first field; based on a second field and the multi-dimensional data information corresponding to the second field, a second description language matrix is determined, and the first field and the second field are located in different documents; determining a third description language matrix based on the first field and the second description language matrix; determining a fourth description language matrix based on the second field and the first description language matrix; based on the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix, determining field similarity corresponding to the first field and the second field; and determining a matching result of the first field and the second field based on the field similarity. According to the invention, automatic matching of the documents can be realized, and the document matching efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a document field matching method, device and electronic device. Background Art

[0002] Before the program docking in the multi-dimensional data docking process, the developers compare the system interface documents provided by the two platforms, analyze the flow of data, further determine the correspondence between the interface modules and the correspondence between the detailed fields, and output the document comparing the interface document fields to facilitate subsequent program docking.

[0003] In the prior art, developers generally perform manual matching, or use text comparison tools to determine the semantic similarity of two fields based on the feature value matching method of semantic analysis to determine whether the two fields are similar. However, when performing manual matching, the accuracy of the matching results is low due to the one-sided consideration of manual matching, which in turn leads to abnormalities in subsequent program docking, and the matching results need to be reworked and modified, which wastes a lot of human resources and leads to low matching efficiency. When matching, text comparison tools match limited document types and have low matching accuracy. A lot of human resources need to be wasted to modify the matched documents, which leads to low matching efficiency. Summary of the invention

[0004] The present invention provides a document field matching method, device and electronic device, which are used to solve the defects in the prior art that the matching process wastes a lot of human resources and leads to low matching efficiency. By combining fields and multi-dimensional data information corresponding to the fields, automatic matching of documents is realized, the comprehensiveness and accuracy of the matching results are ensured, and the document matching efficiency is improved.

[0005] The present invention provides a document field matching method, comprising:

[0006] Determine a first description language matrix based on a first field and multidimensional data information corresponding to the first field; and determine a second description language matrix based on a second field and multidimensional data information corresponding to the second field, wherein the first field and the second field are located in different documents;

[0007] Determine a third description language matrix based on the first field and the second description language matrix; and determine a fourth description language matrix based on the second field and the first description language matrix;

[0008] Determine the field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix;

[0009] Based on the field similarity, a matching result between the first field and the second field is determined.

[0010] According to the document field matching method provided by the present invention, the first description language matrix is ​​determined based on the first field and the multidimensional data information corresponding to the first field; and the second description language matrix is ​​determined based on the second field and the multidimensional data information corresponding to the second field, including:

[0011] Determine a first description language corresponding to the first field based on the first field and the multidimensional data information corresponding to the first field; and determine a second description language corresponding to the second field based on the second field and the multidimensional data information corresponding to the second field;

[0012] Based on the multidimensional data information corresponding to the first field, determine a first attribute matrix corresponding to the first field; and based on the multidimensional data information corresponding to the second field, determine a second attribute matrix corresponding to the second field;

[0013] Determine the first description language matrix based on the first field, the first attribute matrix and the first description language;

[0014] The second description language matrix is ​​determined based on the second field, the second attribute matrix and the second description language.

[0015] According to the document field matching method provided by the present invention, determining the field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix includes:

[0016] determining a first feature angle based on the first description language matrix and the second description language matrix;

[0017] Determining a second feature angle based on the third description language matrix and the fourth description language matrix;

[0018] Based on the difference between the first feature angle and the second feature angle, the field similarity corresponding to the first field and the second field is determined.

[0019] According to the document field matching method provided by the present invention, the determining of the first feature angle based on the first description language matrix and the second description language matrix includes:

[0020] Determine a first quantization vector of the first description language matrix in a first target segment to which the first field belongs, and determine a second quantization vector of the second description language matrix in a second target segment to which the second field belongs; the first target segment and the second target segment have a matching relationship;

[0021] The first characteristic angle is determined based on the first quantization vector and the second quantization vector.

[0022] According to the document field matching method provided by the present invention, the method further includes:

[0023] Divide the first document corresponding to the first field into paragraphs to obtain a plurality of first segments; and divide the second document corresponding to the second field into paragraphs to obtain a plurality of second segments;

[0024] Respectively extracting first topic features corresponding to each of the plurality of first segments and second topic features corresponding to each of the plurality of second segments;

[0025] Based on any of the first subject features and any of the second subject features, any of the first segments and any of the second segments are matched to determine at least one set of first target segments and second target segments having a matching relationship.

[0026] According to the document field matching method provided by the present invention, based on any of the first subject features and any of the second subject features, any of the first segments and any of the second segments are matched to determine at least one set of first target segments and second target segments having a matching relationship, including:

[0027] For any of the first topic features and any of the second topic features, determining a topic similarity between the first segment corresponding to the first topic feature and the second segment corresponding to the second topic feature;

[0028] When the topic similarity is greater than a first preset threshold, it is determined that there is a matching relationship between the first segment corresponding to the first topic feature and the second segment corresponding to the second topic feature, and the first segment corresponding to the first topic feature is determined as the first target segment, and the second segment corresponding to the second topic feature is determined as the second target segment.

[0029] According to the document field matching method provided by the present invention, determining the matching result between the first field and the second field based on the field similarity includes:

[0030] When the field similarity is greater than a second preset threshold, determining a first matching relationship between the first field and the second field;

[0031] Determine a second matching relationship between the multidimensional data information corresponding to the first field and the multidimensional data information corresponding to the second field;

[0032] Determining a third matching relationship based on a matching relationship between the first target segment and the second target segment;

[0033] Based on the first matching relationship, the second matching relationship, and the third matching relationship, a matching result of the first field and the second field is determined.

[0034] According to the document field matching method provided by the present invention, the method of determining a third description language matrix based on the first field and the second description language matrix; and determining a fourth description language matrix based on the second field and the first description language matrix, comprises:

[0035] Replacing the second field in the second description language matrix with the first field to obtain the third description language matrix;

[0036] The first field in the first description language matrix is ​​replaced by the second field to obtain the fourth description language matrix.

[0037] The present invention also provides a document field matching device, comprising:

[0038] A first determination module is configured to determine a first description language matrix based on a first field and multidimensional data information corresponding to the first field; and to determine a second description language matrix based on a second field and multidimensional data information corresponding to the second field, wherein the first field and the second field are located in different documents;

[0039] a second determining module, configured to determine a third description language matrix based on the first field and the second description language matrix; and to determine a fourth description language matrix based on the second field and the first description language matrix;

[0040] A third determination module, configured to determine a field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix, and the fourth description language matrix;

[0041] A fourth determination module is used to determine a matching result between the first field and the second field based on the field similarity.

[0042] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the document field matching method described above is implemented.

[0043] The document field matching method, device and electronic device provided by the present invention determine a first description language matrix through a first field and multidimensional data information corresponding to the first field, and determine a second description language matrix through a second field and multidimensional data information corresponding to the second field, then determine a third description language matrix based on the first field and the second description language matrix, and determine a fourth description language matrix based on the second field and the first description language matrix, determine the field similarity corresponding to the first field and the second field through the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix, and then determine the matching result of the first field and the second field according to the field similarity, match the first field and the second field in a semantic environment constructed by the multidimensional data information corresponding to each other, ensure the comprehensiveness and accuracy of document field matching, reduce human resources in the document field matching process, and thus improve matching efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0045] Figure 1 This is one of the flowcharts of the document field matching method provided by an embodiment of the present invention;

[0046] Figure 2 is a schematic diagram of paragraph division of a first document provided by an embodiment of the present invention;

[0047] Figure 3 is a schematic diagram of paragraph division of a second document provided by an embodiment of the present invention;

[0048] Figure 4 This is a second flow chart of the document field matching method provided by an embodiment of the present invention;

[0049] Figure 5 is a schematic diagram of segment matching between a first document and a second document provided by an embodiment of the present invention;

[0050] Figure 6 It is a structural diagram of a document field matching device provided by an embodiment of the present invention;

[0051] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] In view of the problem that the matching process in the prior art wastes a lot of human resources and leads to low matching efficiency, an embodiment of the present invention provides a document field matching method. Figure 1 is one of the flowcharts of the document field matching method provided by the embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0054] Step 110: determine a first description language matrix based on a first field and multidimensional data information corresponding to the first field; and determine a second description language matrix based on a second field and multidimensional data information corresponding to the second field, wherein the first field and the second field are located in different documents.

[0055] Specifically, when matching document fields, the fields have different meanings in different semantic environments. If the characters of the two fields are the same, but the meanings are different when they are in different semantic environments, it indicates that the two fields in the two documents do not match. If the characters of the two fields are different, but the meanings are the same when they are in different semantic environments, it indicates that there is a matching relationship between the two fields. Therefore, in an embodiment of the present invention, a first description language matrix is ​​determined in combination with the first field and the multidimensional data information corresponding to the first field, and a second description language matrix is ​​determined in combination with the second field and the multidimensional data information corresponding to the second field. Ensure that the field itself and the information in multiple dimensions corresponding to the field are fully and comprehensively considered during subsequent comparisons, improve the accuracy of document field matching, and thereby reduce the human participation in the field matching process, reduce human costs, and thereby improve matching efficiency.

[0056] Optionally, the multidimensional data information may include field type type, necessary, value range range, description description, input parameter or return value param and others, etc. The value of necessary is: necessary or unnecessary, and the value of input parameter or return value is: input parameter is param, and return value is result.

[0057] Table 1 Example table of the first field and multi-dimensional attribute information

[0058]

[0059] For example, taking the first field as msgtype as an example, the first field and the multi-dimensional attribute information corresponding to the first field are shown in Table 1.

[0060] Optionally, the above-mentioned documents may be system interface documents provided by the data source and the data recipient, respectively. The language type used by the system interface document may be English or Chinese, which is not limited in the embodiment of the present invention. To facilitate the subsequent program operation, the language type is preferably English. When the language type is English, the fields in the document may be English words or English strings obtained by custom combinations of English letters. The flow direction of the data may be determined by the above-mentioned documents, and the default data flow direction is from the data source to the data recipient.

[0061] Before executing step 110, the method further includes:

[0062] Divide the first document corresponding to the first field into paragraphs to obtain a plurality of first segments; and divide the second document corresponding to the second field into paragraphs to obtain a plurality of second segments;

[0063] Respectively extracting first topic features corresponding to each of the plurality of first segments and second topic features corresponding to each of the plurality of second segments;

[0064] Based on any of the first subject features and any of the second subject features, any of the first segments and any of the second segments are matched to determine at least one set of first target segments and second target segments having a matching relationship.

[0065] Specifically, after determining the first document and the second document, in order to improve the matching rate of the document field, first, the first document corresponding to the first field is divided into paragraphs to obtain multiple first segments, and at the same time, the second document corresponding to the second field is divided into paragraphs to obtain multiple second segments, and each first segment and the second segment are matched according to the first subject feature corresponding to each first document and the second subject feature corresponding to each second document. The matching here refers to matching any first segment with any second segment, thereby obtaining a first target segment and a second target segment with a matching relationship. Afterwards, any field is extracted from the first target segment as the first field, and any field is extracted from the second target segment as the second field, so as to match the first field with the second field, thereby narrowing the scope of field matching and thereby improving the matching efficiency of the document field.

[0066] For example, Figure 2 is a schematic diagram of paragraph division of a first document provided by an embodiment of the present invention, such as Figure 2As shown in FIG. 1 , after dividing the first document into paragraphs, the first segment a1 to the first segment an can be obtained, and the first topic feature t corresponding to the first segment a1 can be extracted respectively through the LDA model (Latent Dirichlet Allocation, document topic generation model). a1 , ..., the first theme feature t corresponding to the first segment an an . Figure 3 is a schematic diagram of paragraph division of the second document provided by an embodiment of the present invention, such as Figure 3 As shown, after the second document is divided into paragraphs, the second segments b1 to bm can be obtained, and the second topic features t corresponding to the second segment b1 are extracted respectively. b1 , ..., the second topic feature t corresponding to the second segment bm bm .

[0067] It should be noted that there is a one-to-one correspondence between the fragments and thematic features.

[0068] Furthermore, Figure 4 FIG. 2 is a flow chart of the document field matching method provided in an embodiment of the present invention. Figure 4 As shown, taking the first document as an example, when dividing the first document into paragraphs, according to the writing style of the first document, if the first document has obvious regular chapters and paragraphs, the first document can be divided into multiple paragraphs according to the paragraph feature information. For example, the first document can be divided into multiple paragraphs according to the number of indent characters of the first line of the paragraph. After that, it can be determined whether each paragraph is under the same title according to the cascade information of the title. If each paragraph is under the same title, the multiple paragraphs under the same title can be divided into the same segment, that is, a segment can include at least one paragraph, and the theme corresponding to the at least one paragraph is the same. Alternatively, the first document can be divided into multiple chapters according to the cascade information of the title, and the chapter is the segment. After that, each segment can be divided twice according to the paragraph feature information such as the number of indent characters of the first line of the paragraph, so that each segment can include at least one paragraph. In addition, if the first document does not have obvious regular chapters and paragraphs, each sentence in the first document can be separated, and the keywords or themes of each sentence can be extracted to perform cluster analysis on each sentence, and the sentences with the same keywords or themes can be aggregated to obtain segments. The paragraph division method corresponding to the second document is the same as that of the first document, and the embodiment of the present invention will not be described in detail here.

[0069] In addition, it can be further determined whether there is a segment representing the login theme in the first document or the second document. If there is a segment representing the login theme, the segment representing the login theme can be further matched according to the preset keywords combined with keyWords, and then it can be determined whether the segment representing the login theme contains the login authentication part. The login authentication part can be marked as authentication. If the login authentication part is included, the value of authentication is true, otherwise it is false.

[0070] Further, based on any one of the first theme features and any one of the second theme features, matching any one of the first segments and any one of the second segments to determine at least one set of first target segments and second target segments with a matching relationship, including:

[0071] For any one of the first theme features and any one of the second theme features, determine the theme similarity between the first segment corresponding to the first theme feature and the second segment corresponding to the second theme feature;

[0072] When the theme similarity is greater than the first preset threshold, it is determined that there is a matching relationship between the first segment corresponding to the first theme feature and the second segment corresponding to the second theme feature, and the first segment corresponding to the first theme feature is determined as the first target segment, and the second segment corresponding to the second theme feature is determined as the second target segment.

[0073] Specifically, after extracting the first theme feature and the second theme feature, further determine the first feature vector of the first theme feature and the second feature vector of the second theme feature. Then, using Equation (1), calculate the cosine similarity between the first segment and the second segment according to the first feature vector and the second feature vector, and this cosine similarity is the theme similarity. If this theme similarity is greater than the first preset threshold, it indicates that there is a matching relationship between the first segment and the second segment. If this theme similarity is less than or equal to the first preset threshold, it indicates that there is no matching relationship between the first segment and the second segment. Equation (1) is:

[0074]

[0075] where i represents the i-th segment in the first document, 0 < i < n, n represents the number of the first segments, j represents the j-th segment in the second document, t ai represents the first theme feature corresponding to the i-th segment in the first document, represents the first feature vector corresponding to the first theme feature t ai corresponding to. t bj represents the second theme feature corresponding to the j-th segment in the second document, represents the first theme feature tbj The corresponding first eigenvector, where 0 < j < m and m represents the number of second segments.

[0076] Figure 5 It is a schematic diagram of segment matching between the first document and the second document provided by an embodiment of the present invention. As Figure 5 shown, after matching each first topic feature and each second topic feature, at least one set of first segments and second segments with a matching relationship can be obtained. For example, Figure 5 the first segment a1 and the second segment b1, and the first segment a2 and the second segment bm shown. In addition, first segments and second segments without a matching relationship can also be obtained. For example, Figure 5 the second segment b2 and the first segment an shown. For the first segments and second segments without a matching relationship, the matching process ends. For the first segments and second segments with a matching relationship, the first field in the first segment and the second field in the second segment can be further matched.

[0077] Optionally, taking the first field as an example, if there is a table in the first segment, each first field can be extracted from the table. If there is no table in the first segment, the first segment can be segmented to obtain multiple first fields, which is convenient for subsequent matching of document fields.

[0078] Further, determining the first description language matrix based on the first field and the multi-dimensional data information corresponding to the first field; and determining the second description language matrix based on the second field and the multi-dimensional data information corresponding to the second field, includes:

[0079] Determining the first description language corresponding to the first field based on the first field and the multi-dimensional data information corresponding to the first field; and determining the second description language corresponding to the second field based on the second field and the multi-dimensional data information corresponding to the second field;

[0080] Determining the first attribute matrix corresponding to the first field based on the multi-dimensional data information corresponding to the first field; and determining the second attribute matrix corresponding to the second field based on the multi-dimensional data information corresponding to the second field;

[0081] Determining the first description language matrix based on the first field, the first attribute matrix, and the first description language;

[0082] Determining the second description language matrix based on the second field, the second attribute matrix, and the second description language.

[0083] Specifically, first, according to the first field and the multidimensional data information corresponding to the first field, a first description language corresponding to the first field can be constructed, and according to the second field and the multidimensional data information corresponding to the second field, a second description language corresponding to the second field can be constructed. The construction rule is shown in formula (2). For example, the first description language line constructed by the first field dbcode corresponding to the first segment ai ai Can be: line ai :dbcode means library code, which is an input parameter and is a required item. Its type value is int and has no value range. The second description language line constructed by the second field facelibid corresponding to the second segment bj bj Can be: line bj : facelibid means database code, is an input parameter, is a required item, is of type String, and has no value range. Formula (2) is:

[0084] line x =w x +param+necessary+type+range+description+others.

[0085] Here, x represents any first field or any second field.

[0086] Secondly, according to the multidimensional data information corresponding to the first field, a first attribute matrix corresponding to the first field is constructed, and according to the multidimensional data information corresponding to the second field, a second attribute matrix corresponding to the second field is constructed, and the construction rule is shown in formula (3). Formula (3) is:

[0087] H=[param necessary type range description others].

[0088] Finally, according to the first field, the first attribute matrix and the first description language, the first description language matrix corresponding to the first field is constructed, and according to the second field, the second attribute matrix and the second description language, the second description language matrix corresponding to the second field is constructed. The construction rule is shown in formula (4), which is:

[0089]

[0090] Among them, K T Represents the transpose of the first description language matrix or the second description language matrix.

[0091] For example, the first description language matrix corresponding to the first segment ai Can be:

[0092]

[0093] The second description language matrix corresponding to the second segment bj Can be:

[0094]

[0095] Step 120: Determine a third description language matrix based on the first field and the second description language matrix; and determine a fourth description language matrix based on the second field and the first description language matrix.

[0096] Specifically, when performing field matching, in order to avoid similar characters appearing in the matching process between the first field and the second field, there may be certain errors. For example, username and dbname, both fields contain the name character, and there will be a high degree of similarity between the two during the matching process. However, the fields are different in the corresponding fragments and sentences, and are different. Therefore, the first field and the second description language matrix are recombined to obtain the third description language matrix, and the second field and the first description language matrix are recombined to obtain the fourth description language matrix, that is, using formula (5), the first description language matrix and the second description language matrix are matrix operated to obtain a new third description language matrix and a fourth description language matrix. If there is a matching relationship between the first field and the second field, the description language constructed has a certain degree of similarity in the fragments before and after the reorganization. Formula (5) is:

[0097]

[0098] Among them, A and [a1 a2 …an] both represent the first description language matrix, B and [b1 b2 …bm] both represent the second description language matrix, a1 represents the first field, b1 represents the second field, [a1 b2 …bm] represents the third description language matrix, and [b1 a2 …an] represents the fourth description language matrix.

[0099] Further, the determining of a third description language matrix based on the first field and the second description language matrix; and the determining of a fourth description language matrix based on the second field and the first description language matrix include:

[0100] Replacing the second field in the second description language matrix with the first field to obtain the third description language matrix;

[0101] The first field in the first description language matrix is ​​replaced by the second field to obtain the fourth description language matrix.

[0102] Specifically, in the embodiment of the present invention, the second field in the second description language matrix can be replaced with the first field to obtain a third description language matrix, and the first field in the first description language matrix can be replaced with the second field to obtain a fourth description language matrix. The first field dbcode in is replaced by the second field facelibid, and the fourth description language matrix can be obtained. The second description language matrix The second field facelibid in is replaced by the first field dbcode, and the third description language matrix can be obtained. in:

[0103]

[0104]

[0105] Step 130: Determine the field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix.

[0106] Further, the determining the field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix includes:

[0107] determining a first feature angle based on the first description language matrix and the second description language matrix;

[0108] Determining a second feature angle based on the third description language matrix and the fourth description language matrix;

[0109] Based on the difference between the first feature angle and the second feature angle, the field similarity corresponding to the first field and the second field is determined.

[0110] Specifically, based on the first description language matrix and the second description language matrix before reorganization, the first characteristic angle before reorganization can be determined, and based on the third description language matrix and the fourth description language matrix after reorganization, the second characteristic angle after reorganization can be further determined. Based on the difference between the first characteristic angle and the second characteristic angle, the field similarity between the first field and the second field can be determined, and then it can be determined whether there is a matching relationship between the first field and the second field.

[0111] Further, determining a first feature angle based on the first description language matrix and the second description language matrix includes:

[0112] Determine a first quantization vector of the first description language matrix in a first target segment to which the first field belongs, and determine a second quantization vector of the second description language matrix in a second target segment to which the second field belongs; the first target segment and the second target segment have a matching relationship;

[0113] The first characteristic angle is determined based on the first quantization vector and the second quantization vector.

[0114] Specifically, after determining the first description language matrix and the second description language matrix, the feature vector corresponding to the first description language in the first description language matrix, the feature vector corresponding to the second description language in the second description language matrix, the feature vector corresponding to the first target segment, and the feature vector corresponding to the second target segment can be further determined. Based on the ratio of the feature vector corresponding to the first description language and the feature vector corresponding to the first target segment, a first quantization vector is determined to characterize the proportion of the first description language in the first target segment in the first description language matrix. Based on the ratio of the feature vector corresponding to the second description language and the feature vector corresponding to the second target segment, a second quantization vector is determined to characterize the proportion of the second description language in the second target segment in the second description language matrix. Based on the first quantization vector and the second quantization vector, a first feature angle is further determined.

[0115] Further, the determining the second feature angle based on the third description language matrix and the fourth description language matrix includes:

[0116] Determine a third quantization vector of the third description language matrix in a second target segment to which the second field belongs, and determine a fourth quantization vector of the fourth description language matrix in a first target segment to which the first field belongs; the first target segment and the second target segment have a matching relationship;

[0117] The first characteristic angle is determined based on the first quantization vector and the second quantization vector.

[0118] Specifically, after determining the third description language matrix and the fourth description language matrix, the feature vector corresponding to the third description language in the third description language matrix, the feature vector corresponding to the fourth description language in the fourth description language matrix, the feature vector corresponding to the first target segment, and the feature vector corresponding to the second target segment can be further determined. Based on the ratio of the feature vector corresponding to the third description language and the feature vector corresponding to the second target segment, a third quantization vector is determined to characterize the proportion of the third description language in the second target segment in the third description language matrix. Based on the ratio of the feature vector corresponding to the fourth description language and the feature vector corresponding to the first target segment, a fourth quantization vector is determined to characterize the proportion of the fourth description language in the first target segment in the fourth description language matrix. Based on the third quantization vector and the fourth quantization vector, a second characteristic angle is further determined.

[0119] Step 140: Determine a matching result between the first field and the second field based on the field similarity.

[0120] Further, the determining a matching result between the first field and the second field based on the field similarity includes:

[0121] When the field similarity is greater than a second preset threshold, determining a first matching relationship between the first field and the second field;

[0122] Determine a second matching relationship between the multidimensional data information corresponding to the first field and the multidimensional data information corresponding to the second field;

[0123] Determining a third matching relationship based on a matching relationship between the first target segment and the second target segment;

[0124] Based on the first matching relationship, the second matching relationship, and the third matching relationship, a matching result of the first field and the second field is determined.

[0125] Specifically, the field similarity is compared with the second preset threshold value. If the field similarity is greater than the second preset threshold value, it indicates that the first field matches the second field, which can be expressed as "first field-second field". After the first field matches the second field, the multidimensional data information of the first field can be further matched with the multidimensional data information of the second field to determine the second matching relationship. In addition, the third matching relationship can be further determined based on the matching relationship between the first target segment and the second target segment. The matching result of the first field and the second field can be determined based on the first matching relationship, the second matching relationship and the third matching relationship, that is, it means that the matching result of the first field and the second field not only includes whether the first field and the second field match, but also includes the matching of the segments and the matching of the multidimensional data information.

[0126] For example, whether necessary is required can be represented as 1, and whether unnecessary is 0. When both the first field and the second field are required, the second matching relationship corresponding to the required field is: necessary ai -necessary bj .

[0127] It should be noted that the second matching relationship corresponding to the mandatory field may include: 1-1, 1-0, 0-1 and 0-0, where 1-1 indicates that both fields are mandatory. 1-0 indicates that the first field is mandatory and the second field is non-mandatory. 0-1 indicates that the first field is non-mandatory and the second field is mandatory. 0-0 indicates that both fields are non-mandatory. Generally, when the second matching relationship corresponding to the mandatory field is 0-1, it indicates that there is a certain risk, and it is necessary to consider the handling method when the first field does not exist based on the second field, that is, to assign a default value to the second field.

[0128] For example, for the field type type, if the value of type is a common field type, the second matching relationship corresponding to the field type type is: type ai -type bj When the field type type is an enumeration value, it is necessary to determine whether both sides are enumeration values. If one side is an enumeration value and the other side is a non-enumeration value, a default value is assigned. If both sides are enumeration values, an enumeration value analysis is performed to analyze the number of enumeration values, enumeration values, and the second matching relationship corresponding to the enumeration values: type[a1, a2, ..., an]-type[b1, b2, ..., bm].

[0129] Repeat the above steps to match any first field in the first target segment with any second field in the second target segment to match the first target segment with the second target segment. When the number of first fields in the first target field is equal to or different from the number of second fields in the second target field, it is possible that a field has no matching field. At this time, other fields with the greatest field similarity corresponding to the field can be annotated to facilitate subsequent manual processing. The output result will also suggest that the field can be identified by using an existing field or assigning a default value. The first matching relationship and the second matching relationship corresponding to the first field and the second field are shown in Table 2.

[0130] Table 2

[0131] Second field First Field ncessary type notes <![CDATA[w b1 ]]> <![CDATA[w a1 ]]> 1-1 string to int - <![CDATA[w b2 ]]> <![CDATA[w a3 ]]> 1-0 long to int range[0,2] <![CDATA[w b3 ]]> <![CDATA[w a4 ]]> 0-1 url to base64 <![CDATA[w b4 ]]> - - - <![CDATA[w a4 ]]>

[0132] Field matching of the other first target fragments with matching relationships mentioned above and other second target fragments can be performed to achieve field matching of the first document and the second document. After fragment matching, a third matching result can be obtained. When a fragment in the first document has no corresponding module after a loop, it is marked as an unmatched fragment, and the matching priority of the unmatched fragment is reduced. When other fragments are matched, the matching order with the unmatched fragment is later to improve matching efficiency. When there is still no matching paragraph after the fragments in the two documents are matched cyclically, the output matching result indicates that no corresponding matching result is found. By way of example, the third matching relationship is shown in Table 3. Among them, authentication indicates whether there is a login authentication part. Notes indicates notes.

[0133] Table 3

[0134] source document destination authentication notes ai bj true token

[0135] The document field matching method provided by the embodiment of the present invention determines a first description language matrix through a first field and multidimensional data information corresponding to the first field, and determines a second description language matrix through a second field and multidimensional data information corresponding to the second field, then determines a third description language matrix based on the first field and the second description language matrix, and determines a fourth description language matrix based on the second field and the first description language matrix, determines the field similarity corresponding to the first field and the second field through the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix, and then determines the matching result of the first field and the second field according to the field similarity, matches the first field and the second field in a semantic environment constructed by the multidimensional data information corresponding to each other, ensures the comprehensiveness and accuracy of document field matching, reduces human resources in the document field matching process, and thus improves matching efficiency.

[0136] The document field matching device provided by the present invention is described below. The document field matching device described below and the document field matching method described above can be referred to each other.

[0137] The embodiment of the present invention also provides a document field matching device. Figure 6 is a schematic diagram of the structure of a document field matching device provided by an embodiment of the present invention, such as Figure 6 As shown, the document field matching device 600 includes: a first determination module 610, a second determination module 620, a third determination module 630 and a fourth determination module 640, wherein:

[0138] A first determination module 610 is configured to determine a first description language matrix based on a first field and multidimensional data information corresponding to the first field; and to determine a second description language matrix based on a second field and multidimensional data information corresponding to the second field, wherein the first field and the second field are located in different documents;

[0139] A second determination module 620 is configured to determine a third description language matrix based on the first field and the second description language matrix; and determine a fourth description language matrix based on the second field and the first description language matrix;

[0140] A third determination module 630, configured to determine a field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix, and the fourth description language matrix;

[0141] The fourth determination module 640 is configured to determine a matching result between the first field and the second field based on the field similarity.

[0142] The document field matching device provided by the embodiment of the present invention determines a first description language matrix through a first field and multidimensional data information corresponding to the first field, and determines a second description language matrix through a second field and multidimensional data information corresponding to the second field, then determines a third description language matrix based on the first field and the second description language matrix, and determines a fourth description language matrix based on the second field and the first description language matrix, determines the field similarity corresponding to the first field and the second field through the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix, and then determines the matching result of the first field and the second field according to the field similarity, matches the first field and the second field in a semantic environment constructed by the multidimensional data information corresponding to each other, ensures the comprehensiveness and accuracy of document field matching, reduces human resources in the document field matching process, and thus improves matching efficiency.

[0143] Optionally, the first determining module 610 is specifically configured to:

[0144] Determine a first description language corresponding to the first field based on the first field and the multidimensional data information corresponding to the first field; and determine a second description language corresponding to the second field based on the second field and the multidimensional data information corresponding to the second field;

[0145] Based on the multidimensional data information corresponding to the first field, determine a first attribute matrix corresponding to the first field; and based on the multidimensional data information corresponding to the second field, determine a second attribute matrix corresponding to the second field;

[0146] Determine the first description language matrix based on the first field, the first attribute matrix and the first description language;

[0147] The second description language matrix is ​​determined based on the second field, the second attribute matrix and the second description language.

[0148] Optionally, the second determining module 620 is specifically configured to:

[0149] Replacing the second field in the second description language matrix with the first field to obtain the third description language matrix;

[0150] The first field in the first description language matrix is ​​replaced by the second field to obtain the fourth description language matrix.

[0151] Optionally, the third determining module 630 is specifically configured to:

[0152] determining a first feature angle based on the first description language matrix and the second description language matrix;

[0153] Determining a second feature angle based on the third description language matrix and the fourth description language matrix;

[0154] Based on the difference between the first feature angle and the second feature angle, the field similarity corresponding to the first field and the second field is determined.

[0155] Optionally, the third determining module 630 is specifically configured to:

[0156] Determine a first quantization vector of the first description language matrix in a first target segment to which the first field belongs, and determine a second quantization vector of the second description language matrix in a second target segment to which the second field belongs; the first target segment and the second target segment have a matching relationship;

[0157] The first characteristic angle is determined based on the first quantization vector and the second quantization vector.

[0158] Optionally, the document field matching device 600 further includes a paragraph division module, and the paragraph division module is specifically used to:

[0159] Divide the first document corresponding to the first field into paragraphs to obtain a plurality of first segments; and divide the second document corresponding to the second field into paragraphs to obtain a plurality of second segments;

[0160] Respectively extracting first topic features corresponding to each of the plurality of first segments and second topic features corresponding to each of the plurality of second segments;

[0161] Based on any of the first subject features and any of the second subject features, any of the first segments and any of the second segments are matched to determine at least one set of first target segments and second target segments having a matching relationship.

[0162] Optionally, the paragraph division module is specifically used for:

[0163] For any of the first topic features and any of the second topic features, determining a topic similarity between the first segment corresponding to the first topic feature and the second segment corresponding to the second topic feature;

[0164] When the topic similarity is greater than a first preset threshold, it is determined that there is a matching relationship between the first segment corresponding to the first topic feature and the second segment corresponding to the second topic feature, and the first segment corresponding to the first topic feature is determined as the first target segment, and the second segment corresponding to the second topic feature is determined as the second target segment.

[0165] Optionally, the fourth determining module 640 is specifically configured to:

[0166] When the field similarity is greater than a second preset threshold, determining a first matching relationship between the first field and the second field;

[0167] Determine a second matching relationship between the multidimensional data information corresponding to the first field and the multidimensional data information corresponding to the second field;

[0168] Determining a third matching relationship based on a matching relationship between the first target segment and the second target segment;

[0169] Based on the first matching relationship, the second matching relationship, and the third matching relationship, a matching result of the first field and the second field is determined.

[0170] Figure 7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the document field matching method, which includes:

[0171] Determine a first description language matrix based on a first field and multidimensional data information corresponding to the first field; and determine a second description language matrix based on a second field and multidimensional data information corresponding to the second field, wherein the first field and the second field are located in different documents;

[0172] Determine a third description language matrix based on the first field and the second description language matrix; and determine a fourth description language matrix based on the second field and the first description language matrix;

[0173] Determine the field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix;

[0174] Based on the field similarity, a matching result between the first field and the second field is determined.

[0175] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0176] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can perform the document field matching method provided by the above methods, the method comprising:

[0177] Determine a first description language matrix based on a first field and multidimensional data information corresponding to the first field; and determine a second description language matrix based on a second field and multidimensional data information corresponding to the second field, wherein the first field and the second field are located in different documents;

[0178] Determine a third description language matrix based on the first field and the second description language matrix; and determine a fourth description language matrix based on the second field and the first description language matrix;

[0179] Determine the field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix;

[0180] Based on the field similarity, a matching result between the first field and the second field is determined.

[0181] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the document field matching method provided by the above methods, the method comprising:

[0182] Determine a first description language matrix based on a first field and multidimensional data information corresponding to the first field; and determine a second description language matrix based on a second field and multidimensional data information corresponding to the second field, wherein the first field and the second field are located in different documents;

[0183] Determine a third description language matrix based on the first field and the second description language matrix; and determine a fourth description language matrix based on the second field and the first description language matrix;

[0184] Determine the field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix;

[0185] Based on the field similarity, a matching result between the first field and the second field is determined.

[0186] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0187] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A document field matching method, characterized in that: include: Determine a first description language matrix based on the first field and the multidimensional data information corresponding to the first field; and determining a second description language matrix based on a second field and multidimensional data information corresponding to the second field, wherein the first field and the second field are located in different documents; Determine a third description language matrix based on the first field and the second description language matrix; and determine a fourth description language matrix based on the second field and the first description language matrix; Determine the field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix and the fourth description language matrix; Based on the field similarity, a matching result between the first field and the second field is determined.

2. The document field matching method according to claim 1, characterized in that: determining a first description language matrix based on the first field and the multidimensional data information corresponding to the first field; Based on the second field and the multidimensional data information corresponding to the second field, a second description language matrix is ​​determined, including: Determine a first description language corresponding to the first field based on the first field and the multidimensional data information corresponding to the first field; and determine a second description language corresponding to the second field based on the second field and the multidimensional data information corresponding to the second field; Based on the multidimensional data information corresponding to the first field, determine a first attribute matrix corresponding to the first field; and based on the multidimensional data information corresponding to the second field, determine a second attribute matrix corresponding to the second field; Determine the first description language matrix based on the first field, the first attribute matrix and the first description language; The second description language matrix is ​​determined based on the second field, the second attribute matrix and the second description language.

3. The document field matching method according to claim 2, characterized in that: The determining, based on the first description language matrix, the second description language matrix, the third description language matrix, and the fourth description language matrix, the field similarity corresponding to the first field and the second field includes: determining a first feature angle based on the first description language matrix and the second description language matrix; Determining a second feature angle based on the third description language matrix and the fourth description language matrix; Based on the difference between the first feature angle and the second feature angle, the field similarity corresponding to the first field and the second field is determined.

4. The document field matching method according to claim 3, characterized in that: The determining of a first feature angle based on the first description language matrix and the second description language matrix includes: Determine a first quantization vector of the first description language matrix in a first target segment to which the first field belongs, and determine a second quantization vector of the second description language matrix in a second target segment to which the second field belongs; the first target segment and the second target segment have a matching relationship; The first characteristic angle is determined based on the first quantization vector and the second quantization vector.

5. The document field matching method according to claim 1, characterized in that: The method further comprises: Divide the first document corresponding to the first field into paragraphs to obtain a plurality of first segments; and divide the second document corresponding to the second field into paragraphs to obtain a plurality of second segments; Respectively extracting first topic features corresponding to each of the plurality of first segments and second topic features corresponding to each of the plurality of second segments; Based on any of the first subject features and any of the second subject features, any of the first segments and any of the second segments are matched to determine at least one set of first target segments and second target segments having a matching relationship.

6. The document field matching method according to claim 5, characterized in that: The matching of any of the first segments with any of the second segments based on any of the first subject features and any of the second subject features to determine at least one set of first target segments and second target segments having a matching relationship includes: For any of the first topic features and any of the second topic features, determining a topic similarity between the first segment corresponding to the first topic feature and the second segment corresponding to the second topic feature; When the topic similarity is greater than a first preset threshold, it is determined that there is a matching relationship between the first segment corresponding to the first topic feature and the second segment corresponding to the second topic feature, and the first segment corresponding to the first topic feature is determined as the first target segment, and the second segment corresponding to the second topic feature is determined as the second target segment.

7. The document field matching method according to any one of claims 4 to 6, characterized in that: The determining, based on the field similarity, a matching result between the first field and the second field includes: When the field similarity is greater than a second preset threshold, determining a first matching relationship between the first field and the second field; Determine a second matching relationship between the multidimensional data information corresponding to the first field and the multidimensional data information corresponding to the second field; Determining a third matching relationship based on a matching relationship between the first target segment and the second target segment; Based on the first matching relationship, the second matching relationship, and the third matching relationship, a matching result of the first field and the second field is determined.

8. The document field matching method according to any one of claims 1 to 6, characterized in that: determining a third description language matrix based on the first field and the second description language matrix; and determining a fourth description language matrix based on the second field and the first description language matrix, including: Replacing the second field in the second description language matrix with the first field to obtain the third description language matrix; The first field in the first description language matrix is ​​replaced by the second field to obtain the fourth description language matrix.

9. A document field matching device, characterized in that: include: A first determining module, configured to determine a first description language matrix based on a first field and multidimensional data information corresponding to the first field; and determining a second description language matrix based on a second field and multidimensional data information corresponding to the second field, wherein the first field and the second field are located in different documents; a second determining module, configured to determine a third description language matrix based on the first field and the second description language matrix; and to determine a fourth description language matrix based on the second field and the first description language matrix; A third determination module, configured to determine a field similarity corresponding to the first field and the second field based on the first description language matrix, the second description language matrix, the third description language matrix, and the fourth description language matrix; A fourth determination module is used to determine a matching result between the first field and the second field based on the field similarity.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the document field matching method according to any one of claims 1 to 8 is implemented.