Structural information processing methods, apparatus, computer-readable storage media, and electronic devices
By constructing a structural information knowledge base and using prefix trees and tree diagrams for matching and sorting, the problem of the inability to uniformly standardize structural information is solved, and efficient standardization and consistency processing of structural information are achieved.
Patent Information
- Application Number
- CN202510500388.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-04-21
AI Technical Summary
Existing technologies cannot effectively standardize structural information, making it difficult to guarantee the consistency of structural information. Furthermore, manual adjustments are prone to generating errors, resulting in a waste of human resources.
A structured information knowledge base is constructed by building a prefix tree and a tree diagram, using keywords and regular expressions to split the structured information, perform matching and sorting, generate standardized structured information, and update the knowledge base to record the adjustment process.
It achieves efficient and standardized processing and consistency of structural information, records the optimization and adjustment process of structural information, and ensures that structural information from different sources has standardization and consistency.
Smart Images

Figure CN120578784B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data modeling and analysis technology, specifically to a structural information processing method, apparatus, computer-readable storage medium, and electronic device. Background Technology
[0002] In the process of modernization, structural information is constantly optimized and adjusted to better adapt to the needs of modern scenarios. To ensure the integrity and consistency of structural information, a scientific and standardized approach is needed to make these adjustments.
[0003] However, manual adjustment is prone to generating erroneous information and wastes human resources; in addition, changes such as the adjustment or cancellation of elements in the structural information often occur during the development process, which increases the difficulty of adjusting the structural information.
[0004] Therefore, the relevant technologies cannot effectively standardize structural information in a unified manner, nor can they guarantee the consistency of structural information. Summary of the Invention
[0005] The main objective of this disclosure is to provide a method, apparatus, computer-readable storage medium, and electronic device for processing structural information, in order to solve the problems in related technologies where it is impossible to effectively perform unified and standardized processing of structural information, and at the same time, it is impossible to guarantee the consistency of structural information.
[0006] To achieve the above objectives, a first aspect of this disclosure provides a method for processing structural information, comprising:
[0007] A structural information knowledge base is constructed, which includes structural information and corresponding states. The structural information includes at least one of the following: currently used standard structural information, historical structural information, and structural information to be confirmed. The state corresponding to the standard structural information is the standard state, the state corresponding to the historical structural information is the historical state, and the structural information to be confirmed is the state to be confirmed.
[0008] Based on the structural information and the corresponding state, construct the prefix tree and tree diagram corresponding to the structural information;
[0009] Based on the structural information, a set of structural information tuples to be matched is determined; one structural information corresponds to one tuple in the set of structural information tuples to be matched.
[0010] For each tuple in the set of tuples containing the structural information to be matched, the tuple is matched with the prefix tree and the tree diagram respectively to obtain the set of candidate structural information corresponding to the tuple, and the maximum matching degree between the tuple and each candidate structural information in the set of candidate structural information is calculated.
[0011] Based on the target candidate structure information corresponding to the maximum matching degree, the target structure information corresponding to the structure information is determined, and the target structure information is used to represent the normalized structure information;
[0012] Based on the target structural information, the structural information knowledge base is updated to standardize the structural information in the structural information knowledge base, and the association between historical structural information and standard structural information in the structural information knowledge base is recorded.
[0013] Optionally, further, determining the set of tuples of structural information to be matched based on the structural information includes:
[0014] Based on the keywords, the data type of the structural information, and the data characteristics, a multi-round recursive regular expression matching method is used to extract the information at each level and the attribute information from the structural information, and to mark the information at each level and the attribute information with corresponding labels. The data type includes: string type, numeric type, and encoding type. The data characteristics include: string length, numeric precision, and encoding standard. The attribute information includes at least one of the following: unit code, postal code, area code, longitude, and latitude.
[0015] The extracted information from each level is combined according to the level, and non-compliant combinations are eliminated to obtain a set of tuples of structural information to be matched corresponding to the structural information.
[0016] Optionally, further, the step of matching the tuple with the prefix tree and the tree diagram respectively to obtain the candidate structure information set corresponding to the tuple includes:
[0017] The tuple is searched in the prefix tree to obtain the prefix tree matching result, which includes all the prefix paths to be matched and the matched nodes;
[0018] Based on the prefix tree matching result, the node corresponding to the tree diagram is located, and the matching status of the tuple with the node and its child nodes in the tree diagram is checked to obtain the candidate structure information set corresponding to the tuple.
[0019] Optionally, further, calculating the maximum matching degree between the tuple and each candidate structural information in the candidate structural information set includes:
[0020] The tuple and each candidate structural information in the candidate structural information set are respectively converted into structural information vectors;
[0021] The matching degree between the tuple and each candidate structural information in the candidate structural information set is obtained by calculating the matching degree of each component in the structural information vector corresponding to each candidate structural information in the candidate structural information set.
[0022] The matching degree between the tuple and each candidate structure information in the candidate structure information set is sorted to obtain the maximum matching degree.
[0023] Optionally, further, determining the target structure information corresponding to the structure information based on the target candidate structure information corresponding to the maximum matching degree includes:
[0024] If the maximum matching degree is greater than or equal to a preset threshold, then based on the state recorded in the structure information knowledge base by the target candidate structure information, the target structure information corresponding to the structure information is determined, and based on the structure information to be matched corresponding to the tuple, the target candidate structure information is filled with necessary information to expand the structure information knowledge base; wherein, the state includes standard state, historical state and pending confirmation state;
[0025] If the maximum matching degree is equal to 1 and the candidate structure information set contains a candidate structure information, then the target candidate structure information is used as the target structure information, and based on the structure information to be matched corresponding to the tuple, the target candidate structure information is filled with necessary information to expand the structure information knowledge base;
[0026] If the maximum matching degree is equal to 0, then the most complete structural information corresponding to the tuple is obtained, and the most complete structural information is marked as pending confirmation, in order to update the structural information knowledge base.
[0027] Optionally, further, the step of constructing a prefix tree and a tree diagram corresponding to the structural information based on the structural information and the corresponding state includes:
[0028] Based on the structural information and the corresponding state, key-value pairs are determined; wherein, the key in the key-value pair is an abbreviation of a unit or department, and the value in the key-value pair is a detailed list or set of information of the unit or department with the same abbreviation;
[0029] Based on the key-value pairs, the prefix tree is constructed, and the corresponding state is recorded in the prefix tree;
[0030] Generate a tree diagram based on the structural information;
[0031] The fusion information in the detailed information is a word segmentation array, which corresponds to the nodes in the tree diagram.
[0032] Optionally, further, the construction of the structural information knowledge base includes:
[0033] Obtain structural information of each unit or part and corresponding structural optimization and adjustment log information; wherein, the structural information includes at least one of the following: full name, abbreviation, alias or code, level, unit code, parent unit code, postal code, area code, longitude, and latitude; the structural optimization and adjustment log information includes changes in old and new names and changes in affiliation; the structural optimization and adjustment log information is used to query historical structural information and determine the status of the structural information;
[0034] A structural information knowledge base is generated based on the structural information of each unit or part and the corresponding structural optimization and adjustment log information; wherein, the historical structural information and standard structural information in the structural information knowledge base are linked through foreign keys.
[0035] A second aspect of this disclosure provides a structural information processing apparatus, comprising:
[0036] The first processing unit is used to construct a structural information knowledge base, which includes structural information and corresponding states. The structural information includes at least one of the following: currently used standard structural information, historical structural information, and structural information to be confirmed. The state corresponding to the standard structural information is a standard state, the state corresponding to the historical structural information is a historical state, and the structural information to be confirmed is a state to be confirmed.
[0037] The second processing unit is used to construct a prefix tree and a tree diagram corresponding to the structural information based on the structural information and the corresponding state.
[0038] The third processing unit is used to determine a set of tuples of structural information to be matched based on the structural information; one structural information corresponds to one tuple in the set of tuples of structural information to be matched.
[0039] The fourth processing unit is used to match each tuple in the set of tuples of structural information to be matched with the prefix tree and the tree diagram respectively, to obtain the set of candidate structural information corresponding to the tuple, and to calculate the maximum matching degree between the tuple and each candidate structural information in the set of candidate structural information.
[0040] The fifth processing unit is used to determine the target structure information corresponding to the structure information based on the target candidate structure information corresponding to the maximum matching degree, wherein the target structure information is used to represent the normalized structure information;
[0041] The sixth processing unit is used to update the structure information knowledge base according to the target structure information, so as to standardize the structure information in the structure information knowledge base and record the association between historical structure information and standard structure information in the structure information knowledge base.
[0042] A third aspect of this disclosure provides a computer-readable storage medium storing computer instructions for causing a computer to perform the structured information processing method provided in any of the first aspects.
[0043] A fourth aspect of this disclosure provides an electronic device comprising: 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, the computer program being executed by the at least one processor to cause the at least one processor to perform the structural information processing method provided in any of the first aspects.
[0044] The fifth aspect of this disclosure provides a computer program product comprising a computer program that, when executed by a processor, implements the structural information processing method provided in any of the first aspects.
[0045] In the structural information processing method provided in this embodiment, a structural information knowledge base is constructed by collecting structural information. Based on the structural information to be standardized and its corresponding state in the structural information knowledge base, a prefix tree and tree diagram corresponding to the structural information are constructed to match the structural information to be matched. By calculating the matching degree and sorting, standardized structural information is obtained to update the structural information knowledge base, thereby outputting standardized structural information. The state corresponding to the structural information is also adjusted, and the relationship between historical structural information and standard structural information in the structural information knowledge base is recorded. This provides a basis for the adjustment process from historical structural information to standard structural information, achieving the goal of uniformly standardizing all structural information in the structural information knowledge base while recording the optimization and adjustment process of structural information. This achieves efficient standardization processing while tracking and recording the adjustment process of structural information, resulting in the technical effect of standardization and consistency of structural information from different sources. This solves the technical problem that related technologies cannot effectively standardize structural information and cannot guarantee the consistency of structural information. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this disclosure, the accompanying drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 A schematic flowchart illustrating the structural information processing method provided in this embodiment of the disclosure;
[0048] Figure 2 A schematic diagram of a scenario for the structural information processing method provided in an embodiment of this disclosure;
[0049] Figure 3 A flowchart illustrating a structural information processing method provided in yet another embodiment of this disclosure;
[0050] Figure 4 An ER diagram of the structural information knowledge base provided in this embodiment of the disclosure;
[0051] Figure 5 This is a schematic diagram of the prefix tree data structure and the tree graph data structure provided in the embodiments of this disclosure;
[0052] Figure 6 This is a block diagram of a structural information processing device provided in an embodiment of the present disclosure;
[0053] Figure 7 A block diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0054] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.
[0055] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0056] In this disclosure, the terms "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," and "longitudinal" indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings. These terms are primarily for the purpose of better describing this disclosure and its embodiments, and are not intended to limit the indicated devices, elements, or components to having a specific orientation, or to be constructed and operated in a specific orientation.
[0057] Furthermore, in addition to indicating location or positional relationship, some of the aforementioned terms may also have other meanings. For example, the term "above" may also be used in certain circumstances to indicate a dependency or connection. Those skilled in the art can understand the specific meaning of these terms in this disclosure according to the specific circumstances.
[0058] Furthermore, the terms "installation," "setup," "equipped with," "connection," "linking," and "socketing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral structure; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium, or an internal connection between two devices, components, or parts. Those skilled in the art can understand the specific meaning of the above terms in this disclosure according to the specific circumstances.
[0059] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0060] Currently, manual adjustment methods are prone to generating errors and wasting human resources. Furthermore, changes such as adjustments or cancellations of elements within the structural information frequently occur during development, increasing the difficulty of structural information adjustment. Therefore, related technologies cannot effectively standardize structural information uniformly, nor can they guarantee the consistency of structural information.
[0061] To address the aforementioned issues, the technical concept of this disclosure is to construct a structural information prefix tree and a tree diagram using a structural information knowledge base. By extracting a set of structural information tuples to be matched from the structural information and matching and sorting them with the nodes in the prefix tree and tree diagram, standardized structural information is obtained. This, in turn, updates the structural information knowledge base, ensuring that the structural information from various systems is standardized and consistent.
[0062] In practical applications, the implementing entity of this disclosure can be a structural information processing device, which can be deployed in electronic devices, such as terminal devices or servers. Users can process structural information from different sources through electronic devices equipped with structural information processing devices: standardization and consistency processing. The structural information can be organizational structure information, without specific limitations herein.
[0063] The following section uses organizational structure information as an example to explain the structural information processing method in detail.
[0064] For example, see Figure 1 As shown, Figure 1 This is a flowchart illustrating the structural information processing method provided in this embodiment. The structural information processing method can be used to collect structural information from various business information systems (wherein, the format, data structure, and information completeness of structural information in different business information systems may differ; structural information refers to the organizational form and association method describing the internal components and interrelationships of a system, object, or data), and construct a structural information knowledge base based on the structural information from each business information system, and then standardize and ensure consistency of the structural information knowledge base. This structural information processing can be applied to structural information related to any scenario, such as: security scenarios, company scenarios, school scenarios, etc. For security scenarios: structural information includes structural information of various security units (e.g., M1-level security units, M2-level security units, M3-level security units, etc.); for company scenarios: structural information includes group, second-level units, third-level units, fourth-level units, etc.; for school scenarios: school headquarters, branch campuses, etc. No specific limitations are made on the scenarios or structural information here.
[0065] Specifically, the structural information processing method may include the following steps (combined with...) Figure 2 As shown, Figure 2 (This is a schematic diagram of a scenario illustrating the structural information processing method provided in an embodiment of this disclosure):
[0066] S101: Construct a structural information knowledge base.
[0067] The structural information includes multiple levels (using a security scenario as an example, such as M1-level security units, M2-level security units, M3-level security units, M4-level security units, M5-level security units, M6-level security units, M7-level security units, M8-level security units, etc.), as well as the full name, short name, alias or code, level, unit code, parent unit code, postal code, area code, longitude, and latitude of each unit or department. The structural information knowledge base includes three types of structural information: currently used standardized structural information (i.e., currently used standard structural information, which will not be elaborated further below), historical structural information, and structural information to be confirmed. Optionally, the structural information knowledge base also includes the credibility of the structural information. When the credibility of the structural information to be confirmed reaches a threshold, the structural information to be confirmed can be adjusted to historical structural information or standard structural information.
[0068] (1.1) The standardized structural information currently used is the standardized output result of the structural information in this disclosure, and the corresponding data status (or status, which will not be repeated below) is status:S (referring to the standard status);
[0069] (1.2) Historical structural information that was abandoned due to structural optimization and adjustment such as reorganization and diversion is used to track and record the structural optimization and adjustment process. The corresponding data status is status:H (here referring to historical status).
[0070] (1.3) The data status of the unconfirmed structure information is status:U (which means pending confirmation).
[0071] The standard structural information (S) and historical structural information (H) mainly come from written documents; the structural information to be verified (U) comes from external input to the system (e.g., a structural information processing system or a structural information standardization system, which will not be elaborated further below). During system use, the reliability of the structural information to be verified is adjusted, and when the reliability reaches a certain condition, it is converted into standard structural information (S) or historical structural information (H).
[0072] S102: Construct the structural information prefix tree and tree diagram.
[0073] The standard structural information (S), historical structural information (H), and unconfirmed structural information (U) in the information knowledge base are used to construct the structural information prefix tree data structure and tree graph data structure. The status (status:S|H|U) is used to distinguish different types of structural data in the prefix tree node and the tree graph node.
[0074] (2.1) In the prefix tree data structure, the root node is an empty node, and the remaining nodes are composed of key-value pairs. Among them, the key is the abbreviation of the unit or department (SHORT_NAME), and the value is a detailed list (e.g., INFO_LIST, containing NAME (full name), ALIAS_NAME (alias or code), LEVEL (level), CODE (unit code), PARENT_CODE (parent unit code), ZIP_CODE (postal code), CITY_CODE (area code), LONGITUDE (longitude), LATITUDE (latitude), INTEGRATE_INFO (integrated information, which is a set of tokenized detailed information; for example, integrated_info: [BBM1 level security unit, CCM2 level security unit, DDM3 level security unit, EEM4 level security unit, FFN5 level security unit]), STATUS (status) (or set).
[0075] (2.2) In the tree diagram data structure, the root node is an empty node, and the remaining nodes are composed of hierarchical structures such as M1 level security unit, M2 level security unit, M3 level security unit, M4 level security unit, M5 level security unit, M6 level security unit, M7 level security unit, M8 level security unit (or N1 level security unit, which is not specifically limited here). The leaf nodes contain basic units or departments such as N1 level security unit, N2 level security unit, N3 level security unit, N4 level security unit, N5 level security unit, N6 level security unit, N7 level security unit, and N8 level security unit.
[0076] (2.3) Each unit or department in the prefix tree node “value” list corresponds to a node in the tree diagram.
[0077] S103: Split and extract data containing structured information.
[0078] By utilizing keywords, data types of structural information, and data characteristics, structural information can be extracted from data containing structural information (such as text, which will not be elaborated further below, and there are no restrictions on the storage or presentation methods of data containing structural information).
[0079] (3.1) Keywords include M1-level protection unit, M2-level protection unit, M3-level protection unit, M4-level protection unit, M5-level protection unit, M6-level protection unit, M7-level protection unit, M8-level protection unit, N2-level protection unit, N3-level protection unit, N4-level protection unit, N5-level protection unit, N6-level protection unit, N7-level protection unit, N8-level protection unit, etc.; data types cover string type, numeric type, encoding type, etc.; data characteristics include string length, numeric precision, encoding standard, etc.
[0080] (3.2) Construct regular expressions using keywords, data types, and data features. Employ multi-round recursive matching to split data containing structural information (e.g., text) into multiple dimensions, obtaining structural information fragments, and assigning corresponding labels to these fragments. For data from which valid information fragments cannot be extracted using regular expression matching, extract structural information through manual annotation and assign corresponding labels.
[0081] (3.3) The structural information fragments are combined according to the following levels: M1 level security unit, M2 level security unit, M3 level security unit, M4 level security unit, M5 level security unit, M6 level security unit, M7 level security unit, M8 level security unit, and N2 level security unit, N3 level security unit, N4 level security unit, N5 level security unit, N6 level security unit, N7 level security unit, and N8 level security unit, to obtain the set S of structural information tuples to be matched. orig Each piece of information containing structured data (or each piece of structured information or each fragment of structured information, which will not be elaborated further below) corresponds to a set of structured information tuples to be matched.
[0082] S104: Structural information matching and sorting.
[0083] The set S of structural information tuples to be matched orig The tuples in the structure information are matched with the prefix tree and tree diagram (nodes) to obtain the candidate structure information set S. prop Calculate the maximum matching degree between the structural information to be matched and the candidate structural information in the candidate structural information set.
[0084] The matching degree between structural information is calculated using structural information vectors. First, the structural information is transformed into structural information vectors. Then, the matching degree between structural information vectors is obtained by calculating the matching degree of each component (information component) of the structural information vector (e.g., the matching degree between each component in a tuple vector and each component in the corresponding candidate structural information vector). This is expressed by formula (1) as follows (i.e., the formula used to calculate the matching degree between structural information):
[0085]
[0086] in:
[0087] T i ∈S orig This refers to the i-th structural information to be matched;
[0088] P j ∈S prop This refers to the structure information of the j-th candidate;
[0089] VT i Let be the structural information vector corresponding to the i-th structural information to be matched;
[0090] VP j This is the structural information vector corresponding to the j-th candidate structural information;
[0091] VT i (k) is the k-th information component of the i-th structural information vector to be matched;
[0092] VP j (k) is the k-th information component of the j-th candidate structure information vector;
[0093] Match(VT i (k),VP j (k) represents the matching degree between the k-th information components. For string and encoded components, the matching degree is 1 when the two components are the same, and 0 otherwise. For numeric components, the matching degree is 1 when the difference between the two components is less than a given threshold, and 0 otherwise.
[0094] An example of each component in the structural information vector is as follows:
[0095] (M1 level support unit, M2 level support unit, M3 level support unit, M4 level support unit, M5 level support unit, M6 level support unit, M7 level support unit, M8 level support unit, unit code, postal code, area code, longitude, latitude)
[0096] S105: Output standardized structural information or update the structural information database.
[0097] Based on the maximum matching degree obtained from S104, output the normalized structural information or update the structural information knowledge base.
[0098] Suppose the maximum matching result obtained in S104 is:
[0099] (T maxi ,P maxj ,m maxi,maxj =arg max{Match(T i ,P j):T i ∈S orig ,P j ∈S prop}
[0100] (5.1) If the maximum matching degree m maxi,maxj If the value is greater than or equal to a given threshold (usually 2), then output P. maxj As normalized structural information, T is used simultaneously. maxi For P maxj The necessary structural information is supplemented by data containing structural information to expand the structural knowledge base.
[0101] Optionally, when candidate structure information P maxj The state is the historical state (i.e., status: H), which is the candidate structure information P. maxj When the information is historical structural information, P is obtained through association relationships. maxj The corresponding standard structure information currently in use, and P maxj Together, they serve as normalized structural information obtained from data containing structural information; when candidate structural information P maxj The status is pending confirmation (i.e., status: U), which is the candidate structure information P. maxj When structural information is pending confirmation, add P to the structural information knowledge base. maxj Credibility.
[0102] (5.2) If the maximum matching degree m maxi,maxj The set of candidate structural information S is equal to 1. prop There is only one candidate structural information P maxj Then the output is P. maxj As normalized structural information, T is used simultaneously. maxi For P maxj The necessary structural information is supplemented by data containing structural information to expand the structural knowledge base.
[0103] (5.3) If the maximum matching degree m maxi,maxj Equals 0 (i.e., no match for T was found in the structural information prefix tree) maxi If the matching structural information is obtained, then the set S of the structural information tuples to be matched is taken. orig The tuple with the most complete structural information to be matched is marked as pending confirmation (status:U) and added to the structural information knowledge base.
[0104] Exemplary embodiments:
[0105] 1. Raw data:
[0106] BBM Level 1 Security Unit, CCM Level 2 Security Unit, DDM Level 3 Security Unit, EEM Level 4 Security Unit, FFN Level 5 Security Unit
[0107] 2. Obtained through multiple rounds of recursive regular expression matching:
[0108] {BBM Level 1 Security Unit: M1 Security Unit, CCM Level 2 Security Unit: M2 Security Unit, DDM Level 3 Security Unit: M3 Security Unit, EEM Level 4 Security Unit: M4 Security Unit, FFN Level 5 Security Unit: Department}
[0109] 3. Obtain the set of tuples containing the structural information to be matched:
[0110] S orig
[0111] ={(BB M1 Level Security Unit: M1 Level Security Unit, CC M2 Level Security Unit: M2 Level Security Unit, DD M3 Level Security Unit: M3 Level Security Unit, EE M4 Level Security Unit: M4 Level Security Unit, N5 Level Security Unit: Department)}
[0112] 4. Vector of structural information to be matched:
[0113] (BB M1 Level Security Unit: M1 Level Security Unit, CC M2 Level Security Unit: M2 Level Security Unit, DD M3 Level Security Unit: M3 Level Security Unit, EE M4 Level Security Unit: M4 Level Security Unit, N5 Level Security Unit: Department)
[0114] 5. The structural information vector to be matched is matched with the structural information prefix tree and tree graph nodes to obtain the maximum matching degree and normalized structural information:
[0115] BBM Level 1 Security Unit, CCM Level 2 Security Unit, DDM Level 3 Security Unit, EEM Level 4 Security Unit, FFN Level 5 Security Unit
[0116] This disclosure utilizes a structured information knowledge base to construct a prefix tree and a tree diagram for structured information. It splits and extracts data containing structured information using keywords and regular expressions, then matches and sorts this data with nodes in the prefix tree and tree diagram to obtain standardized structured information or update the structured information knowledge base. This achieves the matching and standardization of structured information while recording the optimization and adjustment process, ensuring the standardization and consistency of the structured information.
[0117] It should be noted that the collection, storage, use, processing, transmission, provision and disclosure of data and other information involved in the technical solution disclosed herein all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0118] The technical solutions of this disclosure will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0119] Structural information refers to the systematic arrangement of departments, positions, and their interrelationships within an organization. It defines the organization's hierarchical relationships, division of responsibilities, reporting paths, and collaboration methods, serving as the fundamental framework for organizational management and operation. The following section uses structural information in a security scenario as an example to explain in detail the methods for processing structural information.
[0120] This disclosure provides a structural information processing method, such as... Figure 3 As shown, the method includes the following steps S301 to S306:
[0121] S301: Construct a structural information knowledge base, which includes structural information and corresponding states. The structural information includes at least one of the following: currently used standard structural information, historical structural information, and structural information to be confirmed. The state corresponding to the standard structural information is a standard state, the state corresponding to the historical structural information is a historical state, and the structural information to be confirmed is a state to be confirmed.
[0122] S302: Based on the structural information and the corresponding state, construct the prefix tree and tree diagram corresponding to the structural information.
[0123] S303: Determine the set of tuples of structural information to be matched based on the structural information; one structural information corresponds to one tuple in the set of tuples of structural information to be matched.
[0124] S304: For each tuple in the set of tuples of structural information to be matched, match the tuple with the prefix tree and the tree diagram respectively to obtain the set of candidate structural information corresponding to the tuple, and calculate the maximum matching degree between the tuple and each candidate structural information in the set of candidate structural information.
[0125] S305: Based on the target candidate structure information corresponding to the maximum matching degree, determine the target structure information corresponding to the structure information, wherein the target structure information is used to represent the normalized structure information.
[0126] S306: Update the structural information knowledge base according to the target structural information to standardize the structural information in the structural information knowledge base, and record the association between historical structural information and standard structural information in the structural information knowledge base.
[0127] In this embodiment, a structural information knowledge base is constructed by collecting structural information. Based on the structural information to be standardized and its corresponding state in the structural information knowledge base, a prefix tree and tree diagram corresponding to the structural information are constructed to match the structural information to be matched. By calculating the matching degree and sorting, standardized structural information is obtained to update the structural information knowledge base, thereby outputting standardized structural information. The state corresponding to the structural information is also adjusted, and the relationship between historical structural information and standard structural information in the structural information knowledge base is recorded. This provides a basis for the adjustment process from historical structural information to standard structural information, achieving the goal of uniformly standardizing all structural information in the structural information knowledge base while recording the optimization and adjustment process of structural information. This achieves efficient standardization while tracking and recording the adjustment process of structural information, ensuring that the structural information from various systems has standardization and consistency.
[0128] Specifically, based on the structural information data collected from various business information systems, a structural information knowledge base is constructed by extracting structural information. Each piece of data containing structural information (or each or every piece of structural information in the constructed structural information knowledge base, or other structural data in the constructed structural information knowledge base besides standard structural data) can be treated as structural information to be standardized and subjected to standardization processing. The structural information in this knowledge base can include three types of data: currently used standardized structural information (i.e., currently used standard structural information), historical structural information, and structural information to be confirmed.
[0129] One or more pieces of structural information to be normalized correspond to a set of structural information to be matched or a tuple in a set of tuples containing structural information to be matched. For each tuple in the set of tuples containing structural information to be matched, matching and sorting operations are performed, and the normalized structural information corresponding to the target candidate structural information for each tuple or each principle is determined. Specifically, the following operations are performed on each tuple:
[0130] Calculate the matching degree between the current tuple and each candidate structure information in its corresponding candidate structure information set, and sort the matching degrees.
[0131] The result corresponding to the maximum matching degree is determined. The result corresponding to the maximum matching degree includes the current tuple or the structural information to be normalized corresponding to the current tuple, the maximum matching degree value, and the target candidate structural information in the set of candidate structural information corresponding to the current tuple. Here, the target candidate structural information refers to the candidate structural information for which the maximum matching degree is calculated.
[0132] Optionally, the construction of the structural information knowledge base includes:
[0133] Obtain structural information of each unit or part and corresponding structural optimization and adjustment log information; wherein, the structural information includes at least one of the following: full name, abbreviation, alias or code, level, unit code, parent unit code, postal code, area code, longitude, and latitude; the structural optimization and adjustment log information includes changes in old and new names and changes in affiliation; the structural optimization and adjustment log information is used to query historical structural information and determine the status of the structural information;
[0134] A structural information knowledge base is generated based on the structural information of each unit or part and the corresponding structural optimization and adjustment log information; wherein, the historical structural information and standard structural information in the structural information knowledge base are linked through foreign keys.
[0135] In this embodiment of the disclosure, combined with Figure 4 As shown, Figure 4 The diagram illustrates the Entity-Relationship (ER) structure of the structured information knowledge base. The knowledge base contains hierarchical structured information, including M1-level, M2-level, M3-level, M4-level, M5-level, M6-level, M7-level, and M8-level support units. Within the knowledge base (referring to the structured information knowledge base, which will not be elaborated further below), each unit or department can contain at least one of the following structural information: full name, short name, alias or code, level, unit code, parent unit code, postal code, city code, longitude, and latitude. The full name (name) includes the complete name of the unit, such as BBM1 level support unit, CCM2 level support unit, DDM3 level support unit, EEM4 level support unit, and FFN5 level support unit; the abbreviation (short_name) is the name of the unit or department agreed upon within the organization, such as the Political Work Department or the Meteorological Station. The unit and department information will be gradually improved during system use.
[0136] The knowledge base contains three types of structural information: the standard structural information currently in use (S), the historical structural information (H) that has been abandoned due to reorganization and diversion, and the unconfirmed structural information (U) whose nature cannot be determined at the moment.
[0137] To enable querying historical structural information, the knowledge base includes structural optimization and adjustment logs, such as changes in names and ownership relationships. To track and record the structural adjustment process, historical and standard structural information are linked via foreign keys.
[0138] Optionally, constructing the prefix tree and tree diagram corresponding to the structural information based on the structural information and the corresponding state includes:
[0139] Based on the structural information and the corresponding state, key-value pairs are determined; wherein, the key in the key-value pair is an abbreviation of a unit or department, and the value in the key-value pair is a detailed list or set of information of the unit or department with the same abbreviation;
[0140] Based on the key-value pairs, the prefix tree is constructed, and the corresponding state is recorded in the prefix tree;
[0141] Generate a tree diagram based on the structural information;
[0142] The fusion information in the detailed information is a word segmentation array, which corresponds to the nodes in the tree diagram.
[0143] In this embodiment of the disclosure, a prefix tree and a tree diagram of structural information are constructed using at least one of the standard structural information (S), historical structural information (H), and structural information to be confirmed (U) in the information knowledge base. In the prefix tree nodes and tree diagram nodes (or nodes in the tree diagram), a status is used to distinguish different types of structural data (or structural information, which will not be elaborated further below). Initially, when constructing the knowledge base, one unit or department corresponds to at least one node, which is a one-to-many relationship. The goal is for one unit or department to correspond to one node, achieving consistency in structural information. However, one node may correspond to multiple units.
[0144] Specifically, the prefix tree node consists of key-value pairs. The "key" is the abbreviation of the unit or department, and the "value" is a list (or set) of details for units or departments with the same abbreviation. For ease of data comparison and verification, the integrated information (integrate_info) within the details (here referring to the detailed information) is a word segmentation array, corresponding to the nodes in the tree diagram. See [link to relevant documentation]. Figure 5 As shown, Figure 5 The diagram illustrates the prefix tree data structure and the tree graph data structure, where Figure 5 The left side shows the prefix tree data structure (containing the root node and the remaining nodes which are composed of "key-value pairs"; the remaining nodes include: Operation and Maintenance / key: FFN5 level support unit / key: weather station; among which, the Operation and Maintenance node contains key: A Operation and Maintenance Research Institute / key: B Operation and Maintenance Support Team); Figure 5The right side shows a tree-structured data structure (BBM1 level protection unit <- CCM2 level protection unit <- DDM3 level protection unit <- EEM4 level protection unit <- FFN5 level protection unit). For example, a prefix tree (or prefix tree nodes).
[0145]
[0146]
[0147] Corresponding to the nodes in the tree diagram:
[0148] BBM Level 1 Security Unit <- CCM Level 2 Security Unit <- DDM Level 3 Security Unit <- EEM Level 4 Security Unit <- FFN Level 5 Security Unit
[0149] Optionally, determining the set of tuples of structural information to be matched based on the structural information includes:
[0150] Based on the keywords, the data type of the structural information, and the data characteristics, a multi-round recursive regular expression matching method is used to extract the information at each level and the attribute information from the structural information, and to mark the information at each level and the attribute information with corresponding labels. The data type includes: string type, numeric type, and encoding type. The data characteristics include: string length, numeric precision, and encoding standard. The attribute information includes at least one of the following: unit code, postal code, area code, longitude, and latitude.
[0151] The extracted information from each level is combined according to the level, and non-compliant combinations are eliminated to obtain a set of tuples of structural information to be matched corresponding to the structural information.
[0152] In this embodiment, a regular expression is constructed based on keywords such as M1-level protection unit, M2-level protection unit, M3-level protection unit, M4-level protection unit, M5-level protection unit, M6-level protection unit, M7-level protection unit, M8-level protection unit, N2-level protection unit, N3-level protection unit, N4-level protection unit, N5-level protection unit, N6-level protection unit, N7-level protection unit, and N8-level protection unit, as well as data types and characteristics such as unit code, postal code, area code, longitude, and latitude. The keywords, data types, data characteristics, and regular expressions are stored in a configuration file, which can be expanded and adjusted as needed. This configuration file is stored in a Redis cache and persisted on the application system server.
[0153] To extract structural information to the maximum extent and with the highest accuracy, a multi-round recursive regular expression matching method is used to split the data containing structural information into multiple dimensions, extracting abbreviations of information at each level, as well as information such as unit code, postal code, area code, longitude, and latitude (which can refer to attribute information), and assigning corresponding labels (e.g., M1 level security unit, M2 level security unit, M3 level security unit, M4 level security unit, N5 level security unit, etc.). For example, "BBM1 level security unit, CCM2 level security unit, DDM3 level security unit, EEM4 level security unit, FFN5 level security unit" is obtained through multi-round recursive regular expression matching:
[0154] {BBM Level 1 Security Unit: M1 Security Unit, CCM Level 2 Security Unit: M2 Security Unit, DDM Level 3 Security Unit: M3 Security Unit, EEM Level 4 Security Unit: M4 Security Unit, FFN Level 5 Security Unit: Department}
[0155] The extracted information is combined according to the levels of "M1 level protection unit, M2 level protection unit, M3 level protection unit, M4 level protection unit, M5 level protection unit, M6 level protection unit, M7 level protection unit, M8 level protection unit", and after removing unreasonable combinations, the set S of structural information tuples to be matched is obtained. orig For example, the set of tuples (referring to the set of tuples containing the structural information to be matched) obtained from the combination of "{BBM1 level security unit: M1 level security unit, CCM2 level security unit: M2 level security unit, DDM3 level security unit: M3 level security unit, EEM4 level security unit: M4 level security unit, FFN5 level security unit: department}" is as follows:
[0156] {(BBM Level 1 Support Unit: M1 Support Unit, CCM Level 2 Support Unit: M2 Support Unit, DDM Level 3 Support Unit: M3 Support Unit, EEM Level 4 Support Unit: M4 Support Unit, FFN Level 5 Support Unit: Department)}
[0157] Example of eliminating unreasonable combinations:
[0158] XXM8-level protection unit, YYM6-level protection unit, XXM2-level protection unit system application department
[0159] For data containing structural information that cannot be extracted using regular expression matching, the structural information is extracted manually and assigned corresponding labels.
[0160] Optionally, the step of matching the tuple with the prefix tree and the tree graph respectively to obtain the candidate structure information set corresponding to the tuple includes:
[0161] The tuple is searched in the prefix tree to obtain the prefix tree matching result, which includes all the prefix paths to be matched and the matched nodes;
[0162] Based on the prefix tree matching result, the node corresponding to the tree diagram is located, and the matching status of the tuple with the node and its child nodes in the tree diagram is checked to obtain the candidate structure information set corresponding to the tuple.
[0163] In this context, a structural information to be normalized (e.g., data containing structural information to be normalized) corresponds to a structural information tuple to be matched or a set of structural information tuples to be matched (which may include a single tuple). The structural information to be normalized can be each structural information in the constructed structural information knowledge base, or it can be at least one of the following: standard structural information, historical structural information, and structural information to be confirmed (e.g., other structural information besides standard structural information).
[0164] The following example uses each structural information in the constructed structural information knowledge base (not repeated below). Based on each data containing structural information or each structural information, we can determine each corresponding structural information tuple to be matched, thereby forming a set of structural information tuples to be matched. Then, for each tuple to be matched (i.e., structural information tuples or tuples to be matched, not repeated below), we can generate a set of candidate matching items. For example, a tuple corresponds to at least one candidate structural information.
[0165] In this embodiment of the disclosure, taking a tuple as an example, the information at each level in the tuple of structural information to be matched is matched with the nodes of the structural information prefix tree and the tree diagram (or the tree diagram, which will not be described in detail below), and the details of the matching results are stored in the candidate structural information set.
[0166] Specifically, the matching process includes:
[0167] Step a1. Tuple preprocessing: Standardize each tuple of structural information to be matched. This may include word segmentation, noise reduction, normalization, etc.
[0168] Step a2. Prefix tree matching: Search the prefix tree for each tuple to find all possible matching prefix paths; record the matched nodes and the degree of matching.
[0169] Step a3. Tree Graph Node Matching: Based on the prefix tree matching results, locate the corresponding node in the tree graph. Check the matching between tuples and nodes and their child nodes, considering relationships such as sibling nodes and parent-child nodes.
[0170] Step a4. Candidate Set Generation: Generate a set of candidate matches for each tuple to be matched. Each candidate contains a matching node and a matching score, for example: retain the top-K most matching candidates.
[0171] The matching algorithm can be implemented using one or a combination of the following methods:
[0172] Path matching degree: The degree to which the tuple path matches the tree path;
[0173] Node attribute matching: similarity of attributes such as name, type, and level;
[0174] Structural similarity: similarity in positional relationships within a tree structure;
[0175] Fuzzy matching: handles cases where names are not exactly the same but semantically similar.
[0176] The final output is a "candidate structure information set", in which each tuple to be matched corresponds to a set of possible matching results, which can be used for subsequent precise matching or manual verification.
[0177] Optionally, calculating the maximum matching degree between the tuple and each candidate structural information in the candidate structural information set includes:
[0178] The tuple and each candidate structural information in the candidate structural information set are respectively converted into structural information vectors;
[0179] The matching degree between the tuple and each candidate structural information in the candidate structural information set is obtained by calculating the matching degree of each component in the structural information vector corresponding to each candidate structural information in the candidate structural information set.
[0180] The matching degree between the tuple and each candidate structure information in the candidate structure information set is sorted to obtain the maximum matching degree.
[0181] In this embodiment of the disclosure, the structural information T to be matched is calculated through the following steps. i ∈S orig (Or refers to the i-th tuple in the set of structure information tuples to be matched, which will not be elaborated further below) and candidate structure information P j ∈S prop Match degree between them:
[0182] Step b1: Transfer the structural information T to be matched i ∈S orig and candidate structure information P j ∈S prop They are respectively converted into structural information vectors VT to be matched. i and candidate structure information vector VP jAn example of each component in the structural information vector is as follows:
[0183] (M1 level support unit, M2 level support unit, M3 level support unit, M4 level support unit, M5 level support unit, M6 level support unit, M7 level support unit, M8 level support unit, unit code, postal code, area code, longitude, latitude)
[0184] Step b2: Calculate the structural information vector VT to be matched. i and candidate structure information vector VP j The matching degree m between them ij := Match(VT i ,VP j (Combined with the above formula (1)), where the matching degree is the sum of the matching degrees of each component in the structural information vector. For string type components such as M1-level protection unit, M2-level protection unit, M3-level protection unit, M4-level protection unit, M5-level protection unit, M6-level protection unit, M7-level protection unit, M8-level protection unit, unit code, postal code, area code, etc., the matching degree is 1 when the two components are the same, otherwise the matching degree is 0; for numerical type components such as longitude and latitude, the matching degree is 1 when the difference between the two components is less than a given threshold, otherwise the matching degree is 0.
[0185] Step b3: Sort the matching degree between the structure information to be matched and the candidate structure information, and output (T) i ,P j ,m ij ,k ij ), where T i ∈S orig For the i-th structural information to be matched, P j ∈S prop For the j-th candidate structure information, mi j For the structural information T to be matched i and candidate structure information P j The degree of matching between them, k ij Sort the results by matching degree.
[0186] Optionally, determining the target structure information corresponding to the structure information based on the target candidate structure information corresponding to the maximum matching degree includes:
[0187] If the maximum matching degree is greater than or equal to a preset threshold, then based on the state recorded in the structure information knowledge base by the target candidate structure information, the target structure information corresponding to the structure information is determined, and based on the structure information to be matched corresponding to the tuple, the target candidate structure information is filled with necessary information to expand the structure information knowledge base; wherein, the state includes standard state, historical state and pending confirmation state;
[0188] If the maximum matching degree is equal to 1 and the candidate structure information set contains a candidate structure information, then the target candidate structure information is used as the target structure information, and based on the structure information to be matched corresponding to the tuple, the target candidate structure information is filled with necessary information to expand the structure information knowledge base;
[0189] If the maximum matching degree is equal to 0, then the most complete structural information corresponding to the tuple is obtained, and the most complete structural information is marked as pending confirmation, in order to update the structural information knowledge base.
[0190] Optionally, determining the target structure information corresponding to the structure information based on the state recorded in the structure information knowledge base according to the target candidate structure information includes:
[0191] When the target candidate structure information is recorded as a historical state in the structure information knowledge base (i.e., the target candidate structure information is historical structure information), the standard structure information currently used corresponding to the target candidate structure information is obtained through the association relationship. The standard structure information currently used corresponding to the target candidate structure information and the target candidate structure information are used together as the target structure information to adjust the structure information to be matched corresponding to the maximum matching degree to the standard structure information, and at the same time adjust the credibility or state corresponding to the structure information to be matched and / or the target candidate structure information.
[0192] When the target candidate structure information is recorded as a standard state in the structure information knowledge base, the target candidate structure information is used as the target structure information;
[0193] When the status of candidate structure information is pending confirmation, the credibility of the candidate structure information in the structure information knowledge base is increased.
[0194] The structural information knowledge base is updated using the target structural information.
[0195] In this embodiment of the disclosure, the result with the highest matching degree (T) is obtained. maxi ,P maxj ,m maxi,maxjThe result corresponding to the maximum matching degree includes the structure information to be matched, the target candidate structure information, and the maximum matching degree.
[0196] Specifically, if the maximum matching degree m maxi,maxj Greater than or equal to a given threshold (usually 2, representing T) maxi With P maxj If at least two data items are identical, then output P. maxj As normalized structural information obtained from data containing structural information, and simultaneously, using the structural information T to be matched. maxi For candidate structural information P maxj This involves filling in the necessary information to expand the structural knowledge base. Specifically, when candidate structural information P... maxj When the status is historical structural information (i.e., status: H), then P is obtained through the association relationship. maxj The corresponding standard structure information currently in use, and P maxj Together, they serve as normalized structural information obtained from data containing structural information; when candidate structural information P maxj When the status is pending confirmation (i.e., status: U), then add P to the structure information knowledge base. maxj Credibility.
[0197] If the maximum matching degree is m maxi,maxj Equal to 1 (i.e., T) maxi With P maxj (Only one data item is the same), and the candidate structure information set S prop There is only one candidate structural information P maxj Then the output is P. maxj As normalized structural information obtained from data containing structural information, T is used simultaneously. maxi For P maxj The structural information in the knowledge base is supplemented as necessary, that is, the knowledge base is supplemented with data containing structural information.
[0198] If the maximum matching degree is m maxi,maxj Equals 0 (i.e., no match for T was found in the structural information prefix tree) maxi If the matching structural information is obtained, then the set S of the structural information tuples to be matched is taken. orig The tuple with the most complete structure information to be matched is marked as pending confirmation (status:U) and added to the structure information knowledge base.
[0199] As can be seen from the above description, this disclosure achieves the following technical effects: it constructs prefix trees and tree graph data structures using structural information, uses prefix trees and tree graph data structures to achieve matching and standardization of structural information, and records the optimization and adjustment process of structural information to ensure the standardization and consistency of structural information.
[0200] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0201] This disclosure also provides a structural information processing system for implementing the above-described method embodiments. It includes three main modules: a data splitting and extraction module, an information matching and sorting module, and a knowledge base updating module.
[0202] The data splitting and extraction module is used to determine the set of tuples of structural information to be matched based on the structural information to be normalized; wherein one or one piece of structural information to be normalized corresponds to one tuple in the set of tuples of structural information to be matched.
[0203] The information matching and sorting module is used to match each tuple in the set of structural information to be matched with the prefix tree and the tree diagram respectively, to obtain the set of candidate structural information corresponding to the tuple, and to calculate the matching degree between the tuple and each candidate structural information in the set of candidate structural information. By sorting the matching degrees, the maximum matching degree between the tuple and each candidate structural information in the set of candidate structural information is determined. Based on the target candidate structural information corresponding to the maximum matching degree, the target structural information corresponding to the tuple is determined; the target structural information is used to represent normalized structural information.
[0204] The knowledge base update module is used to update the structure information knowledge base according to the target structure information, so as to standardize the structure information in the structure information knowledge base and record the association between historical structure information and standard structure information in the structure information knowledge base.
[0205] Specifically, the data splitting and extraction module is mainly used to split and extract organizational information from structured data (text), including information at each level such as M1, M2, M3, M4, M5, M6, M7, and M8 support units, as well as unit codes, postal codes, area codes, longitude, latitude, etc. It then combines the structured information hierarchically to obtain the structured information to be matched (corresponding to a tuple). This module maintains the data types and characteristics of keywords and structured information, as well as a list of regular expressions, which can be expanded and adjusted as needed.
[0206] Information matching and sorting module: mainly used to match the structural information to be matched with the structural information in the address prefix tree and tree diagram, calculate the matching degree and sort it to obtain the normalized structural information.
[0207] The knowledge base update module is mainly used to maintain standard structure information, historical structure information, and structure information to be confirmed, as well as to build and update the address prefix tree and tree diagram based on the structure information knowledge base information.
[0208] This disclosure utilizes structural information to construct prefix trees and tree graph data structures, and uses these data structures to achieve matching and standardization of structural information. Simultaneously, it records the optimization and adjustment process of structural information to ensure the standardization and consistency of structural information.
[0209] This disclosure also provides a structural information processing apparatus for implementing the above-described method embodiments, such as... Figure 6 As shown, the structural information processing device 60 includes:
[0210] The first processing unit 601 is used to construct a structural information knowledge base, which includes structural information and corresponding states. The structural information includes at least one of the following: currently used standard structural information, historical structural information, and structural information to be confirmed. The state corresponding to the standard structural information is a standard state, the state corresponding to the historical structural information is a historical state, and the structural information to be confirmed is a state to be confirmed.
[0211] The second processing unit 602 is used to construct a prefix tree and a tree diagram corresponding to the structural information based on the structural information and the corresponding state.
[0212] The third processing unit 603 is used to determine a set of tuples of structural information to be matched based on the structural information; one structural information corresponds to one tuple in the set of tuples of structural information to be matched.
[0213] The fourth processing unit 604 is used to match each tuple in the set of tuples of structural information to be matched with the prefix tree and the tree diagram respectively, to obtain the set of candidate structural information corresponding to the tuple, and to calculate the maximum matching degree between the tuple and each candidate structural information in the set of candidate structural information.
[0214] The fifth processing unit 605 is used to determine the target structure information corresponding to the structure information based on the target candidate structure information corresponding to the maximum matching degree, wherein the target structure information is used to represent the normalized structure information;
[0215] The sixth processing unit 606 is used to update the structure information knowledge base according to the target structure information, so as to standardize the structure information in the structure information knowledge base and record the association between historical structure information and standard structure information in the structure information knowledge base.
[0216] Optionally, when the third processing unit 603 performs the step of determining the set of tuples of structural information to be matched based on the structural information, it specifically includes:
[0217] Based on the keywords, the data type of the structural information, and the data characteristics, a multi-round recursive regular expression matching method is used to extract the information at each level and the attribute information from the structural information, and to mark the information at each level and the attribute information with corresponding labels. The data type includes: string type, numeric type, and encoding type. The data characteristics include: string length, numeric precision, and encoding standard. The attribute information includes at least one of the following: unit code, postal code, area code, longitude, and latitude.
[0218] The extracted information from each level is combined according to the level, and non-compliant combinations are eliminated to obtain a set of tuples of structural information to be matched corresponding to the structural information.
[0219] Optionally, the fourth processing unit 604, when performing the matching of the tuple with the prefix tree and the tree diagram respectively to obtain the candidate structure information set corresponding to the tuple, specifically includes:
[0220] The tuple is searched in the prefix tree to obtain the prefix tree matching result, which includes all the prefix paths to be matched and the matched nodes;
[0221] Based on the prefix tree matching result, the node corresponding to the tree diagram is located, and the matching status of the tuple with the node and its child nodes in the tree diagram is checked to obtain the candidate structure information set corresponding to the tuple.
[0222] Optionally, the fourth processing unit 604, when calculating the maximum matching degree between the tuple and each candidate structural information in the candidate structural information set, specifically includes:
[0223] The tuple and each candidate structural information in the candidate structural information set are respectively converted into structural information vectors;
[0224] The matching degree between the tuple and each candidate structural information in the candidate structural information set is obtained by calculating the matching degree of each component in the structural information vector corresponding to each candidate structural information in the candidate structural information set.
[0225] The matching degree between the tuple and each candidate structure information in the candidate structure information set is sorted to obtain the maximum matching degree.
[0226] Optionally, when the fifth processing unit 605 determines the target structure information corresponding to the structure information based on the target candidate structure information corresponding to the maximum matching degree, it specifically includes:
[0227] If the maximum matching degree is greater than or equal to a preset threshold, then based on the state recorded in the structure information knowledge base by the target candidate structure information, the target structure information corresponding to the structure information is determined, and based on the structure information to be matched corresponding to the tuple, the target candidate structure information is filled with necessary information to expand the structure information knowledge base; wherein, the state includes standard state, historical state and pending confirmation state;
[0228] If the maximum matching degree is equal to 1 and the candidate structure information set contains a candidate structure information, then the target candidate structure information is used as the target structure information, and based on the structure information to be matched corresponding to the tuple, the target candidate structure information is filled with necessary information to expand the structure information knowledge base;
[0229] If the maximum matching degree is equal to 0, then the most complete structural information corresponding to the tuple is obtained, and the most complete structural information is marked as pending confirmation, in order to update the structural information knowledge base.
[0230] Optionally, when the second processing unit 602 constructs the prefix tree and tree diagram corresponding to the structure information based on the structure information and the corresponding state, it specifically includes:
[0231] Based on the structural information and the corresponding state, key-value pairs are determined; wherein, the key in the key-value pair is an abbreviation of a unit or department, and the value in the key-value pair is a detailed list or set of information of the unit or department with the same abbreviation;
[0232] Based on the key-value pairs, the prefix tree is constructed, and the corresponding state is recorded in the prefix tree;
[0233] Generate a tree diagram based on the structural information;
[0234] The fusion information in the detailed information is a word segmentation array, which corresponds to the nodes in the tree diagram.
[0235] Optionally, the first processing unit 601, when performing the construction of the structural information knowledge base, specifically includes:
[0236] Obtain structural information of each unit or part and corresponding structural optimization and adjustment log information; wherein, the structural information includes at least one of the following: full name, abbreviation, alias or code, level, unit code, parent unit code, postal code, area code, longitude, and latitude; the structural optimization and adjustment log information includes changes in old and new names and changes in affiliation; the structural optimization and adjustment log information is used to query historical structural information and determine the status of the structural information;
[0237] A structural information knowledge base is generated based on the structural information of each unit or part and the corresponding structural optimization and adjustment log information; wherein, the historical structural information and standard structural information in the structural information knowledge base are linked through foreign keys.
[0238] The specific methods of execution of each unit in the above device embodiments have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0239] This disclosure also provides an electronic device, such as... Figure 7 As shown, the electronic device includes one or more processors 71 and a memory 72. Figure 7 Take a processor 71 as an example.
[0240] The controller may also include an input device 73 and an output device 74.
[0241] The processor 71, memory 72, input device 73, and output device 74 can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.
[0242] Processor 71 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips. The general-purpose processor can be a microprocessor or any conventional processor.
[0243] The memory 72, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the control method in the embodiments of this disclosure. The processor 71 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions, and modules stored in the memory 72, thereby implementing the structural information processing method of the above-described method embodiments.
[0244] The memory 72 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the use of the processing device operated by the server. Furthermore, the memory 72 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 72 may optionally include memory remotely located relative to the processor 71, and these remote memories can be connected to a network connection device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0245] Input device 73 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the server's processing device. Output device 74 may include display devices such as a display screen.
[0246] One or more modules are stored in memory 72 and, when executed by one or more processors 71, perform the methods described above.
[0247] This disclosure also provides a computer-readable storage medium storing computer instructions for causing a computer to execute the structured information processing method described above.
[0248] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the structural information processing method described above.
[0249] Those skilled in the art will understand that all or part of the processes in the above method embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes as described in the above method embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory (FM), hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium can also include combinations of the above types of memory.
[0250] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A structural information processing method characterized by comprising: The application comprises the following steps: constructing a structure information knowledge base, wherein the structure information knowledge base comprises structure information and corresponding states, and the structure information comprises at least one of the following: current standard structure information, historical structure information and to-be-confirmed structure information; the standard structure information corresponds to a standard state, the historical structure information corresponds to a historical state, and the to-be-confirmed structure information is in a to-be-confirmed state; constructing a prefix tree and a tree graph corresponding to the structure information according to the structure information and the corresponding states, wherein the root node of the prefix tree is an empty node, and the remaining nodes are composed of "key-value pairs", wherein the "key" comprises an abbreviation, and the "value" comprises a list composed of a level, a unit code and a parent unit code; the "value" of each node of the prefix tree corresponds to a node in the tree graph; splitting and extracting data containing structure information to obtain a structure information segment; determining a set of to-be-matched structure information tuples according to the structure information segment; one structure information segment corresponds to one tuple in the set of to-be-matched structure information tuples; matching each tuple in the set of to-be-matched structure information tuples in the prefix tree to obtain a prefix tree matching result, locating a node corresponding to the tree graph according to the prefix tree matching result, obtaining sibling node relationships and parent-child node relationships in the tree graph, checking the matching of the tuple with the node corresponding to the tree graph and its child nodes, the sibling node relationships and the parent-child node relationships, obtaining a set of candidate structure information corresponding to the tuple, and calculating the maximum matching degree between the tuple and each candidate structure information in the set of candidate structure information; determining target structure information corresponding to the structure information according to target candidate structure information corresponding to the maximum matching degree, wherein the target structure information is used to represent normalized structure information; updating the structure information knowledge base according to the target structure information, so as to normalize the structure information in the structure information knowledge base and record the association between the historical structure information and the standard structure information in the structure information knowledge base.
2. The method of claim 1, wherein, The method comprises the following steps: extracting hierarchical information and attribute information from the structure information in multiple rounds of recursive regular matching according to keywords, data types and data characteristics of the structure information, and marking corresponding labels on the hierarchical information and the attribute information; the data types comprise string type, numerical value type and coding type; the data characteristics comprise string length, numerical value precision and coding standard; and the attribute information comprises at least one of the following: unit code, postal code, area code, longitude and latitude. combining the extracted hierarchical information according to the levels, and obtaining the set of to-be-matched structure information tuples corresponding to the structure information by eliminating irregular combinations.
3. The method of claim 1, wherein, The method comprises the following steps: The prefix tree matching result comprises all to-be-matched prefix paths and matched nodes.
4. The method of claim 1, wherein, The calculating the maximum matching degree between the tuple and each candidate structure information in the candidate structure information set comprises: transforming the tuple and each candidate structure information in the candidate structure information set into structure information vectors respectively; obtaining the matching degree between the tuple and each candidate structure information in the candidate structure information set by calculating the matching degree of each component in the structure information vectors corresponding to the tuple and each candidate structure information in the candidate structure information set respectively; sorting the matching degrees between the tuple and each candidate structure information in the candidate structure information set to obtain the maximum matching degree.
5. The method of claim 1, wherein, The determining the target structure information corresponding to the structure information according to the target candidate structure information corresponding to the maximum matching degree comprises: if the maximum matching degree is greater than or equal to a preset threshold, determining the target structure information corresponding to the structure information according to the state recorded in the structure information knowledge base, and performing necessary information filling on the target candidate structure information based on the to-be-matched structure information corresponding to the tuple, so as to expand the structure information knowledge base; wherein the state comprises a standard state, a historical state and a to-be-confirmed state; if the maximum matching degree is equal to 1 and the candidate structure information set contains one candidate structure information, taking the target candidate structure information as the target structure information, and performing necessary information filling on the target candidate structure information based on the to-be-matched structure information corresponding to the tuple, so as to expand the structure information knowledge base; if the maximum matching degree is equal to 0, obtaining the structure information corresponding to the tuple with the most complete information, and marking the structure information with the most complete information as a to-be-confirmed state, so as to update the structure information knowledge base.
6. The method according to any one of claims 1 to 5, characterized in that, The constructing a prefix tree and a tree graph corresponding to the structure information according to the structure information and the corresponding state comprises: determining a key-value pair according to the structure information and the corresponding state; wherein the key in the key-value pair is the abbreviation of a unit or a department, and the value in the key-value pair is a detail list or set composed of detailed information of the unit or the department with the same abbreviation; based on the key-value pair, constructing the prefix tree and recording the corresponding state in the prefix tree; generating a tree graph according to the structure information; wherein the fusion information in the detailed information is a token array and corresponds to a node in the tree graph.
7. The method according to any one of claims 1 to 5, characterized in that, The constructing a structure information knowledge base comprises: obtaining the structure information of each unit or part and the corresponding structure optimization adjustment log information; wherein the structure information comprises at least one of the following: full name, abbreviation, alias or code, level, unit code, parent unit code, postcode, area code, longitude, latitude, the structure optimization adjustment log information comprises new and old name change, affiliation relationship change; the structure optimization adjustment log information is used for querying historical structure information and determining the state of the structure information; According to the structural information of each unit or part and the corresponding structural optimization adjustment log information, a structural information knowledge base is generated; wherein the historical structural information in the structural information knowledge base is associated with the standard structural information through an external key.
8. A structural information processing apparatus characterized by comprising: Comprise: A first processing unit is configured to construct a structural information knowledge base, wherein the structural information knowledge base comprises structural information and corresponding states, and the structural information comprises at least one of the following: current standard structural information, historical structural information, and to-be-confirmed structural information; the state corresponding to the standard structural information is a standard state, the state corresponding to the historical structural information is a historical state, and the to-be-confirmed structural information is in a to-be-confirmed state; A second processing unit is configured to construct a prefix tree and a tree graph corresponding to the structural information according to the structural information and the corresponding states; in the prefix tree, a root node is an empty node, and the remaining nodes are composed of "key-value pairs", wherein the "key" comprises an abbreviation, and the "value" comprises a list composed of a level, a unit code, and a parent unit code; the "values" of the nodes in the prefix tree correspond to the nodes in the tree graph respectively; a third processing unit is configured to split and extract data containing structural information to obtain a structural information segment; according to the structural information segment, a set of to-be-matched structural information tuples is determined; one structural information segment corresponds to one tuple in the set of to-be-matched structural information tuples; A fourth processing unit is configured to match each tuple in the set of to-be-matched structural information tuples in the prefix tree to obtain a prefix tree matching result, locate a node corresponding to the tree graph according to the prefix tree matching result, obtain sibling node relationships and parent-child node relationships in the tree graph, and check the matching of the tuple with the node corresponding to the tree graph and its child nodes, the sibling node relationships, and the parent-child node relationships to obtain a set of candidate structural information corresponding to the tuple, and calculate the maximum matching degree between the tuple and each candidate structural information in the set of candidate structural information; A fifth processing unit is configured to determine target structural information corresponding to the structural information according to target candidate structural information corresponding to the maximum matching degree, wherein the target structural information is used to represent standardized structural information; A sixth processing unit is configured to update the structural information knowledge base according to the target structural information, so as to standardize the structural information in the structural information knowledge base, and record the association relationship between the historical structural information and the standard structural information in the structural information knowledge base.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a computer to execute the structural information processing method of any one of claims 1 to 7.
10. An electronic device, comprising: The electronic device comprises at least one processor and a memory connected in communication with 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 to cause the at least one processor to execute the structural information processing method of any one of claims 1 to 7.
Citation Information
Patent Citations
Data structure chart generation method and device, data structure chart updating method and device, electronic equipment and storage medium
CN113282795A
Information input method and device, equipment, storage medium and program product
CN115113740A