CN112162731B - Data expansion method, device, storage medium and electronic device - Google Patents

Data expansion method, device, storage medium and electronic device Download PDF

Info

Publication number
CN112162731B
CN112162731B CN202011090236.0A CN202011090236A CN112162731B CN 112162731 B CN112162731 B CN 112162731B CN 202011090236 A CN202011090236 A CN 202011090236A CN 112162731 B CN112162731 B CN 112162731B
Authority
CN
China
Prior art keywords
data
metadata
information
model
expansion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011090236.0A
Other languages
Chinese (zh)
Other versions
CN112162731A (en
Inventor
杨凯然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Xingyun Kaiwu Technology Co.,Ltd.
Original Assignee
Guangzhou Leyaoyao Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Leyaoyao Information Technology Co ltd filed Critical Guangzhou Leyaoyao Information Technology Co ltd
Priority to CN202011090236.0A priority Critical patent/CN112162731B/en
Publication of CN112162731A publication Critical patent/CN112162731A/en
Application granted granted Critical
Publication of CN112162731B publication Critical patent/CN112162731B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data expansion method, a data expansion device, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring data expansion demand information, wherein the data expansion demand information at least comprises service data to be expanded; creating metadata expansion information corresponding to the service data to be expanded in a metadata model, wherein the metadata model is a model matched with data expansion demand information; and performing data expansion management on the service data to be expanded by utilizing the metadata expansion information. The invention can improve the data expansion efficiency.

Description

Data expansion method, device, storage medium and electronic device
Technical Field
The invention relates to the field of computers, in particular to a data expansion method, a data expansion device, a storage medium and an electronic device.
Background
At present, in the process of service development, service data is often expanded in order to meet personalized development requirements.
In practice, it is found that when business data is expanded, object attributes often need to be modified to meet different development requirements. However, the change of the object attribute affects the logic of the data persistence layer, and in this case, a developer needs to perform a complicated development operation to solve the effect, which results in low efficiency of expansion of the business data.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a data expansion method, a data expansion device, a storage medium and an electronic device, which are used for at least improving the data expansion efficiency.
According to an aspect of an embodiment of the present invention, there is provided a data extension method, including: acquiring data expansion demand information, wherein the data expansion demand information at least comprises service data to be expanded; creating metadata expansion information corresponding to the service data to be expanded in a metadata model, wherein the metadata model is a model matched with the data expansion requirement information; and performing data expansion management on the service data to be expanded by using the metadata expansion information.
As an optional implementation manner, the creating metadata extension information corresponding to the service data to be extended in the metadata model includes: acquiring to-be-expanded model information in the data expansion demand information, wherein the data expansion demand information also comprises the to-be-expanded model information; determining the metadata model matched with the model information to be expanded; generating a target field of the metadata extension information in the metadata model, wherein the target field is used for dividing the data authority and the service type of the service data to be extended; and creating metadata extension information corresponding to the service data to be extended by using the target field.
As an optional implementation manner, the performing data expansion management on the service data to be expanded by using the metadata expansion information includes: and under the condition of writing the service data to be expanded, updating a data expansion management table in the metadata model by using the metadata expansion information, wherein the metadata expansion information at least comprises the numerical value of the service data to be expanded and the attribute of the service data to be expanded.
As an optional implementation manner, before the obtaining the data expansion requirement information, the method further includes: acquiring service data; creating metadata for managing the business data, wherein the metadata at least comprises extended metadata and public metadata; and constructing the metadata model by using the metadata, wherein the metadata model at least comprises a first hierarchy formed by the metadata and a second hierarchy formed by the business data.
As an optional implementation manner, after performing data expansion management on the service data to be expanded by using the metadata expansion information, the method further includes: and creating a global identifier for the service data to be expanded by using the metadata, wherein the global identifier at least comprises a service type corresponding to the service data to be expanded.
As an optional implementation manner, after performing data expansion management on the service data to be expanded by using the metadata expansion information, the method further includes: determining a target split key under the condition that the quantity of the service data reaches a target threshold value, wherein the target split key is a sublibrary field or a sublibrary field, and the target split key at least comprises an extended data split key and a standard data split key; and performing database dividing operation and table dividing operation on the service data by using the target splitting key.
According to another aspect of the embodiments of the present invention, there is also provided a data expansion apparatus, including: an obtaining unit, configured to obtain data expansion requirement information, where the data expansion requirement information at least includes service data to be expanded; a creating unit, configured to create metadata extension information corresponding to the service data to be extended in a metadata model, where the metadata model is a model matched with the data extension requirement information; and the extension unit is used for performing data extension management on the service data to be extended by using the metadata extension information.
As an optional implementation, the creating unit includes: an obtaining subunit, configured to obtain model information to be extended in the data extension requirement information, where the data extension requirement information further includes the model information to be extended; a determining subunit, configured to determine the metadata model that matches the model information to be expanded; a generating subunit, configured to generate a target field of the metadata extension information in the metadata model, where the target field is used to divide the data permission and the service type of the service data to be extended; and the creating subunit is used for creating the metadata extension information corresponding to the service data to be extended by using the target field.
As an optional implementation manner, a manner of the extension unit being configured to perform data extension management on the service data to be extended by using the metadata extension information is specifically: and under the condition of writing the service data to be expanded, updating a data expansion management table in the metadata model by using the metadata expansion information, wherein the metadata expansion information at least comprises the numerical value of the service data to be expanded and the attribute of the service data to be expanded.
As an optional implementation manner, the obtaining unit is further configured to obtain service data before obtaining the data expansion requirement information; the creating unit is further configured to create metadata for managing the service data, where the metadata at least includes extended metadata and common metadata; and constructing the metadata model by using the metadata, wherein the metadata model at least comprises a first hierarchy formed by the metadata and a second hierarchy formed by the business data.
As an optional implementation manner, the creating unit is further configured to create a global identifier for the service data to be extended by using the metadata after performing data extension management on the service data to be extended by using the metadata extension information, where the global identifier at least includes a service type corresponding to the service data to be extended.
As an optional implementation, the apparatus further includes: a determining unit, configured to determine a target split key when the number of the service data reaches a target threshold after performing data expansion management on the service data to be expanded by using the metadata expansion information, where the target split key is a sublibrary field or a sublibrary field, and the target split key at least includes an expansion data split key and a standard data split key; and the database and table dividing unit is used for executing database dividing operation and table dividing operation on the service data by using the target splitting key.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above data expansion method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the data expansion method through the computer program.
In the embodiment of the invention, data expansion demand information is obtained, and the data expansion demand information at least comprises service data to be expanded; creating metadata expansion information corresponding to the service data to be expanded in a metadata model, wherein the metadata model is a model matched with data expansion demand information; and performing data expansion management on the service data to be expanded by utilizing the metadata expansion information. The process can utilize the metadata model to create metadata expansion information of the service data to be expanded, and the influence on the logic of the data persistence layer is reduced by driving the expansion of the service data through the metadata, so that the influence does not need to be solved manually and time-consuming, and the data expansion efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of an alternative data expansion method according to an embodiment of the present invention;
FIG. 2 is a flow diagram of an alternative data expansion method according to an embodiment of the present invention;
FIG. 3 is a flow diagram of an alternative data expansion method according to an embodiment of the present invention;
FIG. 4 is an architectural diagram of an optional data extension according to an embodiment of the invention;
FIG. 5 is a schematic structural diagram of an alternative data expansion apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
An embodiment of the present invention provides an optional module construction method, and as shown in fig. 1, the data expansion method includes:
s101, acquiring data expansion demand information, wherein the data expansion demand information at least comprises service data to be expanded;
s102, creating metadata expansion information corresponding to the service data to be expanded in a metadata model, wherein the metadata model is a model matched with data expansion demand information;
and S103, performing data expansion management on the service data to be expanded by using the metadata expansion information.
In the embodiment of the present invention, the data expansion requirement information is requirement information created to meet service expansion, and may include service data to be expanded, model information to be expanded, and the like. The service data to be expanded may be data meeting personalized service requirements, and the model information to be expanded may be a metadata model for managing the applied service data. After the data expansion requirement information is acquired, metadata expansion information corresponding to the service data to be expanded may be created in the metadata model. The metadata model may be a model designed using a metadata design schema, the metadata is data for performing abstract management on the service data, and the metadata model may include at least a hierarchy formed by the service data and a hierarchy formed by the metadata. Specifically, the bottom layer of the metadata model may be object information and data information of the service data, the object information and the data information of the service data may be abstracted, so as to obtain a model layer, the model layer may be understood as a summary of the object information and the data information of the service data, further, the model layer may be abstracted, so as to obtain a meta model layer, the meta model layer is used to describe attribute information and the like of each model in the model layer, and further, the meta model layer may be abstracted, so as to obtain a meta model layer, where the meta model layer is used to describe information such as relationships and attributes between constituent elements of each meta model in the meta model layer. Optionally, the metadata model described in the embodiment of the present invention is not limited to the structures of the object data layer, the model layer, the meta model layer, and may also be composed of only a two-layer structure or a three-layer structure, which is not limited in the embodiment of the present invention. For example, if a relational database is used to represent business logic, it may consist of a two-layer structure. Specifically, in the case of using the metadata model composed of the structures of the object data layer, the model layer, the meta model layer, and the meta model layer, the object data layer may be specific service data, which may include but is not limited to document files, folder data, user data, and the like; the model layer can abstract user data to obtain a user table structure or a user model, and can also abstract an object data layer by using a class File, wherein the class File can be but is not limited to a File class, a Folder class and the like; the meta-model layer may further abstract the model layer, and may represent attribute information of the model itself, for example, may describe information of a File class or Folder class, File attributes, and relationships between elements, or may describe field information, type information, and constraint information of the user model or user table; the meta-model layer may describe the relationship between the constituent elements in the meta-model layer and attribute information of each constituent element, for example, the attribute, type, relationship, and the like of the field itself in the user table structure.
Further, metadata extension information corresponding to the service data to be extended may be created in the metadata model, where the metadata extension information is used to configure the service data to be extended, and may include, but is not limited to, storing the service data to be extended, updating relationships between data tables according to attributes of the service data to be extended, and modifying data management information corresponding to each hierarchy in the metadata model. The specific creation mode may be: determining object information and data information of service data to be expanded, and creating corresponding object information and data information in an object data layer in a metadata model; determining model information corresponding to the object information and the data information, and writing the model information into a model layer; and under the condition that the model attribute information is changed in the process of writing the model information, updating the model attribute information and the model relation information in the meta-model layer, and updating the information of the meta-model layer in the meta-model layer to complete the generation of the metadata extension information, wherein the metadata extension information can comprise the mapping relation between the hierarchies. After the metadata extension information is created, the metadata model can be updated with the metadata extension information, thereby achieving management of data extension.
In the embodiment of the invention, data expansion demand information is obtained, and the data expansion demand information at least comprises service data to be expanded; creating metadata expansion information corresponding to the service data to be expanded in a metadata model, wherein the metadata model is a model matched with data expansion demand information; and performing data expansion management on the service data to be expanded by utilizing the metadata expansion information. The process can utilize the metadata model to create metadata expansion information of the service data to be expanded, and the influence on the logic of the data persistence layer is reduced by driving the expansion of the service data through the metadata, so that the influence does not need to be solved manually and time-consuming, and the data expansion efficiency is improved.
Further, an embodiment of the present invention provides another optional data extension method, as shown in fig. 2, where the data extension method includes:
s201, acquiring data expansion demand information, wherein the data expansion demand information at least comprises service data to be expanded;
s202, acquiring model information to be expanded in data expansion demand information, wherein the data expansion demand information also comprises the model information to be expanded;
s203, determining a metadata model matched with the information of the model to be expanded;
s204, generating a target field of metadata extension information in the metadata model, wherein the target field is used for dividing the data authority and the service type of the service data to be extended;
s205, creating metadata extension information corresponding to the service data to be extended by using the target field;
and S206, under the condition that the business data to be expanded is written, updating a data expansion management table in the metadata model by using metadata expansion information, wherein the metadata expansion information at least comprises the numerical value of the business data to be expanded and the attribute of the business data to be expanded.
In this embodiment of the present invention, the creating of the metadata extension information corresponding to the service data to be extended in the metadata model may include the following steps:
s1, acquiring model information to be expanded in the data expansion demand information, wherein the data expansion demand information also comprises the model information to be expanded;
s2, determining a metadata model matched with the model information to be expanded;
s3, generating a target field of metadata extension information in the metadata model, wherein the target field is used for dividing the data authority and the service type of the service data to be extended;
and S4, creating metadata extension information corresponding to the service data to be extended by using the target field.
In the embodiment of the invention, different metadata models can be correspondingly arranged for different applications to manage the service data in the applications, in the process of data expansion, the information of the model to be expanded in the data expansion demand information can be obtained first, the information of the model to be expanded can be a model identifier, and further, the metadata model matched with the information of the model to be expanded can be determined. A target field of metadata extension information may be generated in the metadata model, and the target field may be used to divide data rights and service types of the service data, for example, different fields are set for different data rights and different fields are also set for different service types, and the target field may be generated according to a field corresponding to the data right of the service data to be extended and a field corresponding to the service type of the service data to be extended, and the metadata extension information is created by using the target field. When the metadata extension information includes the mapping relationship between the hierarchies, the information such as the management table of the data authority and the service type in each hierarchy can be updated by analyzing the data authority and the service type in the target field.
The performing data expansion management on the service data to be expanded by using the metadata expansion information may include the following steps:
under the condition of writing operation on the service data to be expanded, updating a data expansion management table in a metadata model by using metadata expansion information, wherein the metadata expansion information at least comprises a numerical value of the service data to be expanded and an attribute of the service data to be expanded.
In the embodiment of the present invention, in the case of writing the service data to be extended, the data extension management table may be updated by using a mapping relationship between each hierarchy in the metadata extension information, where the data extension management table is a table for managing the extension data, and may include, but is not limited to, an object information table, an object attribute table, a large object table, a unique constraint table, an index table, a service relationship table, and the like. The value of the service data to be expanded and the attribute of the service data to be expanded can be obtained by analyzing the target field in the metadata expansion information, and the data expansion management table is updated by using the value and the attribute. By the aid of the process, under the condition of writing in the service data to be expanded, the data expansion management table in the metadata model can be updated synchronously, and the management and control effect of the service data to be expanded is improved.
Further, an embodiment of the present invention provides another optional data extension method, and as shown in fig. 3, the module construction method includes:
s301, acquiring service data;
s302, metadata for managing service data is created, and the metadata at least comprises extended metadata and public metadata;
s303, constructing a metadata model by using the metadata, wherein the metadata model at least comprises a first level formed by the metadata and a second level formed by the service data;
s304, acquiring data expansion requirement information, wherein the data expansion requirement information at least comprises service data to be expanded;
s305, acquiring model information to be expanded in the data expansion demand information, wherein the data expansion demand information also comprises the model information to be expanded;
s306, determining a metadata model matched with the information of the model to be expanded;
s307, generating a target field of metadata extension information in the metadata model, wherein the target field is used for dividing the data authority and the service type of the service data to be extended;
s308, using the target field to create metadata extension information corresponding to the service data to be extended;
s309, under the condition of writing operation on the service data to be expanded, updating a data expansion management table in the metadata model by using metadata expansion information, wherein the metadata expansion information at least comprises the numerical value of the service data to be expanded and the attribute of the service data to be expanded;
s310, using the metadata to create a global identifier of the service data to be expanded, wherein the global identifier at least comprises a service type corresponding to the service data to be expanded;
s311, under the condition that the quantity of the service data reaches a target threshold value, determining a target split key, wherein the target split key is a sublibrary field or a sublist field, and the target split key at least comprises an extended data split key and a standard data split key;
and S312, performing library dividing operation and table dividing operation on the service data by using the target splitting key.
In the embodiment of the present invention, as an optional implementation manner, before acquiring the data expansion requirement information, the following steps may be further performed:
s1, acquiring service data;
s2, creating metadata for managing the service data, wherein the metadata at least comprises extended metadata and public metadata;
and S3, constructing a metadata model by using the metadata, wherein the metadata model at least comprises a first hierarchy formed by the metadata and a second hierarchy formed by the business data.
In the embodiment of the invention, before the data expansion demand information is acquired and the data expansion operation is executed, the metadata model can be constructed. The specific construction method can be as follows: the method comprises the steps of obtaining service data in an application, and creating metadata for managing the service data, wherein the metadata at least comprises extended metadata and public metadata. The extended metadata is metadata for managing data extension, and may manage relationships between data, attribute information of data, object information of data, and the like. The common metadata is used for managing the running information of the metadata model operation and the standard object relation table. In the case of constructing a metadata model using metadata, the metadata model may include a first hierarchy of metadata constructs and a second hierarchy of business data constructs. Optionally, the metadata model may include, in addition to the first hierarchy formed by the metadata and the second hierarchy formed by the service data, a hierarchy formed by the above model, a hierarchy formed by the metadata, and the like, which is not limited in the embodiment of the present invention.
As an alternative embodiment, after updating the data extension management table in the metadata model with the metadata extension information, the following steps may be further performed:
and creating a global identifier of the service data to be expanded by using the metadata, wherein the global identifier at least comprises a service type corresponding to the service data to be expanded.
In the embodiment of the present invention, a global identifier of the service data to be expanded may also be created by using the metadata, where the global identifier is an identifier that can be recognized by each function in the program. In the case of expanding the service data, a global identifier including the service type may be created, for example, each service type may correspond to a corresponding character identifier, and the character identifier may be used as the global identifier of the service type. The process can add the characters corresponding to the service types into the global unique identification of the service data, so that the query of the service data can be conveniently realized through the characters corresponding to the service types, and the efficiency is higher.
As an alternative embodiment, after updating the data extension management table in the metadata model with the metadata extension information, the following steps may be further performed:
s1, determining a target split key under the condition that the quantity of the service data reaches a target threshold value, wherein the target split key is a sublibrary field or a sublist field, and the target split key at least comprises an extended data split key and a standard data split key;
and S2, performing a library dividing operation and a table dividing operation on the business data by using the target splitting key.
In the embodiment of the invention, after the data expansion operation is executed, if the quantity of the service data reaches the target threshold value, the database-based and table-based processing of the data can be considered. Wherein the target threshold may be set to a maximum load amount of a single data server. The target splitting key can comprise an extended data splitting key and a standard data splitting key, wherein the extended data splitting key is used for performing database splitting operation and table splitting operation on extended data, and the standard data splitting key is used for performing database splitting operation and table splitting operation on standard data. The extension data is data that can be extended and modified, such as the service data to be extended. Standard data based service data. When the target split key is determined, the switching bonding mode can be determined firstly, the determined switching bonding mode is used for determining the target split key, the probability of the situation of full-table scanning caused by split key change is reduced, and the splitting performance is improved.
Referring to fig. 4, fig. 4 is a schematic diagram of an optional data extension architecture disclosed in the embodiment of the present invention, and as shown in fig. 4, the architecture for performing data extension may include a hierarchy formed by an application object attribute extension 401, a service structure extension 402, and a virtual application extension 403, a hierarchy formed by an object model operation 404, a service relation mapping 405, a query syntax parsing 406, and a query optimization and full text retrieval 407, and a hierarchy formed by an extension metadata 408, a common metadata 409, and standard service data 410. The application scenario for data extension may include, but is not limited to, the application object attribute extension 401, the service structure extension 402, and the virtual application extension 403. In this scenario, metadata extension information may be created through object model operations 404, business relationship mapping 405, query syntax parsing 406, and query optimization and full text retrieval 407. Specifically, the object model in the metadata model can be operated, the data relationship mapping between the service data can be updated and managed, query optimization and full-text retrieval can be realized by using metadata runtime service, query syntax analysis can be further optimized, it is ensured that data can be written in and a relationship management table between the data can be updated under the condition of data expansion, further, optimization can be performed on the data query retrieval, the integration between services can be realized, and the data expansion performance can be improved. And after the metadata extension information is created, extension management of the service data can be realized by using the metadata extension information. For the structure of the business data, referring to fig. 4, the standard business data 401 is abstracted to obtain the extended metadata 408 and the common metadata 409. Wherein, the extended metadata 408 may include, but is not limited to, an object information table, an object attribute table, a large object table, a unique constraint table, an index table, and a business relationship table, and the common metadata 409 may include, but is not limited to, a standard object relationship table and runtime information. Optionally, the metadata may be managed by object metadata, attribute metadata, and the like, and the object information and the attribute information of the metadata are respectively managed. And a metadata interface can be set for the metadata, so that the service development can access the metadata corresponding to the service development through the metadata interface and manage the metadata. Further, the extended metadata 408, the public metadata 409 and the standard service data 410 may be integrated into a standard interface to implement service access control. Optionally, functions of auxiliary data query such as data indexing, constraint information, retrieval query information, and the like may also be set for the standard service data 410. Further, in the case of creating the metadata model, a service application program interface may be generated first, and text information related to the service may be created, data may be bound, a data processing tool may be modified, and an auxiliary indexing tool and auxiliary constraint information may be configured. When the metadata extended information is created in the metadata model, the auxiliary indexing tool and the auxiliary constraint information can be used for calling data to perform data processing, and during the data processing, the data can be filtered to obtain effective data and then processed. After the data processing logic is executed, an event object can be sent according to the data processing tool, so that an event handler listens to the event object and performs event processing.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the present invention, there is also provided a data expansion apparatus for implementing the data expansion method. As shown in fig. 5, the apparatus includes:
an obtaining unit 501, configured to obtain data expansion requirement information, where the data expansion requirement information at least includes service data to be expanded;
a creating unit 502, configured to create metadata extension information corresponding to service data to be extended in a metadata model, where the metadata model is a model matched with data extension requirement information;
an extending unit 503, configured to perform data extension management on the service data to be extended by using the metadata extension information.
In the embodiment of the present invention, the data expansion requirement information is requirement information created to meet service expansion, and may include service data to be expanded, model information to be expanded, and the like. The service data to be expanded may be data meeting personalized service requirements, and the model information to be expanded may be a metadata model for managing the applied service data. After the data expansion requirement information is acquired, metadata expansion information corresponding to the service data to be expanded may be created in the metadata model. The metadata model may be a model designed using a metadata design schema, the metadata is data for performing abstract management on the service data, and the metadata model may include at least a hierarchy formed by the service data and a hierarchy formed by the metadata. Specifically, the bottom layer of the metadata model may be object information and data information of the service data, the object information and the data information of the service data may be abstracted, so as to obtain a model layer, the model layer may be understood as a summary of the object information and the data information of the service data, further, the model layer may be abstracted, so as to obtain a meta model layer, the meta model layer is used to describe attribute information and the like of each model in the model layer, and further, the meta model layer may be abstracted, so as to obtain a meta model layer, where the meta model layer is used to describe information such as relationships and attributes between constituent elements of each meta model in the meta model layer. Optionally, the metadata model described in the embodiment of the present invention is not limited to the structures of the object data layer, the model layer, the meta model layer, and may also be composed of only a two-layer structure or a three-layer structure, which is not limited in the embodiment of the present invention. For example, if a relational database is used to represent business logic, it may consist of a two-layer structure. Specifically, in the case of using the metadata model composed of the structures of the object data layer, the model layer, the meta model layer, and the meta model layer, the object data layer may be specific service data, which may include but is not limited to document files, folder data, user data, and the like; the model layer can abstract user data to obtain a user table structure or a user model, and can also abstract an object data layer by using a class File, wherein the class File can be but is not limited to a File class, a Folder class and the like; the meta-model layer may further abstract the model layer, and may represent attribute information of the model itself, for example, may describe information of a File class or Folder class, File attributes, and relationships between elements, or may describe field information, type information, and constraint information of the user model or user table; the meta-model layer may describe the relationship between the constituent elements in the meta-model layer and attribute information of each constituent element, for example, the attribute, type, relationship, and the like of the field itself in the user table structure.
Further, metadata extension information corresponding to the service data to be extended may be created in the metadata model, where the metadata extension information is used to configure the service data to be extended, and may include, but is not limited to, storing the service data to be extended, updating relationships between data tables according to attributes of the service data to be extended, and modifying data management information corresponding to each hierarchy in the metadata model. The specific creation mode may be: determining object information and data information of service data to be expanded, and creating corresponding object information and data information in an object data layer in a metadata model; determining model information corresponding to the object information and the data information, and writing the model information into a model layer; and under the condition that the model attribute information is changed in the process of writing the model information, updating the model attribute information and the model relation information in the meta-model layer, and updating the information of the meta-model layer in the meta-model layer to complete the generation of the metadata extension information, wherein the metadata extension information can comprise the mapping relation between the hierarchies. After the metadata extension information is created, the metadata model can be updated with the metadata extension information, thereby achieving management of data extension.
In the embodiment of the invention, data expansion demand information is obtained, and the data expansion demand information at least comprises service data to be expanded; creating metadata expansion information corresponding to the service data to be expanded in a metadata model, wherein the metadata model is a model matched with data expansion demand information; and performing data expansion management on the service data to be expanded by utilizing the metadata expansion information. The process can utilize the metadata model to create metadata expansion information of the service data to be expanded, and the influence on the logic of the data persistence layer is reduced by driving the expansion of the service data through the metadata, so that the influence does not need to be solved manually and time-consuming, and the data expansion efficiency is improved.
As an optional implementation, the creating unit includes: an obtaining subunit, configured to obtain model information to be extended in the data extension requirement information, where the data extension requirement information further includes the model information to be extended; a determining subunit, configured to determine the metadata model that matches the model information to be expanded; a generating subunit, configured to generate a target field of the metadata extension information in the metadata model, where the target field is used to divide the data permission and the service type of the service data to be extended; and the creating subunit is used for creating the metadata extension information corresponding to the service data to be extended by using the target field.
In the embodiment of the invention, different metadata models can be correspondingly arranged for different applications to manage the service data in the applications, in the process of data expansion, the information of the model to be expanded in the data expansion demand information can be obtained first, the information of the model to be expanded can be a model identifier, and further, the metadata model matched with the information of the model to be expanded can be determined. A target field of metadata extension information may be generated in the metadata model, and the target field may be used to divide data rights and service types of the service data, for example, different fields are set for different data rights and different fields are also set for different service types, and the target field may be generated according to a field corresponding to the data right of the service data to be extended and a field corresponding to the service type of the service data to be extended, and the metadata extension information is created by using the target field. When the metadata extension information includes the mapping relationship between the hierarchies, the information such as the management table of the data authority and the service type in each hierarchy can be updated by analyzing the data authority and the service type in the target field.
As an optional implementation manner, a manner of the extension unit being configured to perform data extension management on the service data to be extended by using the metadata extension information is specifically: and under the condition of writing the service data to be expanded, updating a data expansion management table in the metadata model by using the metadata expansion information, wherein the metadata expansion information at least comprises the numerical value of the service data to be expanded and the attribute of the service data to be expanded.
In the embodiment of the present invention, in the case of writing the service data to be extended, the data extension management table may be updated by using a mapping relationship between each hierarchy in the metadata extension information, where the data extension management table is a table for managing the extension data, and may include, but is not limited to, an object information table, an object attribute table, a large object table, a unique constraint table, an index table, a service relationship table, and the like. The value of the service data to be expanded and the attribute of the service data to be expanded can be obtained by analyzing the target field in the metadata expansion information, and the data expansion management table is updated by using the value and the attribute. By the aid of the process, under the condition of writing in the service data to be expanded, the data expansion management table in the metadata model can be updated synchronously, and the management and control effect of the service data to be expanded is improved.
As an optional implementation manner, the obtaining unit is further configured to obtain service data before obtaining the data expansion requirement information; the creating unit is further configured to create metadata for managing the service data, where the metadata at least includes extended metadata and common metadata; and constructing the metadata model by using the metadata, wherein the metadata model at least comprises a first hierarchy formed by the metadata and a second hierarchy formed by the business data.
In the embodiment of the invention, before the data expansion demand information is acquired and the data expansion operation is executed, the metadata model can be constructed. The specific construction method can be as follows: the method comprises the steps of obtaining service data in an application, and creating metadata for managing the service data, wherein the metadata at least comprises extended metadata and public metadata. The extended metadata is metadata for managing data extension, and may manage relationships between data, attribute information of data, object information of data, and the like. The common metadata is used for managing the running information of the metadata model operation and the standard object relation table. In the case of constructing a metadata model using metadata, the metadata model may include a first hierarchy of metadata constructs and a second hierarchy of business data constructs. Optionally, the metadata model may include, in addition to the first hierarchy formed by the metadata and the second hierarchy formed by the service data, a hierarchy formed by the above model, a hierarchy formed by the metadata, and the like, which is not limited in the embodiment of the present invention.
As an optional implementation manner, the creating unit is further configured to create a global identifier for the service data to be extended by using the metadata after performing data extension management on the service data to be extended by using the metadata extension information, where the global identifier at least includes a service type corresponding to the service data to be extended.
In the embodiment of the present invention, a global identifier of the service data to be expanded may also be created by using the metadata, where the global identifier is an identifier that can be recognized by each function in the program. In the case of expanding the service data, a global identifier including the service type may be created, for example, each service type may correspond to a corresponding character identifier, and the character identifier may be used as the global identifier of the service type. The process can add the characters corresponding to the service types into the global unique identification of the service data, so that the query of the service data can be conveniently realized through the characters corresponding to the service types, and the efficiency is higher.
As an optional implementation, the apparatus further includes: a determining unit, configured to determine a target split key when the number of the service data reaches a target threshold after performing data expansion management on the service data to be expanded by using the metadata expansion information, where the target split key is a sublibrary field or a sublibrary field, and the target split key at least includes an expansion data split key and a standard data split key; and the database and table dividing unit is used for executing database dividing operation and table dividing operation on the service data by using the target splitting key.
In the embodiment of the invention, after the data expansion operation is executed, if the quantity of the service data reaches the target threshold value, the database-based and table-based processing of the data can be considered. Wherein the target threshold may be set to a maximum load amount of a single data server. The target splitting key can comprise an extended data splitting key and a standard data splitting key, wherein the extended data splitting key is used for performing database splitting operation and table splitting operation on extended data, and the standard data splitting key is used for performing database splitting operation and table splitting operation on standard data. The extension data is data that can be extended and modified, such as the service data to be extended. Standard data based service data. When the target split key is determined, the switching bonding mode can be determined firstly, the determined switching bonding mode is used for determining the target split key, the probability of the situation of full-table scanning caused by split key change is reduced, and the splitting performance is improved.
According to yet another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the data expansion method, as shown in fig. 6, the electronic device includes a memory 602 and a processor 604, the memory 602 stores therein a computer program, and the processor 604 is configured to execute the steps in any one of the method embodiments by the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring data expansion requirement information, wherein the data expansion requirement information at least comprises service data to be expanded;
s2, creating metadata expansion information corresponding to the service data to be expanded in the metadata model, wherein the metadata model is a model matched with the data expansion requirement information;
and S3, performing data expansion management on the service data to be expanded by using the metadata expansion information.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 6 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
The memory 602 may be used to store software programs and modules, such as program instructions/modules corresponding to the data expansion method and apparatus in the embodiments of the present invention, and the processor 604 executes various functional applications and data processing by running the software programs and modules stored in the memory 602, that is, implementing the data expansion method described above. The memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 602 may further include memory located remotely from the processor 604, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 602 may be used to store information such as operation instructions, but is not limited thereto. As an example, as shown in fig. 6, the memory 602 may include, but is not limited to, the obtaining unit 501, the creating unit 502, and the expanding unit 503 in the data expanding apparatus. In addition, the data expansion device may further include, but is not limited to, other module units in the data expansion device, which is not described in detail in this example.
Optionally, the transmitting device 606 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 606 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmitting device 606 is a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In addition, the electronic device further includes: a display 608 for displaying the data expansion requirement information and the metadata model; and a connection bus 610 for connecting the respective module parts in the above-described electronic apparatus.
According to a further aspect of embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring data expansion requirement information, wherein the data expansion requirement information at least comprises service data to be expanded;
s2, creating metadata expansion information corresponding to the service data to be expanded in the metadata model, wherein the metadata model is a model matched with the data expansion requirement information;
and S3, performing data expansion management on the service data to be expanded by using the metadata expansion information.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (8)

1. A method of data expansion, comprising:
acquiring data expansion demand information, wherein the data expansion demand information at least comprises service data to be expanded;
creating metadata expansion information corresponding to the service data to be expanded in a metadata model, wherein the metadata model is a model matched with the data expansion demand information;
performing data expansion management on the service data to be expanded by using the metadata expansion information;
the creating of metadata extension information corresponding to the service data to be extended in the metadata model includes:
acquiring to-be-expanded model information in the data expansion demand information, wherein the data expansion demand information also comprises the to-be-expanded model information;
determining the metadata model matched with the model information to be expanded;
generating a target field of the metadata extension information in the metadata model, wherein the target field is used for dividing the data authority and the service type of the service data to be extended;
and creating metadata extension information corresponding to the service data to be extended by using the target field.
2. The method according to claim 1, wherein the performing data expansion management on the service data to be expanded by using the metadata expansion information includes:
and under the condition of writing the service data to be expanded, updating a data expansion management table in the metadata model by using the metadata expansion information, wherein the metadata expansion information at least comprises the numerical value of the service data to be expanded and the attribute of the service data to be expanded.
3. The method according to claim 1, further comprising, before said obtaining data expansion requirement information:
acquiring service data;
creating metadata for managing the business data, the metadata including at least extended metadata and common metadata;
and constructing the metadata model by using the metadata, wherein the metadata model at least comprises a first hierarchy formed by the metadata and a second hierarchy formed by the business data.
4. The method according to claim 3, further comprising, after the performing data expansion management on the service data to be expanded by using the metadata expansion information, the following steps:
and creating a global identifier for the service data to be expanded by using the metadata, wherein the global identifier at least comprises a service type corresponding to the service data to be expanded.
5. The method according to any one of claims 1 to 4, further comprising, after the performing data expansion management on the service data to be expanded by using the metadata expansion information, the following steps:
under the condition that the quantity of the service data reaches a target threshold value, determining a target split key, wherein the target split key is a sublibrary field or a sublibrary field, and the target split key at least comprises an extended data split key and a standard data split key;
and performing database dividing operation and table dividing operation on the service data by using the target splitting key.
6. A data expansion apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring data expansion demand information which at least comprises service data to be expanded;
a creating unit, configured to create metadata extension information corresponding to the service data to be extended in a metadata model, where the metadata model is a model matched with the data extension requirement information;
the expansion unit is used for carrying out data expansion management on the service data to be expanded by utilizing the metadata expansion information;
the creating unit includes:
the acquiring subunit is configured to acquire model information to be expanded in the data expansion requirement information, where the data expansion requirement information further includes the model information to be expanded;
a determining subunit, configured to determine the metadata model that matches the model information to be expanded;
a generating subunit, configured to generate a target field of the metadata extension information in the metadata model, where the target field is used to divide the data permission and the service type of the service data to be extended;
and the creating subunit is used for creating the metadata extension information corresponding to the service data to be extended by using the target field.
7. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
CN202011090236.0A 2020-10-13 2020-10-13 Data expansion method, device, storage medium and electronic device Active CN112162731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011090236.0A CN112162731B (en) 2020-10-13 2020-10-13 Data expansion method, device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011090236.0A CN112162731B (en) 2020-10-13 2020-10-13 Data expansion method, device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112162731A CN112162731A (en) 2021-01-01
CN112162731B true CN112162731B (en) 2021-10-22

Family

ID=73866652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011090236.0A Active CN112162731B (en) 2020-10-13 2020-10-13 Data expansion method, device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112162731B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115993966B (en) * 2023-03-24 2023-06-30 美云智数科技有限公司 Application development system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102221998A (en) * 2011-06-07 2011-10-19 北京大学 Method for extending EJB container in component running support platform
US10331423B1 (en) * 2016-08-25 2019-06-25 Zigisoft Llc Utilizing cross platform streamable user interfaces to reduce software deployment frequency caused by user interface improvements
CN110389944A (en) * 2019-07-29 2019-10-29 浪潮软件股份有限公司 A kind of metadata management system and method based on model
CN111435347A (en) * 2019-01-14 2020-07-21 叶常青 Efficient expansion method and system for relational table in database

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100493896B1 (en) * 2003-04-18 2005-06-10 삼성전자주식회사 Method and Apparatus for Transforming Digital Content Metadata, and Network System Using the Same
US20100161648A1 (en) * 2008-12-19 2010-06-24 Peter Eberlein Flexible multi-tenant support of metadata extension
CN101763256A (en) * 2009-12-25 2010-06-30 金蝶软件(中国)有限公司 Expansion application method, device and business system of business objects
US9182994B2 (en) * 2012-07-18 2015-11-10 Sap Se Layering of business object models via extension techniques
CN104063495A (en) * 2014-07-04 2014-09-24 用友软件股份有限公司 Form extension method and form extension device
CN105631019A (en) * 2015-12-29 2016-06-01 畅捷通信息技术股份有限公司 Metadata extension method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102221998A (en) * 2011-06-07 2011-10-19 北京大学 Method for extending EJB container in component running support platform
US10331423B1 (en) * 2016-08-25 2019-06-25 Zigisoft Llc Utilizing cross platform streamable user interfaces to reduce software deployment frequency caused by user interface improvements
CN111435347A (en) * 2019-01-14 2020-07-21 叶常青 Efficient expansion method and system for relational table in database
CN110389944A (en) * 2019-07-29 2019-10-29 浪潮软件股份有限公司 A kind of metadata management system and method based on model

Also Published As

Publication number Publication date
CN112162731A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
CN111176976B (en) Test data generation method and device, storage medium and electronic device
US20180107725A1 (en) Data Storage Method and Apparatus, and Data Read Method and Apparatus
CN111881223B (en) Data management method, device, system and storage medium
CN102810094A (en) Report generation method and device
CN107766396B (en) Resource data management method and device
CN109977099A (en) Database portion arranging method, user equipment, storage medium and device
EP2965492B1 (en) Selection of data storage settings for an application
CN110781183A (en) Method and device for processing incremental data in Hive database and computer equipment
CN105389184A (en) Configuration method and apparatus for product interface information
CN113326264A (en) Data processing method, server and storage medium
CN111767144A (en) Transaction routing determination method, device, equipment and system for transaction data
CN110928681A (en) Data processing method and device, storage medium and electronic device
CN110989891B (en) Component deployment method in chart editor, chart editor and related equipment
CN112162731B (en) Data expansion method, device, storage medium and electronic device
US9330372B2 (en) Generating an improved development infrastructure
CN117453980A (en) Metadata management, configuration page generation method, server and storage medium
CN103098055A (en) Recursive navigation in mobile customer relations management
CN104731804A (en) General query framework establishing method and device
KR20130126012A (en) Method and apparatusfor providing report of business intelligence
CN115629763A (en) Target code generation method and NPU instruction display method and device
CN115905274A (en) Data processing method and device, electronic equipment and medium
CN112860725A (en) SQL automatic generation method and device, storage medium and electronic equipment
CN112052234A (en) Service data processing method and device, storage medium and electronic device
CN112988879A (en) Method, system, device, storage medium and processor for accessing database
CN117112654B (en) City data display method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 510000 Room 301, building 5, 28 Qinglan street, Xiaoguwei street, Panyu District, Guangzhou City, Guangdong Province

Patentee after: Guangdong Xingyun Kaiwu Technology Co.,Ltd.

Address before: 511400 b213-10, 22 zhongerheng Road, Xiaoguwei street, Panyu District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU LEYAOYAO INFORMATION TECHNOLOGY Co.,Ltd.