Processing method and device of metadata model and electronic equipment
By constructing a three-layer metadata model consisting of tags, entities, and attributes, the problem of poor flexibility in existing metadata models when adding behavioral events is solved, enabling rapid response to business needs and more granular user filtering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2026-03-17
AI Technical Summary
When existing metadata models add behavioral events on top of tags and metrics, they cannot meet business needs in a timely manner, have poor flexibility, cannot respond quickly to business changes, and cannot filter users with finer granularity.
Construct a three-layer metadata model consisting of tags, entities, and attributes. Use the tag definition table, entity table, and attribute table to find users, and abstract the common features of tags, metrics, and behavioral events to automatically detect data changes and quickly respond to business needs.
It enables timely response to business development and rapid business needs without adjusting the filtering logic, allowing for more granular user filtering and exhibiting high flexibility and scalability.
Smart Images

Figure CN115934859B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of metadata technology, and in particular to a method, apparatus and electronic device for processing metadata models. Background Technology
[0002] Existing metadata models typically include a tag definition table and a wide tag table based on user dimensions. Users can be segmented using these tables during searches. However, for more granular user segmentation, it may be necessary to combine tags and metrics with specific user behaviors for further analysis. For example, to filter active customers who viewed a specific article on a website yesterday, the "active customer" tag needs to be supplemented with "browsing behavior" for user segmentation. In this case, the existing tag and metric model cannot promptly meet this business requirement, necessitating the development of new tag metrics based on specific behavioral logic to satisfy the business needs.
[0003] However, when new tags or metrics are added, the client needs to add corresponding tags and metric items, the backend application needs to add corresponding filtering logic, and the data warehouse needs to add corresponding calculation logic. When the business wide table or data fields of tags and metrics change, in addition to the data team needing to process the tags and metrics, the front-end and back-end development teams of the application also need to adjust the code.
[0004] Therefore, if behavioral events need to be added to the existing metadata model for filtering in addition to tags and metrics, the filtering logic of the existing metadata model needs to be adjusted, which has the following drawbacks: business changes lead to adjustments in business rules, the demand iteration cycle is slow, and it cannot meet business development in a timely manner; it has poor flexibility and cannot respond quickly to business needs; it cannot filter users with finer granularity and requires continuous reprocessing of tags to meet business needs. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a method, apparatus and electronic device for processing metadata models, which can find users based on tags, indicators and behavioral events without adjusting the filtering logic. This can meet business development needs in a timely manner, respond quickly to business requirements, and filter users with finer granularity, thus having high flexibility.
[0006] In a first aspect, embodiments of the present invention provide a method for processing a metadata model, the method comprising: constructing a metadata model based on a tag definition table, a data entity table, and an entity attribute table of multiple applications or projects; wherein the tag definition, data entity, and entity attribute of each tag are related to each other; receiving a search request, and determining the search result of the search request based on the metadata model.
[0007] In a preferred embodiment of this application, the tag definition, data entity, and entity attribute of each tag are associated with each other through the tag's entity ID and / or attribute ID.
[0008] In a preferred embodiment of this application, the fields of the tag definition table include: code, name, entity ID, attribute ID, business type, and data type; the fields of the data entity table include: entity ID, entity name, entity type, and entity business type; and the fields of the entity attribute table include: entity ID, attribute ID, attribute name, data type, and business type.
[0009] In a preferred embodiment of this application, the data types of the tag definition table include: text, boolean, date, time, and character; the business types of the tag definition table include: attributes, tags, customer groups, and metrics.
[0010] In a preferred embodiment of this application, the entity types of the data entity table include: relational database table, relational database view, key-value pair database, and index database.
[0011] In a preferred embodiment of this application, the label definition table is used to maintain the definition information and status information of labels and indicators; the data entity table is used to record the data entities mapped by the label definition table and the behavior events; and the entity attribute table is used to record the entity attributes contained in the data entity table.
[0012] In a preferred embodiment of this application, the search request includes: a tag index search request and / or a behavior event search request; the step of determining the search result of the search request based on the metadata model includes: searching for a first search result of the tag index search request based on the tag definition table, the data entity table, and the entity attribute table; and / or, searching for a second search result of the behavior event search request based on the data entity table and the entity attribute table; and determining the final search result based on the first search result and / or the second search result.
[0013] In a preferred embodiment of this application, the terminal device provides a search page, through which the user enters a tag index search request via the tag index option on the search page, and through the behavior event option on the search page, the user enters a behavior event search request.
[0014] In a preferred embodiment of this application, the method further includes: obtaining a first tag and a first behavioral event; wherein the first tag and the first behavioral event are tags and behavioral events recorded in the metadata model; determining a second tag based on the first tag and the first behavioral event; updating the tag definition table, data entity table, and entity attribute table in the metadata model based on the second tag; and updating the field content of the data entity table or entity attribute table in the metadata model based on the changed business logic of the first tag or the first behavioral event if the business logic of the first tag or the first behavioral event changes.
[0015] In a preferred embodiment of this application, the method further includes: if the business logic of the second tag changes, updating the field content of the data entity table or entity attribute table in the metadata model based on the changed business logic of the second tag; wherein, the second tag is a tag recorded in the metadata model.
[0016] Secondly, embodiments of the present invention also provide a metadata model processing apparatus, the apparatus comprising: a metadata model building module, used to build a metadata model based on a tag definition table, a data entity table and an entity attribute table of multiple applications or projects; wherein the tag definition, data entity and entity attribute of each tag are related to each other; and a metadata model lookup module, used to receive a lookup request and determine the lookup result of the lookup request based on the metadata model.
[0017] Thirdly, embodiments of the present invention also provide an electronic device, including a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the above-described metadata model processing method.
[0018] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the above-described metadata model processing method.
[0019] The embodiments of the present invention bring the following beneficial effects:
[0020] The present invention provides a metadata model processing method, apparatus, and electronic device that constructs a metadata model based on tag definition tables, data entity tables, and entity attribute tables of multiple applications or projects. It can search for users through tag definition tables, data entity tables, and entity attribute tables based on tags, indicators, and behavioral events without adjusting the filtering logic. It can meet business development needs in a timely manner, respond quickly to business requirements, and filter users with finer granularity, thus having high flexibility.
[0021] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0022] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0023] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 A flowchart illustrating a metadata model processing method provided in an embodiment of the present invention;
[0025] Figure 2 This is a schematic diagram of entity relationships in a metadata model provided by an embodiment of the present invention;
[0026] Figure 3 A flowchart illustrating another method for processing a metadata model provided in an embodiment of the present invention;
[0027] Figure 4 A schematic diagram of a search page provided in an embodiment of the present invention;
[0028] Figure 5 This is a schematic diagram illustrating a metadata model lookup method provided in an embodiment of the present invention;
[0029] Figure 6 A schematic diagram of the structure of a metadata model processing device provided in an embodiment of the present invention;
[0030] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] Currently, after business data enters the data platform through various means and undergoes processing at different layers of the data warehouse, it produces user tags, user metrics, and other data. Applications typically use this user tag and metric data in two ways:
[0033] 1. Applications directly use tags and metrics: Within the data warehouse, various tags and metrics are integrated into one or more large wide tables, recording the tags and metrics required by the business. These wide business tables are then pushed to the application, typically hosted in a relational database such as MySQL. When using these wide business tables, the application needs to understand the data information within the tables and then bind it to specific business functions. Examples include user profiling and user filtering functions: segmenting user groups based on user tags and defined metric values.
[0034] The client submits the set tags, metrics, and other parameters to the backend service. The backend service, based on the specific tag and metric values, locates the corresponding database table, organizes the SQL statement, and submits it to the database for retrieval. During the SQL statement organization process, the business wide table, data fields, and filtering logic are relatively fixed. When the business wide table or data fields change, the code logic also needs to be adjusted accordingly.
[0035] 2. Application-side maintenance of specific tags and metrics: After business data is processed through various layers of the data warehouse, it forms tag and metric centers for each subject area. This tag and metric data is then pushed to the application. The application, based on the actual business scenario, directly uses or further processes the tags and metrics to form specific business wide tables, which then provide data services. In this approach, the application handles some of the tag and metric processing work. When business changes, corresponding code logic adjustments may be needed from the data warehouse tag and metric processing logic to the application-side tag and metric secondary processing logic, and finally to client-side usage.
[0036] Because tags are a high-level summary of users, their threshold ranges are frequently adjusted based on changes in user distribution. Metrics, on the other hand, are business descriptions closely related to the business; when the business changes, the calculation methods for metrics also change accordingly.
[0037] In existing technical solutions, metadata models typically include a tag definition table and a wide tag table based on user dimensions. Users can be targeted using these two tables during searches. When a tag or metric is added, the client needs to add the corresponding tag or metric item, the backend application needs to add corresponding filtering logic, and the data warehouse needs to add corresponding calculation logic. When the business wide table or data fields of tags or metrics change, in addition to the data team needing to process the tags and metrics, the front-end and back-end development teams on the application side also need to adjust their code.
[0038] To achieve more granular user segmentation, it may be necessary to combine tags and metrics with specific user behaviors for further analysis. For example, when filtering active customers who viewed a specific article on a website yesterday, the "active customer" tag needs to be supplemented with "browsing behavior" for user segmentation. In this case, the existing tag and metric model cannot meet this business requirement in a timely manner, and new tag and metric models need to be developed based on specific behavioral logic to satisfy the business needs.
[0039] Therefore, if behavioral events need to be added to the existing metadata model for filtering in addition to tags and metrics, the filtering logic of the existing metadata model needs to be adjusted, which has the following drawbacks: business changes lead to adjustments in business rules, the demand iteration cycle is slow, and it cannot meet business development in a timely manner; it has poor flexibility and cannot respond quickly to business needs; it cannot filter users with finer granularity and requires continuous reprocessing of tags to meet business needs.
[0040] Based on this, embodiments of the present invention provide a metadata model processing method, apparatus, and electronic device, specifically providing a metadata model processing method for tags, metrics, and behavioral events, used to address the adjustment of various tags, metrics, and behavioral events caused by business changes when business scenarios change, enabling the application to automatically perceive data changes.
[0041] The method provided in this embodiment can highly abstract and summarize the common characteristics of tags, metrics, and behavioral events, establishing a three-layer metadata model: tag metrics (TAG), data entities (ENTITY), and entity attributes (ATTR). Tag metrics are then bound to data entities and entity attributes. When a user retrieves a tag, they can look up the metadata through the specific tag metric code to obtain the specific entity object and entity attributes. The dynamically obtained entity objects and attributes are then used to organize calculation logic and submitted to the server for user retrieval.
[0042] To facilitate understanding of this embodiment, a method for processing a metadata model disclosed in this embodiment of the invention will first be described in detail.
[0043] This invention provides a method for processing metadata models. The following concepts need to be understood in this invention:
[0044] Tags: Based on the needs of the business scenario, tags are highly refined feature identifiers obtained by processing the target object's attribute information, behavioral information, and business information, and using algorithms such as abstraction, induction, and reasoning. Their values are highly generalized, mutually independent, and enumerable. A tag consists of a tag name and a tag value, and is affixed to the target object. Tags are divided into fact tags, rule tags, and model tags.
[0045] Fact tags: Describe the objective facts of an entity, focusing on its attribute characteristics, such as user gender, education level, age, and place of origin. They originate from the entity's attributes and are objective and static.
[0046] Rule-based labels: Labels are labels applied to processed data. They are statistical results combining attributes and measures, such as whether a patient is a resident with a contracted family doctor, or whether an institution is involved in rural integration development. Labels are generated by combining attributes with certain judgment rules and are relatively objective and static.
[0047] Model tags: Insights into different characteristics of business value orientation are used for the evaluation and prediction of entities, such as whether the blood pressure control of a hypertensive patient is good, bad, or maintained. Tags are generated by combining attributes with algorithms and are subjective and dynamic.
[0048] Metrics: These are specific numerical values, generally consisting of a name and a value. They embody both the qualitative and quantitative characteristics of a phenomenon. Metrics can generally be divided into count metrics and composite metrics. Count metrics include total assets, number of visits, page views, and dwell time; composite metrics include bounce rate and conversion rate. Metrics are generally more meaningful when analyzed in conjunction with dimensions.
[0049] Behavioral event: A behavioral event describes a user doing a specific thing at a certain time, in a certain place, and in a certain way.
[0050] Dimension: A dimension describes the characteristics or attributes of something. For example, a person's gender, city of residence, and favorite color are all attributes. In the data field, dimensions are often used to describe and analyze metrics. For instance, a single metric like visit count doesn't provide much information; dimensions are needed to make the metric more specific and meaningful.
[0051] Metadata: Data that describes data; descriptive information about data and information resources; or structured data used to provide information about a resource. Metadata is data that describes information resources or data objects, and its purpose is to identify resources; evaluate resources; track changes in resources during use; achieve simple and efficient management of large amounts of data; and enable effective discovery, retrieval, integrated organization, and effective management of information resources.
[0052] Based on the above description, see Figure 1 The flowchart shown illustrates a method for processing a metadata model, which includes the following steps:
[0053] Step S100: Construct a metadata model based on the tag definition table, data entity table, and entity attribute table of multiple applications or projects; wherein the tag definition, data entity, and entity attribute of each tag are interconnected.
[0054] In this embodiment, the label can represent a user, or it can represent other entities such as enterprises or organizations. See also Figure 2 The diagram illustrates entity relationships in a metadata model. An Entity Relationship Diagram (ER) provides a method for representing entity types, attributes, and relationships, used to describe conceptual models of the real world. Figure 2 As shown, the label definition table, data entity table, and entity attribute table are interconnected. Specifically, there is a mapping relationship between the label definition table and the data entity table, a mapping relationship between the label definition table and the entity attribute table, and a membership relationship between the data entity table and the entity attribute table.
[0055] This embodiment can highly abstract and summarize the common characteristics of tags, metrics, and behavioral events, establishing a three-layer metadata model including tag metrics (TAG), data entities (ENTITY), and entity attributes (ATTR). Metadata can be bound to tag metrics, data entities, and entity attributes. When a user retrieves a tag, they can look up the metadata through the specific tag metric code to obtain the specific entity object and entity attributes.
[0056] The metadata model proposed in this embodiment not only supports metadata for user tags and metrics, but also abstracts user behavior events. It abstracts and summarizes user behavior events as events, event time, event dimensions, event metrics, event attributes, and event business IDs, and maintains events uniformly in the data entity table.
[0057] Step S102: Receive a search request and determine the search result based on the metadata model.
[0058] During retrieval, tags, metrics, and behavioral events can be uniformly retrieved using a metadata model to determine the search results for the query request. Specifically, tags and metrics can be retrieved through the tag definition table, and behavioral events can be retrieved through the data entity table and entity attribute table. The final search results are determined based on the search results obtained from the above retrieval.
[0059] It should be noted that in this embodiment, at least one tag indicator is required as a filtering condition, and the query results can be an empty set.
[0060] In addition, when business scenarios change, various tags, indicators, and behavioral events are adjusted due to business changes. The application end of the method provided in this embodiment can automatically sense the data changes and can also select users with more granularity based on user behavior events.
[0061] The present invention provides a metadata model processing method that constructs a metadata model based on tag definition tables, data entity tables, and entity attribute tables of multiple applications or projects. Without adjusting the filtering logic, users can be found through the tag definition tables, data entity tables, and entity attribute tables based on tags, indicators, and behavioral events. This method can promptly meet business development needs, quickly respond to business requirements, and filter users with finer granularity, offering high flexibility.
[0062] This embodiment provides another method for processing metadata models, which is implemented based on the above embodiment. See also Figure 3 The flowchart illustrates another method for processing metadata models. The method for processing metadata models in this embodiment includes the following steps:
[0063] Step S300: Construct a metadata model based on the tag definition table, data entity table, and entity attribute table of multiple applications or projects.
[0064] In this embodiment, the characteristics of tags, metrics, and behavioral events can be abstracted and summarized to establish a three-layer metadata model: tag metrics (TAG), data entities (ENTITY), and entity attributes (ATTR). The tag definition table t_tag, data entity table t_entity, and entity attribute table t_entity_attr are designed accordingly.
[0065] Specifically, in this embodiment, the tag definition, data entity, and entity attribute of each tag are interconnected through the tag's entity ID and / or attribute ID. That is, the aforementioned tag definition table, data entity table, and entity attribute table include at least an entity ID or an attribute ID.
[0066] The tag definition table is used to maintain the definition and status information of tags and metrics, and to establish a mapping relationship with data entities and entity attributes. See Table 1 for an example of a tag definition table. The core fields of the tag definition table include: code, name, entity ID, attribute ID, business type, and data type.
[0067]
[0068]
[0069] Table 1
[0070] Data types are used to label the data types of the metric data. The data types in the label definition table include: text (string), boolean, date, datetime, and character (class). Applications can use this dictionary to validate the format of the metric input items.
[0071] Business type is used to distinguish the types of tag metric metadata. The business types in the tag definition table include: attribute, tag, customer group, and metric. Among them, attribute is fact tag, tag includes model tag and rule tag, and customer group refers to the customer group defined based on existing tag metrics, which is usually created by the business.
[0072] The data entity table records the data entities mapped to the tag definition table and behavior events. See Table 2 for an example of a data entity table. The core fields of the data entity table include: Entity ID, Entity Name, Entity Type, and Entity Business Type.
[0073]
[0074]
[0075] Table 2
[0076] Entity types are primarily used to distinguish the medium in which an entity is stored. Entity types for data entity tables include: table (typically a relational database table); view (a relational database view); and Redis (storage format is...).<K,V> Key-value databases; indexed databases like Elasticsearch; and more. Furthermore, the entity types in data entity tables can be extended according to the specific scenario, for example, using open-source databases like HBase.
[0077] For entity business types, when the entity business type value is 1 (tag metric), the tag definition table t_tag is associated with the data entity table t_entity through entity_ID (i.e., entity ID). When the value is 2 (behavior), the entity table records an abstracted user behavior event. The behavior event table records the user ID, event time, event dimension, event metric, and event-related attributes. For example, for user payment behavior, the payment behavior event table would record: user ID, payment time (event time), product category (event dimension), payment amount (event metric), product name (event attribute), transaction ID (event attribute), etc.
[0078] The entity attribute table records the entity attributes contained in the data entity table. See Table 3 for an example of an entity attribute table. The core fields of the entity attribute table include: Entity ID, Attribute ID, Attribute Name, Data Type, and Business Type.
[0079]
[0080] Table 3
[0081] When the entity table represents user behavior events, the entity attribute table records metadata information such as: user ID, event time, event dimension, event metric, and event-related attributes. For example, for user payment behavior, the attribute table would record metadata information such as: user ID, payment time (event time), product category (event dimension), payment amount (event metric), product name (event attribute), and transaction ID (event attribute).
[0082] Step S302: Receive the search request.
[0083] Specifically, the terminal device can be the application client of this embodiment, and the terminal device can be a physical server or a cloud server. The search request includes: a tag indicator search request and / or a behavior event search request. The terminal device provides a search page, and the user enters a tag indicator search request through the tag indicator option on the search page, and the user enters a behavior event search request through the behavior event option on the search page.
[0084] User groups can be segmented by setting user tagging metrics and specific behavioral events. For example, users who registered before 2021, are highly active female users aged 25 and above, and whose payment amount during the National Day holiday exceeded 500 yuan can be identified.
[0085] See Figure 4 The diagram shows a search page where users can enter a search request using the tag index option: highly active female users aged 25 and above who registered before 2021; or they can enter a search request using the behavior event option: users who made payments exceeding 500 yuan during the National Day holiday.
[0086] like Figure 4 As shown, the application's front-end can display tag metric options and behavior event options. The specific logic for loading tag metric options is as follows: Tag metric items within the project are retrieved based on the project code; the front-end determines the operation logic for each tag item based on the `tag_datatype` value; the `number` class allows setting operations such as greater than or less than; the `date` class only allows input of date formatted data; the `string` class allows input of text; and the `class` class allows selecting a dictionary of tag items, such as "male" or "female". Additionally, behavior event options can also be loaded to retrieve behavior event items and their logic.
[0087] When a new tag metric is added, the application only needs to add the tag metric metadata to obtain the definition information of the new tag metric. The backend program can also dynamically obtain the corresponding data entity through the tag metric metadata, thereby performing user filtering calculations. The same applies to behavioral events.
[0088] Step S304: Search for the first search result of the tag indicator search request based on the tag definition table, the data entity table, and the entity attribute table; and / or, search for the second search result of the behavior event search request based on the data entity table and the entity attribute table.
[0089] See Figure 5 The diagram illustrates a method for finding metadata models, where the backend can segment user groups using tag indicators and behavioral items.
[0090] The client submits tags, metrics, behavioral items, and values for the target user group as a search request. The system determines whether the search request is a tag / metric search request or a behavioral / event search request and then organizes the calculation logic accordingly.
[0091] If it is a tag metric lookup request, the entity business type is tag metric, and the data entity and attributes corresponding to the tag metric can be obtained to organize the calculation logic; if it is an event lookup request, the entity business type is behavior event, and the data entity, behavior event, dimension, and metric corresponding to the behavior can be obtained to organize the calculation logic.
[0092] Step S306: Determine the final search result based on the first search result and / or the second search result.
[0093] The organized tag metrics and behavioral calculation logic are submitted to the storage computing engine for calculation, yielding a first search result and a second search result. Finally, the first and second search results are merged to obtain the final search result. For example, AND-OR, AND-OR, intersection-union, and other operations can be performed on the first and second search results to obtain the final search result.
[0094] In addition, this embodiment can also update the metadata model through the following steps. For example: obtaining a first tag and a first behavioral event; wherein, the first tag and the first behavioral event are tags and behavioral events recorded in the metadata model; determining a second tag based on the first tag and the first behavioral event; updating the tag definition table, data entity table, and entity attribute table in the metadata model based on the second tag.
[0095] This embodiment can also freely combine existing tag indicators (i.e., the first tag) and existing behavioral events (i.e., the first behavioral event) to form new tags (i.e., the second tag) as needed, and update the metadata of this tag to the tag definition table, data entity table and entity attribute table in the metadata model.
[0096] For example, if the business logic of the second tag event changes, the field content of the data entity table or entity attribute table in the metadata model is updated based on the changed business logic of the second tag; where the second tag is the tag recorded in the metadata model.
[0097] When the tag logic changes, only the data entity table or entity attribute table needs to be updated in the metadata model, without having to update the tag definition table multiple times, thus reducing the number of adjustments to the tag metric filtering logic.
[0098] The method provided in this embodiment of the invention can abstract the common business attributes of tags, metrics, and events. It forms three data models: tags / metrics, entities, and attributes, to uniformly maintain metadata information such as tags, metrics, and events. The metadata model in this embodiment decouples the data warehouse processing end and data application from the client, making maintenance convenient, expansion flexible, and unaffected by business changes. Compared to common tag and metric management, the metadata model in this embodiment also includes behavioral events, unifying behavioral events into the metadata. Furthermore, behavioral event entities have their own business attributes, allowing for flexible configuration and more granular description of users.
[0099] This embodiment does not focus on the processing logic of tags and is not limited by the tag metric storage engine. The proposed metadata model not only supports the metadata of user tags and metrics, but also abstracts user behavior events. User behavior events are summarized as events, event time, event dimensions, metric values, event-carried attributes, and event business IDs. Events are uniformly maintained in entity tables, establishing event dimensions, event metrics, event attributes, etc. At the same time, the event table can be expanded with event dimension items, event attributes, and event metric values according to its own business characteristics.
[0100] The method provided in this embodiment has the following advantages:
[0101] (1) Universality: The proposed standardized metadata management of tags, indicators and events ensures the universality of the technology and can be well promoted.
[0102] (2) Uniformity: Abstract the common business attributes of tags, metrics, and events, and build globally unified metadata information for tags, metrics, and events.
[0103] (3) Flexibility: Establish relationships between tags, metrics, and specific entities and attributes. When business rules change and tags and metrics need to be adjusted, only the tag metadata information needs to be maintained, reducing the need for adjustments on the application side due to changes.
[0104] (4) Scalability: Business tags can be derived by combining existing basic tags according to business rules. These business tags can also be maintained uniformly through tag metadata.
[0105] (5) Decoupling: Data development engineers and application development engineers can communicate on a business basis through unified tag metadata. When using tags, the application can dynamically obtain the entity and attributes of the tag through the tag metadata. Both parties can focus on their own business without having to worry about upstream and downstream logic.
[0106] Corresponding to the above method embodiments, this invention provides a metadata model processing apparatus, see [link to relevant documentation]. Figure 6 The diagram shows a structural schematic of a metadata model processing device, which includes:
[0107] The metadata model building module 61 is used to build a metadata model based on tag definition tables, data entity tables, and entity attribute tables of multiple applications or projects; wherein the tag definition, data entity, and entity attribute of each tag are interconnected.
[0108] Metadata model lookup module 62 is used to receive lookup requests and determine the lookup results based on the metadata model.
[0109] The metadata model processing device provided in this embodiment of the invention constructs a metadata model based on tag definition tables, data entity tables, and entity attribute tables of multiple applications or projects. It can search for users through tag definition tables, data entity tables, and entity attribute tables based on tags, indicators, and behavioral events without adjusting the filtering logic. It can meet business development needs in a timely manner, respond quickly to business requirements, and filter users with finer granularity, thus having high flexibility.
[0110] The tag definition, data entity, and entity attributes of each tag are interconnected through the tag's entity ID and / or attribute ID.
[0111] The fields in the tag definition table include: code, name, entity ID, attribute ID, business type, and data type; the fields in the data entity table include: entity ID, entity name, entity type, and entity business type; the fields in the entity attribute table include: entity ID, attribute ID, attribute name, data type, and business type.
[0112] The data types of the tag definition table include: text, boolean, date, time, and character; the business types of the tag definition table include: attributes, tags, customer groups, and metrics.
[0113] The entity types of data entity tables include: relational database tables, relational database views, key-value databases, and indexed databases.
[0114] The label definition table is used to maintain the definition and status information of labels and metrics; the data entity table is used to record the data entities mapped by the label definition table and behavioral events; the entity attribute table is used to record the entity attributes contained in the data entity table.
[0115] The search request includes: a tag metric search request and / or a behavior event search request; the aforementioned metadata model search module is used to search for the first search result of the tag metric search request based on the tag definition table, the data entity table, and the entity attribute table; and / or, to search for the second search result of the behavior event search request based on the data entity table and the entity attribute table; and to determine the final search result based on the first search result and / or the second search result.
[0116] The terminal device provides a search page, through which users can enter a tag index search request via the tag index option and a behavior event search request via the behavior event option.
[0117] The aforementioned device further includes: a customer group derivation module, used to obtain a first tag and a first behavioral event; wherein the first tag and the first behavioral event are tags and behavioral events recorded in the metadata model; a second tag is determined based on the first tag and the first behavioral event; the tag definition table, data entity table, and entity attribute table in the metadata model are updated based on the second tag; if the business logic of the first tag or the first behavioral event changes, the field content of the data entity table or entity attribute table in the metadata model is updated based on the changed business logic of the first tag or the first behavioral event.
[0118] The aforementioned device further includes: a model update module, used to update the field content of the data entity table or entity attribute table in the metadata model based on the changed business logic of the second tag if the business logic of the second tag changes; wherein, the second tag is the tag and behavior event recorded in the metadata model.
[0119] The metadata model processing apparatus provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned metadata model processing method embodiment. For the sake of brevity, any parts not mentioned in the metadata model processing apparatus embodiment can be referred to the corresponding content in the aforementioned metadata model processing method embodiment.
[0120] This invention also provides an electronic device for running the above-described metadata model processing method; see [link to related documentation]. Figure 7 The diagram shows the structure of an electronic device, which includes a memory 100 and a processor 101. The memory 100 is used to store one or more computer instructions, which are executed by the processor 101 to implement the above-mentioned metadata model processing method.
[0121] Furthermore, Figure 7 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 101, the communication interface 103 and the memory 100 connected via the bus 102.
[0122] The memory 100 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0123] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. Processor 101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 100, and processor 101 reads information from memory 100 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0124] This invention also provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are called and executed by a processor, they cause the processor to implement the above-described metadata model processing method. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0125] The computer program products of the metadata model processing method, apparatus and electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0126] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and / or device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0127] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0128] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0129] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0130] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method of processing a metadata model, characterized by, The method comprises: building a metadata model based on a label definition table, a data entity table and an entity attribute table of a plurality of applications or projects; wherein the label definition, the data entity and the entity attribute of each label are associated with each other; receiving a search request, and determining a search result of the search request based on the metadata model; The search request comprises a label index search request and / or a behavior event search request; the step of determining the search result of the search request based on the metadata model comprises: determining a first search result of the label index search request based on the label definition table, the data entity table and the entity attribute table; and / or determining a second search result of the behavior event search request based on the data entity table and the entity attribute table; and determining a final search result based on the first search result and / or the second search result.
2. The method of claim 1, wherein, The label definition, the data entity and the entity attribute of each label are associated with each other through an entity ID and / or an attribute ID of the label.
3. The method of claim 2, wherein, The fields of the label definition table comprise code, name, entity ID, attribute ID, business type and data type; The fields of the data entity table comprise entity ID, entity name, entity type and entity business type; The fields of the entity attribute table comprise entity ID, attribute ID, attribute name, data type and business type.
4. The method of claim 3, wherein, The data type of the label definition table comprises text, Boolean, date, time and dictionary; and the business type of the label definition table comprises attribute, label, customer group and index.
5. The method of claim 3, wherein, The entity type of the data entity table comprises relational database table, relational database view, key-value pair database and index database.
6. The method of claim 1, wherein, The label definition table is used to maintain definition information and state information of labels and indexes; The data entity table is used to record data entities mapped by the label definition table and behavior events; The entity attribute table is used to record entity attributes contained in the data entity table.
7. The method of claim 1, wherein, The terminal device provides a search page, and a user inputs the label index search request through a label index option of the search page, and the user inputs the behavior event search request through a behavior event option of the search page.
8. The method of claim 1, wherein, The method further comprises: obtaining a first label and a first behavior event; wherein the first label and the first behavior event are labels and behavior events recorded in the metadata model; determining a second label based on the first label and the first behavior event; updating the label definition table, the data entity table and the entity attribute table in the metadata model based on the second label; if the business logic of the first label or the first behavior event is changed, updating the field content of the data entity table or the entity attribute table in the metadata model based on the changed business logic of the first label or the first behavior event.
9. The method of claim 1, wherein, The method further comprises: If the business logic of the second label is changed, the field content of the data entity table or the entity attribute table in the metadata model is updated based on the changed business logic of the second label; wherein the second label is a label recorded in the metadata model.
10. A processing apparatus of a metadata model, characterized by, The apparatus comprises: A metadata model establishing module is configured to establish a metadata model based on a label definition table, a data entity table and an entity attribute table of a plurality of applications or projects; wherein the label definition, the data entity and the entity attribute of each label are associated with each other; A metadata model searching module is configured to receive a search request, and determine a search result of the search request based on the metadata model; The search request comprises a label index search request and / or a behavior event search request; the metadata model searching module is configured to search a first search result of the label index search request based on the label definition table, the data entity table and the entity attribute table; and / or search a second search result of the behavior event search request based on the data entity table and the entity attribute table; and determine a final search result based on the first search result and / or the second search result.
11. An electronic device, comprising: A processor and a memory are included, the memory stores computer executable instructions which can be executed by the processor, and the processor executes the computer executable instructions to implement the metadata model processing method in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions, and when the computer executable instructions are called and executed by the processor, the computer executable instructions cause the processor to implement the metadata model processing method in any one of claims 1 to 9.
Citation Information
Patent Citations
System and method for tagging data
CA3081893A1
Data processing method and device
CN111949665A