CN114490644A - Data storage method, device and storage medium - Google Patents

Data storage method, device and storage medium Download PDF

Info

Publication number
CN114490644A
CN114490644A CN202210022270.7A CN202210022270A CN114490644A CN 114490644 A CN114490644 A CN 114490644A CN 202210022270 A CN202210022270 A CN 202210022270A CN 114490644 A CN114490644 A CN 114490644A
Authority
CN
China
Prior art keywords
data
asset
storage
storage model
configuring
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.)
Pending
Application number
CN202210022270.7A
Other languages
Chinese (zh)
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.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing 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 Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202210022270.7A priority Critical patent/CN114490644A/en
Publication of CN114490644A publication Critical patent/CN114490644A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

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

Abstract

The embodiment of the application provides a data storage method, data storage equipment and a storage medium. The storage structure of the data storage model adopted by the database can be dynamically configured, so that when data assets which are not matched with the current storage structure of the data storage model are obtained, the storage structure of the data storage model adopted by the database can be flexibly configured according to the asset type and/or data structure information of the data assets, and the data assets are written into the database after the data storage model is configured. In the embodiment, the storage structure of the data storage model adopted by the database can be dynamically configured according to the requirements of the data assets, so that the unified or less-variety data storage models can be used for storing various different types of data assets, the development cost of the data storage model is reduced, and for the application of the data assets, the variety of the data storage model to be maintained is reduced, and the maintenance cost is greatly reduced.

Description

Data storage method, device and storage medium
Technical Field
The present application relates to the field of data management technologies, and in particular, to a data storage method, device and storage medium.
Background
Data asset applications serve as a platform for data aggregation and management, requiring interfacing with multiple modules or systems to receive various types of data assets, and converting the received data assets into designated models for unified storage and management. The different types of data assets differ in their characteristics and requirements, and data resource applications need to meet the storage and management requirements of the different types of data assets.
In general, for different types of data assets, data asset applications typically develop data storage models customized to meet the differentiated requirements according to the characteristics and requirements of the data assets. However, this approach is costly to develop and costly to maintain for long-term accumulated personalized data storage models. Therefore, a new solution is yet to be proposed.
Disclosure of Invention
Aspects of the present application provide a data storage method, device and storage medium, so as to provide a data storage method with a reusable data storage model.
The embodiment of the application also provides a data storage method, wherein a database stores the received data assets according to a preset data storage model, and the storage structure of the data storage model can be dynamically configured; the method comprises the following steps: acquiring the asset type and data structure information of a first data asset to be written; if the current storage structure of the data storage model adopted by the database is not matched with the first data asset, configuring the storage structure of the data storage model according to the asset type and/or the data structure information; and writing the first data assets into a configured database of a data storage model.
Further optionally, configuring a storage structure of the data storage model according to the asset type and/or the data structure information includes: if the asset type of the first data asset is configured in the data storage model, determining an unconfigured target attribute field in the data structure information of the first data asset; configuring the target attribute field associated with the asset type in a storage structure of the storage model.
Further optionally, configuring a storage structure of the data storage model according to the asset type and/or the data structure information includes: if the asset type of the first data asset is not configured in the data storage model, configuring a primary key ID, a name and a type corresponding to the asset type in a storage structure of the storage model; and configuring at least one attribute field associated with the data structure information of the first data asset and an asset type ID to which the at least one attribute field belongs in a storage structure of the storage model.
Further optionally, configuring, in a storage structure of the storage model, at least one attribute field associated with the data structure information of the first data asset and a primary key ID to which the at least one attribute field belongs, including: if the asset type of the first data asset is a data table, configuring a table field of the data table in a storage structure of the storage model, and configuring the asset type ID of the table field according to the primary key ID of the data table.
Further optionally, configuring, in a storage structure of the storage model, at least one attribute field associated with the data structure information of the first data asset and a primary key ID to which the at least one attribute field belongs, including: if the asset type of the first data asset is interface service, configuring at least one attribute field of a calling method, a calling address, an output parameter and an input parameter of the interface service in a storage structure of the storage model, and configuring an asset type ID of the interface service for the at least one attribute field according to a primary key ID of the interface service.
Further optionally, the method further comprises: in the process of configuring the at least one attribute field, responding to a parameter configuration operation aiming at any attribute field in the at least one attribute field, and configuring a search control parameter of the attribute field; and/or configuring the filtering control parameter of the attribute field.
Further optionally, the method further comprises: configuring foreground control parameters for the first data asset in the data storage model in response to a parameter configuration operation for the asset type; the foreground control parameters include: at least one of foreground display starting parameters, foreground display sequencing control parameters, foreground authority control parameters, foreground screening control parameters and control parameters of a synchronous search engine.
Further optionally, writing the first data asset into a configured database of a data storage model, including: respectively writing the asset type and the data structure information into a database after a data storage model is configured by adopting a key-value pair storage mode; wherein a set of key-value pairs is stored as a row of records.
Further optionally, the method further comprises: acquiring the asset type and data structure information of a second data asset to be written; and if the current storage structure of the data storage model is matched with the type of the second data asset, writing the second data asset into a configured database of the data storage model.
An embodiment of the present application further provides a server, including: a memory and a processor; the memory is to store one or more computer instructions; the processor is to execute the one or more computer instructions to: the steps in the method provided by the embodiments of the present application are performed.
Embodiments of the present application further provide a computer-readable storage medium storing a computer program, where the computer program can implement the steps in the method provided in the embodiments of the present application when executed by a processor.
In the embodiment of the application, the storage structure of the data storage model adopted by the database can be dynamically configured, so that when data assets which are not adapted to the current storage structure of the data storage model are acquired, the storage structure of the data storage model adopted by the database can be flexibly configured according to the asset type and/or data structure information of the data assets, and the data assets are written into the database after the data storage model is configured. In the embodiment, the storage structure of the data storage model adopted by the database can be dynamically configured according to the requirements of the data assets, so that the unified or less-variety data storage models can be used for storing various different types of data assets, the development cost of the data storage model is reduced, and for the application of the data assets, the variety of the data storage model to be maintained is reduced, and the maintenance cost is greatly reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic flow chart diagram illustrating a data storage method according to an exemplary embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating a data storage method according to another exemplary embodiment of the present application;
fig. 3 is a schematic structural diagram of a server according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, 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 application.
Data asset applications serve as a platform for data aggregation and management, requiring interfacing with multiple modules or systems to receive various types of data assets, and converting the received data assets into designated models for unified storage and management. The different types of data assets differ in their characteristics and requirements, and data resource applications need to meet the storage and management requirements of the different types of data assets.
In general, for different types of data assets, data asset applications typically develop data storage models customized to meet the differentiated requirements according to the characteristics and requirements of the data assets. However, in this method, the reuse rate of the data storage models of different types of data assets is low, so the development cost is high, the quality of repeatedly developed codes is difficult to guarantee, the security is low, and the development period is long. Meanwhile, the personalized data storage model accumulated for a long time improves the complexity of the storage system and increases the maintenance cost.
In view of the above technical problem, in some embodiments of the present application, a solution is provided, in which a reusable data storage model whose storage structure is dynamically configurable is provided. The database may store the received plurality of different types of data assets via the data storage model. The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flowchart of a data storage method according to an exemplary embodiment of the present application, and as shown in fig. 1, the method includes:
step 101, acquiring an asset type and data structure information of a first data asset to be written.
And 102, if the current storage structure of the data storage model adopted by the database is not matched with the first data asset, configuring the storage structure of the data storage model according to the asset type and/or the data structure information.
And 103, writing the first data asset into a configured database of the data storage model.
The executing agent of this embodiment may be a server on which is deployed a data asset application that may provide data asset management interface services to a data sourcing party (e.g., an individual or an enterprise). The server may be a conventional server, a cloud server, a virtual center, or an elastic computing instance on the cloud, and the present embodiment is not limited thereto. The server may receive the data assets through a data asset application running thereon and store the data assets in a database. The database may be a database located on the server or a remote database, and this embodiment is not limited. In this example, the database stores data according to a preset data storage model, and a storage structure of the data storage model is dynamically configurable. The process of dynamic configuration is implemented by the data asset application and the configuration file may be managed and used by the data asset application.
A data asset is a physically or electronically recorded data resource owned or controlled by an individual or business that can bring future economic benefits to the individual or business. Data assets include file-borne data such as photographs, documents, drawings, videos, digital rights, etc. of individuals or businesses.
Wherein the asset type is used to describe the representation of the data asset. For example, the asset types may include: data table, interface service, tag, index, etc.
The data structure information is used for describing a data organization mode of the data assets and the constituent elements of the data assets. For example, for a data table, the data structure information is used to describe the row and column field information of the data table.
A data storage model refers to a model for abstractly organizing data, and the data storage model has a certain storage structure for describing relationships, organization manners, and the like between data elements in the data storage model. For example, the storage structure of a line storage model (e.g., MySQL, Oracle) is: the data is stored in the form of rows. The storage structure of the column type storage model (such as C-Store, Vertica) is as follows: the data is stored in columns. The storage structure of the key-value storage model (Hbase, Redis) is: data is stored in the form of key-value pairs (key-values). The storage structure of the document storage model (such as MongoDB and XQuery) is as follows: the data is stored in binary form. The storage structure of the graphic database model (e.g., Neo4j) is: the data are stored in a map formed by fixed points and edges.
In this embodiment, the data asset application provides a unified data storage model, such as a unified line storage model or a unified key-value storage model. The data storage model can configure the allowed data storage modes in a configuration mode so as to realize the dynamic change of the storage structure. When the data storage model is created, the storage structure of the data storage model can be configured in advance according to experience information, and the configuration result is stored in a configuration file and managed by a data asset application.
For some data assets, the data storage model has been adapted to the data asset by configuring the storage structure of the data storage model during a historical configuration phase of the data storage model. The adaptation refers to defining the asset type and data structure information of the data asset in the data storage model, so that the data storage model can meet the storage requirement of the data asset. That is, the profile of the data asset application management contains the asset type and data structure information of the data asset, which is allowed to be written into the database using the data storage model. In this case, when the data asset application receives a storage request for the data asset, it may determine that the data asset is compatible with the current structure of the data storage model according to the description of the configuration file, and may write the data asset into the data structure model.
For other data assets (i.e., the first data asset), the asset type or data structure information of the first data asset is not configured or not fully configured during the historical configuration phase of the data storage model, such that the data storage model fails to meet the storage requirements of the first data asset. In this case, the current storage structure of the data storage model may be considered to be unadapted with the first data asset.
If the current storage structure of the data storage model is not adapted to the first data asset, the storage structure of the data storage model may be configured according to the asset type and/or the data structure information based on a dynamically configurable characteristic of the storage structure of the data storage model. That is, in the configuration file of the data asset application management, the asset type and data structure information of the first data asset are newly added. After the storage structure configuration is complete, a first data asset is allowed to be written to a database employing the data storage model, and a data asset application may write the first data asset to the configured database of the data storage model.
In this embodiment, the storage structure of the data storage model adopted by the database may be dynamically configured, so that when a data asset that is not adapted to the current storage structure of the data storage model is acquired, the storage structure of the data storage model adopted by the database may be flexibly configured according to the asset type and/or the data structure information of the data asset, and the data asset is written into the database after the data storage model is configured. In the embodiment, the storage structure of the data storage model adopted by the database can be dynamically configured according to the requirements of the data assets, so that the unified or less-variety data storage models can be used for storing various different types of data assets, the development cost of the data storage model is reduced, and for the application of the data assets, the variety of the data storage model to be maintained is reduced, and the maintenance cost is greatly reduced.
In the above and following embodiments of the present application, the data storage model adopted by the database may be a line storage model or a key-value storage model, which is not limited in this embodiment. When the data storage model is implemented as a line storage model, the asset type of the first data asset and the data structure information may be stored in successive lines, without being limited by the column structure. When the data storage model is implemented as a key-value storage model, the asset type and the data structure information can be respectively written into a database adopting the data storage model in a key-value pair storage mode; wherein a set of key-value pairs may be stored as a row of records. For example, the key-value pair corresponding to the asset type may be stored as a row of records, and the key-value pair corresponding to one type of data structure information may be stored as a row of records, which is not described any further.
In some possible cases, the asset type of the first data asset is not configured in the current structure of the data storage model, resulting in the current structure of the data storage model not fitting the first data asset. In this case, the data asset application may configure the data storage model to update a configuration file of the data storage model based on the asset type of the first data asset and the data structure information of the first data asset.
Optionally, the data asset application may configure the primary key ID, name, and type corresponding to the asset type in a storage structure of the storage model to add a definition of the asset type in the data storage model. When the primary key ID is generated for the data asset, the self-increment codes can be generated for the data asset as the primary key ID according to the arrival sequence of the data asset in a self-increment code mode.
After the definition of the new asset type is added, the data asset application may configure, in a storage structure of the storage model, at least one attribute field associated with the data structure information of the first data asset and an asset type ID to which the at least one attribute field belongs. Wherein the attribute field is used to describe the data asset and one attribute field is used to describe one attribute of the data asset. Each attribute field may configure an asset type ID to which the attribute field belongs, where the asset type ID may be a primary key ID of an asset type corresponding to the attribute field, or may also be an ID having a mapping relationship with the primary key ID of the asset type corresponding to the attribute field, which is not limited in this embodiment. And the asset type ID to which the attribute field belongs is used for associating the attribute field with the corresponding asset type so as to facilitate subsequent query retrieval.
In the above and following embodiments of the present application, the asset types may include: the data table and the interface service are taken as examples, and an optional implementation mode of configuring the primary key ID, the name and the type corresponding to the asset type in the storage structure of the storage model is exemplarily described below.
Optionally, if the asset type of the first data asset is a data table, the data asset application may generate a primary key ID for the data table, and add an asset type corresponding to the data table in the data storage model in combination with the table name and the data table type of the data table. For example, the newly added asset types are: < primary key ID: 001, table name: mobile phone parameter table, type: table >, < primary key ID: 002, table name: sales performance table, type: table >.
Optionally, if the asset type of the first data asset is the interface service, the data asset application may generate a primary key ID for the interface service, and add an asset type corresponding to the interface service in the data storage model in combination with the interface service name and the interface service type of the interface service. For example, the newly added asset types are: < primary key ID: 003, interface service name: fuselage memory read interface, type: api >, < primary key ID: 004, interface service name: sales reading interface, type: api >.
Optionally, if the asset type of the first data asset is a data table, when the data asset application configures at least one attribute field associated with the data structure information of the first data asset in the storage structure of the data storage model, the data asset application may configure a table field of the data table in the storage structure of the storage model; the number of table fields of the data table may be one or more, and this embodiment is not limited. A table field is a member of a data table and is used for representing a certain feature, index or topic in the data table. For example, the table fields in the achievement table may include: name, subject, score, ranking, etc.
When the data asset application configures the primary key ID of the at least one attribute field, the asset type ID of the data asset application can be configured for the table field according to the primary key ID of the data table. The asset type ID to which the table field belongs may be the primary key ID of the data table. For example, taking the example above, the newly added asset types are: < primary key ID: 001, table name: mobile phone parameter table, type: table >, the table fields contained in the mobile phone parameter table include: mobile phone brand, body memory, running memory, pixel number and selling price. The data asset application may configure the table fields in a storage structure of the data storage model, and set the asset type ID to which the table fields belong to 001. When each table field and field value are stored in the database, the table field and field value can carry the asset type ID to which each table field and field value belongs, so that the table field and field value stored in the database can be associated with the corresponding asset type, and subsequent query and retrieval are facilitated. For example, when the body memory in the mobile phone parameter table is subsequently queried, the query keyword may be set to < ID ═ 001, and the field ═ body memory >; when inquiring the sales performance of 12 months in the sales performance table, the inquiry keyword may be set to < ID ═ 002, and the field ═ 12 months >, which are not listed.
Optionally, if the asset type of the first data asset is an interface service, the data asset is applied to a storage interface of a data storage model, and when at least one attribute field associated with the data structure information of the first data asset is configured, at least one attribute field of a calling method, a calling address, an output parameter and an input parameter of the interface service may be configured in a storage structure of the storage model; wherein, the attribute field of the interface service is used for describing the interface service.
The data asset application may configure the asset type ID of the at least one attribute field according to the primary key ID of the interface service when configuring the primary key ID of the at least one attribute field. The asset type ID to which the attribute field belongs may be a primary key ID of the interface service. For example, taking the example above, the newly added asset types are: < primary key ID: 003, interface service name: fuselage memory read interface, type: api >, the attribute field of the fuselage memory exclusive interface includes: and attribute fields such as a calling method, a calling address, an output parameter and an input parameter. The data asset application may configure the attribute fields in a storage structure of the data storage model, respectively, and set the asset type ID to which the attribute fields belong to 003. When each attribute field and field value are stored in the database, the attribute field and field value can carry the asset type ID to which each attribute field and field value belongs, so that the attribute field and field value stored in the data storage model can be associated with the corresponding asset type, and subsequent query and retrieval are facilitated. For example, when a calling method of the body memory read interface is subsequently queried, the query key may be set to < ID ═ 003 > and the field ═ calling method >, which are not listed.
In the implementation mode, the structure of the data storage model adopted by the database can be flexibly adjusted according to the storage requirements of different types of data assets, the development cost of the data storage model is reduced, and the access efficiency of the database to different asset types is improved.
The above embodiments describe the case where the current structure of the data storage model is not configured with the asset type of the first data asset, and in other possible cases, the current structure of the data storage model is configured with the asset type of the first data asset, but is not configured with a partial field in the data structure information of the full first data asset. That is, the configuration file of the data storage model contains a definition of the asset type of the first data asset, but does not completely contain a definition of the entire data structure information of the first data asset. In this case, the data asset application may consider the current structure of the data storage model to not fit the first data asset, and may additionally define the storage structure of the data storage model based on the data structure information of the first data asset.
Alternatively, the data asset application may determine an unconfigured target attribute field in the data structure information of the first data asset. For data asset application, identifying attribute fields needing to be stored in a first data asset, and inquiring defined attribute fields under the asset type of the first data asset in a configuration file of a data storage model; and comparing the attribute field to be stored with the defined attribute field, so as to identify the target attribute field which is not configured yet.
After determining the target attribute field, the data asset application may configure the target attribute field associated with the asset type in a storage structure of the storage model. In particular, the data asset application may add a portion of the attribute fields in the storage structure of the storage model and set the asset type ID to which the newly added attribute fields belong to the configured primary key ID of the first data asset.
The description is continued with the previous example. It is assumed that the data source side has an updated mobile phone parameter table, and the updated mobile phone parameter table needs to be written into the database. Based on the description of the foregoing embodiment, the asset type corresponding to the mobile phone parameter table is defined, and its primary key ID is 001. In the updated mobile phone parameter table, there are some fields that are not defined in the data storage model: time to market, number of cores, and processor model. The data asset application may add the three table fields in the data storage model and configure the asset type IDs to which the three table fields belong to 001.
In the implementation mode, when the defined asset type in the data storage model has the newly added field, the newly added field can be flexibly configured, and the newly configured field is associated with the defined asset type, so that the flexible updating of the data structure information is realized, the freedom degree of data storage and the updating efficiency of the data storage model are further improved, and the updating cost of the data storage model is reduced.
It should be noted that, the operation of configuring the storage structure of the data storage model may be configured by the data asset application according to the actual requirement of the data asset to be stored, or may be configured under the operation or instruction of the administrator of the database, which is not limited in this embodiment. In some scenarios, in order to ensure the reasonability and the compliance of the new configuration, before the data asset application configures the storage structure of the data storage model, the asset type to be configured and the data structure information can be displayed to an administrator of the database for the administrator to check. After the administrator review passes, the data asset application may update the configuration file of the data storage model based on the asset type and the data structure information.
In still other scenarios, a manager of the database may set a configuration rule for screening data assets, and the data asset application may not initiate self-configuration for the moment when determining that the data assets to be stored do not satisfy the configuration rule, and may discard the data assets to ensure the reasonability and safety of the data stored in the database.
Based on the configuration operation, the storage structure of the data storage model is updated, and when the data asset application receives a new data asset (for example, a second data asset) to be stored, the asset type and the data structure information of the second data asset to be written in can be acquired; if the current storage structure of the data storage model is adapted to the type of the second data asset, the second data asset can be directly written into the database adopting the data storage model. Based on the implementation mode, the multiplexing of the data storage model is realized, and the development cost of the data storage model is greatly reduced.
In the foregoing and following embodiments of the present application, in the process of configuring at least one attribute field associated with the data structure information of the first data asset, configuration of a foreground function of any attribute field may be further implemented. Optionally, the data asset applies search control parameters of the configurable attribute field and/or filter control parameters of the attribute field in response to a parameter configuration operation for any of the at least one attribute field. Wherein, the search control parameter is used for defining whether the attribute field supports the search in the foreground. And the filtering control parameter of the attribute field is used for defining whether the attribute field supports filtering in the foreground. The data source side or the administrator of the data asset application can configure the parameters according to actual requirements. The configuration result of each attribute field has an association relation with the attribute field. When the attribute field is used in foreground, the configuration result of the attribute field can be read, and whether the attribute field supports searching or filtering can be determined according to the configuration result.
In addition to the above-mentioned foreground function configuration of the attribute field dimension, in some exemplary embodiments of the present application, foreground functions of the data asset dimension may also be configured, as will be exemplified below.
Optionally, in response to a parameter configuration operation for the asset type, the data asset application may configure foreground control parameters for the first data asset in the data storage model; the foreground control parameters include: at least one of foreground display starting parameters, foreground display sequencing control parameters, foreground authority control parameters, foreground screening control parameters and control parameters of a synchronous search engine.
And the foreground display starting parameter is used for configuring whether the first data asset supports display in the foreground, and the parameter value can be configured to be true or false. And the foreground display sequencing control parameter is used for configuring the sequence of the first data assets displayed in the foreground, and the parameter values are configured to be specific sequence numbers. And the foreground authority control parameter is used for granting the foreground use authority under the condition that whether the first data resource capacity initiates the use authority or not is configured, and the parameter value can be configured to be yes or no. And the foreground screening control parameter is used for configuring whether the first data capacity is searched in the foreground, and the parameter value can be configured to be yes or no. And the control parameters of the synchronous search engine are used for configuring whether the first data asset needs to be synchronized into the search engine of the data asset application so as to facilitate the search display of the first data asset through the data search engine. The parameter values of the control parameters of the synchronous search engine may be configured as yes or no. For some data assets without search and presentation requirements, the data assets can be set to be out of synchronization with the search engine, so that the storage space of the search engine is saved.
It should be noted that the configuration operations may be executed alone or in combination, and the embodiment is not limited.
Based on the configuration operation of the parameters, the data asset application can realize the function expansion of the data asset dimension and the attribute field dimension without re-developing a data storage model, and the expansibility of the database function is greatly improved.
The embodiments of the present application will be further illustrated with reference to fig. 2. As shown in fig. 2, an administrator of the data asset application may organize the asset types of the data assets that need to be newly accessed, including the names of the asset types and fields in the data structure, etc. The administrator may initiate an operation to add a new asset type through the data asset application, which may check whether the new asset type already exists; if so, prompting the administrator that the definition cannot be repeated; if not, configuring the new asset type according to the name of the newly added asset type and the field in the data structure, and writing the configuration file into a database (such as MySQL) for storage.
When the data source side reports the new asset data, the data asset application can judge whether the data type of the new asset data exists according to the configuration file stored in the database. If so, the data asset application may write the newly reported asset data into the database. If the data does not exist, the reporting can be finished, or new configuration is automatically added to the data storage model of the database according to the asset type and the data structure information of the new data asset, and the details are not repeated.
It should be noted that the execution subjects of the steps of the methods provided in the above embodiments may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subjects of steps 101 to 104 may be device a; for another example, the execution subject of steps 101 and 102 may be device a, and the execution subject of step 103 may be device b; and so on.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 101, 102, etc., are merely used for distinguishing different operations, and the sequence numbers do not represent any execution order per se. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel.
It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
Fig. 3 is a schematic structural diagram of a server according to an exemplary embodiment of the present application, where the server may be used to execute the data storage method described in the foregoing embodiment. The server is provided with a database, the database can store the received data assets according to a preset data storage model, and the storage structure of the data storage model can be dynamically configured. As shown in fig. 3, the server includes: a memory 301 and a processor 302.
The memory 301 is used for storing computer programs and may be configured to store other various data to support operations on the server. Examples of such data include instructions for any application or method operating on the server, contact data, phonebook data, messages, pictures, videos, and so forth.
The memory 301 may be implemented, among other things, by any type of volatile or non-volatile storage device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
In some embodiments, the processor 302 is coupled to the memory 301 for executing computer programs in the memory 301 for: acquiring the asset type and data structure information of a first data asset to be written; if the current storage structure of the data storage model adopted by the database is not matched with the first data asset, configuring the storage structure of the data storage model according to the asset type and/or the data structure information; and writing the first data assets into a configured database of a data storage model.
Further optionally, when configuring the storage structure of the data storage model according to the asset type and/or the data structure information, the processor 302 is specifically configured to: if the asset type of the first data asset is configured in the data storage model, determining an unconfigured target attribute field in the data structure information of the first data asset; configuring the target attribute field associated with the asset type in a storage structure of the storage model.
Further optionally, when configuring the storage structure of the data storage model according to the asset type and/or the data structure information, the processor 302 is specifically configured to: if the asset type of the first data asset is not configured in the data storage model, configuring a primary key ID, a name and a type corresponding to the asset type in a storage structure of the storage model; and configuring at least one attribute field associated with the data structure information of the first data asset and an asset type ID to which the at least one attribute field belongs in a storage structure of the storage model.
Further optionally, when configuring, in the storage structure of the storage model, at least one attribute field associated with the data structure information of the first data asset and a primary key ID to which the at least one attribute field belongs, the processor 302 is specifically configured to: if the asset type of the first data asset is a data table, configuring a table field of the data table in a storage structure of the storage model, and configuring the asset type ID of the table field according to the primary key ID of the data table.
Further optionally, when configuring, in the storage structure of the storage model, at least one attribute field associated with the data structure information of the first data asset and a primary key ID to which the at least one attribute field belongs, the processor 302 is specifically configured to: if the asset type of the first data asset is interface service, configuring at least one attribute field of a calling method, a calling address, an output parameter and an input parameter of the interface service in a storage structure of the storage model, and configuring an asset type ID of the interface service for the at least one attribute field according to a primary key ID of the interface service.
Further optionally, the processor 302 is further configured to: in the process of configuring the at least one attribute field, responding to a parameter configuration operation aiming at any attribute field in the at least one attribute field, and configuring a search control parameter of the attribute field; and/or configuring the filtering control parameter of the attribute field.
Further optionally, the processor 302 is further configured to: configuring foreground control parameters for the first data asset in the data storage model in response to a parameter configuration operation for the asset type; the foreground control parameters include: at least one of foreground display starting parameters, foreground display sequencing control parameters, foreground authority control parameters, foreground screening control parameters and control parameters of a synchronous search engine.
Further optionally, when writing the first data asset into the configured database of the data storage model, the processor 302 is specifically configured to: respectively writing the asset type and the data structure information into a database after a data storage model is configured by adopting a key-value pair storage mode; wherein a set of key-value pairs is stored as a row of records.
Further optionally, the processor 302 is further configured to: acquiring the asset type and data structure information of a second data asset to be written; and if the current storage structure of the data storage model is matched with the type of the second data asset, writing the second data asset into the data storage model.
Further, as shown in fig. 3, the server further includes: communication components 303, and power components 304. Only some of the components are schematically shown in fig. 3, and it is not meant that the server includes only the components shown in fig. 3.
Wherein the communication component 303 is configured to facilitate communication between the device in which the communication component is located and other devices in a wired or wireless manner. The device in which the communication component is located may access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, or 5G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component may be implemented based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
The power supply component 304 provides power to various components of the device in which the power supply component is located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
In this embodiment, the storage structure of the data storage model adopted by the database may be dynamically configured, so that when a data asset that is not adapted to the current storage structure of the data storage model is obtained, the storage structure of the data storage model adopted by the database may be flexibly configured according to the asset type and/or the data structure information of the data asset, and the data asset is written into the database after the data storage model is configured. In the embodiment, the storage structure of the data storage model adopted by the database can be dynamically configured according to the requirements of the data assets, so that the unified or less-variety data storage models can be used for storing various different types of data assets, the development cost of the data storage model is reduced, and for the application of the data assets, the variety of the data storage model to be maintained is reduced, and the maintenance cost is greatly reduced.
Accordingly, the present application further provides a computer-readable storage medium storing a computer program, where the computer program can implement the steps that can be executed by the server in the foregoing method embodiments when executed.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (11)

1. A data storage method is characterized in that a database stores received data assets according to a preset data storage model, and the storage structure of the data storage model can be dynamically configured; the method comprises the following steps:
acquiring the asset type and data structure information of a first data asset to be written;
if the current storage structure of the data storage model adopted by the database is not matched with the first data asset, configuring the storage structure of the data storage model according to the asset type and/or the data structure information;
and writing the first data assets into a configured database of a data storage model.
2. The method of claim 1, wherein configuring a storage structure of the data storage model based on the asset type and/or the data structure information comprises:
if the asset type of the first data asset is configured in the data storage model, determining an unconfigured target attribute field in data structure information of the first data asset;
configuring the target attribute field associated with the asset type in a storage structure of the storage model.
3. The method of claim 1, wherein configuring a storage structure of the data storage model based on the asset type and/or the data structure information comprises:
if the asset type of the first data asset is not configured in the data storage model, configuring a primary key ID, a name and a type corresponding to the asset type in a storage structure of the storage model; and the number of the first and second groups,
configuring, in a storage structure of the storage model, at least one attribute field associated with data structure information of the first data asset and an asset type ID to which the at least one attribute field belongs.
4. The method of claim 3, wherein configuring, in a storage structure of the storage model, at least one attribute field associated with the data structure information of the first data asset and a primary key ID to which the at least one attribute field belongs comprises:
if the asset type of the first data asset is a data table, configuring a table field of the data table in a storage structure of the storage model, and configuring the asset type ID of the table field according to the primary key ID of the data table.
5. The method of claim 3, wherein configuring, in a storage structure of the storage model, at least one attribute field associated with the data structure information of the first data asset and a primary key ID to which the at least one attribute field belongs comprises:
if the asset type of the first data asset is interface service, configuring at least one attribute field of a calling method, a calling address, an output parameter and an input parameter of the interface service in a storage structure of the storage model, and configuring an asset type ID of the interface service for the at least one attribute field according to a primary key ID of the interface service.
6. The method of claim 3, further comprising:
in the process of configuring the at least one attribute field, responding to a parameter configuration operation aiming at any attribute field in the at least one attribute field, and configuring a search control parameter of the attribute field; and/or configuring the filtering control parameter of the attribute field.
7. The method of any one of claims 1-6, further comprising:
configuring foreground control parameters for the first data asset in the data storage model in response to a parameter configuration operation for the asset type; the foreground control parameters include: at least one of foreground display starting parameters, foreground display sequencing control parameters, foreground authority control parameters, foreground screening control parameters and control parameters of a synchronous search engine.
8. The method of any of claims 1-6, wherein writing the first data asset to a configured database of a data storage model comprises:
respectively writing the asset type and the data structure information into a database after the data storage model is configured by adopting a key-value pair storage mode; wherein a set of key-value pairs is stored as a row of records.
9. The method of any one of claims 1-6, further comprising:
acquiring the asset type and data structure information of a second data asset to be written;
and if the current storage structure of the data storage model is matched with the type of the second data asset, writing the second data asset into a configured database of the data storage model.
10. A server, comprising: a memory and a processor;
the memory is to store one or more computer instructions;
the processor is to execute the one or more computer instructions to: performing the steps of the method of any one of claims 1-9.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method of any one of claims 1 to 9.
CN202210022270.7A 2022-01-10 2022-01-10 Data storage method, device and storage medium Pending CN114490644A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210022270.7A CN114490644A (en) 2022-01-10 2022-01-10 Data storage method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210022270.7A CN114490644A (en) 2022-01-10 2022-01-10 Data storage method, device and storage medium

Publications (1)

Publication Number Publication Date
CN114490644A true CN114490644A (en) 2022-05-13

Family

ID=81509375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210022270.7A Pending CN114490644A (en) 2022-01-10 2022-01-10 Data storage method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114490644A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115640275A (en) * 2022-08-27 2023-01-24 北京华宜信科技有限公司 Automatic generation and updating method for data products and assets

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115640275A (en) * 2022-08-27 2023-01-24 北京华宜信科技有限公司 Automatic generation and updating method for data products and assets
CN115640275B (en) * 2022-08-27 2023-04-21 北京华宜信科技有限公司 Automatic generation and update method for data products and assets

Similar Documents

Publication Publication Date Title
US10248711B2 (en) Representation of time-sensitive and space-sensitive profile information
US20140244364A1 (en) Benchmarking system using benchmarking scenario tag templates
CN107103011B (en) Method and device for realizing terminal data search
CN110489409B (en) Method and device for dynamically expanding data field
CN111708589B (en) Information processing system, method, device and readable storage medium
US10262055B2 (en) Selection of data storage settings for an application
CN106547646B (en) Data backup and recovery method and data backup and recovery device
CN111343241A (en) Graph data updating method, device and system
US10713228B2 (en) Generating and accessing a data table
CN111784468A (en) Account association method and device and electronic equipment
CN114490644A (en) Data storage method, device and storage medium
CN107357557B (en) Information updating method and device
US20150363399A1 (en) Generating and accessing a data table
CN114385623A (en) Data table acquisition method, device, apparatus, storage medium, and program product
US11379478B2 (en) Optimizing a join operation
CN110879799B (en) Method and device for labeling technical metadata
CN112597151A (en) Data processing method, device, equipment and storage medium
CN104699477A (en) Near field communication based data transfer
CN112579877A (en) Information source system control method, device, storage medium and equipment
CN107463618B (en) Index creating method and device
CN116150236A (en) Data synchronization method and device, electronic equipment and computer readable storage medium
US11868349B2 (en) Row secure table plan generation
CN115660591A (en) Process configuration method, system, electronic device and medium for business approval
CN114189457A (en) Cloud resource display and processing method, equipment and storage medium
CN112507193A (en) Data updating method, device, 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