Form mapping method and device, equipment, medium and program product
By using a preset model and city knowledge system to build a relationship network in form mapping, the problems of low flexibility and high cost in heterogeneous form field mapping are solved, achieving more accurate semantic parsing and structured output, and improving data processing efficiency and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies have low flexibility and high cost when mapping heterogeneous form fields, relying on predefined rules or manually labeled data, resulting in low processing efficiency.
By inputting form fields, entity attributes of the city knowledge system, and prompt information into a preset model, candidate attributes are output, and a relationship network is constructed based on the relationships between entities. A large language model is used for dynamic constraints and logical reasoning to filter out the target candidate attributes and entity mapping relationships with the most similar semantics.
It achieves more accurate parsing and structured output of complex field semantics with zero additional training cost, improves processing flexibility, provides more efficient and reliable data support, and lays the foundation for collaborative analysis of heterogeneous forms.
Smart Images

Figure CN121786041A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, specifically to a form mapping method, apparatus, device, medium, and program product. Background Technology
[0002] With the continuous digital development of public services, data sharing and mutual recognition have become an inherent requirement for improving service efficiency. It is not only a prerequisite for breaking down information silos and unlocking the value of data, but also a fundamental guarantee for the profound transformation of public services from decentralized operation to a holistic collaborative model.
[0003] In the process of realizing the concept of this disclosure, it was found that the related technologies have at least the following problems: when mapping fields in heterogeneous forms to the same standard, the related technologies usually rely on predefined rules or manually labeled data, which results in low processing flexibility and high cost. Summary of the Invention
[0004] In view of this, the present disclosure provides a form mapping method, apparatus, device, medium, and program product.
[0005] One aspect of this disclosure provides a form mapping method, comprising: inputting various fields of a form, various entity attributes in a city knowledge system, and first prompt information into a preset model; outputting multiple candidate attributes matching each field; the first prompt information being used to indicate first logical reasoning information for matching multiple candidate attributes for each field; the city knowledge system including at least entities, relationships between entities, and entity attributes; filtering target candidate attributes that are semantically most similar to the form from the multiple candidate attributes matching each field to obtain the mapping relationship between each field and the entity, as well as the target candidate attribute; and associating the corresponding mapping relationships based on the relationships between entities to obtain a relationship network matching the form.
[0006] According to embodiments of this disclosure, when it is determined that there are at least two target candidate attributes whose corresponding entity types are the same, it is determined whether to perform aggregation processing on the entities corresponding to the at least two target candidate attributes based on the analysis results obtained by analyzing the instances of the entities corresponding to the at least two target candidate attributes.
[0007] According to embodiments of this disclosure, multiple inter-entity relationships exist between any two entity pairs in the urban knowledge system. Based on these inter-entity relationships, corresponding mapping relationships are associated to obtain a relationship network that matches the form. This includes: inputting multiple mapping relationships, multiple inter-entity relationships between any two entity pairs in the urban knowledge system, and second prompt information into a preset model, and outputting a relationship network. The second prompt information is used to indicate second logical reasoning information for associating entity pairs with inter-entity relationships in the multiple mapping relationships. The second logical reasoning information constrains multiple entities in the relationship network to be connected, and constrains the target inter-entity relationships associated with entity pairs to follow semantic information matching with the attribute descriptions of the entity pairs and the corresponding entity attributes.
[0008] According to embodiments of this disclosure, multiple mapping relationships, multiple inter-entity relationships between any two entity pairs in the city knowledge system, and second prompt information are input into a preset model, and the following operations are performed: identifying M initial entity pairs existing in the multiple mapping relationships, where M is a positive integer; based on the entity pairs in the city knowledge system, selecting N target entity pairs with inter-entity relationships from the M initial entity pairs, where N≤M and N is a positive integer; based on the semantic information of the N target entity pairs and the attribute descriptions of the target entity attributes corresponding to the N target entity pairs, selecting target entity relationships from the multiple inter-entity relationships existing between the N target entity pairs; if it is determined that all N target entity pairs are connected based on the target entity relationships corresponding to each of the N target entity pairs, a relationship network is obtained; if it is determined that some N target entity pairs are connected, establishing connections between unconnected target entity pairs and connected target entity pairs based on relationship expansion rules, a relationship network is obtained.
[0009] According to embodiments of this disclosure, the city knowledge system also includes relational attributes; the above form mapping method further includes: updating the relational network when it is determined that there are entity attributes similar to relational attributes in the relational network, and there is a relational network between entities corresponding to the relational attributes.
[0010] According to embodiments of this disclosure, the first logical reasoning information includes at least one of the following: parsing constraint information, business scenario constraint information, attribute value type constraint information, and matching constraint information; the parsing constraint information is used to constrain the semantic information of any field based on the form's theme, the name of any field, and the descriptive features of fields adjacent to any field; the business scenario constraint information is used to constrain the semantic information to match the business scenario; the attribute value type constraint information is used to constrain the semantic information to match the historical field value type of any field; the matching constraint information is used to constrain the semantic information to satisfy the characteristics of entity attributes belonging to a preset entity category, the preset categories including: person, place, thing, organization, and event.
[0011] According to embodiments of this disclosure, when filtering target candidate attributes that are most similar to the semantics of the form from multiple candidate attributes matched by each field, the following hierarchical strategies are followed at least in sequence: the first-level strategy indicates that the names of the field and the candidate attribute are consistent; the second-level strategy indicates that the business scenarios of the field and the candidate attribute are related; and the third-level strategy indicates that the field value type corresponding to the field matches the attribute value type of the candidate attribute.
[0012] Another aspect of this disclosure provides a form mapping device, comprising: a matching module, used to input various fields of the form, various entity attributes in a city knowledge system, and first prompt information into a preset model, and output multiple candidate attributes matching each field, wherein the first prompt information is used to indicate first logical reasoning information for matching multiple candidate attributes for each field, and the city knowledge system includes at least entities, relationships between entities, and entity attributes; a filtering module, used to filter target candidate attributes that are most similar to the semantics of the form from the multiple candidate attributes matched by each field, and obtain the mapping relationship between each field and the entity, as well as the target candidate attribute; and an association module, used to associate the corresponding mapping relationships based on the relationships between entities, and obtain a relationship network matching the form.
[0013] Another aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the form mapping method described above.
[0014] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, implement the form mapping method described above.
[0015] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, implement the form mapping method described above.
[0016] According to embodiments of this disclosure, a preset model is dynamically constrained by a first prompt message. Using its inference chain, each field of the form is matched with entity attributes in the city's knowledge system, enabling more accurate identification of multiple candidate attributes corresponding to each field. Simultaneously, multiple candidate attributes are filtered through form semantics, thereby determining a more precise mapping relationship between fields, entities, and attributes. Based on the relationships between entities in the city's knowledge system, the matched entities are associated, ultimately obtaining a relationship network adapted to the form. Therefore, this at least partially solves the technical problems of low processing flexibility and high implementation costs in related technologies, achieving more accurate parsing and structured output of complex field semantics without additional training costs, providing more efficient and reliable data support for subsequent collaborative analysis of heterogeneous forms. Attached Figure Description
[0017] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0018] Figure 1 The illustrations depict application scenarios of form mapping methods, apparatuses, devices, media, and program products according to embodiments of the present disclosure.
[0019] Figure 2 A flowchart illustrating a form mapping method according to an embodiment of the present disclosure is shown schematically;
[0020] Figure 3 A schematic diagram illustrating the mapping relationships between different entities according to embodiments of the present disclosure is provided.
[0021] Figure 4 A schematic diagram of a relationship network according to an embodiment of the present disclosure is shown;
[0022] Figure 5 A schematic diagram illustrating a form mapping method according to an embodiment of the present disclosure is shown.
[0023] Figure 6 A block diagram schematically illustrates a form mapping apparatus according to an embodiment of the present disclosure; and
[0024] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing a form mapping method according to an embodiment of the present disclosure. Detailed Implementation
[0025] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0027] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0028] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0029] In the embodiments disclosed herein, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security and network security.
[0030] In the embodiments disclosed herein, user authorization or consent is obtained before acquiring or collecting user personal information.
[0031] In the process of realizing the concept of this disclosure, it was discovered that the following methods are commonly used in related technologies when mapping heterogeneous form fields to the same standard.
[0032] 1. Heuristic methods, divided into query-based and iterative methods. Query-based methods match knowledge graph entities based on string similarity, relying on predefined rules and exhibiting poor flexibility. Iterative methods assume a complete knowledge graph and a standardized table structure, disambiguating through multiple rounds of iteration, but rely on the closed-world assumption, resulting in low adaptability to real-world scenarios. 2. Feature engineering methods, such as Annotating and Searching Web Tables, use Term Frequency-Inverse Document Frequency (TF-IDF) to calculate the similarity between column headers and knowledge graph entity labels; for numerical columns, the Kolmogorov-Smirnov Test (KS) is used. These methods require manual feature design and have weak cross-domain generalization ability. 3. Deep learning methods, among which single-column modeling integrates features such as character distribution and word embedding to predict column types, but ignores the context information of the table; context awareness introduces text topic mining models (Latent Dirichlet Allocation Topic Model, LDA) and linear conditional random fields (CRF) to capture the relationships between columns, which is computationally complex and requires a large amount of labeled data; table structure modeling encodes row and column metadata, but still requires pre-training on massive amounts of table data, which is costly.
[0033] In view of this, embodiments of this disclosure provide a form mapping method, comprising: inputting each field of the form, each entity attribute in a city knowledge system, and a first prompt message into a preset model; outputting multiple candidate attributes matching each field; the first prompt message being used to indicate first logical reasoning information for matching multiple candidate attributes for each field; the city knowledge system including at least entities, relationships between entities, and entity attributes; filtering target candidate attributes that are semantically most similar to the form from the multiple candidate attributes matching each field to obtain the mapping relationship between each field and the entity, as well as the target candidate attribute; and associating the corresponding mapping relationships based on the relationships between entities to obtain a relationship network matching the form.
[0034] Figure 1 The illustrations depict application scenarios of form mapping methods, apparatuses, devices, media, and program products according to embodiments of the present disclosure.
[0035] like Figure 1As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0036] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0038] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0039] It should be noted that the form mapping method provided in this embodiment can generally be executed by server 105. Correspondingly, the form mapping device provided in this embodiment can generally be located in server 105. The form mapping method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the form mapping device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0040] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0041] Figure 2 A flowchart illustrating a form mapping method according to an embodiment of the present disclosure is shown schematically.
[0042] like Figure 2 As shown, the method includes operations S210 to S230.
[0043] In operation S210, each field of the form, each entity attribute in the city knowledge system, and the first prompt information are input into the preset model. Multiple candidate attributes that match each field are output. The first prompt information is used to indicate the first logical reasoning information for matching multiple candidate attributes for each field. The city knowledge system includes at least entities, relationships between entities, and entity attributes.
[0044] In operation S220, the target candidate attribute that is most semantically similar to the form is filtered from multiple candidate attributes matched by each field, and the mapping relationship between each field and the entity, as well as the target candidate attribute, is obtained.
[0045] In operation S230, based on the relationships between entities, the corresponding mapping relationships are associated to obtain a relationship network that matches the form.
[0046] There are no restrictions on the preset model; it can be a Large Language Model (LLM).
[0047] A city's knowledge system encompasses knowledge and information about entities within a city, their attributes, corresponding attribute descriptions, and relationships between entities. Entities are the basic units constituting a city, specifically including categories such as people, places, things, organizations, and events. Entity attributes indicate the characteristic categories of an entity, such as categories corresponding to an entity's parameters, states, or functions. For example, the entity attributes for "person" include name and age. Attribute descriptions provide specific information about entity attributes, indicating the specific details of the entity's corresponding characteristic categories, such as actual parameter values, state information, or functional information. For example, the attribute description for "name" is "Zhang San," and the attribute description for "age" is "20 years old." Relationships between entities indicate the connections between different entities in dimensions such as time, space, function, or causality.
[0048] Because the preset model has a strong semantic understanding capability, by inputting the various fields included in the form, the various entity attributes in the city knowledge system and the first prompt information into the preset model, the first prompt information can drive the preset model to parse the semantics of the fields, and combine the parsed semantics of the fields with multiple entity attributes to perform matching analysis and determine multiple candidate attributes that match each field.
[0049] During this process, the preset model will parse the first logical reasoning information indicated by the first prompt information, and determine multiple matching candidate attributes for each field according to the instructions of the information.
[0050] In some embodiments, the preset model can output not only candidate attributes but also the entities corresponding to those candidate attributes. Thus, for each field, multiple candidate attributes can be semantically matched with the semantic information determined by that field, or with the semantic information of at least one determined field in the adjacent fields combined with the form title. Based on the matching results, the target candidate field with the highest similarity to the semantic information of that field can be determined from multiple candidate attributes. And based on the entity corresponding to the target candidate attribute, the mapping relationship between each field and the entity, as well as the target candidate attribute, can be obtained.
[0051] When generating the relational network, the entities included in the form can be extracted from the mapping relationship, the relationships between the above entities can be filtered from the city knowledge system, and the target candidate attributes included in each entity can be integrated to obtain a structured relational network.
[0052] A relationship network can include entities, relationships between entities, and target candidate attributes for each entity. The format of the relationship network is not limited; for example, it can be in JSON format, a lightweight, cross-language data exchange format. Alternatively, it can be a node topology, where entities are nodes, relationships between entities are edges, and target candidate attributes for entities are node attributes.
[0053] According to embodiments of this disclosure, a preset model is dynamically constrained by a first prompt message. Using its inference chain, each field of the form is matched with entity attributes in the city's knowledge system, enabling more accurate identification of multiple candidate attributes corresponding to each field. Simultaneously, multiple candidate attributes are filtered through form semantics, thereby determining a more precise mapping relationship between fields, entities, and attributes. Based on the relationships between entities in the city's knowledge system, the matched entities are associated, ultimately obtaining a relationship network adapted to the form. Therefore, this at least partially solves the technical problems of low processing flexibility and high implementation costs in related technologies, achieving more accurate parsing and structured output of complex field semantics without additional training costs, providing more efficient and reliable data support for subsequent collaborative analysis of heterogeneous forms.
[0054] According to embodiments of this disclosure, the form mapping method further includes: when it is determined that there are at least two target candidate attributes whose corresponding entity types are the same, determining whether to perform aggregation processing on the entities corresponding to the at least two target candidate attributes based on the analysis results obtained by analyzing the instances of the entities corresponding to the at least two target candidate attributes.
[0055] Based on the entity types corresponding to multiple target candidate attributes, at least two target candidate attributes with the same entity type can be selected. Then, the entity instances corresponding to each of the at least two target candidate attributes are analyzed. Analysis dimensions can include the semantics of the target candidate attributes, the semantics of the attribute descriptions, or the relationship information between attributes. The relationship information between attributes can be analyzed, for example, whether they point to the same business object or whether there are identical target candidate attributes.
[0056] Based on the analysis results, further processing is performed. If the analysis finds that the entities corresponding to these target candidate attributes point to the same specific instance, then they are aggregated, these target candidate attributes are assigned to the same entity, and an identifier (id) is assigned to that entity.
[0057] If the analysis results indicate that the entities corresponding to these target candidate attributes belong to different specific instances, then no aggregation is performed. Instead, two independent entities are created, each assigned a different ID, and the corresponding target candidate attributes are assigned to their respective entity objects. By clearly distinguishing the differences between instances through different IDs, each entity object contains the attribute set of the same specific instance.
[0058] For example, "Parent's Name" and "Student's Name" both belong to the entity "Person", but they represent two different people, that is, they belong to two different instances. They should be two different entities and have different IDs to reflect this distinction.
[0059] Figure 3 A schematic diagram illustrating the mapping relationships between different entities according to embodiments of the present disclosure is shown.
[0060] like Figure 3 As shown, although the fields “Enterprise Phone” and “Regulatory Unit Phone” are both fields corresponding to the target candidate attribute “Contact Information” of the entity “Organization”, they belong to different organizations, that is, different instances. Therefore, they should be mapped to two different entities, thus obtaining the mapping relationship diagrams shown in 310 and 320.
[0061] It is important to note that Figure 3 In the Chinese text, categoryName refers to the organization, properties refers to the target candidate property, propertyNameCn refers to the Chinese name of the target candidate property, propertyExpressionNameCn refers to the Chinese name of the property expression of the target candidate property, and fieldNameCn refers to the Chinese name of the field.
[0062] In some embodiments, the mapping relationship between each field and the entity, as well as the target candidate attribute, can be obtained by inputting multiple candidate attributes matching each field and third prompt information into a preset model, or by inputting multiple candidate attributes matching each field, form title, and third prompt information into a preset model.
[0063] Furthermore, the third prompt information can include third logical reasoning information. This third logical reasoning information can then constrain the inference of the form topic based on the form title, and for each field, in conjunction with the context, including the form topic, other fields, and the field name, determine a target candidate attribute that best represents the meaning of that field.
[0064] In some embodiments, the third logical reasoning information may further constrain the determination of whether at least two target candidate attributes correspond to the same entity type, and constrain, if so, to determine whether to perform aggregation processing on the entities corresponding to the at least two target candidate attributes based on the analysis results obtained from analyzing the instances of the entities corresponding to the at least two target candidate attributes. This ensures that the mapping relationship between each field and the entity, as well as the target candidate attribute, is the result of aggregation processing.
[0065] According to embodiments of this disclosure, by identifying target candidate attributes of the same entity type and then determining whether they correspond to the same specific instance, target candidate attributes of the same instance are aggregated and target candidate attributes of different instances are distinguished by different identifiers, thereby reducing the attribute confusion problem of the same type of entity. Furthermore, by merging the scattered data of the same instance, it is more conducive to building a non-redundant relationship network.
[0066] According to embodiments of this disclosure, multiple inter-entity relationships exist between any two entity pairs in the city knowledge system; based on the inter-entity relationships, the corresponding mapping relationships are associated to obtain a relationship network that matches the form, which may include the following operations.
[0067] Input multiple mapping relationships, multiple inter-entity relationships between any two entity pairs in the city knowledge system, and second prompt information into a preset model, and output a relationship network. The second prompt information is used to indicate the second logical reasoning information associated with the entity pairs and inter-entity relationships existing in the multiple mapping relationships. The second logical reasoning information constrains the multiple entities in the relationship network to be connected, and constrains the target inter-entity relationships associated with the entity pairs to follow the semantic information matching of the attribute descriptions of the entity pairs and the corresponding entity attributes.
[0068] In a city's knowledge system, the relationships between any two entity pairs can include whether a relationship exists between the entities, the relational terms, and relational attributes. Relationship terms can include the relation name, such as: Relationship / Person-Land / Resident, where "Resident" is the relation name.
[0069] In some embodiments, in addition to outputting candidate attributes and the entities corresponding to each candidate attribute, the preset model may also output attribute descriptions corresponding to each candidate attribute.
[0070] By inputting multiple mapping relationships, multiple inter-entity relationships between any two entity pairs in the city knowledge system, and second prompt information into the preset model, the second prompt information can drive the preset model to match the target inter-entity relationship for the entity pairs existing in the multiple mapping relationships based on the inter-entity relationships in the city knowledge system, and associate the entity pairs that have the target inter-entity relationship.
[0071] During the matching process, semantic information about entity pairs and their corresponding entity attributes can be used to match relationships between entities, thereby obtaining target entity relationships that match the aforementioned semantic information. Furthermore, after matching, it's possible to check for the existence of independent entities; if so, relationships are constructed between them and other entities to ensure connectivity among multiple entities in the relationship network.
[0072] According to embodiments of this disclosure, a preset model is used to associate entity pairs and relationships between entities in a mapping relationship, thereby achieving efficient generation of a relationship network. A second prompt message guides the preset model to output more accurate structured results. In the implementation process, by constraining the relationships between target entities in the second prompt message to follow the principle of semantic information matching between the attribute descriptions of the entity pairs and their corresponding entity attributes, and by constraining multiple entities in the relationship network to be connected, the entire relationship network can be semantically self-consistent, coherent, and conforms to the logic of a form scenario, rather than being a simple mechanical link.
[0073] Figure 4 A schematic diagram of a relational network according to an embodiment of the present disclosure is shown.
[0074] like Figure 4 As shown, when the relationship network is in JSON format, the relationship network can include entities, relationships between entities, target candidate attributes of each entity, and fields corresponding to each target candidate attribute.
[0075] For example, a relationship network can include a list of entities, showing an "Organization" entity with Id "1" and a "Person" entity with Id "2". The target candidate attribute for the "Organization" entity can be "Name", and its corresponding form field is "School Name". Similarly, the target candidate attribute for the "Person" entity can be "Name", and its corresponding form field is "Student Name".
[0076] The relationship network can also include a list of relationships, which shows the relationships between entities with ID "10". The category name of this relationship is "Relationship / Person-Organization / Subordinate", indicating that the relationship belongs to the subordinate relationship category between a person and an organization. The category code is xxx, used for category differentiation and management. The category description is "Institution," clearly defining the business scenario of this subordinate relationship as an enrollment subordinate relationship between a "person (student)" and an "organization (institution)".
[0077] In addition, the source entity and the target entity should be clearly defined. The source entity is the entity that initiates the relationship, and the target entity is the entity that points to the relationship. When determining the relationship between entities, it should be in accordance with the direction of the relationship between entities in the city knowledge system and should not be changed arbitrarily.
[0078] In some embodiments, the relationship between entities may further include relationship attributes, such as... Figure 4 The relational attribute is named "Subordinate / Start Time" and its attribute expression is named "Enrollment Time". The corresponding form field for this relational attribute is "Registration Time".
[0079] According to embodiments of this disclosure, multiple mapping relationships, multiple inter-entity relationships between any two entity pairs in the city knowledge system, and second prompt information are input into a preset model, and the following operations are performed.
[0080] Identify M initial entity pairs (M is a positive integer) existing in multiple mapping relationships; based on entity pairs in the city knowledge system, select N target entity pairs (N≤M, N is a positive integer) from the M initial entity pairs to identify those with inter-entity relationships; based on the semantic information of the N target entity pairs and the attribute descriptions of the target entity attributes corresponding to the N target entity pairs, select target entity relationships from the multiple inter-entity relationships existing between the N target entity pairs; if all N target entity pairs are connected based on their respective target entity relationships, a relationship network is obtained; if only some N target entity pairs are connected, establish connections between unconnected target entity pairs and connected target entity pairs based on relationship expansion rules, thus obtaining a relationship network.
[0081] In the implementation process, M initial entity pairs, where M is a positive integer, are extracted from multiple mapping relationships, formed by pairwise combinations of different entities. Then, by referring to the list of entity pairs in the city knowledge system that clearly records the relationships between entities, N target entity pairs, where N ≤ M and are positive integers, are selected from the M initial entity pairs.
[0082] For example: Remove unrelated locations / streets-organizations / enterprises from the knowledge system, and retain people-locations / streets with affiliation relationships and people-organizations / enterprises with employment relationships as target entity pairs.
[0083] Subsequently, by combining the semantic information of the attribute descriptions of these N target entities for their respective target entity attributes—for example, the attribute description for a person / head of household name is "Zhang San," and the attribute description for a place / street is "the street it belongs to"—both semantically point to the association between the head of household and the street where they reside. Thus, from the multiple possible inter-entity relationships for each target entity pair, the target entity relationship that best matches the semantic information can be selected.
[0084] It can also determine whether N target entity pairs can be fully connected through their respective target entity relationships, that is, whether all entities form a coherent whole through entity relationships, such as person-land and person-organization connected through the entity "person" to form a complete link. If all can be connected, a relationship network can be constructed based on these target entity pairs and target entity relationships.
[0085] If only partial connectivity is possible, such as the existence of a person-to-location connection link but the organization-to-location connection not being connected to that link, then a connection can be established based on preset relationship expansion rules, such as by associating common entities or preset hierarchical relationships, to associate the unconnected target entities with the connected links, thereby forming a complete relationship network.
[0086] According to embodiments of this disclosure, by extracting initial entity pairs from mapping relationships and filtering out target entity pairs with related relationships based on the city knowledge system, meaningless entity combinations are eliminated to reduce redundant calculations. Subsequently, the target entity relationships with the highest matching degree are filtered out by combining the semantic information of the attribute descriptions of the target entities, ensuring more accurate association logic between entities. Furthermore, by using a flexible approach of fully connected network construction or partially connected extended network construction, the integrity of the relationship network is improved, thereby constructing a more accurate, complete, and low-redundancy relationship network, which provides structured data support for subsequent in-depth analysis of form data.
[0087] According to embodiments of this disclosure, the city knowledge system also includes relational attributes; the above form mapping method may further include the following operations.
[0088] If an entity attribute in a relational network is found to be similar to a relational attribute, and a relational network exists between the entities corresponding to the relational attribute, then update the relational network.
[0089] After the initial construction of the relationship network is completed, the relationship attributes between target entity pairs can be checked to reduce the situation where fields are classified as entity attributes and relationship attributes are ignored in the early stage.
[0090] During the implementation process, the relational attributes of the corresponding relationships in the city's knowledge system can be obtained, such as the start time attribute corresponding to the relationship / person-place / stationing.
[0091] The system then iterates through the extracted relation attributes. For each relation attribute, it compares it with the entity attributes under the corresponding entity pair in the relation network to determine if a similar entity attribute exists. If one exists, the relation network is modified and updated, such as removing the similar entity attribute from the entity's attribute list and adding it to the attribute list of the corresponding entity relationship. If no similar entity attribute is found, preset relation attributes can be added to the corresponding entity relationships.
[0092] In some embodiments, relational attributes, relational networks, and fourth prompt information can be input into a preset model, and the model outputs a relational network after adjustment of the relational attributes. The fourth prompt information may include fourth logical reasoning information, which is used to constrain the behavior of entities if it is determined that there are entity attributes in the relational network that are similar to the relational attributes, and the relationship between entities corresponding to the relational attributes already exists in the current relational network. In this case, the similar entity attributes are removed from the entity's attribute list and added to the attribute list of the corresponding relationship between entities, thereby enabling the relational network to contain more accurate relational attributes and correcting attribute confusion.
[0093] According to embodiments of this disclosure, by identifying the similarity between entity attributes and relationship attributes in the relationship network, and confirming that the corresponding relationships between entities already exist in the network, the relationship network is updated, which more effectively corrects potential attribute classification biases from the early stages. Similar relationship attributes that were originally misclassified as entity attributes are stripped and bound to the corresponding relationships between entities, achieving a clear distinction and correct classification between entity attributes and relationship attributes. This reduces network structure errors caused by attribute confusion, improves the data accuracy and structure quality of the relationship network, and provides more reliable data support for subsequent data association analysis between multiple forms.
[0094] According to embodiments of this disclosure, the first logical reasoning information includes at least one of the following: parsing constraint information, business scenario constraint information, attribute value type constraint information, and matching constraint information;
[0095] Parsing constraint information is used to constrain the semantic information of any field based on the form's topic, the name of any field, and the descriptive features of any adjacent field; business scenario constraint information is used to constrain the semantic information to match the business scenario; attribute value type constraint information is used to constrain the semantic information to match the historical field value type of any field; matching constraint information is used to constrain the semantic information to meet the characteristics of entity attributes belonging to a preset entity category, which includes: people, places, things, organizations, and events.
[0096] By combining the form's theme, the name of any field, and the descriptive features of adjacent fields, the parsing method for the semantic information of any field can be constrained, making the parsing results more closely match the field's actual meaning in the form. The specific content of the parsing constraint information is not limited; for example, carefully reading the form theme, individual field names, and the list of all fields, paying particular attention to the wording and contextual relationships of the field names, is recommended.
[0097] By requiring semantic information to match the specific business scenario of the form, the adaptability of field semantic parsing results to the business scenario can be more effectively constrained, reducing the occurrence of semantic discrepancies between semantics and scenario. The specific content of the business scenario constraint information is not limited; for example, combining the form theme and adjacent fields, a short sentence of no more than 20 characters should clearly state the core purpose of the field, prioritizing practicality for the business scenario rather than a literal translation.
[0098] By requiring that the semantic information match the historical field value type of any matching field, the consistency between the semantic parsing result and the historical data type can be constrained, reducing the problem of the attribute value type corresponding to the semantics not matching historical patterns. The specific content of the attribute value type constraint information is not limited; for example, it may distinguish between structured and unstructured data by inferring the possible input data format based on field naming conventions.
[0099] By constraining semantic information to meet the matching constraints of entity attribute features belonging to preset entity categories such as people, places, things, organizations, and events, the entity category of field semantics can be more accurately defined.
[0100] According to embodiments of this disclosure, multiple constraints can more accurately improve the accuracy and scenario adaptability of field semantic parsing, thereby improving the accuracy of multiple candidate attributes matched through semantic information, so as to provide more structured data support for subsequent data association analysis between multiple forms.
[0101] According to embodiments of this disclosure, when filtering target candidate attributes that are most similar to the semantics of the form from multiple candidate attributes matched by each field, the following hierarchical strategies are followed at least sequentially.
[0102] The first-level policy indicator field and the candidate attribute have the same name; the second-level policy indicator field and the candidate attribute are related to each other in terms of their respective business scenarios; the third-level policy indicator field and the candidate attribute have matching field value types.
[0103] When filtering target candidate attributes that are most similar to the semantics of the form from multiple candidate attributes, hierarchical matching can be performed from multiple dimensions such as name, business scenario, and specific value type.
[0104] During the matching process, the first-level strategy can be executed first, comparing the names of the field with the candidate attributes, and filtering out the first candidate attribute with the same name. For example, if the field "contact phone number" has the same name as the candidate attribute "contact phone number", it can be selected as the first candidate attribute.
[0105] If the number of first candidate attributes selected by the first-level strategy does not meet the preset number requirement, the second-level strategy can be executed on multiple first candidate attributes to analyze the business scenarios corresponding to the fields and candidate attributes respectively, and select second candidate attributes that are related to the business scenarios.
[0106] If the number of second-level candidate attributes selected by the second-level strategy still does not meet the preset number requirement, the third-level strategy is executed. The field value type of the field is compared with the attribute value type of the candidate attribute, and candidate attributes with matching types are selected. For example, if the field value of the "Date of Birth" is of type date, and the attribute value of the candidate attribute "Date of Birth" is also of type date, then the attribute with matching types is determined as the target candidate attribute.
[0107] According to embodiments of this disclosure, a progressive filtering based on a tiered strategy is performed when filtering target candidate attributes, which quickly locks in relevant attributes and improves matching accuracy and filtering efficiency.
[0108] Figure 5 A schematic diagram of a form mapping method according to an embodiment of the present disclosure is shown.
[0109] like Figure 5 As shown, the preset model 520 can be used throughout the process to obtain the relationship network 519 that matches the form. During implementation, form data 511, such as the various fields of the form, the attributes of various entities in the city knowledge system 513, and the first prompt information 512, can be input into the preset model to obtain a candidate attribute set 514. This candidate attribute set 514 can include multiple candidate attributes that match each field.
[0110] Next, the candidate attribute set 514, the entity attributes 513 in the city knowledge system, and the third prompt information 515 can be input into the preset model 520 to obtain the mapping relationship 516 between each field and the entity, as well as the target candidate attribute.
[0111] Furthermore, the mapping relationship 516 between each field and entity, as well as the target candidate attribute, the multiple inter-entity relationships 518 between any two entity pairs in the city knowledge system, and the second prompt information 517 can be input into the preset model 520 to output the relationship network 519.
[0112] According to embodiments of this disclosure, when performing form mapping, the use of prompt information constraints, distributed reasoning chains, and domain knowledge embedding can guide the preset model to output structured results more accurately and avoid fine-tuning costs.
[0113] Figure 6 A block diagram of a form mapping apparatus according to an embodiment of the present disclosure is shown schematically.
[0114] like Figure 6 As shown, the form mapping device 600 includes a matching module 610, a filtering module 620, and an association module 630.
[0115] The matching module 610 is used to input the various fields of the form, the attributes of each entity in the city knowledge system and the first prompt information into the preset model, and output multiple candidate attributes that match each field. The first prompt information is used to indicate the first logical reasoning information for matching multiple candidate attributes for each field. The city knowledge system includes at least entities, relationships between entities and entity attributes.
[0116] The filtering module 620 is used to filter the target candidate attribute that is most similar to the semantics of the form from multiple candidate attributes matched by each field, and to obtain the mapping relationship between each field and the entity, as well as the target candidate attribute.
[0117] The association module 630 is used to associate corresponding mapping relationships based on the relationships between entities to obtain a relationship network that matches the form.
[0118] According to embodiments of this disclosure, the form mapping device 600 further includes a processing module.
[0119] The processing module is used to determine whether to perform aggregation processing on the entities corresponding to the at least two target candidate attributes, based on the analysis results obtained from analyzing the instances of the entities corresponding to the at least two target candidate attributes.
[0120] According to embodiments of this disclosure, multiple inter-entity relationships exist between any two entity pairs in the city knowledge system; the filtering module 620 includes a filtering submodule.
[0121] The filtering submodule is used to input multiple mapping relationships, multiple inter-entity relationships between any two entity pairs in the city knowledge system, and second prompt information into a preset model, and output a relationship network. The second prompt information is used to indicate the second logical reasoning information associated with the entity pairs and inter-entity relationships in the multiple mapping relationships. The second logical reasoning information constrains the multiple entities in the relationship network to be connected, and constrains the target inter-entity relationships associated with the entity pairs to follow the semantic information matching of the attribute descriptions of the entity pairs and the corresponding entity attributes.
[0122] According to embodiments of this disclosure, the filtering submodule includes: an identification unit, a first filtering unit, a second filtering unit, a first determination unit, and a second determination unit.
[0123] The identification unit is used to identify M initial entity pairs existing in multiple mapping relationships, where M is a positive integer.
[0124] The first filtering unit is used to filter N target entity pairs with inter-entity relationships from M initial entity pairs based on entity pairs in the city knowledge system, where N≤M and N is a positive integer.
[0125] The second filtering unit is used to filter target entity relationships from multiple inter-entity relationships existing between the N target entity pairs based on the semantic information of the attribute descriptions of the target entity attributes corresponding to the N target entity pairs.
[0126] The first determining unit is used to obtain a relation network by determining the relationship between N target entity pairs and connecting all N target entity pairs.
[0127] The second determining unit is used to establish a relationship network by connecting unconnected target entity pairs with connected target entity pairs based on the relationship expansion rule, when it is determined that N target entity pairs are partially connected.
[0128] According to embodiments of this disclosure, the city knowledge system further includes relational attributes; the form mapping device 600 further includes an update module.
[0129] The update module is used to update the relationship network when there are entity attributes and relationship attributes that are similar in the relationship network, and there is a relationship network between the entities corresponding to the relationship attributes.
[0130] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-a-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0131] For example, any plurality of the matching module 610, filtering module 620, and association module 630 may be combined into a single module / unit / subunit, or any one of these modules / units / subunits may be split into multiple modules / units / subunits. Alternatively, at least a portion of the functionality of one or more of these modules / units / subunits may be combined with at least a portion of the functionality of other modules / units / subunits and implemented in a single module / unit / subunit. According to embodiments of this disclosure, at least one of the matching module 610, filtering module 620, and association module 630 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the matching module 610, the filtering module 620, and the association module 630 may be implemented at least partially as a computer program module that can perform corresponding functions when the computer program module is run.
[0132] It should be noted that the form mapping device part in the embodiments of this disclosure corresponds to the form mapping method part in the embodiments of this disclosure. For a detailed description of the form mapping device part, please refer to the form mapping method part, which will not be repeated here.
[0133] Figure 7 A block diagram schematically illustrates an electronic device suitable for implementing a form mapping method according to an embodiment of the present disclosure. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0134] like Figure 7 As shown, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0135] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 702 and / or RAM 703. It should be noted that programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
[0136] According to embodiments of this disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the input / output (I / O) interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0137] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by processor 701, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0138] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0139] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0140] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0141] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the form methods provided in the embodiments of this disclosure.
[0142] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0143] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0144] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0146] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A form mapping method, comprising: Input each field of the form, each entity attribute in the city knowledge system and the first prompt information into the preset model, and output multiple candidate attributes that match each field. The first prompt information is used to indicate the first logical reasoning information for matching the multiple candidate attributes for each field. The city knowledge system includes at least entities, relationships between entities and entity attributes. Filter the target candidate attribute that is most semantically similar to the form from the multiple candidate attributes matched by each field to obtain the mapping relationship between each field and the entity, as well as the target candidate attribute; Based on the relationships between the entities, the corresponding mapping relationships are associated to obtain a relationship network that matches the form.
2. The method according to claim 1, further comprising: If it is determined that there are at least two target candidate attributes whose corresponding entity types are the same, based on the analysis results obtained by analyzing the instances of the entities corresponding to the at least two target candidate attributes, it is determined whether to perform aggregation processing on the entities corresponding to the at least two target candidate attributes.
3. The method according to claim 1 or 2, wherein multiple inter-entity relationships exist between any two entity pairs in the urban knowledge system; The step of associating corresponding mapping relationships based on the relationships between entities to obtain a relationship network matching the form includes: Input the multiple mapping relationships, the multiple inter-entity relationships between any two entity pairs in the city knowledge system, and the second prompt information into the preset model, and output the relationship network. The second prompt information is used to indicate the second logical reasoning information associated with the entity pairs existing in the multiple mapping relationships and the inter-entity relationships. The second logical reasoning information constrains that multiple entities in the relational network are connected, and constrains the relationship between target entities associated with the entity pair to follow the semantic information matching of the attribute descriptions of the entity pair and the entity attributes corresponding to the entity pair.
4. The method according to claim 3, wherein: The step involves inputting multiple mapping relationships, multiple inter-entity relationships between any two entity pairs in the city knowledge system, and second prompt information into the preset model, and performing the following operations: Identify M initial entity pairs existing in the multiple mapping relationships, where M is a positive integer; Based on the entity pairs in the city knowledge system, select N target entity pairs with inter-entity relationships from the M initial entity pairs, where N≤M and N is a positive integer; Based on the semantic information of the attribute descriptions of the N target entity pairs and the corresponding target entity attributes of the N target entity pairs, target entity relationships are filtered from the multiple inter-entity relationships that exist between the N target entity pairs; The relationship network is obtained by determining the relationship between the N target entities and their corresponding target entities, and by connecting all the N target entity pairs. If it is determined that the N target entity pairs are partially connected, the unconnected target entity pairs are linked to the connected target entity pairs based on the relationship expansion rule to obtain the relationship network.
5. The method according to claim 3, wherein the urban knowledge system further includes relational attributes; The method further includes: If it is determined that there exists an entity attribute in the relation network that is similar to the relation attribute, and the relationship between the entities corresponding to the relation attribute exists in the relation network, then the relation network is updated.
6. The method according to claim 1, wherein: The first logical reasoning information includes at least one of the following: parsing constraint information, business scenario constraint information, attribute value type constraint information, and matching constraint information; The parsing constraint information is used to constrain the parsing of the semantic information of any field based on the topic of the form, the name of any field, and the descriptive features of the fields adjacent to any field. The business scenario constraint information is used to constrain the semantic information to match the business scenario; The attribute value type constraint information is used to ensure that the semantic information is consistent with the historical field value type that matches any field. The matching constraint information is used to constrain the semantic information to meet the characteristics of entity attributes belonging to a preset entity category. The preset categories include: people, places, things, organizations, and events.
7. The method according to claim 1, wherein: When filtering target candidate attributes that are most similar to the semantics of the form from the multiple candidate attributes matched for each field, the following hierarchical strategy should be followed at least sequentially: The first-level strategy indication field has the same name as the candidate attribute; The second-level strategy indication field and the candidate attributes are related to their respective business scenarios; The third-level strategy indicates that the field value type corresponding to the field matches the attribute value type of the candidate attribute.
8. A form mapping device, comprising: The matching module is used to input the various fields of the form, the various entity attributes in the city knowledge system and the first prompt information into the preset model, and output multiple candidate attributes that match each field. The first prompt information is used to indicate the first logical reasoning information for matching the multiple candidate attributes for each field. The city knowledge system includes at least entities, relationships between entities and entity attributes. The filtering module is used to filter the target candidate attribute that is most similar to the semantics of the form from the multiple candidate attributes matched by each field, and to obtain the mapping relationship between each field and the entity, as well as the target candidate attribute; The association module is used to associate corresponding mapping relationships based on the relationships between the entities to obtain a relationship network that matches the form.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 8.
10. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 8.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-8.