Method, device, equipment and storage medium for establishing security rules for report files

By extracting text information from report files, constructing syntax trees and formulating security rules, the problem of difficulty in protecting private data of report files in the existing technology is solved, and more efficient security protection and file security are achieved.

CN114091106BActive Publication Date: 2024-10-25CHINA MERCHANTS FINANCE HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111422505.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2024-10-25
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

When establishing security rules for report files using existing technology, it is difficult to protect the private data of the file without affecting access by insiders, leading to the risk of private data leakage.

Method used

By extracting text information from the report file, perform word segmentation operations and build a syntax tree, use the ontology knowledge of the report file to update the syntax tree, build a syntax parsing tree and a security rule structure tree, and formulate security rules for specific user categories to protect private data.

Benefits of technology

It achieves more accurate expression and security protection of private data in report files, improves the overall security of files, and avoids leakage of private data caused by untimely access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114091106B_ABST
    Figure CN114091106B_ABST
Patent Text Reader

Abstract

The present invention relates to data processing technology, and discloses a method for establishing security rules for report files, including: extracting text information of a report file to obtain report information text; performing word segmentation operation on the report information text, and constructing a syntax tree using the word segmentation result to obtain a first report information word set syntax tree; using report file ontology knowledge to preprocess the word segmentation result of the report information word set syntax tree, and updating the report information word set syntax tree to obtain a second report information word set syntax tree; according to the syntax parsing tree rule, constructing a syntax parsing tree using the second report word set syntax tree; establishing security rules for each tree node of the syntax parsing tree, constructing a security rule structure tree, and completing the establishment of report file security rules. The present invention also proposes a device, equipment, and medium for establishing report file security rules. The present invention can improve the security of files.
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 method, device, electronic device and computer-readable storage medium for establishing security rules for report files. Background Art

[0002] Report files occupy a large proportion of the value in each enterprise, and users' inappropriate access and abnormal location access will lead to the risk of privacy data leakage of report files. Each enterprise will establish a security rule to protect the security of report files.

[0003] At present, security rules are generally established by building a security key outside the report file storage system to prevent external access. However, this also hinders relevant personnel in the enterprise from viewing and referring to non-privacy report files in the report system without knowing the security key, and it is impossible to build security rules from the attributes of the report file itself. Summary of the invention

[0004] The present invention provides a method, device, equipment and storage medium for establishing security rules for report files, the main purpose of which is to improve the security of files.

[0005] To achieve the above object, the present invention provides a method for establishing report file security rules, comprising:

[0006] Acquire a report file from a report system, extract text information of the report file, and obtain report information text;

[0007] Performing a word segmentation operation on the report information text, and constructing a syntax tree using the word segmentation result to obtain a syntax tree of a first report information word set;

[0008] Preprocessing the word segmentation result of the report information word set syntax tree by using the report file ontology knowledge, and updating the report information word set syntax tree to obtain a second report information word set syntax tree;

[0009] According to the pre-constructed syntax parse tree rules, construct a syntax parse tree using the syntax tree of the second report word set;

[0010] Establish security rules for each tree node of the grammar parsing tree and construct a security rule structure tree.

[0011] Optionally, the adjusting the first report information word set syntax tree by using the report file ontology knowledge, and updating the adjusted first report information word set syntax tree to obtain the second report information word set syntax tree includes:

[0012] Traversing each tree node in the first report information word set syntax tree, and using the LTP word segmentation tool to perform part-of-speech tagging on the words corresponding to each tree node, to obtain a part-of-speech tagged report information word set syntax tree;

[0013] Determine whether a tree node in a grammar tree and a node adjacent to the tree node are a noun part of speech;

[0014] If the words corresponding to the tree node and the adjacent nodes of the tree node are both nouns, the original syntax tree node remains unchanged;

[0015] If the words corresponding to the tree node and the adjacent nodes of the tree node are not all nouns, a pre-constructed recursive node combination rule is used to combine the syntax tree node corresponding to the word in the syntax tree of the report information word set with the adjacent nodes to obtain a new syntax tree node;

[0016] All the new syntax tree nodes and the unchanged original syntax tree nodes are aggregated to obtain the second report word set syntax tree.

[0017] Optionally, performing a word segmentation operation on the report information text and constructing a syntax tree using the word segmentation result to obtain a syntax tree of the first report information word set includes:

[0018] Using the LTP word segmentation tool to perform word segmentation on the report information text to obtain a report information word set;

[0019] The segmented words corresponding to each text sentence of the report information text are extracted, and a syntax tree is constructed according to the sentence structure of each text sentence to obtain the syntax tree of the first report information word set.

[0020] Optionally, the establishing of security rules for each tree node of the grammar parsing tree and constructing a security rule structure tree includes:

[0021] Dividing the conditional relationship of each tree node of the grammar parsing tree;

[0022] Determine conditional limiting items and comparison conditional limiting items according to the conditional relationship;

[0023] Obtaining the attributes of the conditional qualification item and the comparison conditional qualification item;

[0024] The attributes are used to formulate security rules for each tree node of the grammar parsing tree.

[0025] Optionally, obtaining the report file includes:

[0026] Get the transaction order set;

[0027] Identify the transaction data in the transaction order set, and integrate the transaction data to obtain a transaction data set:

[0028] Combining the transaction data sets into multiple report files according to user categories;

[0029] Upload a plurality of the report files to a report system, and obtain the report files from the report system.

[0030] Optionally, extracting text information of the report file to obtain report information text includes:

[0031] Remove table lines from the report file;

[0032] Using OCR technology to extract text from the report file with table lines removed, and copying the extracted text to a specified position according to a predefined typesetting order to obtain a text to be sorted;

[0033] A text standardization conversion process is performed on the text to be sorted, and special symbols and non-standard text in the text to be sorted are removed in a manner based on regularization rules to obtain the report information text.

[0034] Optionally, performing text standardization conversion processing on the text to be sorted includes:

[0035] The character sizes of the text to be collated are adjusted to the same size to obtain standardized text to be collated with the same size.

[0036] In order to solve the above problem, the present invention also provides a report file security rule establishment device, the device comprising:

[0037] A syntax tree building module is used to obtain a report file, extract text information of the report file, and obtain report information text; perform a word segmentation operation on the report information text, and use the word segmentation result to build a syntax tree to obtain a first report information word set syntax tree; use the report file ontology knowledge to adjust the first report information word set syntax tree, and update the adjusted first report information word set syntax tree to obtain a second report information word set syntax tree;

[0038] A parse tree building module, used to build a grammar parse tree using the second report word set grammar tree according to the pre-built grammar parse tree rules;

[0039] The security rule establishment module is used to establish the security rules of each tree node of the grammar parsing tree and construct a security rule structure tree.

[0040] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0041] at least one processor; and,

[0042] a memory communicatively connected to the at least one processor; wherein,

[0043] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned method for establishing report file security rules.

[0044] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned report file security rule establishment method.

[0045] The embodiment of the present invention extracts text information from a report file and performs a word segmentation operation on the text information; constructs a word set grammar tree using the sentence structure of the text machine in the text information and the corresponding word segmentation words, and then uses the ontology knowledge of the report file to update the word set grammar tree, which can better improve the parsing of the word set grammar tree and improve the expression accuracy of each tree node word in the word set grammar tree; then, according to the pre-constructed grammar parsing tree rules, a corresponding grammar parsing tree is constructed for the updated word set grammar tree, and security rules for each tree node of the grammar parsing tree are established to construct a security rule structure tree. Furthermore, the security rules constructed by the present invention can more completely realize the security protection of privacy files in report files and improve the security of files. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flowchart of a method for establishing security rules for report files provided in one embodiment of the present invention;

[0047] Figure 2 A functional module diagram of a report file security rule establishment device provided by an embodiment of the present invention;

[0048] Figure 3 A schematic diagram of the structure of an electronic device for implementing the method for establishing security rules for report files provided in one embodiment of the present invention.

[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0051] The embodiment of the present application provides a method for establishing security rules for report files. The execution subject of the method for establishing security rules for report files includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for establishing security rules for report files can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0052] Reference Figure 1 FIG. 1 is a flow chart of a method for establishing security rules for report files provided in an embodiment of the present invention. In this embodiment, the method for establishing security rules for report files includes:

[0053] S1. Obtain a report file, extract text information of the report file, and obtain report information text;

[0054] In the embodiment of the present invention, the report file may be a transaction order data report obtained after each enterprise in each field completes a transaction. In the embodiment of the present invention, the report file may be obtained from a report system for storing the report file. For example, in the banking field, the report file may be obtained from a report system for storing a table file generated by order data after a transaction between a bank and a customer is completed.

[0055] In other embodiments of the present invention, the step of obtaining a report file includes:

[0056] Get the transaction order set;

[0057] Identify the transaction data in the transaction order set, and integrate the transaction data to obtain a transaction data set:

[0058] Combining the transaction data sets into multiple report files according to user categories;

[0059] Upload a plurality of the report files to a report system, and obtain the report files from the report system.

[0060] In detail, extracting the text information of the report file to obtain the report information text includes:

[0061] Remove table lines from the report file;

[0062] Using OCR technology to extract text from the report file with table lines removed, and copying the extracted text to a specified position according to a predefined typesetting order to obtain a text to be sorted;

[0063] A text standardization conversion process is performed on the text to be sorted, and special symbols and non-standard text in the text to be sorted are removed in a manner based on regularization rules to obtain the report information text.

[0064] The step of performing text standardization conversion processing on the text to be sorted includes:

[0065] The text sizes in the to-be-organized text are adjusted to the same size to obtain standardized to-be-organized texts of the same size.

[0066] The transaction order includes but is not limited to category, quantity, order number and order price. The embodiment of the present invention converts all the information in the transaction order according to the table requirements and stores the converted data in a pre-built table in sequence.

[0067] In the embodiment of the present invention, the plurality of report files may be individual reports, enterprise reports, community reports, etc. obtained by the bank according to the categories of loan customers in the field of bank lending.

[0068] It should be understood that the report file is usually stored in the report system in a table format. If the report information text is directly extracted, it is easily limited by the table format, which will cause garbled text extraction. Therefore, the embodiment of the present invention can improve the accuracy of text extraction by removing the table lines in the report file and then extracting the report information text.

[0069] S2, performing a word segmentation operation on the report information text, and constructing a syntax tree using the word segmentation result to obtain a syntax tree of a first report information word set;

[0070] In an embodiment of the present invention, the word segmentation operation can be an operation process of slicing a text file using a common word segmentation tool according to the word segmentation rules formulated within the word segmentation tool to obtain a plurality of words. For example, in an embodiment of the present invention, after the following text "E-commerce docking demand and funds will become the core participant of Internet consumer finance." is segmented using the LTP word segmentation tool, the text can be obtained as "E-commerce docking demand and funds will become the core participant of Internet consumer finance."

[0071] In the embodiment of the present invention, the syntax tree is a graphical representation of a sentence structure. For example, in the embodiment of the present invention, the syntax tree may be a tree-like graph formed by using the sentence structure of a text sentence in the report information text.

[0072] The embodiment of the present invention uses an LTP word segmentation tool to perform a word segmentation operation on the report information text to obtain a report information word set; extracts the segmented words corresponding to each text sentence of the report information text, and constructs a syntax tree according to the sentence structure of each text sentence to obtain the syntax tree of the first report information word set.

[0073] In the embodiment of the present invention, the sentence structure may be a "subject" contained in the text sentence. + predicate + The basic structure of the sentence form of "object".

[0074] S3. Using report file ontology knowledge, adjust the first report information word set syntax tree, and update the adjusted first report information word set syntax tree to obtain a second report information word set syntax tree;

[0075] In the embodiment of the present invention, the ontology knowledge can be a conventional proper noun in the relevant field. For example, in the medical field, the ontology knowledge can be expressed in a series of proper nouns such as "puncture diagnosis, ultrasound diagnosis, doctor diagnosis", rather than the usual "puncture / diagnosis / ultrasound / diagnosis / doctor / diagnosis" after word segmentation. Therefore, the embodiment of the present invention uses the ontology knowledge "puncture diagnosis, ultrasound diagnosis, doctor diagnosis" and a series of proper nouns to adjust the "puncture / diagnosis / ultrasound / diagnosis / doctor / diagnosis" in the syntax tree of the first report information word set to obtain the adjusted syntax tree of the first report information word set.

[0076] Furthermore, in the embodiment of the present invention, updating the first report information word set syntax tree to obtain the second report information word set syntax tree includes:

[0077] Traversing each tree node in the first report information word set syntax tree, and using the LTP word segmentation tool to perform part-of-speech tagging on the words corresponding to each tree node, to obtain a part-of-speech tagged report information word set syntax tree;

[0078] Determine whether a tree node in a grammar tree and a node adjacent to the tree node are a noun part of speech;

[0079] If the words corresponding to the tree node and the adjacent nodes of the tree node are both nouns, the original syntax tree node remains unchanged;

[0080] If the words corresponding to the tree node and the adjacent nodes of the tree node are not all nouns, a pre-constructed recursive node combination rule is used to combine the syntax tree node corresponding to the word in the syntax tree of the report information word set with the adjacent nodes to obtain a new syntax tree node;

[0081] All the new syntax tree nodes and the unchanged original syntax tree nodes are aggregated to obtain the second report word set syntax tree.

[0082] In the embodiment of the present invention, the recursive node combination rule may be a rule for combining two tree nodes according to an association relationship.

[0083] S4, constructing a grammar parse tree using the second report word set grammar tree according to the pre-constructed grammar parse tree rules;

[0084] In an embodiment of the present invention, the grammatical parse tree may be a hierarchical structure formed by the expression and storage method of the sentence grammar of the text sentence in a computer. For example, the grammatical parse tree that can be constructed using the pre-constructed grammatical parse tree rules for the above-mentioned "electronic / business / connection / demand / and / funds / " may be (s(np(nelectronic))(np(nbusiness)(vp(vconnection))(np(ndemand))(pp(p(and))(np(nfunds))). Among them, s represents the entire sentence; np is the subject; n is a noun; pp is a conjunction; and vp is a predicate.

[0085] S5. Establish security rules for each tree node of the grammar parsing tree and construct a security rule structure.

[0086] In an embodiment of the present invention, the security rules may be data protection rules formulated to protect data from being arbitrarily accessed and queried. For example, in the medical field, when a file has a security requirement of "ordinary users cannot query doctors' medication habits", the data to be protected on the data set is "medication habits", which are the drugs that doctors often prescribe based on the diagnosis results. This data has privacy leakage and security issues, so users need to give security requirements and restrict the access behavior of the data to avoid information leakage.

[0087] In detail, the embodiment of the present invention divides the conditional relationship of each tree node of the grammatical parsing tree; determines the conditional limiting items and the comparison conditional limiting items according to the conditional relationship; obtains the conditional attributes of the conditional limiting items and the comparison conditional limiting items; and uses the conditional attributes of the conditional limiting items and the comparison conditional limiting items to formulate security rules for each tree node of the grammatical parsing tree.

[0088] Furthermore, the embodiment of the present invention constructs the tree nodes of the syntax tree of the second report information word set with similar parts of speech at the same level, and uses the sentence structure relationship to link the tree nodes in the word syntax tree; uses the pre-constructed syntax parsing tree rules, introduces conditional relationships to set conditional attributes of the syntax tree nodes at the same level, and uses the conditional attributes to construct the security rule structure. In the embodiment of the present invention, the conditional relationship can be a comparison relationship, logical OR, logical AND, similarity relationship, and inclusion relationship in the data.

[0089] In an embodiment of the present invention, the conditional limiting items may be the words of each tree node in the grammatical parse tree and the words on the adjacent nodes, and the words corresponding to each tree node and each tree node at the same level in the grammatical parse tree, and the new parse tree nodes derived after adding the conditional relationship. For example, in the medical field, "doctor's diagnosis", "puncture diagnosis" and "ultrasound diagnosis" belong to parse tree nodes at the same level, and after adding the conditional relationship, they can be expressed as "doctor's diagnosis" = "puncture diagnosis" = "ultrasound diagnosis". In another example, "doctor's diagnosis. Diagnosis result", "puncture diagnosis. Diagnosis result" and "ultrasound diagnosis. Diagnosis result" can be expressed as "doctor's diagnosis. Diagnosis result" = "puncture diagnosis. Diagnosis result" & "puncture diagnosis. Diagnosis result" = "ultrasound diagnosis. Diagnosis result" after adding the conditional relationship.

[0090] In an embodiment of the present invention, the attribute may be a semantic mapping included in the words corresponding to each tree node in the parse tree node. For example, in the medical field, if the word corresponding to a tree node in the parse tree is "diabetes", then the attribute corresponding to the node is "diagnosis result". For another example, if the word corresponding to a node is "Zhang XX", then the attribute corresponding to the node is "patient name" or "doctor name".

[0091] In an embodiment of the present invention, the file is "ordinary users cannot query doctors' medication habits", and there is a security requirement. Then, the security rule structure tree is used to perform security protection on the "medication habits". The security protection can be understood as when the user queries the node in the security rule structure tree corresponding to the medication habits according to the conditional restriction item and the comparison conditional restriction item, the information under the node is shielded and "NULL" is returned. In another embodiment of the present invention, the file is "Zhang's salary this month under a certain department is XXX", and the security rule structure tree is needed to perform security protection on the "XXX". Then, when the querying user queries the tree node corresponding to the "this month's salary" in the security rule structure tree, the "XXX" under the "this month's salary" tree node in the security rule structure tree is shielded, and "NULL" is returned to the querying user.

[0092] like Figure 2FIG. 1 is a functional module diagram of a report file security rule establishment device provided by an embodiment of the present invention.

[0093] The report file security rule establishment device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the report file security rule establishment device 100 can include a syntax tree establishment module 101, a parsing tree establishment module 102 and a security rule establishment module 103. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0094] In this embodiment, the functions of each module / unit are as follows:

[0095] The syntax tree building module 101 is used to obtain a report file, extract text information of the report file, and obtain report information text; perform word segmentation on the report information text, and use the word segmentation result to build a syntax tree to obtain a first report information word set syntax tree; use the report file ontology knowledge to adjust the first report information word set syntax tree, and update the adjusted first report information word set syntax tree to obtain a second report information word set syntax tree;

[0096] In the embodiment of the present invention, the report file may be a transaction order data report obtained after each enterprise in each field completes a transaction. In the embodiment of the present invention, the report file may be obtained from a report system for storing the report file. For example, in the banking field, the report file may be obtained from a report system for storing a table file generated by order data after a transaction between a bank and a customer is completed.

[0097] In other embodiments of the present invention, the step of obtaining a report file includes:

[0098] Get the transaction order set;

[0099] Identify the transaction data in the transaction order set, and integrate the transaction data to obtain a transaction data set:

[0100] Combining the transaction data sets into multiple report files according to user categories;

[0101] Upload a plurality of the report files to a report system, and obtain the report files from the report system.

[0102] In detail, extracting the text information of the report file to obtain the report information text includes:

[0103] Remove table lines from the report file;

[0104] Using OCR technology to extract text from the report file with table lines removed, and copying the extracted text to a specified position according to a predefined typesetting order to obtain a text to be sorted;

[0105] A text standardization conversion process is performed on the text to be sorted, and special symbols and non-standard text in the text to be sorted are removed in a manner based on regularization rules to obtain the report information text.

[0106] The step of performing text standardization conversion processing on the text to be sorted includes:

[0107] The text sizes in the to-be-organized text are adjusted to the same size to obtain standardized to-be-organized texts of the same size.

[0108] The transaction order includes but is not limited to category, quantity, order number and order price. The embodiment of the present invention converts all the information in the transaction order according to the table requirements and stores the converted data in a pre-built table in sequence.

[0109] In the embodiment of the present invention, the plurality of report files may be individual reports, enterprise reports, community reports, etc. obtained by the bank according to the categories of loan customers in the field of bank lending.

[0110] It should be understood that the report file is usually stored in the report system in a table format. If the report information text is directly extracted, it is easily limited by the table format, which will cause garbled text extraction. Therefore, the embodiment of the present invention can improve the accuracy of text extraction by removing the table lines in the report file and then extracting the report information text.

[0111] In an embodiment of the present invention, the word segmentation operation can be an operation process of slicing a text file using a common word segmentation tool according to the word segmentation rules formulated within the word segmentation tool to obtain a plurality of words. For example, in an embodiment of the present invention, after the following text "E-commerce docking demand and funds will become the core participant of Internet consumer finance." is segmented using the LTP word segmentation tool, the text can be obtained as "E-commerce docking demand and funds will become the core participant of Internet consumer finance."

[0112] In the embodiment of the present invention, the syntax tree is a graphical representation of a sentence structure. For example, in the embodiment of the present invention, the syntax tree may be a tree-like graph formed by using the sentence structure of a text sentence in the report information text.

[0113] The embodiment of the present invention uses an LTP word segmentation tool to perform a word segmentation operation on the report information text to obtain a report information word set; extracts the segmented words corresponding to each text sentence of the report information text, and constructs a syntax tree according to the sentence structure of each text sentence to obtain the syntax tree of the first report information word set.

[0114] In the embodiment of the present invention, the sentence structure may be a "subject" contained in the text sentence. + predicate + The basic structure of the sentence form of "object".

[0115] In the embodiment of the present invention, the ontology knowledge can be a conventional proper noun in the relevant field. For example, in the medical field, the ontology knowledge can be expressed in a series of proper nouns such as "puncture diagnosis, ultrasound diagnosis, doctor diagnosis", rather than the usual "puncture / diagnosis / ultrasound / diagnosis / doctor / diagnosis" after word segmentation. Therefore, the embodiment of the present invention uses the ontology knowledge "puncture diagnosis, ultrasound diagnosis, doctor diagnosis" and a series of proper nouns to adjust the "puncture / diagnosis / ultrasound / diagnosis / doctor / diagnosis" in the syntax tree of the first report information word set to obtain the adjusted syntax tree of the first report information word set.

[0116] Furthermore, in the embodiment of the present invention, updating the first report information word set syntax tree to obtain the second report information word set syntax tree includes:

[0117] Traversing each tree node in the first report information word set syntax tree, and using the LTP word segmentation tool to perform part-of-speech tagging on the words corresponding to each tree node, to obtain a part-of-speech tagged report information word set syntax tree;

[0118] Determine whether a tree node in a grammar tree and a node adjacent to the tree node are a noun part of speech;

[0119] If the words corresponding to the tree node and the adjacent nodes of the tree node are both nouns, the original syntax tree node remains unchanged;

[0120] If the words corresponding to the tree node and the adjacent nodes of the tree node are not all nouns, a pre-constructed recursive node combination rule is used to combine the syntax tree node corresponding to the word in the syntax tree of the report information word set with the adjacent nodes to obtain a new syntax tree node;

[0121] All the new syntax tree nodes and the unchanged original syntax tree nodes are aggregated to obtain the second report word set syntax tree.

[0122] In the embodiment of the present invention, the recursive node combination rule may be a rule for combining two tree nodes according to an association relationship.

[0123] The parse tree building module 102 is used to build a parse tree using the second report word set parse tree according to the pre-built parse tree rules;

[0124] In an embodiment of the present invention, the grammatical parse tree may be a hierarchical structure formed by the expression and storage method of the sentence grammar of the text sentence in a computer. For example, the grammatical parse tree that can be constructed using the pre-constructed grammatical parse tree rules for the above-mentioned "electronic / business / connection / demand / and / funds / " may be (s(np(nelectronic))(np(nbusiness)(vp(vconnection))(np(ndemand))(pp(p(and))(np(nfunds))). Among them, s represents the entire sentence; np is the subject; n is a noun; pp is a conjunction; and vp is a predicate.

[0125] The security rule establishment 103 is used to establish security rules for each tree node of the syntax parsing tree and construct a security rule structure tree.

[0126] In an embodiment of the present invention, the security rules may be data protection rules formulated to protect data from being arbitrarily accessed and queried. For example, in the medical field, when a file has a security requirement of "ordinary users cannot query doctors' medication habits", the data to be protected on the data set is "medication habits", which are the drugs that doctors often prescribe based on the diagnosis results. This data has privacy leakage and security issues, so users need to give security requirements and restrict the access behavior of the data to avoid information leakage.

[0127] In detail, the embodiment of the present invention divides the conditional relationship of each tree node of the grammatical parsing tree; determines the conditional limiting items and the comparison conditional limiting items according to the conditional relationship; obtains the conditional attributes of the conditional limiting items and the comparison conditional limiting items; and uses the conditional attributes of the conditional limiting items and the comparison conditional limiting items to formulate security rules for each tree node of the grammatical parsing tree.

[0128] Furthermore, the embodiment of the present invention constructs the tree nodes of the syntax tree of the second report information word set with similar parts of speech at the same level, and uses sentence structure relationships to link the tree nodes in the word syntax tree; uses pre-constructed syntax parsing tree rules, introduces conditional relationships to set conditional attributes of syntax tree nodes at the same level, and uses the conditional attributes to construct the security rule structure.

[0129] In the embodiment of the present invention, the conditional relationship may be a comparison relationship, a logical OR, a logical AND, a similarity relationship, a containment relationship, etc. in the data.

[0130] In an embodiment of the present invention, the conditional limiting items may be the words of each tree node in the grammatical parse tree and the words on the adjacent nodes, and the words corresponding to each tree node and each tree node at the same level in the grammatical parse tree, and the new parse tree nodes derived after adding the conditional relationship. For example, in the medical field, "doctor's diagnosis", "puncture diagnosis" and "ultrasound diagnosis" belong to parse tree nodes at the same level, and after adding the conditional relationship, they can be expressed as "doctor's diagnosis" = "puncture diagnosis" = "ultrasound diagnosis". In another example, "doctor's diagnosis. Diagnosis result", "puncture diagnosis. Diagnosis result" and "ultrasound diagnosis. Diagnosis result" can be expressed as "doctor's diagnosis. Diagnosis result" = "puncture diagnosis. Diagnosis result" & "puncture diagnosis. Diagnosis result" = "ultrasound diagnosis. Diagnosis result" after adding the conditional relationship.

[0131] In an embodiment of the present invention, the attribute may be a semantic mapping included in the words corresponding to each tree node in the parse tree node. For example, in the medical field, if the word corresponding to a tree node in the parse tree is "diabetes", then the attribute corresponding to the node is "diagnosis result". For another example, if the word corresponding to a node is "Zhang XX", then the attribute corresponding to the node is "patient name" or "doctor name".

[0132] For example, in an embodiment of the present invention, if the file is "ordinary users cannot query doctors' medication habits", and there is a security requirement, then the security rule structure tree is used to perform security protection on the "medication habits". The security protection can be understood as when the user queries the node in the security rule structure tree corresponding to the medication habits according to the conditional restriction item and the comparison conditional restriction item, the information under the node is shielded and "NULL" is returned. In another embodiment of the present invention, if the file is "Zhang's salary this month is XXX under a certain department", and the security rule structure tree is needed to perform security protection on the "XXX", then when the querying user queries the tree node corresponding to the "XXX" in the security rule structure tree, the "XXX" is shielded and "NULL" is returned to the querying user.

[0133] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a method for establishing security rules for report files provided by an embodiment of the present invention.

[0134] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a report file security rule establishment program.

[0135] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a report file security rule establishment program, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0136] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device, such as the code of the report file security rule establishment program, but also be used to temporarily store data that has been output or is to be output.

[0137] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0138] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0139] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0140] For example, although not shown, the electronic device may also include a power source (e.g., a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0141] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0142] The report file security rule establishment program stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0143] Acquire a report file, extract text information of the report file, and obtain report information text;

[0144] Performing a word segmentation operation on the report information text, and constructing a syntax tree using the word segmentation result to obtain a syntax tree of a first report information word set;

[0145] Using report file ontology knowledge to adjust the first report information word set syntax tree, and updating the adjusted first report information word set syntax tree to obtain a second report information word set syntax tree;

[0146] According to the pre-constructed syntax parse tree rules, construct a syntax parse tree using the syntax tree of the second report word set;

[0147] Establish security rules for each tree node of the grammar parsing tree and construct a security rule structure tree.

[0148] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0149] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0150] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0151] Acquire a report file, extract text information of the report file, and obtain report information text;

[0152] Performing a word segmentation operation on the report information text, and constructing a syntax tree using the word segmentation result to obtain a syntax tree of a first report information word set;

[0153] Using report file ontology knowledge to adjust the first report information word set syntax tree, and updating the adjusted first report information word set syntax tree to obtain a second report information word set syntax tree;

[0154] According to the pre-constructed syntax parse tree rules, construct a syntax parse tree using the syntax tree of the second report word set;

[0155] Establish security rules for each tree node of the grammar parsing tree and construct a security rule structure tree.

[0156] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0157] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0158] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0159] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0160] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0161] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0162] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0163] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for establishing security rules for report files, characterized in that: The method comprises: Acquire a report file, extract text information of the report file, and obtain report information text; Performing a word segmentation operation on the report information text, and constructing a syntax tree using the word segmentation result to obtain a syntax tree of a first report information word set; Using report file ontology knowledge to adjust the first report information word set syntax tree, and updating the adjusted first report information word set syntax tree to obtain a second report information word set syntax tree; According to the pre-constructed syntax parse tree rules, construct a syntax parse tree using the syntax tree of the second report information word set; Establishing security rules for each tree node of the grammar parsing tree and constructing a security rule structure tree; Among them, the method of adjusting the syntax tree of the first report information word set by using the report file ontology knowledge, and updating the adjusted syntax tree of the first report information word set to obtain the syntax tree of the second report information word set includes: traversing each tree node in the syntax tree of the first report information word set, and using the LTP word segmentation tool to perform part-of-speech tagging on the words corresponding to each tree node to obtain a part-of-speech tagged report information word set syntax tree; judging whether the tree nodes in the syntax tree and the adjacent nodes of the tree nodes are noun parts of speech; if the words corresponding to the tree nodes and the adjacent nodes of the tree nodes are all noun parts of speech, the original syntax tree nodes are kept unchanged; if the words corresponding to the tree nodes and the adjacent nodes of the tree nodes are not all nouns, the pre-constructed recursive node combination rules are used to combine the syntax tree nodes and adjacent nodes corresponding to the words in the syntax tree of the report information word set to obtain new syntax tree nodes; summarizing all the new syntax tree nodes and the unchanged original syntax tree nodes to obtain the syntax tree of the second report information word set; The method of establishing security rules for each tree node of the grammatical parsing tree and constructing a security rule structure tree includes: dividing the conditional relationships of each tree node of the grammatical parsing tree; determining conditional limiting items and comparison conditional limiting items according to the conditional relationships; obtaining the attributes of the conditional limiting items and comparison conditional limiting items; and formulating security rules for each tree node of the grammatical parsing tree using the attributes.

2. The method for establishing report file security rules according to claim 1, characterized in that: The performing of a word segmentation operation on the report information text and constructing a syntax tree using the word segmentation result to obtain a syntax tree of a first report information word set includes: Using the LTP word segmentation tool to perform word segmentation on the report information text to obtain a report information word set; The segmented words corresponding to each text sentence of the report information text are extracted, and a syntax tree is constructed according to the sentence structure of each text sentence to obtain the syntax tree of the first report information word set.

3. The method for establishing report file security rules according to claim 1, characterized in that: The obtaining of the report file includes: Get the transaction order set; Identify the transaction data in the transaction order set, and integrate the transaction data to obtain a transaction data set: Combining the transaction data sets into multiple report files according to user categories; Upload the plurality of report files to the report system, and obtain the report files from the report system.

4. The method for establishing report file security rules according to claim 1, characterized in that: The step of extracting text information of the report file to obtain report information text includes: Remove table lines from the report file; Using OCR technology to extract text from the report file with table lines removed, and copying the extracted text to a specified position according to a predefined typesetting order to obtain a text to be sorted; A text standardization conversion process is performed on the text to be sorted, and special symbols and non-standard text in the text to be sorted are removed in a manner based on regularization rules to obtain the report information text.

5. The method for establishing report file security rules according to claim 4, characterized in that: The performing of text standardization conversion processing on the text to be sorted includes: The character sizes of the text to be collated are adjusted to the same size to obtain standardized text to be collated with the same size.

6. A report file security rule establishment device, used to implement the report file security rule establishment method as claimed in any one of claims 1 to 5, characterized in that: The device comprises: A syntax tree building module is used to obtain a report file, extract text information of the report file, and obtain report information text; perform a word segmentation operation on the report information text, and use the word segmentation result to build a syntax tree to obtain a first report information word set syntax tree; use the report file ontology knowledge to adjust the first report information word set syntax tree, and update the adjusted first report information word set syntax tree to obtain a second report information word set syntax tree; A parse tree building module, used to build a grammar parse tree using the grammar tree of the second report information word set according to the pre-built grammar parse tree rules; The security rule establishment module is used to establish the security rules of each tree node of the grammar parsing tree and construct a security rule structure tree.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the report file security rule establishment method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for establishing report file security rules as described in any one of claims 1 to 5 is implemented.