Data batch flow method and system based on semantic logic judgment
By performing word segmentation, function variable assignment, and standardization on natural language data, the problem of the inability to standardize natural language data has been solved, enabling intelligent data flow and management, and improving efficiency and accuracy.
Patent Information
- Application Number
- CN202110913648.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-10
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2041-08-10
AI Technical Summary
Existing technologies cannot effectively standardize the processing of natural language data, resulting in low efficiency in the intelligent application and management of information data, and the repetitive writing and filling of data consumes a lot of human and material resources.
By segmenting natural language data, converting it into function variables, and assigning values, the original dataset is merged and standardized, including merging synonymous data elements and optimizing variable names, to generate application and circulation data sets, thus achieving intelligent data circulation.
It improves the efficiency of natural language data application and flow, reduces the input of human and material resources, and realizes intelligent data management and filling.
Smart Images

Figure CN115906803B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a data batch flow method and system based on semantic logic judgment, which can standardize data information with different expression methods but the same semantic logic, and effectively improve the batch flow efficiency and accuracy of such information data. BACKGROUND
[0002] In social life, people inevitably need to write, fill in, and manage various files and forms. Although there are many information data, the essential content of which contains the same semantics, although there are differences in expression methods such as files and forms, or different expressions in specific language and text. However, due to the lack of relevant information processing technology, people have to spend a lot of manpower, financial and material resources to repeatedly write and fill in various information data. Intelligent application and management of information data is difficult to achieve.
[0003] In order to improve the efficiency and accuracy of human-computer interaction, the technology of cutting and semantic analysis of natural language has appeared. After the system receives the user's input voice or text, the voice data can be converted into text data, and the nouns, verbs and other words in the text can be retrieved. However, natural language has obvious diversity, and different people will have different expressions for the same information. However, the existing technology only realizes semantic analysis according to the user's historical search records or the similarity of the existing data in the database, and cannot realize the standardization of natural language from the micro level. Therefore, it is difficult to intelligently flow, fill in or manage natural language data. SUMMARY
[0004] The present application proposes a data batch flow method and system based on semantic logic judgment, which can standardize natural language data and realize intelligent application, flow and filling of data.
[0005] The present application achieves the following measures:
[0006] A data batch flow method based on semantic logic judgment, characterized by the following steps:
[0007] Step 1: cutting any simple declarative sentence N to cut out the nouns, pronouns and numerals, and then converting the cut-out words into function variables x1, x2, … x n , and assigning values to the variables x1, x2, … x n in turn, and then converting the remaining conjunctions after cutting into function content P iThus, the sentence function P representing the sentence N is obtained i (x1,x2,…x n ) and the assignment of x1,x2,…x n , wherein i and n are positive integers;
[0008] Step 2: Constructing the original data set A for storing the sentence function and variable assignment obtained in step 1, wherein each data element in the original data set A contains data sets X and Y, the X set is used to store the sentence function P i (x1,x2,…x n ), and the Y set is used to store the assignment of the function variables x1,x2,…x n ;
[0009] Step 3: Standardizing the data elements in the original data set A, including standardizing the multi-elements with the same number of variables and the multi-elements with different numbers of variables; wherein the standardizing the multi-elements with the same number of variables includes:
[0010] First, constructing the standardized data set B, wherein each data element in the standardized data set B contains data sets X and Y, then comparing the data of any multiple data elements a, b, c in the original data set A, if the number of variables in a, b, and c is the same, and the complete semantics of P a , P b , and P c are synonymous with each other, then a new data element d is added in the standardized data set B, wherein the X set of the element d is used to store the sentence functions P a (x a1 ,x a2 ,…x an ), P b (x b1 ,x b2 ,…x bn ), and P c (x c1 ,x c2 ,…x cn ) of a, b, and c, and the Y set of the element d is used to store the variable assignments of “x a1 ,x a2 ,…x an ”, “x b1 ,x b2 ,…x bn ”, and “x c1 ,x c2 ,…x cn ”;
[0011] The standardization of the multi-elements with different numbers of variables includes:
[0012] Step 3-1: Construct a standardized data set C, each data element in the standardized data set C contains data sets X, Y, Z, compare data of any multiple data elements d, e, f in the original data set A, if the function content P d , P e , P f are partially synonymous, partially synonymous means that the function content is partially the same, execute step 3-2;
[0013] Step 3-2: If the variable number of elements d, e, f are r, s, t respectively, and r, s, t are positive integers and r>s and r>t, and the assignment of x e1 ,x e2 ,…x es in element e and the assignment of x f1 ,x f2 ,…x ft in element f can find the same assignment data in the variable x d1 ,x d2 ,…x dr of element d, then add a data element g in the standardized data set C, the X set of element g is used to store the function P d (x d1 ,x d2 ,…x dr ) with the most variables, the Y set is used to store the variable assignment of x d1 ,x d2 ,…x dr , x e1 ,x e2 ,…x es and x f1 ,x f2 ,…x ft , and the Z set is used to store the function P e (x e1 ,x e2 ,…x es ), P f (x f1 ,x f2 ,…x ft ) with less variables; Step 3-3: Optimize and unify the variable names of the data elements in the standardized data set C, in the Y set of any data element g in the standardized data set C, use the assignment of x e1 ,x e2 ,…x es and x f1 ,x f2 ,…x ft with less variables to replace the assignment of x d1x d2 ,…x dr The assignment of x d1 ,x d2 ,…x dn is replaced by the variable name in x d1 ,x d2 ,…x dn .
[0014] Step 4: Data elements are retrieved from standardized data set B and standardized data set C to construct application and circulation data set D. In the application and circulation data set D, all variable names of data elements are uniformly given different names according to different variable assignments, and only one set of variable assignments is selected in the Y set of all data elements, and data elements can be connected by logical conjunction words to form a compound sentence.
[0015] Step 5: If a new file or form data is automatically generated from the application and circulation data set D, first select the function variable x d1 ,x d2 ,…x dn to be used in the application and circulation data set D, then call the original statement function or set a new statement function according to x d1 ,x d2 ,…x dn , and then build a new file or new form data set E based on these statement functions, and then import the variable assignments of x d1 ,x d2 ,…x dn in the application and circulation data set D into the new file or new form data set E.
[0016] Step 6: If the existing data set F is filled with data by the application and circulation data set D, first select any data element h in the existing data set F to be filled with data, then analyze and obtain the statement function, the assigned variable and the to-be-assigned variable in the element h, and then compare the statement function of the element h with the statement function in the application and circulation data set D. If there is a data element i in the application and circulation data set D with the same number of variables and the same function content as the element h, continue to compare the variable assignments of the two one by one. If the data of the assigned variables in the element h can be found in the corresponding position of the element i, fill the remaining different variable assignments in the element i into the to-be-assigned variables in the element h according to the corresponding position.
[0017] The application also includes preprocessing of the statement, which refers to logical true value judgment and data processing of natural language. Only when the statement has a logical true value and is a simple declarative sentence without not, conjunction, disjunction, implication and equivalence logical relationships, the data analysis processing in step 1 is performed.
[0018] The application further provides a system for implementing the data batch flow method based on semantic logic judgment, characterized by comprising a sentence analysis processing unit for performing word segmentation on a statement to obtain function variables and a statement function; a raw data set generation unit for generating a raw data set A from data output by the sentence analysis processing unit; a data standardization processing unit for generating a standardized data set B and a standardized data set C from the raw data set A; and a flow data set generation unit for extracting data from the standardized data set B and the standardized data set C and making an application and flow data set D; wherein the data standardization processing unit is provided with a standardized data set generation module, a first-level standardization processing module for processing elements with the same number of variables and a second-level standardization processing module for processing elements with different numbers of variables, which are connected in sequence, the first-level standardization processing module is used for generating the standardized data set B, and the second-level standardization processing module is used for generating the standardized data set C.
[0019] The sentence analysis processing unit is provided with a statement preprocessing module for performing logical truth value judgment on natural language.
[0020] The application further comprises a reminder data set generation unit for generating a reminder file data set E and associating the reminder file data set E with the flow data set D.
[0021] The application can accurately identify and process natural language information data by standardizing natural language data and regenerating a series of standardized information data which is uniform, complete and reliable and easy to be processed by a computer, so that the artificial intelligence can accurately identify and process natural language information data, and the intelligent application and intelligent filling of natural language information can be realized, and the application and flow efficiency of natural language information data can be greatly improved, and the investment in manpower, financial resources and material resources can be greatly saved. BRIEF DESCRIPTION OF DRAWINGS
[0022] Figure 1 is a schematic diagram of word segmentation and function conversion in step A of Example 1 and Example 2. Figure 1 Figure 2 is a schematic diagram of constructing a raw data set A in step B of Example 1 and Example 2.
[0023] Figure 2 Figure 3 is a schematic diagram of constructing a standardized data set B in step C of Example 1 and Example 2.
[0024] Figure 4 is a schematic diagram of constructing a standardized data set C in step D of Example 1 and Example 2. Figure 3 Figure 5 is a schematic diagram of constructing a standardized data set C in step D of Example 1 and Example 2.
[0025] Figure 4 Figure 6 is a schematic diagram of constructing a standardized data set C in step D of Example 1 and Example 2.
[0026] Figure 7 is a schematic diagram of constructing a standardized data set C in step D of Example 1 and Example 2. Figure 5 is an example of optimizing uniform variable names for data elements in data set C in Example 1, Example 2, Step E.
[0027] attached Figure 6 is an example of constructing applications and data set D in Example 1, Example 2.
[0028] attached Figure 7 is an example of automatically generating reminder file data set E in Example 1.
[0029] attached Figure 8 is an example of data filling for existing data set F in Example 1.
[0030] attached Figure 9 is an example of analyzing complex sentence natural language data in Example 2.
[0031] attached Figure 10 is an example of automatically generating reminder file data set E in Example 2.
[0032] attached Figure 11 is an example of data filling for existing data set F in Example 2.
[0033] attached Figure 12 is a system block diagram of the present application. DETAILED DESCRIPTION
[0034] The present application will be further described below in conjunction with the accompanying drawings and examples.
[0035] Example 1
[0036] This example provides a data batch transfer method for the case where the to-be-processed sentence data is N1 = "the rental period of the house is from A day to B day" and N2 = "the rental period is from A day to B day". The specific steps are as follows:
[0037] Step A: By preprocessing the data, it is known that N1 and N2 are simple declarative sentences that do not contain non-, conjunctive, disjunctive, implication, and equivalent logical relationships. Therefore, as shown in Figure 1 , first, N1 = "the rental period of the house is from A day to B day" and N2 = "the rental period is from A day to B day" are cut, and the nouns, pronouns and numerals in them are cut out. Among them, N1 can cut out 4 nouns and numerals "house", "rental period", "A day", "B day", and N2 can cut out 3 nouns and numerals "rental period", "A day", "B day"; Then, the cut-out words are converted into function variables in turn. In N1, "house" and the like 4 words are converted into function variables x a11 , x a12 , x a13 , xa14 And make x a11 = "house", x a12 = "Lease Term", x a13 = "Day A", x a14 = "B day"; In N2, the three terms "lease term" are converted to x in sequence. a21 x a22 x a23 And make x a21 = "Lease Term", x a22 = "Day A", x a23 =“B day”; then, convert the remaining connectives after N1 word segmentation into function content, so that P a1 =“...of...from...to…”, converting the remaining connectives after N2 word segmentation into P a2 = "...from...to..."; thus, obtain the statement function P representing statement N1. a1 (x a11 x a12 x a13 x a14 ) = "x a11 x a12 From x a13 To x a14 ", and x a11 = "house", x a12 = "Lease Term", x a13 = "Day A", x a14 = "B day"; retrieve the statement function P representing statement N2. a2 (x a21 x a22 x a23 ) = "x a21 From x a22 To x a23 ", and x a21 = "Lease Term", x a22 = "Day A", x a23 = "B day".
[0038] Step B: As Figure 2 As shown, an original data set A is constructed to store the statement functions and variable assignments obtained in step A. In the original data set A, each data element, for example N... a1 N a2 Both contain data sets X and Y, where set X stores their respective statement functions, such as P. a1 (x a11 x a12 x a13 x a14 ) = "x a11 x a12From x a13 to x a14 Y set is used to store the respective function variable assignment, such as x a11 = "house", x a12 = "lease period" and so on; although each data element in the original data set A as shown in Figure 2 has only one set of variable assignments, but as Figure 3 can be seen, the sentence function obtained by the present technology actually has very strong versatility and practicality. As long as we obtain the standardized sentence function in the X set of a data element, we can obtain natural language data with different semantics by giving different assignments to the function variables in the Y set. In this way, people can more quantitatively and accurately analyze natural language, and can greatly improve the ability of artificial intelligence to process natural language.
[0039] Step C: Standardize and optimize the data elements with the same number of variables in the original data set A. First, construct a standardized data set B, as shown in Figure 3 . In the standardized data set B as shown in Figure 3 , each data element such as N b1 , N b2 , etc. contains data sets X and Y, where the X set is used to store the sentence function and the Y set stores the variable assignment. Then, as shown in Figure 2 , compare the data of any multiple data elements N a1 , N a2 …N a7 in data set A. After data comparison, it can be seen that N a1 and N a6 have the same number of variables, which is 4, N a2 and N a3 , N a7 have the same number of variables, which is 3. However, among them, the function content P a1 = "… from … to …" of N a1 and the function content P6 = "… from … to …" of N a6 are synonymous in complete semantics, and the function content P a2 of N a2 is different from the function content P a3 , P a7 of N a3 , N a7 in complete semantics. Therefore, in the present technology, N a2 and N a3 , N a7 cannot be optimized and combined with the same number of variables, but N a1 , N a6 need to be optimized and combined. For this purpose, as shown in Figure 3 ,As shown, a data element N is newly added to the standardized data set B b1 , and make N b1 merge and contain P in its X set b1 (x b11 , x b12 , x b13 , x b14 ), P b1 (x b11 , x b12 , x b13 , x b14 ), these two statement functions, and make N b1 's Y set merge and contain "x b11 = house, x b12 = lease term, x b13 = A day, x b14 = B day", "x b11 = National Day, x b12 = rest time, x b13 = C day, x b14 = D day" for these two groups of variable assignments;
[0040] Step D: Standardize and optimize the merge of data elements with different variable numbers in the original data set A. First, construct a standardized data set C. As shown in the standardized data set C Figure 4 , for example, each data element such as N c1 , N c3 contains data sets X, Y, and Z. Among these, the X set is used to store the statement function with the largest number of variables, the Y set stores variable assignments, and the Z set stores the statement function with a smaller number of variables; then as shown in Figure 2 , for any number of data elements N a1 , N a2 ... N a7 in the data set A, perform data comparison. Through data comparison, it can be seen that the number of variables of N a1 and N a2 are 4 and 3 respectively, and the number of variables of the two is different. Moreover, the function content "... of... from... to..." of N a1 and the function content "... from... to..." of N a2 both contain the function content "... from... to...". That is, the function contents of N a1 and N a2 are semantically synonymous in part. And the variable assignment "x a2 = lease term, x a21 = A day, x a22 = B day" of the data element N a23 with a smaller number of variables can all be found in the variable assignment "x a1 of the data element N with a larger number of variablesa11 =house, x a12 =lease period, x a13 =A day, x a14 =B day, x a1 The same assignment content is found in N a2 and N c1 , and the optimization and combination of N c1 and N a1 are required in the present technology. To this end, as shown in Figure 4 , a data element N a11 is added in the standardized data set C, so that the X set of N a12 contains the statement function P a13 (x a14 , x a11 , x a12 ) = "x a13 from x a14 to x a11 " with the largest number of variables, the Y set contains the two groups of variable assignments "x a12 , x a13 , x a14 " and "x a21 , x a22 , x a23 ", and the Z set contains the statement function P a2 (x a21 , x a22 , x a23 ) = "x a21 from x a22 to x a23 " with a smaller number of variables.
[0041] Step E: The variable names of the newly added data element N c1 in the standardized data set C are optimized and unified, as shown in Figure 4 . In the Y set of the data element N c1 , the assignments "lease period", "A day", and "B day" of x a21 , x a22 , and x a23 with a smaller number of variables are used as retrieval conditions to perform data comparison with x a11 = "house", x a12 = "lease period", x a13 = "A day", and x a14 = "B day" one by one. When x a21 = "lease period" = x a12 , x a22 = "A day" = x a13 , and x a23 = "B day" = x a14 are found, the optimization and combination of N a11 and N a12 are completed.After establishing these correspondences, x will be... a21 Use x a12 Replace x a22 Use x a13 Replace x a23 Use x a14 Replacement, in this example, is used to more clearly identify data elements within the normalized dataset C, such as... Figure 5 As shown, we will also include data element N c1 The function and variable names in the code are all named using P. c x c After the relabeling was done, thus... Figure 5 As shown, in the standardized dataset C, N C1 Within the elements, function and variable names are standardized, and N C1 The assignment of values to variables within the set of elements Y is also done by Figure 4 The second group in the middle was optimized to Figure 5 One of the groups;
[0042] Step F: Retrieve data elements from normalized sets B and C to construct application and transfer data set D, such as... Figure 6 As shown in the "Data Details" section, the variable names of all data elements in the application and flow data set D, such as x, are... a1 x a2 x b1 x b2 All variables are uniformly named according to their assigned values, and only one set of variables is selected from the Y set of all data elements for assignment, and such as Figure 6 As shown in the "Data Overview", data elements such as a and b can be connected by logical connectives to form a compound statement "a∧b". In specific practical applications, when a specific application and data set D is constructed, it may represent that a contract has been signed, a document has been finalized, or a form has been filled out. But no matter what form of natural language the data set D represents, the standardized data content in the set D must be the data foundation for these natural languages.
[0043] Step G: If a new reminder file is automatically generated from the application and the data set D, then first in Figure 6 The function variable x to be used is selected from element c of set D shown. c3 x c4 Then according to x c3 x c4 Define a new statement function P(x) c3 x c4 ) is used to represent "rental duration = x c4 -x c3”, or set a new sentence function R(x c4 , x c5 ) to represent "x c5 days in advance to inform the expiration of the lease term = x c4 -x c5 ", where x c5 = 30 days in this example, and then build a reminder file data set E for these sentence functions as shown in Figure 7 , and then call the variable assignment of x c3 , x c4 in data set D into data set E, so that when the data of x c3 , x c4 in data set D changes, data set E will automatically generate a new reminder file or reminder form;
[0044] Step H: If the existing data set F is filled with data by the application and flow data set D, first select the data element a to be filled in the existing data set F as shown in Figure 8 , then analyze and obtain the sentence function of element a as P a (x a1 , x a2 , x a3 , x a4 ) = "x a1 of x a2 from x a3 to x a4 ", the assigned variables are "x a1 = house, x a2 = lease term", and the variables to be assigned are "x a3 =?, x a4 =?", then compare the sentence function P a (x a1 , x a2 , x a3 , x a4 ) = "x a1 of x a2 from x a3 to x a4 " of element a with the sentence function in the application and flow data set D, when it is found that there is a data element c in the application and flow data set D with the same number of variables and the same function content, then continue to compare the variable assignments one by one, when it is found that the assigned variables "x a1 = house, x a2 = lease term" of element a in data set F can all be found in the corresponding positions of element c in data set D, then assign the remaining variables of element c in data set D as "x b3 = A days, x b4Fill the variable "x" to be assigned of element "a" in set F according to the corresponding position of "= B day" a3 =?, x a4 In "=?", make x a3 = A day, x a4 = B day.
[0045] Embodiment 2:
[0046] This example provides a method for batch transfer of data where the data to be processed is a compound sentence N i = "The name of Party A is Zhang San, and the ID number is 123". The specific steps are as follows:
[0047] Step A: As Figure 9 shown, through preprocessing the data, it can be known that N i is a compound sentence containing the "conjunction" logical relationship. If N3 = "The name of Party A is Zhang San" and N4 = "The ID number is 123", then N i = N3 ∧ N4, where both N3 and N4 are simple declarative sentences that do not contain NOT, conjunction, disjunction, implication, or equivalence logical relationships; therefore, as Figure 1 shown, first, segment N3 = "The name of Party A is Zhang San" and N4 = "The ID number is 123", and respectively cut out the nouns, pronouns, and quantifiers in them. Three nouns, "Party A", "name", and "Zhang San", can be cut out from N3, and two nouns and a quantifier, "ID number" and "123", can be cut out from N4; then, convert the cut-out words into function variables in sequence and assign values to the variables with the cut-out words in sequence. Among them, N3 has x a31 = "Party A", x a32 = "name", x a33 = "Zhang San", N4 has x<opposite a41 = "ID number", x a42 = "123"; then, convert the remaining conjunctions after segmenting N3 and N4 into function contents P3 and P4, where P3 = "... of... is..." and P4 = "... is..."; thus, obtain the statement function P3(x a31 , x a32 , x a33 ) = "x a31 's x a32 is x a33 " and x a31 = "Party A", x a32 = "name", x a33 = "Zhang San", and obtain the statement function P4(x a41 , x a42 ) = "x a41 is x a42 " and xa41 =“ID card number”, x a42 = "123".
[0048] Step B: As Figure 2 As shown, an original data set A is constructed to store the statement functions and variable assignments obtained in step A. In data set A, each data element, for example N... a3 N a4 Both contain data sets X and Y, where set X stores their respective statement functions, such as P. a3 (x a31 x a32 x a33 ) = "x a31 x a32 It is x a33 "etc., the Y set is used to store the values of the respective function variables, such as x." a31 = "Party A", x a32 = "Name", x a33 = "Zhang San" etc.;
[0049] Step C: Standardize and optimize the data elements with the same number of variables in the original dataset A. First, construct a standardized dataset B, such as... Figure 3 In the standardized dataset B shown, for example, N b1 N b2 Each data element contains two data sets, X and Y. Set X stores statement functions, and set Y stores variable assignments. Then, as... Figure 2 As shown, for any number of data elements N in the original data set A a1 N a2 …N a7 Data comparison was performed, and it was found that N a3 With N a4 The number of variables is 3 and 2 respectively, which is different from the number of variables in N. a3 With N a4 Optimization merging with the same number of variables is not possible; however, data comparison shows that N a4 and N a5 The number of variables is 2, and N a4 The function content P a4 = “...is…” and N a5 The function content P a5 = "...:..." (where ":" means "is") are semantically synonymous, therefore N a4 and N a5 If the conditions for optimizing and merging data with the same number of variables are met, then the two data elements need to be merged into a new data element. Therefore, as follows... Figure 3A new data element N is added in the standardized data set B b2 , X set of N contains P b2 b2 (x b21 , x b22 ) = "x b21 is x b22 ", P b2 (x b21 , x b22 ) = "x b21 : x b22 ", so that the Y set of N b2 contains "x b21 = ID number, x b22 = 123" and "x b21 = name, x b22 = Zhang San"
[0050] Step D: Standardized optimization and merging of data elements with different variable quantities in the original data set A. First, construct the standardized data set C, as shown in the standardized data set C Figure 4 , each data element such as N c1 , N c3 contains data sets X, Y, and Z, among which the X set is used to store the statement function with the most variables, the Y set stores variable assignments, and the Z set stores statement functions with fewer variables. Then, as shown in Figure 2 , data comparison is performed on any multiple data elements N a1 , N a2 …N a7 in the original data set A. After data comparison, it is found that N a3 and N a4 have 3 and 2 variables respectively, and the variable quantities of the two are not the same. Moreover, the function content "… is…" of N a3 and the function content "… is…" of N a4 both contain "… is …" function content, that is, the function content of N a3 and N a4 are synonymous in part of the semantics, and the variable assignment "x a41 = ID number, x a42 = 123" of N a4 with fewer variables can all be found in the function assignment "x a31 = Zhang San, x a32 = ID number, x a33 = 123" of N a3 with the most variables, so N a4 Optimization and merging are performed, and for this purpose, as shown in Figure 4 , a data element N c3 is added to the standardized data set C c3 , so that the X set of N c3 contains the statement function P a3 (x a31 , x a32 , x a33 ) = "x a31 's x a32 is x a33 ", the Y set contains the variable assignments "x a31 , x a32 , x a33 ", "x a41 , x a42 ", etc., and the Z set contains the statement function P a4 (x a41 , x a42 ) = "x a41 is x a42 ";
[0051] Step E: The variable names of the newly added data element N c3 in the standardized data set C are optimized and unified, and as shown in Figure 4 , in the Y set of the data element N c3 , the assignments "identity card number" and "123" of the variables x a41 and x a42 with less data are used as retrieval conditions to compare with "x a31 = Zhang San, x a32 = identity card number, x a33 = 123" one by one, and after the corresponding relationships x 41 = "identity card number" = x 32 and x 42 = "123" = x 33 are found, x 32 is used to replace x 41 , and x 33 is used to replace x 42 . In this example, in order to more clearly identify the data elements in the standardized data set C, in Figure 5 , the function and variable names in the data element N c3 are further identified by P c , x c , etc., and as shown in Figure 5 , in the N c3 element of the standardized data set C, the function and variable names are standardized and unified, and the variable assignments in the Y set of the N c3 element are also Figure 4The four groups in the middle were optimized to Figure 5 The second group;
[0052] Step F: Retrieve data elements from standardized datasets B and C to construct application and transfer dataset D, such as... Figure 6 As shown in the "Data Details" section, the variable names of all data elements in dataset D, for example, x a1 x a2 x b1 x b2 All variables are uniformly named according to their assigned values, and only one set of variables is selected from the Y set of all data elements for assignment, and such as Figure 6 As shown in the "Data Overview" section, data elements such as "a∧b" can be linked together into compound statements using logical connectives.
[0053] Step G: If a new reminder file is automatically generated from the application and the data set D, then first in Figure 6 The data set D shown indicates that the function variable x to be used is selected. b3 Then according to x b3 Call the original statement function P b (x b1 x b2 x b3 ) represents "x b1 x b2 It is x b3 ", and then as Figure 10 As shown, a data set E is constructed for the called statement function, when x is set. b1 =Zhang San, x b2 =ID card number, then determine "x" through online methods, etc. b3 By checking if "=123" is true, the function of verifying "Zhang San's ID card information" can be realized online.
[0054] Step H: If the application and the flow data set D are used to populate the existing data set F, then as follows: Figure 11 As shown, first, select data elements a and b to be filled in from the existing data set F, and then analyze and obtain the statement functions P for elements a and b respectively. a (x a1 x a2 x a3 ) = "x a1 x a2 It is x a3 “、P b (x b1 x b2 x b3 ) = "x b1 x b2 It is xb3 The variables that have been assigned values are "x". a1 =Party A, x a2 =Name, x b2 =ID card number", the variable to be assigned is "x" a3 =?, x b1 =x a3 x b3 = ? , then use the statement function P for elements a and b respectively. a (x a1 x a2 x a3 ) = "x a1 x a2 It is x a3 “、P b (x b1 x b2 x b3 ) = "x b1 x b2 It is x b3 "and Figure 6 The statement function in set D is used to compare data. When it is found that data element a in set D is... Figure 11 If the function content of data elements a and b in set F is the same, then continue to assign values to variables and compare the data one by one. When it is found that the already assigned variable "x" of element a in set F is the same... a1 =Party A, x a2 If the variable " = name" can be found at the corresponding position of element a in data set D, then the remaining distinct variables of element a in data set D will be assigned the value "x". a3 =Zhang San” is filled into the unassigned variable “x” of element a in data set F according to the corresponding position. a3 =? "Inside, make x a3 =Zhang San; Similarly, by comparing the variable assignments of data element b in data set D with those in data set F, it can be found that the assigned variable "x" of element b in data set F... b1 =x a3 =Zhang San (already assigned a value along with element a), x b2 =ID card number” can all be found in the corresponding position of element b in data set D. Therefore, the remaining distinct variables of element b in data set D are assigned the value “x”. b3 =123” is filled into the unassigned variable “x” of element b in data set F according to the corresponding position. b3 =? "Inside, make x b3 =123.
[0055] The application can generate a flow data set with complete data information and accurate corresponding relationship by standardizing natural language data, and can complete batch data flow by searching, comparing and filling the flow data set and the received data set, thereby significantly improving the efficiency and accuracy of data flow.
Claims
1. A method for batch data transfer based on semantic logic judgment, characterized in that, Includes the following steps: Step 1: Segment any simple declarative sentence N, extracting nouns, pronouns, and quantifiers. Then, convert the extracted words into function variables x1, x2, ... x1. n And use the extracted words to assign values to variables x1, x2, ... x in sequence. n Assign values, and then convert the remaining connectives after word segmentation into the function content P. i Thus, the statement function P representing statement N is obtained. i (x1,x2,…x) n ) and x1, x2, ... x n The values are assigned to i and n, where i and n are both positive integers. Step 2: Construct an original data set A to store the statement functions and variable assignments obtained in Step 1. Each data element in the original data set A contains a data set X. A Y A X A Sets are used to store statement functions P i (x1,x2,…x) n ), Y A Sets are used to store function variables x1, x2, ... x n Assigning a value; Step 3: Standardize the data elements in the original dataset A, including standardizing multiple elements with the same number of variables and multiple elements with different numbers of variables; The standardization process for multiple elements with the same number of variables includes: First, construct a standardized dataset B, in which each data element contains a subset of dataset X. B Y B Then, the three data elements a, b, and c in the original data set A are compared. If the number of variables in a, b, and c is the same, and the function content P... a P b P c If the complete semantics of are synonymous, then add a new data element d to the standardized dataset B. B , element d B X B The set is used to merge and store the statement function P of a, b, and c. a (x) a1 ,x a2 ,…x an ) and P b (x) b1 ,x b2 ,…x bn ), P c (x) c1 ,x c2 ,…x cn ), element d B Y B Sets are used to merge and store "x" a1 ,x a2 ,…x an "、"x b1 ,x b2 ,…x bn "、"x c1 ,x c2 ,…x cn Assigning values to variables; Standardization of multiple elements with varying numbers of variables specifically includes: Step 3-1: Construct a normalized dataset C, in which each data element contains a dataset X. C Y C Z C Compare the three data elements d, e, and f in the original data set A. If the function content P of d, e, and f is different... d P e P f They are partially semantically synonymous, meaning that the function contents are the same. Execute step 3-2. Step 3-2: If the number of variables for elements d, e, and f are r, s, and t respectively, and r, s, and t are all positive integers with r > s and r > t, and element e contains x e1 ,x e2 ,…x es The assignment and element x in f f1 ,x f2 ,…x ft The assignment of values can all be performed on the variable x of element d. d1 ,x d2 ,…x dr If identical assigned data is found, a new data element g is added to the standardized dataset C, and the X of element g is... C A set is used to store the function P with the largest number of variables. d (x) d1 ,x d2 ,…x dr ), Y C A set is used to store x d1 ,x d2 ,…x dr and x e1 ,x e2 ,…x es and x f1 ,x f2 ,…x ft Variable assignment, Z C Sets are used to store functions P with a small number of variables. e (x) e1 ,x e2 ,…x es ), P f (x) f1 ,x f2 ,…x ft ); Step 3-3: Optimize and unify the variable names of data elements within the standardized dataset C. For any data element g within the standardized dataset C, the Y... C In the set, x is the one with fewer variables. e1 ,x e2 ,…x es and x f1 ,x f2 ,…x ft The assignment of the variable x with the largest number of variables d1 ,x d2 ,…x dr The values assigned are compared one by one. Once the correspondence of identical variable assignments is found, the variable names in elements e and f are uniformly represented by x. d1 ,x d2 ,…x dn The variable names in the text are replaced; Step 4: Retrieve data elements from standardized datasets B and C to construct application and transfer datasets D. In application and transfer datasets D, all data elements are uniformly named differently based on their assigned values. Furthermore, the Y... A Y B Y C Only one set of variables is selected within the set for assignment, and the data elements are linked together using logical connectives to form a compound statement; Step 5: If new file or form data is automatically generated from the application and flow data set D, first select the function variable x to be used in the application and flow data set D. D1 ,x D2 ,…x Dn Then according to x D1 ,x D2 ,…x Dn Call existing statement functions or define new statement functions, then build a new file or new form data set E based on these statement functions, and then apply and transfer the data set x in the data set D. D1 ,x D2 ,…x Dn The variable is assigned a value and loaded into a new file or a new form data set E; Step 6: If the application and flow data set D is used to populate the existing data set F, first select any data element h in the existing data set F to be populated. Then analyze and obtain the statement functions, assigned variables, and unassigned variables in element h. Then compare the statement functions of element h with the statement functions in the application and flow data set D. If there is a data element i in the application and flow data set D with the same number of variables and the same function content as element h, continue to compare the variables assigned to both one by one. If the data of the assigned variables in element h can be found in the corresponding position in element i, then fill the unassigned variables in element i into the unassigned variables in element h according to the corresponding position.
2. The data batch transfer method based on semantic logic judgment according to claim 1, characterized in that, It also includes preprocessing of statements, which refers to performing logical truth value judgment and data processing on natural language. The data analysis and processing in step 1 is performed only when the statement has a logical truth value and is a simple declarative sentence that does not contain NOT, conjunction, disjunction, implication, or equivalence logical relations.
3. A system for performing the data batch transfer method based on semantic logic judgment as described in any one of claims 1 or 2, characterized in that, The system includes a statement analysis and processing unit for segmenting declarative sentences to obtain function variables and statement functions; an original dataset generation unit for generating an original dataset A from the data output by the statement analysis and processing unit; and a data standardization processing unit for generating standardized datasets B and C from the original dataset A. A data transfer dataset generation unit is used to extract data from standardized datasets B and C and create application and transfer datasets D. The data standardization processing unit includes a standardized dataset generation module, a first-level standardization processing module for processing elements with the same number of variables, and a second-level standardization processing module for processing elements with different numbers of variables, which are connected in sequence. The first-level standardization processing module is used to generate standardized dataset B, and the second-level standardization processing module is used to generate standardized dataset C.
4. The system according to claim 3, characterized in that, The statement analysis and processing unit includes a statement preprocessing module for performing logical truth value judgments on natural language.
5. The system according to claim 3, characterized in that, It also includes a reminder dataset generation unit for generating a reminder file data set E and associating the reminder file data set E with the flow data set D.
Citation Information
Patent Citations
Method and system for processing question and answer data based on semantic logic uniqueness judgment
CN111859990A
Intelligent question and answer method and device, readable storage medium and computing equipment
CN111898024A