A method and system for service data aggregation and lookup

By defining atomic concepts and constructing aggregate concepts in a relational database, and using a distributed search engine to find and update aggregate entities, the timeliness and operational complexity problems of traditional data aggregation methods are solved, achieving efficient and accurate data aggregation.

CN117520337BActive Publication Date: 2026-11-24DIANKEYUN (BEIJING) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311238727.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2026-11-24
Estimated Expiration
2043-09-22

AI Technical Summary

Technical Problem

Traditional data aggregation methods cannot adjust data units in a timely manner, resulting in low timeliness. Furthermore, they are difficult to operate with when dealing with complex data, making it difficult to effectively support business scenario requirements.

Method used

Atomic concepts are defined by selecting data tables in a relational database. Based on business needs, master and slave concepts are selected to construct aggregate concepts. Aggregate entities are then found using a distributed search engine for persistent storage and updates.

Benefits of technology

It improves the efficiency and accuracy of data aggregation, enables timely response to changes in business needs, and optimizes the complexity of data operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117520337B_ABST
    Figure CN117520337B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for business data aggregation and retrieval. The method includes: acquiring a relational database, parsing the data table structure, defining atomic concepts and their attributes, mapping a data table to an atomic concept, and defining the attributes of the atomic concepts using fields in the data table. Selecting a primary concept from the atomic concepts and associating it with other atomic concepts that are related as secondary concepts to construct an aggregate concept. Based on the basic attributes and attribute dimensions in the aggregate concept, searching the corresponding data table, obtaining the entity data of the primary and secondary concepts, and encapsulating them into an aggregate entity. Persistently storing the aggregate entity and updating the data according to preset rules. Querying the data using a distributed search engine and returning the query results. This invention solves the problems of low timeliness and operational difficulties in handling complex data in traditional data aggregation, improving the efficiency and accuracy of data aggregation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data aggregation technology, and in particular to a method and system for business data aggregation and retrieval. Background Technology

[0002] Data aggregation is an information aggregation technology that reorganizes and integrates existing data models and data to meet different business needs. Data aggregation can provide a more comprehensive and accurate view of data to show the relationships between data, better supporting decision-making and business optimization.

[0003] Traditional data aggregation methods primarily include two approaches: business view-based and data mart-based. Business view-based data aggregation begins with the system's business database, developing a corresponding business model based on business needs and determining the source of each attribute field within the business data model. Then, data acquisition tools are used to extract batches of business data from relevant business database tables, assembling them according to the planned business model to form aggregated object data. Data mart-based data aggregation, on the other hand, leverages big data technologies to aggregate, split, organize, and combine domain data accessed by the system, achieving hierarchical storage of business data. By constructing business marts tailored to different business needs, it satisfies requirements for querying, subscribing, statistical analysis, and other aspects of business data.

[0004] However, as business needs change, traditional data aggregation methods cannot adjust data units in a timely manner, resulting in low timeliness in data reconstruction. Furthermore, as the complexity of data relationships increases, traditional data aggregation methods become difficult to operate on aggregation patterns based on data field attribute dimensions, making it difficult to effectively support business scenario requirements. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a business data aggregation and retrieval method and system to eliminate or improve the shortcomings of the prior art, such as low timeliness of data aggregation and difficulty in operation when dealing with complex data.

[0006] One aspect of the present invention provides a method for business data aggregation and retrieval, the method comprising the following steps: Select a target relational database, parse each data table in the target relational database, define corresponding atomic concepts based on the content recorded in each data table, and use the table fields in the data table as attributes of the corresponding atomic concepts; Select one atomic concept from among the atomic concepts as the main concept based on business needs; Obtain the relationships between the atomic concepts, and find one or more subordinate concepts corresponding to the main concept based on the relationships, and construct the main concept and its corresponding subordinate concepts into an aggregate concept; The attributes of the main concept are used as the basic attributes of the aggregate concept to which it belongs, and the attributes of each subordinate concept corresponding to the main concept are used as the single attribute dimension of the aggregate concept to which it belongs. Based on the basic attributes and attribute dimensions of each aggregate concept, the corresponding data table is searched to obtain the entity data of the main concept and the subordinate concept in each aggregate concept, and then encapsulated into an aggregate entity; Each aggregated entity is persistently stored, and the aggregated entities are updated according to preset rules; Based on the target query requirements, a distributed search engine is used to find the aggregated entities.

[0007] In some embodiments of the present invention, after using the table fields in the data table as attributes of the corresponding atomic concepts, the method further includes: Select a unique attribute from the attributes of each atomic concept as the primary key to identify the entity data corresponding to that atomic concept; In addition, the data corresponding to each data item in the data table is extracted and mapped to the attributes of each atomic concept, and assembled into atomic entities, so that the corresponding atomic entities can be found according to the main concept and the subordinate concept in the aggregate concept and encapsulated into the corresponding aggregate entity.

[0008] In some embodiments of the present invention, the process of obtaining the association relationships between atomic concepts and finding one or more subordinate concepts corresponding to the main concept based on the association relationships, and constructing the main concept and its corresponding subordinate concepts into an aggregate concept, further includes: Based on the aforementioned relationships, the relationships between the primary concept and other unassociated atomic concepts are identified, and the relationship chains of the aforementioned relationships are expanded. Based on business needs, extract the main concept, some or all of the corresponding sub-concepts, and some or all of the relationship links corresponding to the main concept, and construct them into an aggregate concept; The association relationships include explicit relationships that directly link two atomic concepts, and implicit relationships that indirectly link two atomic concepts through an intermediate concept; the direct association relationships are established based on the equality of attributes and attribute values ​​between atomic concepts.

[0009] In some embodiments of the present invention, persistent storage of each aggregate entity and updating the aggregate entity according to preset rules include: Based on the basic attributes and attribute dimensions of each aggregate concept, the corresponding data table is searched to update the entity data and further update the aggregate entity.

[0010] In some embodiments of the present invention, persistent storage of each aggregate entity and updating the aggregate entity according to preset rules include: When the entity data corresponding to the main concept changes, the corresponding aggregate entity is found using the primary key of the main concept. The changed entity data of the main concept is then mapped to the basic attributes of the aggregate concept based on the attributes of its corresponding main concept, and recombined into a new aggregate entity. When the entity data corresponding to the sub-concept changes, the corresponding master concept is found using the association relationship; if there is no corresponding master concept, the update ends; if the corresponding master concept is found, the corresponding aggregate entity is found using the primary key of the master concept, and the changed sub-concept entity data is mapped to the attribute dimension of the aggregate concept based on the attributes of its corresponding sub-concept, and then recombined into a new aggregate entity. When the entity data corresponding to the main concept is deleted, the corresponding aggregate entity is found based on the primary key of the main concept using the association relationship, and the data of the aggregate entity is deleted. When the entity data corresponding to the sub-concept is deleted, the main concept corresponding to the sub-concept is found using the association relationship, the corresponding aggregate entity is found using the primary key of the main concept, and then the attribute dimension data of the aggregate entity corresponding to the sub-concept is deleted.

[0011] In some embodiments of the present invention, persistent storage of each aggregate entity and updating the aggregate entity according to preset rules include: Within a set period of time, only the entity data that has changed is recorded, and the entity data is not updated; when the set time is reached, the entity data that has changed is fully updated.

[0012] In some embodiments of the present invention, the distributed search engine employs the Elasticsearch engine.

[0013] In some embodiments of the present invention, the data service further includes encapsulating the retrieved aggregated data by category, including attribute information of the main concept and attribute dimension information of the aggregated concept.

[0014] Another aspect of the present invention provides a business data aggregation and retrieval system, the system comprising: The concept building module is used to select a target relational database, parse each data table in the target relational database, define corresponding atomic concepts based on the content recorded in each data table, and use the table fields in the data table as attributes of the corresponding atomic concepts. The data aggregation module is used to select one atomic concept from each atomic concept as the master concept according to business needs; obtain the relationship between each atomic concept, and find one or more subordinate concepts corresponding to the master concept according to the relationship, constructing the master concept and its corresponding subordinate concepts into an aggregate concept; use the attributes of the master concept as the basic attributes of the aggregate concept, and use the attributes of each subordinate concept corresponding to the master concept as a single attribute dimension of the aggregate concept; search the corresponding data table according to the basic attributes and attribute dimensions of each aggregate concept to obtain the entity data of the master concept and subordinate concepts in each aggregate concept, and encapsulate them into an aggregate entity; persist each aggregate entity and update the aggregate entity according to preset rules; The data retrieval module is used to find various aggregated entities using a distributed search engine based on the target query requirements.

[0015] Another aspect of the present invention provides a computer-readable storage medium that, when executed by a processor, implements the steps of the method described above.

[0016] The beneficial effects of the present invention are at least as follows: This invention provides a method and system for business data aggregation and retrieval. The method includes: acquiring a relational database, parsing the data table structure, and defining atomic concepts and attributes. A data table is mapped to an atomic concept, and the attributes of the atomic concept are defined using fields in the data table. Based on specific business needs, a master concept is selected from the atomic concepts and associated with other atomic concepts that have a relationship as subordinate concepts to construct an aggregated concept. Based on the basic attributes and attribute dimensions in the aggregated concept, the corresponding data table is searched to obtain the entity data of the master and subordinate concepts, which are then encapsulated into an aggregated entity. The aggregated entity is persistently stored and updated according to preset rules. Data is queried using a distributed search engine. This invention solves the problems of timeliness and operational complexity in traditional data aggregation by organizing and updating data through concepts and relationships in a knowledge graph, thus improving the efficiency and accuracy of data aggregation.

[0017] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.

[0018] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description

[0019] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings: Figure 1 This is a flowchart of a business data aggregation and search method according to an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of the architecture of the data aggregation model according to another embodiment of the present invention.

[0021] Figure 3 This is a schematic diagram of the aggregate entity construction process according to another embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.

[0023] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.

[0024] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0025] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.

[0026] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.

[0027] The embodiments of the present invention propose a business data aggregation and retrieval method. Based on concepts, attributes, relationships and entities in a knowledge graph, the method uses the concepts in the knowledge graph as the constituent units of data aggregation, and constructs attribute fields for extracting business data by connecting to data services and databases, thereby constructing a single atomic concept.

[0028] Data aggregation refers to the collection and merging of information from different data sources to form a more comprehensive and richer dataset. Embodiments of this invention achieve data aggregation by using concepts from a knowledge graph as the constituent units of the aggregation.

[0029] A knowledge graph is a structure that represents and organizes knowledge in the form of a graph. It models and describes entities, concepts, attributes, and the relationships between them in the real world, forming a complex network structure. Knowledge graphs are used to store and organize information about various concepts, attributes, relationships, and entities.

[0030] An atomic concept is the smallest unit that constitutes aggregated knowledge, similar to a table in a database. Each atomic concept has certain attribute fields used to describe specific business data.

[0031] An aggregated entity is an entity formed by aggregating the entity data of various atomic concepts in a relational relationship and reorganizing them according to an aggregated concept model. In other words, it brings together the data of related atomic concepts to form a higher-level entity.

[0032] An embodiment of the present invention provides a method for business data aggregation and retrieval, the method comprising the following steps S101~S105: Step S101: Select the target relational database, parse each data table in the target relational database, define the corresponding atomic concept according to the content recorded in each data table, and use the table fields in the data table as the attributes of the corresponding atomic concept.

[0033] Relational databases are database systems based on the relational model. This model uses tables to store data, with each table consisting of rows and columns. All rows in each table represent a collection of entities representing an atomic concept; each row represents an entity, and each column represents the entity's attributes.

[0034] In relational databases, a table field refers to a column in a table. Each table field represents an attribute or data item in the table.

[0035] Step S102: Select one atomic concept from all atomic concepts as the master concept according to business requirements. Obtain the relationships between the atomic concepts, and find one or more subordinate concepts corresponding to the master concept based on the relationships. Construct the master concept and its corresponding subordinate concepts into an aggregate concept. Use the attributes of the master concept as the basic attributes of the aggregate concept, and use the attributes of each subordinate concept corresponding to the master concept as a single attribute dimension of the aggregate concept.

[0036] Step S103: Based on the basic attributes and attribute dimensions of each aggregate concept, find the corresponding data table to obtain the entity data of the main concept and the subordinate concepts in each aggregate concept, and encapsulate them into aggregate entities.

[0037] Step S104: Persistently store each aggregate entity and update the aggregate entities according to preset rules.

[0038] Step S105: Based on the target query requirements, use a distributed search engine to find each aggregated entity.

[0039] In step S101, after using the data items recorded in the table fields of the data table as attributes of the corresponding atomic concepts, the following steps are also included: Select a unique attribute from the properties of each atomic concept as the primary key to identify the entity data corresponding to that atomic concept.

[0040] Data is extracted from the records corresponding to each data item in the data table and mapped to the attributes of each atomic concept. These are then assembled into atomic entities, which are used to find the corresponding atomic entities according to the main and subordinate concepts in the aggregate concept and encapsulate them into the corresponding aggregate entities. The assembled atomic entities are stored in a graph database, with neo4j being one of the selected graph databases.

[0041] In step S101, the relationships between atomic concepts are obtained, and one or more subordinate concepts corresponding to each master concept are found based on the relationships. Each master concept and its corresponding subordinate concept are constructed into an aggregate concept. The process also includes: Based on the association relationships, find the relationships between the concept and other unassociated atomic concepts, and expand the relationship links of the association relationships.

[0042] Based on business needs, extract the main concept, some or all of the corresponding sub-concepts, and some or all of the relationship links corresponding to the main concept, and construct them into an aggregate concept.

[0043] Relationships include explicit relationships that directly link two atomic concepts, and implicit relationships that indirectly link two atomic concepts through an intermediate concept. Direct relationships are established based on the equality of attributes and attribute values ​​between atomic concepts.

[0044] In step S103, each aggregate entity is persistently stored, and the aggregate entities are updated according to preset rules, including: Based on the basic attributes and attribute dimensions of each aggregate concept, the corresponding data table is searched to query and update the entity data, and then the aggregate entity is further updated.

[0045] In some embodiments of the present invention, persistent storage of each aggregate entity and updating of the aggregate entities according to preset rules include: When the entity data corresponding to the main concept changes, the corresponding aggregate entity is found using the primary key of the main concept. The changed entity data of the main concept is then mapped to the basic attributes of the aggregate concept based on the attributes of its corresponding main concept, and recombined into a new aggregate entity. When the entity data corresponding to a concept changes, the corresponding master concept is found using the association relationship; if there is no corresponding master concept, the update ends; if the corresponding master concept is found, the corresponding aggregate entity is found using the primary key of the master concept, and the changed entity data of the sub-concept is mapped to the attribute dimension of the aggregate concept based on the attributes of its corresponding sub-concept, and then recombined into a new aggregate entity. When the entity data corresponding to the main concept is deleted, the corresponding aggregate entity is found based on the primary key of the main concept using the association relationship, and the data of the aggregate entity is deleted. When deleting entity data corresponding to a concept, the parent concept corresponding to the parent concept is found using the association relationship, the corresponding aggregate entity is found using the primary key of the parent concept, and then the attribute dimension data of the aggregate entity corresponding to the parent concept is deleted.

[0046] In some embodiments of the present invention, persistent storage of each aggregate entity and updating of the aggregate entities according to preset rules include: Within a set period of time, only the entity data that has changed is recorded, and the entity data is not updated; when the set time is reached, the entity data that has changed is fully updated according to the steps of the preset rules.

[0047] In some embodiments of the present invention, the distributed search engine employs the Elasticsearch engine.

[0048] In some embodiments of the present invention, the data service further includes encapsulating the retrieved aggregated data by category, including attribute information of the main concept and attribute dimension information of the aggregated concept.

[0049] Another embodiment of the present invention provides a business data aggregation and retrieval system, the system comprising: The concept building module is used to select the target relational database, parse each data table in the target relational database, define the corresponding atomic concepts according to the contents recorded in each data table, and use the table fields in the data table as the attributes of the corresponding atomic concepts. The data aggregation module is used to select one atomic concept from all atomic concepts as the master concept according to business needs; obtain the relationships between the atomic concepts, and find one or more subordinate concepts corresponding to the master concept based on the relationships, constructing the master concept and its corresponding subordinate concepts into an aggregate concept; use the attributes of the master concept as the basic attributes of the aggregate concept, and use the attributes of each subordinate concept corresponding to the master concept as a single attribute dimension of the aggregate concept; search the corresponding data table based on the basic attributes and attribute dimensions of each aggregate concept to obtain the entity data of the master concept and subordinate concepts in each aggregate concept, and encapsulate them into aggregate entities; persist the aggregate entities and update the aggregate entities according to preset rules. The data retrieval module is used to find various aggregated entities using a distributed search engine based on the target query requirements.

[0050] Another embodiment of the present invention provides a method for business data aggregation and retrieval. The data aggregation model architecture of this embodiment is as follows: Figure 1 As shown, the method includes the following steps S201~S205: Step S201: An atomic concept is the basic unit of aggregation of aggregate concepts. Atomic concepts are constructed by connecting to relational data sources. The data table information in the database is parsed and transformed. The table name is used as the default name of the atomic concept, and the table field list is the attribute list of the atomic concept. At the same time, the display name of the atomic concept, the data type of the attribute, and the primary key information are set.

[0051] Step S202: Based on business needs and the explicit and implicit relationships between atomic concepts, define the central atomic concept as the master concept and the other concepts as subordinate concepts, and reassemble them to form new aggregate structure basic attributes and attribute dimensions, thus forming an aggregate concept data model.

[0052] Explicit relationships are direct connections between two atomic concepts. Implicit relationships, on the other hand, are relationships that do not have a direct connection between two atomic concepts but are linked through an intermediate concept.

[0053] Step S203: Aggregate knowledge extraction is to extract the entity data of each atomic concept based on the aggregate subgraph information of the aggregate concept. The relationship will not be displayed in the aggregate entity, but the entity data of each atomic concept will be obtained by using the relationship as the matching condition according to the relationship of the aggregate subgraph. Then, the data will be encapsulated according to the attribute mapping information of the aggregate concept to form an aggregate entity with the aggregate concept.

[0054] In this context, a subgraph refers to a graph formed by multiple related atomic concepts based on their relationships. The entity data of each atomic concept in the subgraph are then aggregated and reorganized according to the aggregated concept model to form aggregated entities.

[0055] Step S204: Aggregate caching and updating. The aggregated entities obtained after knowledge extraction need to be persisted to the cache. Simultaneously, based on the attribute mapping configuration of the aggregated concepts, dynamic updates of the aggregated entity data are supported for entity changes of atomic concepts.

[0056] Step S205: Resource data service based on the concept of aggregation. Aggregated data caching uses the distributed search engine Elasticsearch to achieve unified use of aggregated entity data resources. Elasticsearch can provide caching of complex aggregated entity data, and utilizes its indexing mechanism to retrieve data from cached aggregated entities, providing RESTful access to aggregated resources.

[0057] In some embodiments, the attributes of atomic concepts in an aggregate concept can be hidden, and the subgraph can be edited for relationships and pruned for attributes, demonstrating different data application effects.

[0058] In step S201, constructing the atomic concept specifically includes the following steps S2021~S2024: Step S2021: Select a relational database, connect to the database tables, select a pre-created table as a data source for an atomic concept, and use the table fields as attributes of the atomic concept.

[0059] Step S2022: Based on actual business needs, select one attribute from the attribute list of the atomic concept as the unique primary key of the atomic concept. Generally, select an attribute that is unique. The unique primary key can confirm the uniqueness of the entity data of the atomic concept.

[0060] Step S2023: Set the concept name and the concept's display name. The display name can be freely composed based on multiple attributes and text. The display name is the basis for the concept entity's display name.

[0061] Step S2024: By connecting the data source of the atomic concept through the database, extract the data from the data table in the database and map it to the result attribute of the atomic concept, assemble it into an atomic concept entity, and store it in the graph database. The selected graph database includes the neo4j graph database.

[0062] In step S202, constructing the aggregation concept specifically includes the following steps S2021~S2025: Step S2021: Select an atomic concept as the central atomic concept of the aggregation concept, which is the master concept of the aggregation concept. Using this master concept, retrieve the atomic concepts with explicit and implicit relationships, and the relationship graph between atomic concepts, i.e., the subgraph. Based on this, further explore other atomic concepts in the current subgraph. This exploration is based on the current atomic concept node, discovering other related graphs that are not shown in the current subgraph, thus expanding the range of subgraphs for aggregation selection. This forms the aggregate selectable subgraph.

[0063] Step S2022: From the optional subgraph for aggregation, select the main concept and several subordinate concepts to form a subgraph for constructing the aggregation. The main concept must have an explicit or implicit relationship with each subordinate concept; that is, a single concept without any relationship cannot appear. Furthermore, the relationships between each node and the central node can be reorganized based on this, supporting pre-aggregation adjustments and edits to each concept node and relationship subgraph. This forms the aggregation subgraph.

[0064] Step S2023: The aggregation process requires mapping the attributes of the primary and secondary concepts to the attributes of the aggregate concept. The mapping process directly maps the attributes of the primary concept to the basic attributes of the aggregate concept; that is, the aggregate concept directly inherits the attributes of the primary concept. All attributes of a secondary concept in the aggregation subgraph are mapped to an attribute dimension of the aggregate concept. This attribute dimension is a special complex attribute of the aggregate concept. Depending on the actual business requirements, the type of this complex attribute can be defined as a complex type (OBJECT) or a complex array (LIST). <object>For complex attributes in the mapping, it is necessary to define their display encoding, display name, type, and label. This maps them to attributes of an aggregate concept. For attribute groups from a concept, the visibility of each attribute can be customized to achieve an attribute hiding effect, i.e., attribute pruning.

[0065] Step S2024: Add output attributes for the aggregated concept, including the display name of the aggregated concept. This display name serves as the basis for the display names of subsequent aggregated entities and can be freely composed based on multiple attributes and text.

[0066] Step S2025: Store the configuration and mapping of the generated aggregate concepts, thus solidifying the generation of the aggregate concepts in physical storage. Storage includes the basic attribute information of the aggregate concept itself, the attribute mapping information from the concepts, and the aggregate subgraph. The basic attribute information includes the display name and the aggregate main concept ID. The atomic concepts and relationship information of the aggregate subgraph provide the basis for relationship configuration for the combination of aggregate entities of the aggregate concept, using the entity selection conditions under each atomic concept.

[0067] Once the aggregation concept is created and stored, a corresponding Elasticsearch index is created in the distributed search engine Elasticsearch to store the aggregated entity resource data.

[0068] In step S203, aggregated knowledge extraction, i.e., the construction process of aggregated entities, is as follows: Figure 3 As shown, by piecing together the atomic concept relationship information of the aggregated subgraph, a graph library query statement is constructed to retrieve each atomic concept. This query then retrieves the atomic entities corresponding to the concept entities. After obtaining these atomic concept entities, the attribute values ​​of the main concept are assigned to the corresponding basic attributes of the aggregated concept based on the attribute mapping information of the aggregated concept. The attribute list of the aggregated concept is converted into a complex type or a complex array, and the attribute values ​​from the concept are added to the corresponding fieldList of the mapped attributes. Based on the output attributes of the aggregated attributes, information such as the display name of the aggregated entity is obtained, thus forming a new aggregated entity.

[0069] In step S204, the method for persisting and updating the aggregated entity to the cache specifically includes the following steps S2041 to S2043: Step S2041: Aggregate caching. When the aggregate entity obtained through knowledge extraction is created, a corresponding Elasticsearch index and corresponding cache structure and type will be created to support different business scenarios. Full-text indexes with specific attributes can be set to improve query efficiency. The aggregate entity is cached in the corresponding index through the Elasticsearch storage interface.

[0070] Step S2042: Aggregated data supports subscribing to atomic concept data. It also supports dynamically adjusting aggregated data and incrementally updating the cache based on the change type of atomic concept data. After the atomic concept data changes, the aggregated concepts involved will be found based on the atomic concept, and the cache of these aggregated concepts will be updated in turn. The update occurs in the following ways: When new data is added to the atomic concept: 1) When new data is added to the main concept; the associated sub-concept entity is obtained through the aggregation subgraph configuration information, the data and associated entity are reassembled into a new entity according to the aggregation attribute mapping rules, and the reassembled entity record is added to the cache.

[0071] 2) When new data is added to a concept; the corresponding primary concept data is found through the aggregation subgraph configuration information. If not found, the process ends directly. If found, the primary key of the primary concept is used as the primary key of the aggregation concept in the attribute mapping rules between the primary concept and the aggregation concept. After finding the aggregation entity, the corresponding complex attributes are added to the aggregation entity according to the mapping rules of the subconcept in the attribute mapping information of the aggregation concept.

[0072] When the data of an atomic concept entity changes: 1) Changes to the main concept entity data; by using the aggregation subgraph configuration information, obtain the related sub-concept entities of the data, reassemble the data and related entities into a new entity according to the aggregation concept configuration rules, and then update the assembled entity record to the cache through the aggregation concept primary key.

[0073] 2) Changes from conceptual entity data; find the corresponding main concept data through the aggregate subgraph configuration information, and update the fieldList field under the complex attribute corresponding to the complex attribute of the aggregate data according to the attribute mapping rules of the primary key of the main concept and the aggregate concept.

[0074] When the concept of atoms is removed: 1) Deletion of primary concept entity data: Based on the attribute mapping rules of the primary key between the primary concept and the aggregate concept, the aggregate data of the specified primary key is deleted through the aggregate subgraph configuration information.

[0075] 2) Delete from conceptual entity data; find the corresponding main concept data through the aggregate subgraph configuration information, and delete the complex attributes corresponding to the aggregate data through the primary key according to the attribute mapping rules of the primary key of the main concept and the aggregate concept.

[0076] Step S1043: Dynamically update the aggregated entity by changing the source data. This method is highly efficient. However, when the change frequency is too high or the change data is large, real-time dynamic updates will put too much pressure on the service. In this case, a scheduled task can be used to update the changed aggregated concepts in full. Set up a scheduled task to record the changed entities according to their types. When the time comes, all the currently existing changed atomic data will be processed in batches according to step 4-2.

[0077] In step S205, supporting data services specifically includes the following steps S2051~S2052: Step S2051: The data service supports keyword queries and multidimensional indexes for aggregated entity names. The request reaches the data service provider, is transformed into a query statement to retrieve the data, and the data is returned.

[0078] Step S2052: For the retrieved aggregated resources, the data service will perform a simple encapsulation. This includes an attribute list and a sub-concept list. The attribute list stores basic attribute information and attribute information of the main concept. The sub-concept list is an attribute dimension information list, which records the attribute information mapped from the sub-nodes.

[0079] In summary, this invention provides a method and system for business data aggregation and retrieval. The method includes: connecting to a relational database and constructing atomic concepts and their attributes; selecting a master concept based on business needs and constructing an aggregate concept using the relationships between atomic concepts; obtaining the entity data of the corresponding master and subordinate concepts based on the basic attributes and attribute dimensions in the aggregate concept, and encapsulating them into an aggregate entity; caching and updating the aggregate entity; and providing data services to the external system to allow access and use of the aggregate resource data. This invention can handle the aggregation of complex data and update and adjust the data in a timely manner, solving the problem of low timeliness in traditional data aggregation and improving the efficiency and accuracy of data aggregation.

[0080] Corresponding to the above method, the present invention also provides a system comprising a computer device including a processor and a memory, wherein the memory stores computer instructions, and the processor is configured to execute the computer instructions stored in the memory, wherein when the computer instructions are executed by the processor, the system implements the steps of the method as described above.

[0081] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.

[0082] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.

[0083] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0084] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.

[0085] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.< / object>

Claims

1. A method for business data aggregation and retrieval, characterized in that, The method includes the following steps: Select a target relational database, parse each data table in the target relational database, define corresponding atomic concepts based on the content recorded in each data table, and use the table fields in the data table as attributes of the corresponding atomic concepts; Select one atomic concept from among the atomic concepts as the main concept based on business needs; Obtain the relationships between the atomic concepts, and find one or more subordinate concepts corresponding to the main concept based on the relationships, and construct the main concept and its corresponding subordinate concepts into an aggregate concept; The attributes of the main concept are used as the basic attributes of the aggregate concept to which it belongs, and the attributes of each subordinate concept corresponding to the main concept are used as the single attribute dimension of the aggregate concept to which it belongs. Based on the basic attributes and attribute dimensions of each aggregate concept, the corresponding data table is searched to obtain the entity data of the main concept and the subordinate concept in each aggregate concept, and then encapsulated into an aggregate entity; Each aggregated entity is persistently stored, and the aggregated entities are updated according to preset rules; Based on the target query requirements, use a distributed search engine to find the aggregated entities; After using the table fields in the data table as attributes of the corresponding atomic concepts, the method further includes: Select a unique attribute from the attributes of each atomic concept as the primary key to identify the entity data corresponding to that atomic concept; In addition, the data corresponding to each data item in the data table is extracted and mapped to the attributes of each atomic concept, and assembled into atomic entities, so that the corresponding atomic entities can be found according to the main concept and the subordinate concept in the aggregate concept and encapsulated into the corresponding aggregate entity; The process of persistently storing each aggregated entity and updating the aggregated entities according to preset rules includes: When the entity data corresponding to the main concept changes, the corresponding aggregate entity is found using the primary key of the main concept. The changed entity data of the main concept is then mapped to the basic attributes of the aggregate concept based on the attributes of its corresponding main concept, and recombined into a new aggregate entity. When the entity data corresponding to the sub-concept changes, the corresponding master concept is found using the association relationship; if there is no corresponding master concept, the update ends; if the corresponding master concept is found, the corresponding aggregate entity is found using the primary key of the master concept, and the changed sub-concept entity data is mapped to the attribute dimension of the aggregate concept according to the attributes of its corresponding sub-concept, and then recombined into a new aggregate entity. When the entity data corresponding to the main concept is deleted, the corresponding aggregate entity is found based on the primary key of the main concept using the association relationship, and the data of the aggregate entity is deleted. When the entity data corresponding to the sub-concept is deleted, the main concept corresponding to the sub-concept is found using the association relationship, the corresponding aggregate entity is found using the primary key of the main concept, and then the attribute dimension data of the aggregate entity corresponding to the sub-concept is deleted.

2. The business data aggregation and retrieval method according to claim 1, characterized in that, The process includes obtaining the relationships between atomic concepts, finding one or more subordinate concepts corresponding to the main concept based on the relationships, and constructing the main concept and its corresponding subordinate concepts into an aggregate concept. Based on the aforementioned relationships, the relationships between the primary concept and other unassociated atomic concepts are identified, and the relationship chains of the aforementioned relationships are expanded. Based on business needs, extract the main concept, some or all of the corresponding sub-concepts, and some or all of the relationship links corresponding to the main concept, and construct them into an aggregate concept; The association relationships include explicit relationships that directly link two atomic concepts, and implicit relationships that indirectly link two atomic concepts through an intermediate concept; the direct association relationships are established based on the equality of attributes and attribute values ​​between atomic concepts.

3. The business data aggregation and retrieval method according to claim 1, characterized in that, The process of persistently storing each aggregated entity and updating the aggregated entities according to preset rules includes: Based on the basic attributes and attribute dimensions of each aggregate concept, the corresponding data table is searched to obtain the updated entity data, and the aggregate entity is further updated accordingly.

4. The business data aggregation and retrieval method according to claim 1, characterized in that, The distributed search engine uses the Elasticsearch engine.

5. A business data aggregation and retrieval system, characterized in that, The system includes: The concept building module is used to select a target relational database, parse each data table in the target relational database, define corresponding atomic concepts based on the content recorded in each data table, and use the table fields in the data table as attributes of the corresponding atomic concepts. The data aggregation module is used to select one atomic concept from each atomic concept as the master concept according to business needs; obtain the relationship between each atomic concept, and find one or more subordinate concepts corresponding to the master concept according to the relationship, constructing the master concept and its corresponding subordinate concepts into an aggregate concept; use the attributes of the master concept as the basic attributes of the aggregate concept, and use the attributes of each subordinate concept corresponding to the master concept as a single attribute dimension of the aggregate concept; search the corresponding data table according to the basic attributes and attribute dimensions of each aggregate concept to obtain the entity data of the master concept and subordinate concepts in each aggregate concept, and encapsulate them into an aggregate entity; persist each aggregate entity and update the aggregate entity according to preset rules; The data retrieval module is used to find various aggregated entities using a distributed search engine based on the target query requirements; After using the table fields in the data table as attributes of the corresponding atomic concepts, the method further includes: Select a unique attribute from the attributes of each atomic concept as the primary key to identify the entity data corresponding to that atomic concept; In addition, the data corresponding to each data item in the data table is extracted and mapped to the attributes of each atomic concept, and assembled into atomic entities, so that the corresponding atomic entities can be found according to the main concept and the subordinate concept in the aggregate concept and encapsulated into the corresponding aggregate entity; The process of persistently storing each aggregated entity and updating the aggregated entities according to preset rules includes: When the entity data corresponding to the main concept changes, the corresponding aggregate entity is found using the primary key of the main concept. The changed entity data of the main concept is then mapped to the basic attributes of the aggregate concept based on the attributes of its corresponding main concept, and recombined into a new aggregate entity. When the entity data corresponding to the sub-concept changes, the corresponding master concept is found using the association relationship; if there is no corresponding master concept, the update ends; if the corresponding master concept is found, the corresponding aggregate entity is found using the primary key of the master concept, and the changed sub-concept entity data is mapped to the attribute dimension of the aggregate concept according to the attributes of its corresponding sub-concept, and then recombined into a new aggregate entity. When the entity data corresponding to the main concept is deleted, the corresponding aggregate entity is found based on the primary key of the main concept using the association relationship, and the data of the aggregate entity is deleted. When the entity data corresponding to the sub-concept is deleted, the main concept corresponding to the sub-concept is found using the association relationship, the corresponding aggregate entity is found using the primary key of the main concept, and then the attribute dimension data of the aggregate entity corresponding to the sub-concept is deleted.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Systems and methods for analyzing and synthesizing complex knowledge representations

    CN102947842A

  • Memory grounded conversational reasoning and question answering for assistant systems

    CN114072832A