Data model building methods, devices, equipment and media

By generating a data model and utilizing an ID generation interface and node location relationship mapping, the complexity and security issues of traditional data model building are resolved, achieving simplified operation and efficient management.

CN120744192BActive Publication Date: 2025-11-14SHENZHEN SHUYING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511252384.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-03
Publication Date
2025-11-14
Estimated Expiration
2045-09-03

AI Technical Summary

Technical Problem

Traditional data models are complex to build, difficult for non-technical personnel to operate, lack flexibility and security, and cannot meet the personalized and dynamic data management needs of enterprises.

Method used

By acquiring the entity objects and model information selected by the user, a data model is generated, and the model ID and account ID are generated using the ID generation interface. The node position relationship is determined, and the mapping of the data model is established.

Benefits of technology

It simplifies the data model creation process, improves security and uniqueness, facilitates data model management and retrieval, lowers the technical threshold, and enhances the flexibility and management efficiency of the data model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744192B_ABST
    Figure CN120744192B_ABST
Patent Text Reader

Abstract

This invention discloses a data model establishment method, apparatus, device, and medium. The method includes: acquiring user-selected entity objects and user-set model information; generating a data model based on the entity objects and the model information; generating a model ID and an account ID corresponding to the data model by calling an ID generation interface based on the entity nodes corresponding to the entity objects; determining the node position relationship of the entity nodes in the main path table based on the entity object ID table corresponding to the model ID, the entity object account table corresponding to the account ID, and the main path table; and mapping the node position relationship to the data model to complete the establishment of the data model. This invention not only makes model establishment simple and efficient but also ensures the security and uniqueness of the data model, achieving effective management of the data model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data modeling technology, and in particular to a data model building method, apparatus, device and medium. Background Technology

[0002] In the traditional fields of data management and modeling, building data models that meet business needs typically requires specialized database knowledge and technical skills. Traditional database modeling processes involve complex SQL statement writing and database structure design, which presents a high learning and operational barrier for non-technical personnel. Furthermore, data models created using traditional methods often lack flexibility in managing relationships between models and defining model lifecycles, resulting in high costs for using and maintaining the data models.

[0003] To address this issue, low-code and no-code platforms have emerged in the market, attempting to simplify operations for business users through visualization and configuration tools. However, these tools often have limited functionality when dealing with complex business scenarios and cannot adequately meet the personalized and dynamic data management needs of enterprises. Furthermore, existing tools still have shortcomings in data model lifecycle management, entity relationship handling, and performance optimization in distributed environments. Summary of the Invention

[0004] This invention provides a data model building method, apparatus, device, and medium, aiming to solve the problems of complexity and low security in existing data model building.

[0005] In a first aspect, embodiments of the present invention provide a data model establishment method, including:

[0006] Obtain the entity object selected by the user and the model information set by the user, and generate a data model based on the entity object and the model information;

[0007] Based on the entity node corresponding to the entity object, the ID generation interface is called to generate a model ID and an account ID corresponding to the data model;

[0008] The node position relationship of the entity node in the main channel path table is determined based on the entity object ID table corresponding to the model ID, the entity object account table corresponding to the account ID, and the main channel path table.

[0009] The node positional relationships are mapped to the data model to complete the establishment of the data model.

[0010] Secondly, embodiments of the present invention also provide a data model building apparatus, comprising:

[0011] The generation unit is used to acquire the entity object selected by the user and the model information set by the user, and generate a data model based on the entity object and the model information.

[0012] The call generation function is used to generate a model ID and an account ID corresponding to the data model based on the entity node corresponding to the entity object by calling the ID generation interface.

[0013] The determining unit is used to determine the node position relationship of the entity node in the main channel path table based on the entity object ID table corresponding to the model ID, the entity object account table corresponding to the account ID, and the main channel path table.

[0014] The mapping unit is used to map the node positional relationships to the data model in order to complete the establishment of the data model.

[0015] Thirdly, embodiments of the present invention also provide a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described method.

[0016] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0017] This invention provides a method, apparatus, device, and medium for establishing a data model. The method includes: acquiring user-selected entity objects and user-set model information; generating a data model based on the entity objects and model information; generating a model ID and an account ID corresponding to the data model by calling an ID generation interface based on the entity nodes corresponding to the entity objects; determining the node position relationship of the entity nodes in the main path table based on an entity object ID table corresponding to the model ID, an entity object account table corresponding to the account ID, and a main path table; and mapping the node position relationship to the data model to complete the establishment of the data model. The technical solution of this invention generates a data model based on user-selected entity objects and set model information, making model establishment simple and efficient; generating model IDs and account IDs representing the data model ensures the security and uniqueness of the data model; and mapping the node position relationship to the data model facilitates data model invocation and achieves effective management of the data model. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic flowchart of a data model establishment method provided in an embodiment of the present invention;

[0020] Figure 2 This is a schematic diagram of a sub-process of a data model establishment method provided in an embodiment of the present invention;

[0021] Figure 3 This is a schematic diagram of another sub-process of a data model establishment method provided in an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram of another sub-process of a data model establishment method provided in an embodiment of the present invention;

[0023] Figure 5 A schematic block diagram of a data model building device provided in an embodiment of the present invention;

[0024] Figure 6 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.

[0026] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0027] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0028] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0029] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0030] Please see Figure 1 , Figure 1 This is a flowchart illustrating the data model establishment method provided in an embodiment of the present invention. The data model establishment method will be described in detail below. Figure 1 As shown, the method includes the following steps S110-S140.

[0031] S110. Obtain the entity object selected by the user and the model information set by the user, and generate a data model based on the entity object and the model information.

[0032] In this embodiment, the user selects entity objects and sets model information on the general industry data model service tool (hereinafter referred to as the digital model editor). After completion, the digital model editor obtains the entity objects selected by the user and the model information set by the user, and generates a data model based on the entity objects and the model information. The model information includes name, date, purpose and attribute information.

[0033] In one embodiment, such as Figure 2 As shown, step S110 may specifically include steps S111-S116:

[0034] S111. Identify the type of the entity object;

[0035] S112. If the entity object is an organization entity object, then the organization model is retrieved from the database, and the data model is generated based on the organization model and the model information.

[0036] S113. If the entity object is a role entity object, then the role model is retrieved from the database, and the data model is generated based on the role model and the model information.

[0037] S114. If the entity object is a spatial entity object, then the spatial model is retrieved from the database, and the data model is generated based on the spatial model and the model information.

[0038] S115. If the entity object is an element entity object, then the element model is retrieved from the database, and the data model is generated based on the element model and the model information.

[0039] S116. If the entity object is an active entity object, then the active model is retrieved from the database, and the data model is generated based on the active model and the model information.

[0040] In this embodiment, the types of entity objects include organizations, roles, spaces, elements, and activities. Organizations are represented by O, roles by P, spaces by S, elements by E, and activities by A. The database stores organization models, role models, space models, element models, and activity models. Therefore, based on the type of entity object, the corresponding model is retrieved from the database, and a data model is generated based on the retrieved model and its information. It should be noted that in this embodiment, in addition to generating models, model relationships can also be generated. These relationships are the connections between the data model and other data models stored in the database. Furthermore, through the above steps S111-S116, users can easily construct data models encompassing five entity dimensions—organization, role, space, element, and activity—in a no-code manner, even without extensive technical background.

[0041] S120. Based on the entity node corresponding to the entity object, call the ID generation interface to generate the model ID and account ID corresponding to the data model.

[0042] In this embodiment, each entity node in the main channel path table corresponds to a metadata table. The metadata table is sharded according to a preset logic and categorized by organization, role, space, element, and activity. The data model is developed according to this preset logic. Specifically, the preset logic is a 0-1-2-3 tool logic, where 0-0 refers to layer 0 being tool developer organizations, layer 1-1 being industry developer organizations, layer 2-2 being organization instantiation, and layer 3-3 being organization operation. The data model is developed according to this preset logic; specifically, layer 0 is developed first, then layer 1, then layer 2, and finally layer 3. It should be noted that in this embodiment, the entity nodes include organization entity nodes, role entity nodes, space entity nodes, element entity nodes, and activity entity nodes. The ID generation interface includes an organization ID generation interface, a role ID generation interface, a space ID generation interface, an element ID generation interface, and an activity ID generation interface. It should also be noted that in this embodiment, the uniqueness and security of the data model in operation and management are ensured through model IDs and account IDs. This digital model editor not only enables full lifecycle management of data models but also optimizes cross-model data flow and relationship management, improving data interoperability and consistency. In this way, the data modeling process is greatly simplified, enhancing the flexibility and efficiency of enterprise data management.

[0043] In one embodiment, such as Figure 3 As shown, step S120 may specifically include steps S121-S125:

[0044] S121. If the entity node corresponding to the entity object is the organization entity node, then call the organization ID generation interface to generate the model ID and the account ID corresponding to the data model;

[0045] S122. If the entity node corresponding to the entity object is the role entity node, then call the role ID generation interface to generate the model ID and the account ID corresponding to the data model;

[0046] S123. If the entity node corresponding to the entity object is the spatial entity node, then call the spatial ID generation interface to generate the model ID and the account ID corresponding to the data model;

[0047] S124. If the entity node corresponding to the entity object is the element entity node, then call the element ID generation interface to generate the model ID and the account ID corresponding to the data model;

[0048] S125. If the entity node corresponding to the entity object is the active entity node, then the activity ID generation interface is called to generate the model ID and the account ID corresponding to the data model.

[0049] In this embodiment, the organization ID generation interface includes an organization ID generation sub-interface. Step S121 specifically includes: if the entity node corresponding to the entity object is the organization entity node, then identifying the organization type of the organization entity node; setting the organization type reference field in the input parameters of the organization ID generation sub-interface according to the organization type; and calling the organization ID generation sub-interface to generate the model ID and the account ID corresponding to the data model according to the set input parameters. It should be noted that in this embodiment, the organization type of the organization entity node includes personal organizations, enterprise organizations, family organizations, government organizations, and social organizations. The input parameters of the organization ID generation interface are shown in Table 1, and the output parameters of the organization ID generation interface are shown in Table 2. It should also be noted that, in this embodiment, the input parameters of the organization ID generation sub-interface are the same as those of the organization ID generation interface, except for the value of the orgType field. Specifically, "Op" represents an individual organization; "Of" represents a family organization; "Oe" represents a business organization; "Os" represents a social organization; and "Og" represents a government organization. The output parameters of the organization ID generation sub-interface are the same as those of the organization ID generation interface. The input parameters of the role ID generation interface are the same as those of the organization ID generation interface, except for the roleType field, which represents the organization role type code. The values ​​are: "Rx" represents the organization role; "Ro" represents the owner; "Rp" represents the operator; "Rm" represents the manager; "Re" represents the executor; and "Rv" represents the evaluator. The output parameters of the role ID generation interface are the same as those of the organization ID generation interface, and the topseaID field represents the role TOPSEA ID. The input parameters of the spatial ID generation interface differ from those of the organization ID generation interface in two fields: industrialType and admDivision. The industrialType field represents the industry type. (Value description: Refer to the industry coding standard table). The admDivision field represents the administrative division code. (Value description: Refer to the administrative division standard table). The output parameters of the spatial ID generation interface differ from those of the organization ID generation interface in two fields: industrialType and elementType. The industrialType field represents the industry type. (Value description: Refer to the industry coding standard table). The elementType field represents the element type code. (Value description: Refer to the CPC product type standard table). The output parameters of the element ID generation interface differ from those of the organization ID generation interface in two fields: topseaID field represents the element TOPSEA ID.The input parameters of the Activity ID generation interface differ from those of the Organization ID generation interface only in two fields: industrialType and activityType. The industrialType field represents the industry type. Value explanation: Refer to the industry coding standard table; the activityType field represents the activity type code; the output parameters of the Activity ID generation interface differ from those of the Organization ID generation interface, and the topseaID field represents the activity TOPSEA ID.

[0050] Table 1

[0051]

[0052] Table 2

[0053]

[0054] S130. Determine the node position relationship of the entity node in the main channel path table based on the entity object ID table corresponding to the model ID, the entity object account table corresponding to the account ID, and the main channel path table.

[0055] In this embodiment, as Figure 4 As shown, step S130 may specifically include steps S131-S133: S131, associating the entity object ID table corresponding to the model ID with the entity object account table corresponding to the account ID through the ID account association table; S132, associating the model ID in the entity object ID table with the data relationship table corresponding to the entity object, wherein the main channel path table stores the predecessor model ID and successor model ID corresponding to the predecessor and successor entity nodes of the entity nodes in the main channel path table; S133, associating the entity object ID table with the entity nodes to obtain the node position relationship of the entity nodes in the main channel path table. It should be noted that, in this embodiment, the entity object ID table is shown in Table 3; the ID account association table stores the model ID, account ID and the mapping relationship between them; the entity object account table is shown in Table 4. It should also be noted that, in this embodiment, during the establishment of the data model, an entity object data relationship table will also be generated. The entity object data relationship table is shown in Table 5. Various tables can be generated through the entity object data relationship table. Specifically, the following tables can be generated: entity object template master table, entity object sub-template master table, entity object template slave table, entity object sub-template slave table, entity object sub-template extended slave table, entity object sub-template extended attribute table, entity object sub-template attribute table, entity object template attribute table, entity object instance dynamic master table, entity object instance dynamic extended table, and entity object instance dynamic master table.

[0056] Table 3

[0057] field name type Remark id int Database primary key opsea_id varchar OPSEA (Organization O, Role P, Space S, Element E, Activity A) ID entity_type varchar Object types: Organizations [corporate organizations, family organizations, individual organizations, social organizations, government organizations], Roles [organizational roles, activity roles, role responsibilities / rights / benefits], Spaces, Elements, Activities, Image objects, Communication objects path text Main Channel Path Table status int The default value is 1, which means enabled; 0 means disabled.

[0058] Table 4

[0059]

[0060] Table 5

[0061]

[0062] S140. Map the node position relationships to the data model to complete the establishment of the data model.

[0063] In this embodiment, the node position relationship is mapped to the data model. After the data model is established, it can be published and packaged. All tables involved in the data model can be added, deleted, modified, and queried. Furthermore, the tables can be packaged and published.

[0064] It should be noted that, in this embodiment, after the data model builder constructs the data model, it designs the model, for example, defining the model's lifecycle, defining model relationships, defining table attributes, etc., and then publishes the model to the resource repository; the data model operator obtains the latest data model version from the resource repository, reviews the latest data model version, and after the review is approved, publishes the latest data model version to the digital model marketplace; the data model requester views the data model details from the digital model marketplace, obtains the data model to its organization's resource repository, creates an activity body model, designs the activity body model, and adds the data model to the activity body model.

[0065] It should also be noted that, in this embodiment, if a preset call instruction is received in the main channel path table, the data model is called according to the preset call instruction.

[0066] To facilitate understanding, let's take logistics management as an example. The traditional approach is for product managers to conduct requirements research and design, followed by architects to do technical design, such as through domain model design to organize and write high-level design documents, define domain divisions, lifecycles, behaviors, events, etc., and programmers to do detailed design and interface definition. The data model building method in this embodiment can greatly lower the threshold. Business experts or senior business personnel with a good understanding of the business can define the data model themselves, the relationships between models, the definition of tables, table relationships, etc., and finally form an ER diagram. They can also define the lifecycle, business processes, etc., and complete the tasks that were originally done by multiple roles such as product managers, architects, and programmers themselves, and this can be reused.

[0067] In summary, the data model establishment method in this embodiment: 1. Lowers the technical threshold. Traditional data modeling tools typically require users to have in-depth database knowledge and technical skills, making it difficult for non-technical personnel to participate in model design and management, thus limiting the effective utilization of business personnel by enterprises. This method, through no-code configuration, provides an intuitive operating interface, allowing users to directly define and manage data models in business scenarios, significantly lowering the technical threshold. 2. Enhances the flexibility of relationship management. In complex business environments, there are multi-layered relationships and dependencies between data models, and existing solutions often lack flexibility and scalability in handling these relationship chains. This method, through the structural setting of five entity dimensions (organization, role, space, element, activity), enables users to easily build relationships between models and dynamically manage and flow them through activities. 3. Improves lifecycle management. Existing technologies generally lack systematic management support for the data model lifecycle, making it difficult to automate and intelligently manage the creation, use, and decommissioning of models. This method provides comprehensive lifecycle management, allowing users to define multiple stages and sub-stages of the model and realize the flow between stages through activities, reducing the maintenance burden and improving management effectiveness. 4. Provides unified identifier management. Traditional identifier (ID) management often leads to data chaos and conflicts in distributed systems. The lack of a unified identifier affects the uniqueness and traceability of data. This method ensures data consistency, security, and reliability through model IDs and account IDs, especially in cross-system environments. 5. Cross-dimensional business scenario management. For complex business scenarios, traditional methods struggle to achieve cross-dimensional integration and management. This method, through the TOPSEA dimension (T time / O organization / P role / E element / A activity) architecture, provides a multi-dimensional and flexible integration solution for industry business scenarios, effectively supporting the business needs of all industries. 6. Optimizes user experience. Many existing tools lack intuitive and user-friendly interface design, resulting in complex and inefficient user operations. This method, through a no-code graphical interface and configuration tools, enables users to intuitively perform database modeling and operations, simplifying processes, reducing error rates, and improving the overall user experience.

[0068] Figure 5 This is a schematic block diagram of a data model building apparatus 200 provided in an embodiment of the present invention. Figure 5 As shown, corresponding to the above data model building method, the present invention also provides a data model building apparatus 200. This data model building apparatus 200 includes a unit for performing the above data model building method, and the apparatus can be configured in a computer device. Specifically, please refer to... Figure 5 The data model building device 200 includes an acquisition and generation unit 201, a calling unit 202, a determination unit 203, and a mapping unit 204.

[0069] The acquisition and generation unit 201 is used to acquire the entity object selected by the user and the model information set by the user, and generate a data model based on the entity object and the model information; the invocation unit 202 is used to call the ID generation interface according to the entity node corresponding to the entity object to generate the model ID and account ID corresponding to the data model; the determination unit 203 is used to determine the node position relationship of the entity node in the main channel path table according to the entity object ID table corresponding to the model ID, the entity object account table corresponding to the account ID, and the main channel path table; the mapping unit 204 is used to map the node position relationship to the data model to complete the establishment of the data model.

[0070] In some embodiments, such as this embodiment, the acquisition and generation unit 201 is specifically used to identify the type of the entity object; if the entity object is an organization entity object, an organization model is retrieved from the database, and the data model is generated based on the organization model and the model information; if the entity object is a role entity object, a role model is retrieved from the database, and the data model is generated based on the role model and the model information; if the entity object is a space entity object, a space model is retrieved from the database, and the data model is generated based on the space model and the model information; if the entity object is an element entity object, an element model is retrieved from the database, and the data model is generated based on the element model and the model information; if the entity object is an activity entity object, an activity model is retrieved from the database, and the data model is generated based on the activity model and the model information.

[0071] In some embodiments, such as this embodiment, the calling unit 202 is specifically configured to: if the entity node corresponding to the entity object is the organization entity node, then call the organization ID generation interface to generate the model ID and account ID corresponding to the data model; if the entity node corresponding to the entity object is the role entity node, then call the role ID generation interface to generate the model ID and account ID corresponding to the data model; if the entity node corresponding to the entity object is the space entity node, then call the space ID generation interface to generate the model ID and account ID corresponding to the data model; if the entity node corresponding to the entity object is the element entity node, then call the element ID generation interface to generate the model ID and account ID corresponding to the data model; if the entity node corresponding to the entity object is the activity entity node, then call the activity ID generation interface to generate the model ID and account ID corresponding to the data model.

[0072] In some embodiments, such as this embodiment, the calling unit 202 is further configured to: if the entity node corresponding to the entity object is the organization entity node, identify the organization type of the organization entity node; set the organization type reference field in the input parameter of the organization ID generation sub-interface according to the organization type; and call the organization ID generation sub-interface according to the set input parameter to generate the model ID and the account ID corresponding to the data model.

[0073] In some embodiments, such as this embodiment, the determining unit 203 is specifically used to associate the entity object ID table corresponding to the model ID with the entity object account table corresponding to the account ID through an ID account association table; associate the model ID in the entity object ID table with the data relationship table corresponding to the entity object, wherein the main channel path table stores the predecessor model ID and successor model ID corresponding to the predecessor entity node and successor entity node of the entity node in the main channel path table; associate the entity object ID table with the entity node to obtain the node position relationship of the entity node in the main channel path table.

[0074] The aforementioned data model building apparatus can be implemented as a computer program, which can, for example... Figure 6 It runs on the computer device shown.

[0075] Please see Figure 6 , Figure 6 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device 300 is a device with data model building function.

[0076] See Figure 6 The computer device 300 includes a processor 302, a memory, and a network interface 305 connected via a system bus 301. The memory may include a non-volatile storage medium 303 and internal memory 304.

[0077] The non-volatile storage medium 303 can store an operating system 3031 and a computer program 3032. When the computer program 3032 is executed, it causes the processor 302 to execute a data model building method.

[0078] The processor 302 provides computing and control capabilities to support the operation of the entire computer device 300.

[0079] The internal memory 304 provides an environment for the execution of the computer program 3032 in the non-volatile storage medium 303. When the computer program 3032 is executed by the processor 302, the processor 302 can execute a data model establishment method.

[0080] This network interface 305 is used for network communication with other devices. Those skilled in the art will understand that... Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 300 to which the present invention is applied. The specific computer device 300 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0081] The processor 302 is used to run a computer program 3032 stored in a memory to implement any embodiment of the above-described data model establishment method.

[0082] It should be understood that in this embodiment, the processor 302 may be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0083] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0084] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform any embodiment of the data model establishment method described above.

[0085] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.

[0086] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are 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 implementations should not be considered beyond the scope of this invention.

[0087] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0088] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0089] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part 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 to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0090] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0091] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.

[0092] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions 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 data model building method, applied to a data model builder, characterized in that, include: Obtain the entity object selected by the user and the model information set by the user, and generate a data model based on the entity object and the model information; Based on the entity node corresponding to the entity object, the ID generation interface is called to generate a model ID and an account ID corresponding to the data model; The node position relationship of the entity node in the main channel path table is determined based on the entity object ID table corresponding to the model ID, the entity object account table corresponding to the account ID, and the main channel path table. The node positional relationships are mapped to the data model to complete the establishment of the data model; The step of generating a data model based on the entity object and the model information includes: Identify the type of the entity object; If the entity object is an organization entity object, then the organization model is retrieved from the database, and the data model is generated based on the organization model and the model information; If the entity object is a role entity object, then the role model is retrieved from the database, and the data model is generated based on the role model and the model information; If the entity object is a spatial entity object, then the spatial model is retrieved from the database, and the data model is generated based on the spatial model and the model information; If the entity object is an element entity object, then the element model is retrieved from the database, and the data model is generated based on the element model and the model information; If the entity object is an active entity object, then the active model is retrieved from the database, and the data model is generated based on the active model and the model information; The step of determining the node position relationship of the entity node in the main channel path table based on the entity object ID table corresponding to the model ID, the entity object account table corresponding to the account ID, and the main channel path table includes: The entity object ID table corresponding to the model ID is associated with the entity object account table corresponding to the account ID through the ID account association table; The model ID in the entity object ID table is associated with the data relationship table corresponding to the entity object. The main channel path table stores the predecessor model ID and successor model ID corresponding to the predecessor and successor entity nodes of the entity node in the main channel path table. The entity object ID table is associated with the entity node to obtain the node position relationship of the entity node in the main channel path table.

2. The method according to claim 1, characterized in that, The entity nodes include organization entity nodes, role entity nodes, space entity nodes, element entity nodes, and activity entity nodes. The ID generation interface includes an organization ID generation interface, a role ID generation interface, a space ID generation interface, an element ID generation interface, and an activity ID generation interface. The step of generating a model ID and account ID corresponding to the data model based on the entity node corresponding to the entity object by calling the ID generation interface includes: If the entity node corresponding to the entity object is the organization entity node, then the organization ID generation interface is called to generate the model ID and the account ID corresponding to the data model; If the entity node corresponding to the entity object is the role entity node, then the role ID generation interface is called to generate the model ID and the account ID corresponding to the data model; If the entity node corresponding to the entity object is the spatial entity node, then the spatial ID generation interface is called to generate the model ID and the account ID corresponding to the data model; If the entity node corresponding to the entity object is the element entity node, then the element ID generation interface is called to generate the model ID and the account ID corresponding to the data model; If the entity node corresponding to the entity object is the active entity node, then the activity ID generation interface is called to generate the model ID and the account ID corresponding to the data model.

3. The method according to claim 2, characterized in that, The organization ID generation interface includes an organization ID generation sub-interface. If the entity node corresponding to the entity object is the organization entity node, then the organization ID generation interface is called to generate the model ID and the account ID corresponding to the data model, including: If the entity node corresponding to the entity object is the organization entity node, then the organization type of the organization entity node is identified; Set the organization type reference field in the input parameters of the organization ID generation sub-interface according to the organization type; Based on the input parameters set, the organization ID generation sub-interface is invoked to generate the model ID and account ID corresponding to the data model.

4. The method according to any one of claims 1-3, characterized in that, All tables involved in the data model can be added, deleted, modified, and queried.

5. The method according to any one of claims 1-3, characterized in that, Each entity node corresponds to a metadata table. The metadata table is sharded according to a preset logic and classified according to organization, role, space, element, and activity. The data model is developed according to the preset logic.

6. A data model building apparatus, applied in a data model builder, characterized in that, include: The generation unit is used to acquire the entity object selected by the user and the model information set by the user, and generate a data model based on the entity object and the model information. The call generation function is used to generate a model ID and an account ID corresponding to the data model based on the entity node corresponding to the entity object by calling the ID generation interface. The determining unit is used to determine the node position relationship of the entity node in the main channel path table based on the entity object ID table corresponding to the model ID, the entity object account table corresponding to the account ID, and the main channel path table. A mapping unit is used to map the node positional relationships to the data model in order to complete the establishment of the data model; The acquisition and generation unit is specifically used for: identifying the type of the entity object; if the entity object is an organization entity object, then calling the organization model from the database, and generating the data model based on the organization model and the model information; if the entity object is a role entity object, then calling the role model from the database, and generating the data model based on the role model and the model information; if the entity object is a space entity object, then calling the space model from the database, and generating the data model based on the space model and the model information; if the entity object is an element entity object, then calling the element model from the database, and generating the data model based on the element model and the model information; if the entity object is an activity entity object, then calling the activity model from the database, and generating the data model based on the activity model and the model information. The determining unit is specifically used to: associate the entity object ID table corresponding to the model ID with the entity object account table corresponding to the account ID through the ID account association table; The model ID in the entity object ID table is associated with the data relationship table corresponding to the entity object. The main channel path table stores the predecessor model ID and successor model ID corresponding to the predecessor and successor entity nodes of the entity node in the main channel path table. The entity object ID table is associated with the entity node to obtain the node position relationship of the entity node in the main channel path table.

7. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Method for constructing a product operation management data model

    CN109491641A

  • Data model construction method based on business data standard table

    CN114281795A