Dynamic extension method, device and storage medium of attribute data

By performing flattened mapping and dynamic validation on attribute data, the problem of expanding complex data types is solved, system performance and data interaction flexibility are improved, and the process of adding new attributes is simplified.

CN115203491BActive Publication Date: 2025-12-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110378964.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-08
Publication Date
2025-12-19
Estimated Expiration
2041-04-08

AI Technical Summary

Technical Problem

Existing technologies cannot effectively support the extension of properties for complex data types such as reference types or array types, and the validation algorithm for property data needs to be modified when adding new user properties, resulting in low flexibility in data interaction.

Method used

By obtaining the target attribute data template, performing flattened mapping processing, establishing the mapping relationship between attributes and values, and performing dynamic attribute validation based on the template, dynamic expansion of complex data types can be achieved.

Benefits of technology

It enables dynamic expansion of complex data types, reduces the algorithmic complexity of verification processing, improves system performance, supports unified verification processing of different types of attribute data, and simplifies the process of adding new attributes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115203491B_ABST
    Figure CN115203491B_ABST
Patent Text Reader

Abstract

Provided are a dynamic expansion method and device for attribute data and a storage medium, which can realize dynamic expansion of attribute data of a complex type. The method comprises: obtaining attribute data to be dynamically expanded and target attribute data templates corresponding to the attribute data, which have been subjected to flattening mapping processing. Further, the target attribute data is subjected to flattening mapping processing to obtain a second mapping relationship, which can be a primary key value format. Then, according to configuration information or verification rules of each attribute defined by the target attribute data templates subjected to flattening mapping processing, dynamic attribute verification processing is performed on the value of each attribute of the attribute data subjected to flattening mapping processing to obtain a dynamic attribute verification processing result of the attribute data. Further, the target attribute data is dynamically expanded according to the dynamic attribute verification processing result of the target attribute data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, more particularly, to a method, device and storage medium for dynamic expansion of attribute data. BACKGROUND

[0002] In some scenarios, attribute data of a user can be stored in a database according to a user attribute data template, when it is necessary to dynamically expand the attribute of the user, the expansion can only be performed in a Key-Value mode, and some complex data types, such as expansion of attributes of reference type or array type, cannot be implemented, and when a user attribute is added, the attribute data verification algorithm usually needs to be modified to support verification of the added user attribute, how to implement dynamic expansion of user attribute data supporting complex data types is an urgent problem to be solved. SUMMARY

[0003] The present application provides a method, device and storage medium for dynamic expansion of attribute data, which can implement dynamic expansion of attribute data of complex data types.

[0004] In a first aspect, a method for dynamic expansion of attribute data is provided, comprising:

[0005] obtaining target attribute data to be dynamically expanded;

[0006] obtaining a target attribute data template corresponding to the target attribute data, the target attribute data template being used to define configuration information of each attribute of attribute data, wherein the configuration information of each attribute includes a key field included in the each attribute and a usage rule of a data type of the each attribute;

[0007] performing flat mapping processing on the target attribute data to obtain a first mapping relationship, the first mapping relationship being a mapping relationship between each attribute of the target attribute data and a value of the each attribute;

[0008] performing dynamic attribute verification processing on the value of the each attribute in the first mapping relationship according to the configuration information of the each attribute defined by the target attribute data template to obtain a verification processing result of the target attribute data;

[0009] performing dynamic expansion on the target attribute data according to the verification processing result of the target attribute data.

[0010] In some implementations, the dynamic attribute verification processing on the value of the each attribute in the first mapping relationship according to the configuration information of the each attribute defined by the target attribute data template can include:

[0011] According to the configuration information of each attribute defined by the target attribute data template, dynamic attribute checking is performed on the target attribute data subjected to the flattening mapping processing, to obtain a checking result of the target attribute data.

[0012] According to the configuration information of each attribute defined by the target attribute data template, dynamic attribute processing is performed on the target attribute data subjected to the flattening mapping processing, to obtain a processing result of the target attribute data.

[0013] In some implementations, the checking processing result of the target attribute data can include the checking result of the target attribute data and the processing result of the target attribute data.

[0014] In some implementations, according to the configuration information of each attribute defined by the target attribute data template, dynamic attribute processing can be performed on the target attribute data subjected to the flattening mapping processing, to obtain a processing result of the target attribute data, in a case where the checking result of the target attribute data is a pass.

[0015] In some implementations, in a case where the checking result of the actually entered attribute data of the target attribute data is a pass, dynamic attribute processing is performed on the unentered attribute data of the target attribute data, to obtain a processing result of the target attribute data.

[0016] In some implementations, the dynamic attribute processing on the unentered attribute data of the target attribute data can include at least one of the following processing performed on the unentered attribute data of the target attribute data: default value processing, mandatory item checking processing, and attribute value null checking processing.

[0017] In some implementations, before the dynamic attribute checking processing is performed on the target attribute data, the method further includes: performing preprocessing on the entered first attribute data, to obtain the target attribute data.

[0018] In some implementations, the preprocessing on the entered first attribute data includes:

[0019] performing at least one of the following on the first attribute data: data type checking processing, regular expression checking processing, and data value checking processing.

[0020] In some implementations, the method further includes:

[0021] performing checking processing on the entered first attribute data template, to obtain the target attribute data template.

[0022] In some implementations, the checking processing on the entered first attribute data template can include at least one of the following: data format checking processing and data type checking processing.

[0023] In some implementations, the key fields of the attribute include at least one of the following fields:

[0024] Attribute name, data type, regular expression, default value, attribute value, whether required, whether encrypted, and whether used as a search condition.

[0025] In a second aspect, a dynamic extension device for attribute data is provided, comprising:

[0026] A first obtaining module configured to obtain target attribute data to be dynamically extended;

[0027] A second obtaining module configured to obtain a target attribute data template corresponding to the target attribute data, the target attribute data template being configured to define configuration information of each attribute of the attribute data, wherein the configuration information of each attribute includes key fields included in the each attribute and a usage rule of a data type of the each attribute;

[0028] A flattening processing module configured to perform flattening mapping processing on the target attribute data to obtain a first mapping relationship, the first mapping relationship being a mapping relationship between each attribute of the target attribute data and a value of the each attribute;

[0029] A verification processing module configured to perform dynamic attribute verification processing on the value of the each attribute in the first mapping relationship according to the configuration information of the each attribute defined by the target attribute data template to obtain a verification processing result of the target attribute data;

[0030] A dynamic extension module configured to perform dynamic extension on the target attribute data according to the verification processing result of the target attribute data.

[0031] In a third aspect, a dynamic extension device for attribute data is provided, comprising:

[0032] A processor; and

[0033] A memory configured to store executable instructions of the processor;

[0034] The processor is configured to execute the above-mentioned dynamic extension method for attribute data by executing the executable instructions.

[0035] In a fourth aspect, a storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned dynamic extension method for attribute data.

[0036] Therefore, the attribute data of the embodiments of the present application can be attribute data with a hierarchical relationship, and the attribute data template can support the configuration of attribute data with a hierarchical relationship, thereby meeting the expansion requirements of complex type attribute data in some scenarios. Furthermore, through the flat mapping processing of the attribute data, the dynamic attribute checking processing of the flat mapping processed attribute data is performed based on the flat mapping processed attribute data template. On the one hand, the algorithm complexity of the attribute data dynamic checking processing can be reduced, and the system performance can be improved. On the other hand, through the dynamic attribute checking processing algorithm, the checking processing of attribute data of basic types can be realized, and the checking processing of attribute data of complex types can also be realized, that is, the checking processing of attribute data of different types can be realized through a unified algorithm. Therefore, when a new attribute needs to be added, the corresponding attribute data template needs to be modified, and the checking processing of the added attribute can be realized without modifying the checking processing algorithm, thereby realizing the dynamic expansion of the added attribute. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present application.

[0038] Figure 2 is a schematic flow chart of a dynamic expansion method of attribute data provided by an embodiment of the present application.

[0039] Figure 3 is a schematic flow chart of performing format conversion on an attribute data template.

[0040] Figure 4 is a schematic flow chart of performing dynamic attribute checking on attribute data according to an attribute data template.

[0041] Figure 5 is a schematic flow chart of performing dynamic attribute processing on attribute data according to an attribute data template.

[0042] Figure 6 is a schematic block diagram of a dynamic attribute template model according to an embodiment of the present application.

[0043] Figure 7 is a processing flow chart of an attribute data template.

[0044] Figure 8 is a schematic block diagram of a dynamic attribute checking processing model according to an embodiment of the present application.

[0045] Figure 9 is a processing flow chart of attribute data.

[0046] Figure 10 is a schematic block diagram of a dynamic attribute display model according to an embodiment of the present application.

[0047] Figure 11 is a schematic block diagram of a device for dynamically extending attribute data according to an embodiment of the present application.

[0048] Figure 12 is a schematic block diagram of another device for dynamically extending attribute data according to an embodiment of the present application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art without creative effort on the basis of the described embodiments belong to the scope of the present application.

[0050] It should be understood that the drawings are schematic diagrams of the present application, and the same reference numerals in the drawings represent the same or similar parts, so repeated description thereof will be omitted. In addition, the described features, structures or characteristics can be combined in any suitable manner in one or more example embodiments. In the following description, many specific details are provided to give a full understanding of the example embodiments of the present application. However, one skilled in the art will realize that the technical solutions of the present application can be practiced without one or more of the specific details, or can employ other methods, components, steps, etc. In other cases, well-known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the aspects of the present application.

[0051] It should also be understood that some of the block diagrams shown in the drawings are functional entities, which do not necessarily have to correspond to physically or logically independent entities. These functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks, processor devices or microcontroller devices.

[0052] Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software and network in a wide area network or a local area network to realize data calculation, storage, processing and sharing.

[0053] Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied to the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will all require robust system support, which can only be achieved through cloud computing.

[0054] A blockchain system can be a distributed system formed by clients and multiple nodes (any form of computing device connected to the network, such as servers and user terminals) connected through network communication. The nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.

[0055] The functions of each node in a blockchain system include:

[0056] 1) Routing: A basic function of nodes used to support communication between nodes.

[0057] In addition to routing capabilities, nodes can also have the following functions:

[0058] 2) Applications are deployed in the blockchain to implement specific business needs. They record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system. When other nodes successfully verify the source and integrity of the record data, they add the record data to a temporary block.

[0059] For example, the business logic implemented by the application includes:

[0060] 2.1) A wallet is used to provide the function of conducting electronic currency transactions, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system; after other nodes successfully verify the transaction, they store the transaction record data in the temporary block of the blockchain as a response to acknowledge the validity of the transaction; of course, the wallet also supports querying the remaining electronic currency in the electronic currency address;

[0061] 2.2) Shared Ledger, which provides the function of storing, querying and modifying the account data, sends the record data of the operation on the account data to other nodes in the blockchain system, and after the other nodes verify the validity, as a response to acknowledging the validity of the account data, stores the record data in the temporary block, and can also send a confirmation to the node that initiated the operation.

[0062] 2.3) Smart Contract, a computerized protocol that can execute the terms of a certain contract, implemented by code deployed on the shared ledger for execution when certain conditions are met, according to actual business needs, the code is used to complete automated transactions, such as querying the logistics status of the goods purchased by the buyer, and transferring the electronic currency of the buyer to the address of the merchant after the buyer signs for the goods; of course, the smart contract is not limited to executing contracts for transactions, but can also execute contracts for processing received information.

[0063] 3) Blockchain, which includes a series of blocks that are sequentially connected in the order of their generation time, once a new block is added to the blockchain, it will not be removed, and the block records the record data submitted by the nodes in the blockchain system.

[0064] Blockchain, in essence, is a decentralized database, which is a series of data blocks associated using cryptographic methods, each data block contains relevant information for verifying the validity of its information (anti-fake) and generating the next block.

[0065] In some scenarios, different application systems can interact with attribute data, such as user's name, gender, age, hometown, interests, etc., each application system can define its own attribute data template, and the entered attribute data needs to meet the defined attribute data template, and different application systems can define different attribute data templates.

[0066] In some embodiments, the application system can be a node in the blockchain system, and each node in the blockchain system can interact with data to implement corresponding businesses, such as the aforementioned wallet, shared ledger, smart contract business, etc.

[0067] Figure 1 An example scenario of an embodiment of the present application is shown in the following figure: Figure 1As shown, the application system 11 stores a first attribute data template, the application system 11 runs an algorithm for checking attribute data based on the first attribute data template, the application system 12 stores a second attribute data template, and the application system 12 runs an algorithm for checking attribute data based on the second attribute data template. When the data formats of the first attribute data template and the second attribute data template are different, the two application systems need to interact according to the attribute data template of the other party to ensure the execution of the checking processing algorithm on the respective application systems, which reduces the flexibility of data interaction.

[0068] In addition, when a new attribute is needed, it can only be expanded in a Key-Value mode, and some complex data types, such as the expansion of attributes of reference types or array types, cannot be implemented.

[0069] Embodiments of the present application provide a dynamic expansion method, device and storage medium for attribute data. In actual application, each functional module in the dynamic expansion device for attribute data can be cooperatively implemented by hardware resources of a device (such as a terminal device, a server or a server cluster), such as computing resources (such as a processor) and communication resources (such as those used to support various communication modes such as optical cable and cellular network).

[0070] Figure 2 A schematic flowchart of a dynamic expansion method 100 for attribute data according to an embodiment of the present application is shown. As shown, the method 100 can include at least part of the following contents: Figure 2

[0071] S110, obtaining target attribute data to be dynamically expanded.

[0072] In the embodiments of the present application, the target attribute data can be attribute data of a user, such as the user's name, gender, age, place of origin, interest, child information, etc. Or it can also be other types of data, such as the input parameters or return values of an application protocol interface (API), other data exchanged between the front end and the back end of an application system, or other data exchanged between application systems, etc. Hereinafter, the target attribute data is taken as an example of attribute data of a user, but the present application is not limited thereto.

[0073] In the embodiments of the present application, the target attribute data can be obtained from other application systems, or it can also be input by a user. The present application does not limit the acquisition method of the target attribute data, and hereinafter, the input by a user is taken as an example, but the present application is not limited thereto.

[0074] In some embodiments of the present application, the target attribute data includes at least one attribute and at least one value corresponding to each attribute.​

[0075] It should be understood that in the embodiments of the present application, the format of the target attribute data can reflect (or can realize) the hierarchical relationship between attributes, but it does not mean that the target attribute data entered by the user must have a multi-level hierarchical relationship.

[0076] For example, the target attribute data includes the age and gender attributes of the user, and the two attributes are siblings. In this case, the target attribute data does not have a hierarchical relationship between the attributes.

[0077] For another example, the target attribute data includes the age and name attributes of the user, and the name attribute further includes the firstName and lastName attributes. In this case, the age attribute and the name attribute are siblings, and the name attribute has a parent-child relationship with the firstName and lastName attributes.

[0078] As an example, the target attribute data entered by the user can be in the following format:

[0079]

[0080] From the above, the hierarchical relationship between the attributes of the attribute data can be seen, that is, name and age are sibling attributes, firstName and lastName are the next level attributes (or child node attributes) of name, in other words, name is the parent node attribute of firstName and lastName.

[0081] In some embodiments of the present application, before performing subsequent dynamic attribute verification processing on the attribute data, the entered attribute data can be preprocessed first, for example, at least one of data type verification, regular expression verification, and data value verification is performed on the attribute data, which is beneficial to reduce the complexity of the subsequent dynamic attribute verification processing algorithm.

[0082] In some embodiments, the data type of each attribute in the entered attribute data can be verified to be a predefined data type.

[0083] As an example, assuming that the predefined data types are eight types: number, date, text array, number array, date array, object type, object array type, and reference type, if the data type of the first attribute in the attribute data is one of the above eight types, it is determined that the data type verification of the first attribute is passed, otherwise, it is determined that the data type verification of the first attribute is not passed.

[0084] In some embodiments, it can be checked whether the value of each attribute in the entered attribute data conforms to a regular expression. As an example, if the value of the first attribute conforms to the regular expression, it is determined that the regular expression check of the first attribute passes, and if the value of the first attribute does not conform to the regular expression, it is determined that the regular expression check of the first attribute fails.

[0085] In some embodiments, it can be checked whether the value of each attribute in the entered attribute data is within a reasonable range. As an example, if the value of the first attribute is not within the reasonable range, it is determined that the data value check of the first attribute passes, and if the value of the first attribute is not within the reasonable range, it is determined that the data value check of the first attribute fails.

[0086] In some embodiments of the present application, the target attribute data can refer to the entered original attribute data, or can be attribute data obtained after preprocessing the entered attribute data, for example, attribute data in which the data type check, the regular expression check, and the data value check of the entered attribute data all pass, for example, attribute data in which the data type check of the entered attribute data passes, for example, attribute data in which the data type check and the data value check of the entered attribute data both pass, and the like.

[0087] Continuing to refer to Figure 2 The method 100 further includes:

[0088] S120, obtaining a target attribute data template corresponding to the target attribute data.

[0089] It should be understood that the present application does not limit the configuration granularity of the attribute data template, which can be determined according to the business logic corresponding to the attribute data, and the present application does not limit this.

[0090] In some implementations, the attribute data template can be application system granular, for example, one application system corresponds to one attribute data template, that is, the entire application system can use a unified attribute data template.

[0091] In other implementations, the attribute data template can be business granular, for example, different businesses can correspond to independent attribute data templates, as an example, a first business corresponds to a first attribute data template, a second business corresponds to a second attribute data template, and the like.

[0092] In some embodiments, the S120 can include:

[0093] According to the business logic corresponding to the target attribute data, the corresponding target attribute data template is obtained.

[0094] For example, if the target attribute data is of a business granularity, a target attribute data template corresponding to a business corresponding to the target attribute data can be obtained. For example, if the target attribute data corresponds to a first business, a target attribute data template corresponding to the first business can be obtained.

[0095] For another example, if the target attribute data is of an application system granularity, a target attribute data template corresponding to an application system corresponding to the target attribute data can be obtained. In an embodiment of the present application, the target attribute data template is an attribute data template used for dynamic attribute verification processing of the target attribute data, and the target attribute data template is used to define configuration information (or verification rules) of each attribute of the attribute data. Through dynamic attribute verification processing of the attribute data according to the attribute data template corresponding to the target attribute data, dynamic expansion of the attribute data is realized.

[0096] In an embodiment of the present application, the attribute data template is used to define the following contents:

[0097] 1. Key fields included in each attribute of the attribute data

[0098] For example, but not limited to, the key fields can include at least one of the following:

[0099] Attribute name, data type, regular expression, default value, attribute value, whether to encrypt, whether to allow null, whether to be mandatory, and whether to be used as a search condition.

[0100] Optionally, the data type can include a basic type, and this type of data does not have a child node, for example, a number (including an integer and a floating point), a date, a text array, a number array, a date array, and the like. The data type can also include a complex type, and this type of data can have a child node, for example, an object type, an object array type, a reference type, and the like, but the present application is not limited thereto.

[0101] By supporting the complex type of data type, scenarios that cannot be met by the basic data type when dynamically expanding attributes can be solved.

[0102] 2. Data format of the attribute data template

[0103] That is, which format of data is used for data conversion or storage of the attribute data template.

[0104] Optionally, the data format of the attribute data template can be a json format, or can be another data format, for example, an xml format or a string format, and the like. Hereinafter, the json format is taken as an example for description, but the present application is not limited thereto.

[0105] 3. Rule definition of the attribute data template

[0106] For example, defining the usage rules of data types, as an example, which data types can reference other data types, which data types can be parent nodes, including other data types, etc.

[0107] Therefore, the attribute data template in the embodiments of the present application is a dynamic attribute template model. The application system can define different attribute data templates according to business requirements, thereby increasing the flexibility of data interaction between application systems. Correspondingly, the dynamic attribute checking processing model and the dynamic attribute display model of the embodiments of the present application can realize dynamic attribute checking processing and dynamic attribute display functions of dynamic attributes.

[0108] As can be known from the above description, the attribute data in the embodiments of the present application can be data with a hierarchical structure, or can also be attribute data without a hierarchical structure. The attribute data template supports the configuration of attribute data with a hierarchical structure, but the configured attribute data does not necessarily have a hierarchical structure. That is, the attribute data template of the embodiments of the present application can configure attribute data with a hierarchical structure, or can configure attribute data without a hierarchical structure. In this case, how to realize dynamic attribute checking processing of attribute data of different formats to realize dynamic expansion of attribute data is a difficulty in dynamic attribute checking processing.

[0109] In the embodiments of the present application, the attribute data and the attribute data template are respectively subjected to flat mapping processing, to obtain flat attribute data and flat attribute data template (i.e. target attribute data template). Further, the flat attribute data is subjected to dynamic attribute checking processing based on the flat attribute data template (i.e. target attribute data template), which is beneficial to reducing the complexity of dynamic attribute checking processing. The dynamic attribute checking processing algorithm can realize checking of attribute data of a basic type, and can also realize checking of attribute data of a complex type, that is, different types of attribute data can be subjected to checking processing by a unified checking processing algorithm. Therefore, when a new attribute needs to be added, the corresponding attribute data template needs to be modified, and the checking processing algorithm does not need to be modified, so that checking processing of the added attribute can be realized, and dynamic expansion of the added attribute can be realized.

[0110] In combination with specific embodiments, the generation manner of the target attribute data template is described.

[0111] In some embodiments of the present application, the method 100 further includes:

[0112] The first attribute data template input by the user is received, and the first attribute data template is an initial data template that can represent the hierarchical relationship between attributes of attribute data.

[0113] Optionally, the first attribute data template can correspond to an application system, that is, the entire application system can use a unified template, or can correspond to a specific business, that is, different businesses can correspond to independent attribute data templates, and the configuration granularity of the attribute data template is not limited in the embodiments of the present application.

[0114] Optionally, different application systems can use the same attribute data template, or can use different attribute data templates.

[0115] As an example, the user enters a first attribute data template format as follows:

[0116]

[0117]

[0118] Among them, the definition of the key field is as follows:

[0119] FieldCode: field representation;

[0120] FieldName: field display name;

[0121] DataType: data type;

[0122] IsEncrypted bool: whether to encrypt;

[0123] IsNullable bool: whether to allow null;

[0124] IsSearch bool: whether to search;

[0125] Regex string: regular expression;

[0126] DefaultValue string: default value.

[0127] As can be seen from the above entered first attribute data template, name and age correspond to respective configuration information, wherein the child node attributes firstName and lastName of name correspond to respective configuration information.

[0128] Further, in some embodiments of the present application, the method 100 further comprises:

[0129] performing flat mapping processing on the first attribute data template to obtain a second mapping relationship. The second mapping relationship is used to represent the mapping relationship between each attribute defined by the first attribute data template and the configuration information corresponding to each attribute.

[0130] Further, the second mapping relationship can be determined as a target attribute data template used for dynamic attribute checking processing of attribute data.

[0131] In some embodiments of the present application, in the second mapping relationship, the attribute name of each attribute is configured as the primary key of each attribute, and other configuration information (e.g., data type, default value, whether mandatory, etc.) of each attribute is configured as the value corresponding to the primary key in the second mapping relationship. In this way, during subsequent attribute data checking, the corresponding value can be retrieved through the key, so that the configuration information of the attribute can be obtained, and the retrieval speed is improved.

[0132] Optionally, in some embodiments of the present application, after receiving the first attribute data template input by the user, it can be first determined whether a corresponding attribute data template already exists.

[0133] For example, the first attribute data template corresponds to a first business, if the application system has already saved an attribute data template corresponding to the first business, the input can be ended, or if the application system uses one attribute data template, and the application system has already saved an attribute data template, the input can be ended. Otherwise, subsequent steps are executed.

[0134] Optionally, in some embodiments of the present application, after inputting the first attribute data template, the first attribute data template can also be checked, for example, data format checking processing or data type checking processing can be performed on the first attribute data template.

[0135] As an example, the data format checking processing on the first attribute data template can include:

[0136] It is determined whether the data format of the first attribute data template is a predefined data format.

[0137] Optionally, the predefined data format can be a data format supported by the application system corresponding to the first attribute data template, or a data format supported by the business corresponding to the first attribute data template.

[0138] For example, if the data format of the input first attribute data template is the predefined data format, it is determined that the data format checking of the first attribute data template is passed, otherwise, it is determined that the data format checking of the first attribute data template is not passed.

[0139] Optionally, the predefined data format may, for example, include a Json format.

[0140] As an example, the data type checking on the first attribute data template can include:

[0141] determine whether the data type corresponding to each attribute in the first attribute data template is a predefined data type.

[0142] For example, assuming that the predefined data types are eight types: number, date, text array, number array, date array, object type, object array type, and reference type, if the data type corresponding to a first attribute in the first attribute data template is one of the eight types, it is determined that the data type of the first attribute passes the verification, otherwise, it is determined that the data type of the first attribute fails the verification.

[0143] Optionally, the predefined data type can be a data type supported by an application system corresponding to the first attribute data template, or a data type supported by a business corresponding to the first attribute data template.

[0144] Optionally, a subsequent attribute data template processing step, such as a flattening mapping processing step, can be performed in a case where the data format of the attribute data template passes the verification and the data type of each attribute passes the verification.

[0145] Optionally, a subsequent attribute data template processing step, such as a flattening mapping processing step, can be performed on attribute data for which the data type passes the verification in a case where the data format of the attribute data template passes the verification and there is an attribute for which the data type passes the verification.

[0146] In some embodiments of the present application, each attribute in the first attribute data template can be traversed in turn according to a hierarchical relationship between the attributes in the first attribute data template, and a mapping relationship between each attribute and corresponding configuration information is established.

[0147] In some embodiments, flattening mapping processing is performed on the first attribute data template to obtain a second mapping relationship, including:

[0148] According to the hierarchical relationship between the attributes of the first attribute data template, a parent node attribute in the first attribute data template is traversed first to obtain a mapping relationship between each parent node attribute and configuration information corresponding to each parent node attribute;

[0149] After each parent node attribute is traversed, a child node attribute of each parent node attribute in the first attribute data template is traversed in turn to obtain a mapping relationship between each child node attribute and configuration information corresponding to each child node attribute.

[0150] That is, the highest level attribute is traversed first to establish a mapping relationship between the highest level attribute and corresponding configuration information, the next level attribute is further searched for to establish a mapping relationship between the next level attribute and corresponding configuration information, and the mapping relationship between the lowest level attribute and corresponding configuration information is established until the mapping relationship between the target attribute data template and corresponding configuration information is established.

[0151] Then, according to the foregoing example, name and age in the first attribute data template can be traversed first to establish a mapping relationship between name, age and corresponding configuration information. Since name has a child node, all child nodes of name are then traversed to establish a mapping relationship between firstName and lastName and corresponding configuration information.

[0152] It should be understood that, in the embodiments of the present application, the attribute data template after the flattening mapping processing (i.e., the target attribute data template) can also reflect the parent-child relationship between attributes. For example, a sub-node attribute having a parent node can be configured with an identification information, which is used to identify the parent node attribute corresponding to the sub-node attribute.

[0153] Optionally, the parent node attribute corresponding to the sub-node attribute can be identified by the attribute name of the parent node attribute.

[0154] The format of the target attribute data template of the attribute data template in the foregoing example after the flattening mapping processing can be as follows:

[0155]

[0156] In this example, "name." is added before firstName and lastName to identify that the parent node attribute of firstName and lastName is name. In other embodiments, other ways can also be used to identify the parent-child relationship between the two, for example, by name:, name?, etc., which are not limited in the present application.

[0157] Optionally, in some embodiments of the present application, the target attribute data template after the flattening mapping processing can be saved for subsequent attribute data verification processing, for example, saved in the memory.

[0158] In some embodiments of the present application, the S120 can specifically include:

[0159] The target attribute data template corresponding to the target attribute data is obtained from the memory of the application system.

[0160] In some embodiments of the present application, the second mapping relationship can also be further processed to convert data in a target format and stored in a database.

[0161] Optionally, the data in the target format can reflect the hierarchical relationship between attributes.

[0162] Optionally, the target format can be a JsonSchema format.

[0163] For example, the data in the second mapping relationship can be traversed in a loop to splice into template data of a Json hierarchy. In the loop, the association between parent and child attributes is saved through a parent node attribute, and the template data in the Json format is further converted into template data in the JsonSchema format.

[0164] In some embodiments, a plurality of key fields are defined in the target format, for example, for the JsonSchema format, the fields of value (key), type, format, required, pattern, and properties are defined.

[0165] In a specific implementation, each attribute in the second mapping relationship can be traversed in sequence according to the hierarchical relationship of each attribute, and the information of each key field of each attribute is mapped to the corresponding key field in the target format one by one. The present application does not limit which key field of the attribute is mapped to which key field in the target format, as long as it is mapped according to a uniform correspondence.

[0166] In combination with Figure 3 It is illustrated that the conversion mode of the attribute data template from the second mapping relationship to the JsonSchema format.

[0167] For example, the parent node attributes are traversed first, the information of each key field of each parent node attribute is obtained, and the information of each key field of each parent node attribute is mapped to the corresponding field in the JsonSchema format one by one, for example, the value, data type, data format, whether required, and property name fields in the first mapping relationship are mapped to the value, type, format, required, and properties fields in the JsonSchema format, respectively.

[0168] After traversing each parent node attribute, the child node attributes of each parent node attribute are traversed, the information of each key field of each child node attribute is obtained, and the information of each key field of each child node attribute is mapped to the corresponding field in the JsonSchema format one by one, until the key fields of the attributes at the bottom level are mapped, and the attribute data template in the JsonSchema format is obtained.

[0169] Continuing with the above example, the attribute data template in the JsonSchema format can be:

[0170]

[0171] Therefore, in the embodiment of the present application, the target attribute data template with the flattened structure and the attribute data template of the target format with the hierarchical structure can be stored, and when performing attribute data verification according to the attribute data template, the target attribute data template with the flattened structure can be acquired, and the flattened attribute data can be subjected to verification processing.

[0172] With reference to the foregoing example, the method 100 further includes: Figure 2

[0173] S130, performing flattened mapping processing on the target attribute data to obtain a first mapping relationship.

[0174] The first mapping relationship indicates the mapping relationship between each attribute of the target attribute data and the value of each attribute.

[0175] It should be understood that the execution order of S120 and S130 is not limited, for example, the target attribute data template can be acquired first, or the target attribute data to be subjected to dynamic attribute verification processing can be subjected to preprocessing, such as flattened processing, before the dynamic attribute verification processing, and the present application does not limit this.

[0176] Optionally, in the first mapping relationship, the attribute name of each attribute is configured as the primary key of each attribute, and the value of each attribute is configured as the value corresponding to the primary key, and in the target attribute data template, the attribute name of each attribute is configured as the primary key, and the configuration information of each attribute is configured as the value corresponding to the primary key. In this way, when performing subsequent dynamic attribute data verification processing, the key in the attribute data template can be retrieved through the key, the value corresponding to the key, that is, the configuration information of the attribute, is acquired, and the value of the key in the first mapping relationship is further subjected to dynamic attribute verification processing according to the configuration information, thereby improving the verification speed.

[0177] It should be understood that in the embodiment of the present application, the attribute data subjected to the flattened mapping processing can also reflect the parent-child relationship between attributes, for example, the attribute of the child node corresponding to the parent node attribute can be configured with an identification information, and the identification information is used to identify the parent node attribute corresponding to the attribute of the child node.

[0178] With reference to the foregoing example, the flattened attribute data format is as follows:

[0179] name.firstName=ccc

[0180] name.lastName=xxx

[0181] age=20.

[0182] ​Therefore, in the embodiments of the present application, the attribute name in the attribute data processed by the flattening mapping process saves a full path, including the attribute name of the parent node attribute, and if there is a higher level attribute, the attribute name of the higher level attribute can also be included.

[0183] In the above example, the parent node attribute of firstName and lastName is identified as name by adding "name." before firstName and lastName, and in other embodiments, other ways can also be used to identify the parent-child relationship between the two, for example, through name:, name?, etc., which are not limited in the present application.

[0184] In some embodiments of the present application, according to the attribute hierarchy relationship between each attribute in the target attribute data, each attribute in the target attribute data can be traversed in turn, and the mapping relationship between each attribute and the corresponding configuration information is established.

[0185] In some embodiments of the present application, the flattening mapping processing of the target attribute data to obtain the first mapping relationship can include the following steps:

[0186] According to the hierarchy relationship between each attribute of the template attribute data, the parent node attributes in the attribute data are traversed first, and the mapping relationship between each parent node attribute in the target attribute data and the value of each parent node attribute is obtained;

[0187] After each parent node attribute is traversed, each child node attribute corresponding to each parent node attribute in the target attribute data is traversed in turn, and the mapping relationship between each child node attribute and the value of each child node attribute is obtained.

[0188] That is, the highest level attribute is traversed first to establish the mapping relationship between the highest level attribute and the corresponding value, the next level attribute is further searched, the mapping relationship between the next level attribute and the corresponding value is established, and the mapping relationship between the lowest level attribute and the corresponding value is established until the first mapping relationship is obtained.

[0189] By flattening mapping processing, the attribute data template with hierarchical relationship is converted into the mapping relationship between the attribute and the corresponding configuration information, and by flattening mapping processing, the attribute data with hierarchical relationship is converted into the mapping relationship between the attribute and the value. Therefore, when the dynamic attribute checking process is performed on the attribute of the attribute data according to the attribute data template, the configuration information corresponding to the attribute is only needed to be searched according to the mapping relationship of the attribute data template, and the value of the attribute in the mapping relationship of the attribute data is further dynamically checked according to the configuration information, so that flexible checking processing of dynamic attributes can be realized.

[0190] Continuing to refer to Figure 2 The method 100 further comprises:

[0191] S140, according to the configuration information of each attribute defined by the target attribute data template, performing dynamic attribute checking on the value of each attribute in the first mapping relationship.

[0192] Optionally, in some embodiments, S140 can include:

[0193] According to the configuration information of each attribute defined by the target attribute data template, performing dynamic attribute checking on the target attribute data after the flattening mapping processing (i.e., the first mapping relationship).

[0194] Optionally, in some embodiments, S140 can include: according to the configuration information of each attribute defined by the target attribute data template, performing dynamic attribute processing on the target attribute data after the flattening mapping processing (i.e., the first mapping relationship).

[0195] Optionally, the checking result of the target attribute data can include at least one of the checking result of the attribute data and the processing result of the target attribute data.

[0196] As mentioned earlier, the attribute data template can define the key field of the attribute, the usage rule of the data type, etc., and in S140, the key field, data type, etc. of the attribute can be checked.

[0197] For example, each attribute of the attribute data can be looped and traversed, and the key field and data type corresponding to each attribute are checked in turn.

[0198] As shown in the following table, this S140 illustrates one implementation of performing dynamic attribute checking on attribute data: Figure 4

[0199] S141, confirming whether it is the last attribute.

[0200] If yes, ending the checking, otherwise, performing S142.

[0201] S142, judging whether the primary key of the attribute data exists in the target attribute data template.

[0202] As mentioned earlier, after the attribute data flattening mapping processing, the first mapping relationship with the attribute name as the key and the attribute value as the value can be obtained, and therefore, each key in the first mapping relationship can be checked in turn to see whether it exists in the mapping relationship of the target attribute data template. If it exists, it means that the attribute name is a legal attribute name, otherwise, it is processed according to a specific business logic, for example, not processed, or an error is prompted, etc.

[0203] As an example, if the primary key exists in the attribute data template, S143 is performed, otherwise, the checking is ended, or it is confirmed that the checking is failed.​

[0204] S143, data type checking is performed on the attribute data.

[0205] Specifically, the data type of the value of each attribute of the attribute data can be checked according to the data type of each attribute defined in the attribute data template.

[0206] For example, according to the key of each attribute in the first mapping relationship, the configuration information corresponding to the key in the target attribute data template is retrieved in sequence to obtain the data type information of the key in the configuration information, and then the data type of the value of the attribute is checked according to the data type information of the key defined in the attribute data template. For example, if the two match, it is determined that the data type checking of the attribute is passed, otherwise, it is determined that the data type checking of the attribute is not passed.

[0207] In some embodiments, checking the data type of the value of the attribute according to the data type information of the key defined in the target attribute data template can further include:

[0208] Checking the value of the attribute according to the usage rule of the data type in the target attribute data template.

[0209] For example, if the data type of the attribute defined in the target attribute data template is an object array, this data type allows the attribute to have a child node, or if the data type of the attribute defined in the target attribute data template is a basic type, this data type does not allow a child node, i.e. the value of the attribute can only be a basic type, and cannot be a composite data type.

[0210] For example, if the data type of the first attribute is a basic type and the first attribute has a child node, it is determined that the data type checking of the first attribute is not passed.

[0211] For example, if the data type of the first attribute is a complex type and the first attribute has a child node, it is determined that the data type checking of the first attribute is passed.

[0212] Optionally, in some embodiments, other key field checking processes can also be performed on each attribute in the target attribute data in S140, such as default value checking process or regular expression checking process.

[0213] For example, if the value of the first attribute does not conform to the regular expression defined in the target attribute data template, it is determined that the regular expression checking of the first attribute is not passed, otherwise it is determined that the regular expression checking of the first attribute is passed.

[0214] For example, if the value of the first attribute is a default value defined in the target attribute data template, it is determined that the default value of the first attribute passes the check, otherwise, it is determined that the default value of the first attribute fails the check.

[0215] In S144, it is determined whether the check passes.

[0216] Optionally, if the key of an attribute exists in the target attribute data template, and the data type of the attribute is consistent with the data type of the attribute defined in the attribute data template, it is determined that the check result of the attribute is that the check passes.

[0217] Optionally, if the key of an attribute does not exist in the attribute data template, or the data type of the attribute is inconsistent with the data type of the attribute defined in the attribute data template, it is determined that the check result of the attribute is that the check fails.

[0218] If the check result of the attribute is that the check passes, S141 is performed, otherwise, the check can be ended, or the above-mentioned check process can be continued for the next attribute.

[0219] It should be understood that, in the embodiments of the present application, dynamic attribute checking of target attribute data can refer to dynamic attribute checking of actually entered attribute data. For example, the check result of the target attribute data can be determined according to the check result of each attribute of the actually entered target attribute data, and the check result of the target attribute data can be used to determine whether to perform a subsequent attribute data processing step, or whether to save the target attribute data.

[0220] In some implementations, it can be determined that the check result of the target attribute data is that the check passes, if all attributes in the actually entered target attribute data pass the check, or it can be determined that the check result of the target attribute data is that the check passes, if there is at least one attribute that passes the check, or it can be determined that the check result of the target attribute data is that the check fails, if there is at least one attribute that fails the check.

[0221] Optionally, the target attribute data can be dynamically extended according to the check result of the target attribute data, for example, it can be determined whether to save the actually entered attribute data, or the target attribute data can be dynamically extended according to the respective check result of each attribute, for example, it can be determined whether to save each actually entered attribute data.

[0222] For example, in a case where the check result of the target attribute data is a check pass, the target attribute data is dynamically extended, for example, all attribute data that passes the check is saved, or in a case where the check result of the target attribute is a check fail, the target attribute data is not dynamically extended, for example, no attribute data is saved.

[0223] For example, in a case where the check result of the first attribute is a check pass, the first attribute is dynamically extended, for example, attribute data corresponding to the first attribute is saved, or in a case where the check result of the first attribute is a check fail, the first attribute is not dynamically extended, for example, attribute data of the first attribute is not saved.

[0224] Optionally, in a case where the dynamic attribute check result of the target attribute data is a check fail, the target attribute is not dynamically extended, and further, a prompt information can be sent to the user to prompt that the input format of the attribute data does not conform to the rule defined by the target attribute data template.

[0225] Optionally, in a case where the check result of the first attribute is a check fail, the first attribute is not dynamically extended, and further, a prompt information can be sent to the user to prompt that the input format of the first attribute does not conform to the input rule of the first attribute defined by the target attribute data template.

[0226] In some scenarios, if all attribute data of the target attribute data is not input, for example, only part of the attribute information is input, or for a certain attribute, only part of the key field of the attribute is input, in this case, a dynamic attribute processing flow can also be performed, for example, dynamic attribute processing is performed on the un-input attribute data of the target attribute data, for example, at least one of the mandatory item check processing, the check processing of whether to allow to be empty, the default value processing, and the like, to perfect the target attribute data to be input.

[0227] Figure 5 An example of a specific implementation of the dynamic attribute processing flow of the target attribute data is shown in FIG. 1, which shows that the processing of the target attribute data can include: Figure 5

[0228] S145, performing at least one of the mandatory item check processing, the check processing of whether to allow to be empty, the default value processing, and the like, on the un-input attribute data of the target attribute data.

[0229] Optionally, in some embodiments, S145 can be performed in a case where the check result of the target attribute data is a check pass. In a case where the check result of the target attribute data is a check fail, S145 is not performed. For example, it is directly determined that the input target attribute data is not saved.

[0230] ​For example, in the case where the key of each attribute of the actually entered target attribute data passes the key check and the data type of the key passes the check, at least one of the mandatory item check processing, the check of whether to allow to be empty, and the default value processing is further performed on the attribute data of the attribute of the target attribute data that has not been entered.

[0231] In some embodiments of the present application, the processing result of each attribute in the target attribute data can also be determined according to the results of the mandatory item check processing, the check of whether to allow to be empty, and the default value processing.

[0232] In some embodiments, if the first key field of the first attribute has not been entered, but the target attribute data template defines that the value of the first key field of the first attribute is not allowed to be empty, and the target attribute data template defines a default value for the first key field of the first attribute, in this case, the default value is taken as the value of the first key field of the first attribute, and the mapping relationship between the default value and the first key field of the first attribute is added to the target attribute data after the flattening mapping processing. In this case, the processing result of the first attribute is considered to be successful.

[0233] In some other embodiments, if the first key field of the first attribute has not been entered, but the target attribute data template defines that the value of the first key field of the first attribute is a mandatory item, and the target attribute data template defines a default value for the first key field of the first attribute, the default value is taken as the value of the first key field of the first attribute, and the mapping relationship between the default value and the first key field of the first attribute is added to the target attribute data after the flattening mapping processing. In this case, the processing result of the first attribute is considered to be successful.

[0234] In some other embodiments, if the first key field of the first attribute has not been entered, but the target attribute data template defines that the value of the first key field of the first attribute is not allowed to be empty or is a mandatory item, but the target attribute data template does not define a default value for the first key field of the first attribute, in this case, subsequent processing can be performed according to specific business logic, for example, the first key field is not processed, or a prompt message can be output to the user to prompt that the target attribute data entered by the user does not comply with the target attribute data template rules. In this case, the processing result of the first attribute is considered to be failed.

[0235] In some embodiments, if the first key field of the first attribute is not entered, and the target attribute data template defines that the value of the first key field of the first attribute is allowed to be empty or non-mandatory, and the target attribute data template does not define the default value of the first key field of the first attribute, in one implementation, the first key field of the first attribute can not be processed, that is, the value of the first key field is not included in the saved target attribute data. In this case, the processing result of the first attribute is considered to be failed.

[0236] In one implementation, if the first key field of the first attribute is not entered, the target attribute data template defines that the value of the first key field of the first attribute is allowed to be empty or non-mandatory, and the target attribute data template does not define the default value of the first key field of the first attribute, in this case, the first key field of the first attribute can not be processed, that is, the value of the first key field is not included in the saved target attribute data. In this case, the processing result of the first attribute is considered to be failed.

[0237] Optionally, the first key field can be an attribute value field, or can be other key fields, which are not limited in the present application.

[0238] In some embodiments of the present application, the processing result of the target attribute data can be determined according to the processing result of each attribute data that is not entered.

[0239] For example, in the case that all the attribute data that is not entered is successfully processed, that is, each attribute that is not entered obtains a corresponding value, it is determined that the processing result of the target attribute data is successful.

[0240] For another example, in the case that the processing result of at least one attribute is failed, that is, there is an attribute that is mandatory or not allowed to be empty but is not assigned a value, in this case, it is determined that the processing result of the target attribute data is failed.

[0241] For another example, in the case that the processing result of at least one attribute is successful, that is, there is an attribute that is mandatory or not allowed to be empty and is assigned a value, in this case, it is determined that the processing result of the target attribute data is successful.

[0242] Continue to participate Figure 2 In some embodiments of the present application, the method 100 further includes:

[0243] S150, dynamically extending the target attribute data according to the checking processing result of the target attribute data.

[0244] Optionally, the target attribute data is dynamically extended according to at least one of the checking result of the target attribute data and the processing result of the target attribute data.

[0245] The target attribute data is dynamically extended according to at least one of the checking result of the target attribute data and the processing result of the target attribute data.

[0246] The checking result of the target attribute data refers to a checking result of actually entered attribute data of the target attribute data, and the processing result of the target attribute data refers to a processing result of un-entered attribute data of the target attribute data.

[0247] In some implementations, if the checking result of the target attribute data is passed and the processing result of the target attribute data is successful, the target attribute data is dynamically extended, for example, the target attribute data is saved.

[0248] In some other implementations, if the checking result of the target attribute data is failed, the target attribute data is not dynamically extended, for example, the target attribute data is not saved.

[0249] In some other implementations, if the checking result of the target attribute data is passed but the processing result of the target attribute data is failed, the target attribute data is not dynamically extended, for example, the target attribute data is not saved, or only the attribute data whose dynamic attribute checking is passed is dynamically extended, for example, only the attribute data whose checking is passed is saved, or only the attribute data whose dynamic attribute checking is passed or whose processing result is successful is dynamically extended, for example, only the attribute data whose checking is passed and whose processing result is successful is saved.

[0250] It should be understood that the above dynamic attribute checking manner of the target attribute data and the dynamic attribute processing manner of the target attribute data are only examples, and can be designed according to specific business logic, which is not limited in the present application.

[0251] It should be understood that in the embodiments of the present application, the saved target attribute data can include attribute data whose dynamic attribute checking is passed, or can include attribute data whose processing result is successful in the dynamic attribute processing in S145, for example, attribute data processed by default values, etc.

[0252] In some embodiments of the present application, the method 100 further includes:

[0253] Converting the target attribute data into a target format;

[0254] Storing the attribute data in the target format into a database.

[0255] Optionally, the target attribute data can be converted into a target format in case that it is determined to dynamically expand the target attribute data.

[0256] For example, the target attribute data can be determined to be dynamically expanded in case that the dynamic attribute check of the target attribute data is passed and the dynamic data processing of the target attribute data is successful, and the target attribute data is further converted into a target format for storage.

[0257] For another example, the target attribute data can be determined to be dynamically expanded in case that the dynamic attribute check of the target attribute data is passed, and the target attribute data is further converted into a target format for storage.

[0258] Optionally, the target format is a data format supported by a database, such as a Json format.

[0259] Taking the foregoing example, the storage format of the target attribute data in the database is as follows:

[0260]

[0261]

[0262]

[0263] Through the foregoing steps, the target attribute data and the target attribute data template are obtained, and further, in some embodiments, the attribute data can be displayed according to the requirement of a user.

[0264] Optionally, in some embodiments of the present application, the method 100 further includes:

[0265] receiving a query condition of attribute data input by a user;

[0266] taking the query condition as a primary key of attribute data to be queried;

[0267] acquiring attribute data satisfying the query condition from a database according to the primary key of the attribute data to be queried;

[0268] converting the data type of each attribute of the attribute data into the data type of each attribute defined by the target attribute data template;

[0269] converting the attribute data into a data format defined by the target attribute data template;

[0270] outputting the attribute data in the data format defined by the target attribute data template.

[0271] As described above, the attribute data is stored in a flattened data format in the database, and the target attribute data template is also stored in a flattened data format, therefore, after obtaining the query condition of the user, the query condition can be taken as a key, so as to quickly search the value corresponding to the key. Since the value and the data type defined by the target attribute data template may be inconsistent, before displaying the attribute data, the attribute data can be converted according to the data type defined by the target attribute data template, for example, converting a string type into the data type defined by the target attribute data template, and further converting the attribute data into the data format defined by the target attribute data template, so as to display the attribute data.

[0272] In summary of the above embodiments, the embodiments of the present application provide a dynamic attribute template model, a dynamic attribute verification processing model and a dynamic attribute display model, which can support complex data types. When a new attribute needs to be added, the attribute data template only needs to be updated, without modifying the dynamic attribute verification processing model and the dynamic attribute display model, i.e. without modifying the attribute data verification processing algorithm and the attribute data display algorithm, and without restarting the application system, so as to realize dynamic verification processing of the changed attribute data template and dynamic verification processing of the attribute data of the added attribute.

[0273] In addition, the dynamic attribute verification processing model of the embodiments of the present application performs dynamic attribute verification processing after performing flattened mapping processing on the attribute data and the target attribute data template, which can realize dynamic verification of attribute data of basic types and dynamic verification of attribute data of complex types, i.e. dynamic verification of attribute data of different types is realized by a unified algorithm, therefore, the flexibility of the data format of the target attribute data template is increased, for example, the user can customize the data format of the attribute data template without the participation of technical personnel, and the flexibility of data interaction between application systems is increased.

[0274] In addition, the attribute data template and the attribute data are dynamically verified by the dynamic attribute verification processing algorithm before being saved, which is beneficial to guarantee the accuracy of the data transmitted to the background of the application system and avoid transparent transmission of error data.

[0275] Figure 6 A model structure diagram of a dynamic attribute template model according to an embodiment of the present application is shown.

[0276] As shown in Figure 6 , the dynamic data template model can be used to perform the following operations:

[0277] The attribute data template is input, checked, processed and stored.

[0278] The attribute data template is input, checked, processed and stored. Figure 7 The attribute data template is input, checked, processed and stored.

[0279] The attribute data template is input, checked, processed and stored. Figure 7 The attribute data template is input, checked, processed and stored.

[0280] S310, receiving the input first attribute data template;

[0281] Optionally, the first attribute data template can correspond to one or more application systems, or can also correspond to a specific business, that is, one or more application systems can use the same attribute data template, or different businesses can use different attribute data templates.

[0282] It should be understood that the format of the first attribute data template can reflect the hierarchical relationship between attributes.

[0283] The first attribute data template can support complex type data, where complex type data can refer to an attribute having a child node attribute. By designing an attribute data template to support complex type data, the needs of different application scenarios can be met.

[0284] S310, determining whether the attribute data template already exists, that is, whether the corresponding attribute data template has been saved in the application system or the database.

[0285] For example, the first attribute data template corresponds to a first business. If the attribute data template corresponding to the first business already exists, the input is ended, or the attribute data template corresponds to an application system, and the attribute data template has been stored in the application system, then the input is ended. Otherwise, subsequent steps are performed.

[0286] S330, performing dynamic attribute checking processing on the attribute data template. In some embodiments of the present application, the dynamic attribute checking processing on the attribute data template can include at least one of the following:

[0287] The first attribute data template is subjected to data format checking processing;

[0288] The first attribute data template is subjected to data type checking processing.

[0289] Optionally, the data format or data type of the first attribute data template can be determined to be reasonable according to specific business logic, where the business logic can be determined according to the business to which the attribute data template is applied.

[0290] In some embodiments, the data format checking of the first attribute data template can include:

[0291] determining whether the data format of the first attribute data template is a predefined data format.

[0292] For example, if the data format of the first attribute data template is the predefined data format, it is determined that the data format checking of the first attribute data template is passed, otherwise, it is determined that the data format checking of the first attribute data template is failed.

[0293] Optionally, the predefined data format can include, for example, a Json format.

[0294] In some embodiments, the data type checking of the first attribute data template can include:

[0295] determining whether the data type corresponding to each attribute in the first attribute data template is a predefined data type.

[0296] For example, if the data type corresponding to a first attribute in the first attribute data template is the predefined data type, it is determined that the data type checking of the first attribute is passed, otherwise, it is determined that the data type checking of the first attribute is failed.

[0297] Optionally, if the data format checking of the first attribute data template is passed and the data type checking of each attribute in the first attribute data template is passed, subsequent attribute data template processing steps are performed.

[0298] Optionally, if the data format checking of the first attribute data template is failed, or there is an attribute in the first attribute data template whose data type checking is failed, the input is ended.

[0299] Optionally, if the data type checking of part of the attributes in the first attribute data template is failed, subsequent processing can also be performed on the attributes whose data type checking is passed.

[0300] S340, performing a flattening mapping processing on the attribute data template.

[0301] For example, the first attribute data template is subjected to the flattening mapping processing to obtain a second mapping relationship.

[0302] The second mapping relationship is used to represent the mapping relationship between each attribute defined by the first attribute data template and the configuration information corresponding to each attribute. That is, the format of the second mapping relationship is a flat data without hierarchical structure.

[0303] To avoid losing the association relationship between attributes, an identification information can be configured for a child node attribute having a parent node, and the identification information is used to identify the parent node attribute corresponding to the child node attribute.

[0304] Optionally, the identification information can be an attribute name of the parent node attribute.

[0305] Therefore, in the embodiments of the present application, the attribute name in the template data after the flat mapping processing saves a full path, including the attribute name of the parent node attribute, and if there is a higher level attribute, the attribute name of the higher level attribute can also be included.

[0306] It should be understood that the specific implementation process of performing flat mapping processing on the attribute data template refers to the related description of the foregoing embodiments, and for the sake of brevity, will not be repeated here.

[0307] S350, performing format conversion on the attribute data template.

[0308] In some embodiments, the second mapping relationship can be stored in the memory for subsequent dynamic attribute checking processing of the attribute data.

[0309] In some other embodiments, the attribute data template in the target format can also be generated according to the second mapping relationship and saved in the database.

[0310] For example, according to the hierarchical relationship of each attribute in the second mapping relationship, the information of each key field of each attribute can be one-to-one mapped to the target key field in the target format to realize the format conversion of the attribute data template.

[0311] The specific implementation of generating the attribute data template in the target format according to the second mapping relationship refers to the related implementation of the embodiments shown in Figure 3 For the sake of brevity, will not be repeated here.

[0312] S360, performing persistent processing on the attribute data template in the target format.

[0313] At this point, the attribute data template is recorded, and in the subsequent attribute data checking phase, the recorded attribute data template can be used for dynamic attribute checking processing of the attribute data.

[0314] Figure 8 Fig. 4 shows a model structure diagram of a dynamic attribute checking processing model according to an embodiment of the present application.

[0315] As shown in Figure 8 , the dynamic attribute checking processing model can be used to perform the following operations:

[0316] The attribute data is entered, pre-processing is performed on the attribute data before verification, an attribute data template for verification is obtained, the attribute data is flattened and mapped, dynamic attribute verification is performed on the attribute data according to the attribute data template, dynamic attribute processing is performed on the attribute data after verification, format conversion is performed on the attribute data template, and the attribute data is stored.

[0317] In combination Figure 9 , the generation process of the attribute data is described in detail.

[0318] As shown in Figure 9 , the method can include the following steps:

[0319] S410, the entered attribute data is received.

[0320] In some embodiments of the present application, pre-processing can be performed on the entered attribute data before subsequent dynamic attribute verification is performed on the attribute data. For example, at least one of data type verification, regular expression verification and data value verification is performed on the attribute data.

[0321] Optionally, the data type of the attribute data can be determined according to the business type of the attribute data.

[0322] In some embodiments, the data type verification processing of the attribute data can include:

[0323] It is determined whether the data type corresponding to the attribute in the attribute data is a predefined data type.

[0324] For example, if the data type corresponding to the first attribute in the attribute data is a predefined data type, it is determined that the data type verification of the first attribute is passed, otherwise it is determined that the data type verification of the first attribute is not passed.

[0325] In some embodiments, the regular expression verification processing of the attribute data can include:

[0326] It is determined whether the value of the attribute in the attribute data satisfies the regular expression.

[0327] For example, if the value of the first attribute in the attribute data satisfies the regular expression, it is determined that the regular expression verification of the first attribute is passed, otherwise it is determined that the regular expression verification of the first attribute is not passed.

[0328] In some embodiments, it can be verified whether the value of the attribute in the entered attribute data is within a reasonable range. If the value of the first attribute is not within a reasonable range, it is determined that the data value verification of the first attribute is passed, and if the value of the first attribute is not within a reasonable range, it is determined that the data value verification of the first attribute is not passed.

[0329] Optionally, if the data type check, the regular expression check and the data value check of each attribute in the attribute data are passed, a subsequent process is executed, otherwise, the input is ended.

[0330] Optionally, if the dynamic attribute check result of the data type check, the regular expression check and the data value check of part of the attributes in the attribute data is passed, a subsequent process is executed on the passed attribute, and the attribute data that is not passed is not saved.

[0331] In the embodiment of the present application, before the dynamic attribute check processing is performed, the attribute data input is preprocessed, which is beneficial to reduce the implementation complexity of the subsequent dynamic attribute check processing based on the attribute data template.

[0332] S420, obtaining an attribute data template corresponding to the attribute data.

[0333] For example, different businesses correspond to independent attribute data templates, if the attribute data corresponds to a first business, the attribute data template corresponding to the first business can be obtained.

[0334] The attribute data template of the embodiment of the present application can support complex data types, that is, the attribute data template can be a data template with a hierarchical relationship, and the attribute data can also be a complex data type, that is, the attribute data can be attribute data with a hierarchical relationship.

[0335] It should be understood that the attribute data template obtained in S420 can be the attribute data template that has been subjected to the aforementioned flat mapping processing and saved, for example, the second mapping relationship.

[0336] The attribute data template subjected to the flat mapping processing is used to perform dynamic attribute check on the attribute data, which is beneficial to reduce the complexity of the check processing.

[0337] S430, performing flat mapping processing on the attribute data to obtain a first mapping relationship.

[0338] It should be understood that the execution of S430 and S420 is not in any particular order, S420 can be executed first, or S430 can be executed first, or S420 and S430 can be executed simultaneously, and the present application does not limit this.

[0339] It should be understood that the specific implementation process of performing flat mapping processing on the attribute data is described in the foregoing S130, and for the sake of brevity, it will not be described here.

[0340] As an example, attributes of the highest level node in the attribute data are traversed first, a mapping relationship between the attributes of the highest level node and corresponding values is established, attributes of the next level node are further searched, a mapping relationship between the attributes of the next level node and corresponding values is established, and the mapping relationship between the attributes of the lowest level node and corresponding values is established until the mapping relationship between the attributes of the lowest level node and corresponding values is established, and a first mapping relationship is obtained.

[0341] S440, performing dynamic attribute verification on the attribute data after the flat mapping processing according to the flat attribute data template.

[0342] For brevity, details are not repeated here. Figure 2 S140 in the foregoing description of S140 in the foregoing description of Figure 4 For brevity, details are not repeated here.

[0343] Optionally, the S440 can be dynamic attribute verification on the attribute data actually entered by the user.

[0344] As an example, if the key corresponding to the attribute in the attribute data exists in the attribute data template, and the data type of the value of the key matches the data type defined by the attribute data template, it is determined that the dynamic attribute verification of the attribute passes, otherwise, it is determined that the dynamic attribute verification of the attribute does not pass.

[0345] S450, determining whether the verification passes.

[0346] If the verification passes, S460 is performed, otherwise, the entering is ended.

[0347] Optionally, the determination manner of the verification result of the attribute data is as described above, and details are not repeated here for brevity.

[0348] S460, performing dynamic attribute processing on the attribute data after the flat mapping processing according to the flat attribute data template.

[0349] Optionally, the S460 can be dynamic attribute processing on the attribute data not entered by the user.

[0350] For example, at least one of the mandatory item verification processing, the null value allowed verification processing, and the default value processing can be performed on the attribute data not entered by the user.

[0351] It should be understood that the specific implementation of S460 can refer to the related implementation of S145 in the foregoing description of S145 in the foregoing description of Figure 5 For brevity, details are not repeated here.

[0352] After the above processing, attribute data conforming to the rules defined by the attribute data template can be obtained. The attribute data can include entered data conforming to the template definition rules, or can include data processed by S460.

[0353] S470, format conversion is performed on the attribute data to be stored.

[0354] For example, the Json format is converted for storage.

[0355] S480, the attribute data is subjected to a persistence process.

[0356] Through the above steps, the attribute data entry is completed, and the attribute data can be displayed in the subsequent attribute data display stage.

[0357] As shown in Figure 10 , the dynamic attribute display model can perform the following operations:

[0358] The query condition is obtained, the attribute data satisfying the query condition is obtained by matching the query condition, the attribute data satisfying the query condition is subjected to data type conversion, the attribute data satisfying the query condition is subjected to format conversion, and the attribute data is output.

[0359] As described above, the attribute data is stored in a flattened data format in the database, and the attribute data template is also stored in a flattened data format, so after the user's query condition is obtained, the query condition can be used as a key to quickly search for the value corresponding to the key. Since the value and the data type defined by the attribute data template may be inconsistent, the attribute data can be subjected to data type conversion according to the data type defined by the attribute data template before the attribute data is displayed, for example, the string type is converted to the data type defined by the attribute data template, and further, the attribute data is converted to the data format defined by the attribute data template, so as to display the attribute data.

[0360] In summary, the attribute data template based on the embodiments of the present application can not only support basic data types, but also support complex data types, and can solve the problem that the data type defined by the attribute data template is not supported when the dynamic attribute is expanded, thereby meeting the needs of various business scenarios.

[0361] Moreover, the dynamic attribute data verification processing scheme and the dynamic attribute data display scheme based on the embodiments of the present application can achieve dynamic verification processing of the changed attribute data template and dynamic verification processing of the attribute data of the newly added attribute, without modifying the attribute data verification processing algorithm and the attribute data display algorithm, and without restarting the application system, when it is necessary to add attribute data. Therefore, the attribute data verification processing scheme and the attribute data display scheme of the embodiments of the present application have universality, and can be applied to various scenarios of verifying attribute data based on attribute data templates.

[0362] Since the attribute data verification processing scheme of the embodiment of the application performs dynamic attribute verification processing after performing flat mapping processing on attribute data and attribute data templates, dynamic verification of attribute data of basic types and dynamic verification of attribute data of complex types can be implemented, that is, dynamic verification of attribute data of different types is implemented through a unified verification processing algorithm, thus increasing the flexibility of the data format of the attribute data template, for example, the user can customize the data format of the attribute data template without the participation of technical personnel, and increasing the flexibility of data interaction between application systems.

[0363] In addition, before saving the attribute data template and the attribute data, the attribute data template and the attribute data are subjected to dynamic attribute verification processing through the verification processing algorithm, which is beneficial to ensuring the accuracy of the data transmitted to the background of the application system and avoiding the transparent transmission of error data.

[0364] The method embodiment of the application is described in detail above Figures 1 to 10 , and the device embodiment of the application is described in detail below Figures 11 to 12 . It should be understood that the device embodiment and the method embodiment correspond to each other, and similar descriptions can be referred to the method embodiment.

[0365] Figure 11 is a schematic structural diagram of an attribute data dynamic expansion device 1000 according to an embodiment of the application, as Figure 11 indicated, the attribute data dynamic expansion device 1000 can include:

[0366] A first acquisition module 1001 is configured to acquire target attribute data to be subjected to attribute dynamic expansion.

[0367] A second acquisition module 1002 is configured to acquire a target attribute data template corresponding to the target attribute data, the target attribute data template being configured to define configuration information of each attribute of attribute data, wherein the configuration information of each attribute includes a key field included in each attribute and a usage rule of a data type of each attribute.

[0368] A flat processing module 1003 is configured to perform flat mapping processing on the target attribute data to obtain a first mapping relationship, the first mapping relationship being a mapping relationship between each attribute of the target attribute data and a value of each attribute.

[0369] A verification processing module 1004 is configured to perform verification processing on the value of each attribute in the first mapping relationship according to the configuration information of each attribute defined by the target attribute data template to obtain a verification processing result of the target attribute data.

[0370] dynamically expand the target attribute data according to the verification processing result of the target attribute data.

[0371] In some embodiments of the present application, the flattening processing module 1003 is further configured to:

[0372] According to the hierarchical relationship between each attribute of the target attribute data, the parent node attribute in the target attribute data is traversed first to obtain a mapping relationship between each parent node attribute in the target attribute data and the value of each parent node attribute.

[0373] After the traversal of each parent node attribute is completed, the child node attribute corresponding to each parent node attribute in the target attribute data is traversed in turn to obtain a mapping relationship between each child node attribute and the value corresponding to each child node attribute.

[0374] In some embodiments of the present application, the device 1000 further comprises:

[0375] The input module is configured to receive the first attribute data template input by a user, wherein the first attribute data template is an initial data template capable of representing the hierarchical relationship between each attribute of the attribute data.

[0376] In some embodiments of the present application, the flattening processing module 1003 is further configured to:

[0377] The first attribute data template is subjected to flattening mapping processing to obtain a second mapping relationship, wherein the second mapping relationship is a mapping relationship between each attribute defined by the first attribute data template and the configuration information of each attribute.

[0378] The second mapping relationship is determined as the target attribute data template.

[0379] In some embodiments of the present application, the flattening processing module 1003 is further configured to:

[0380] According to the hierarchical relationship between each attribute in the first attribute data template, the parent node attribute in the first attribute data template is traversed first to obtain a mapping relationship between each parent node attribute and the configuration information of each parent node attribute.

[0381] After the traversal of each parent node attribute is completed, the child node attribute of each parent node attribute in the first attribute data template is traversed in turn to obtain a mapping relationship between each child node attribute and the configuration information of each child node attribute.

[0382] In some embodiments of the present application, in the second mapping relationship, a child node attribute of a parent node corresponds to an identification information, and the identification information is used to identify a parent node attribute corresponding to the child node attribute. The apparatus 1000 further includes:

[0383] a format conversion module, configured to determine a hierarchical relationship between attributes in the second mapping relationship according to the identification information of the attributes in the second mapping relationship;

[0384] According to the hierarchical relationship between the attributes in the second mapping relationship, the parent node attributes in the second mapping relationship are traversed first, information of each key field of each parent node attribute is obtained, and the information of each key field of each parent node attribute is one-to-one mapped to a corresponding field in a target format; and

[0385] After the traversal of each parent node attribute is completed, the child node attributes of each parent node attribute are traversed again, information of each key field of each child node attribute is obtained, and the information of each key field of each child node attribute is one-to-one mapped to a corresponding field in the target format, so as to obtain an attribute data template in the target format.

[0386] In some embodiments of the present application, in the target attribute data template, an attribute name of each attribute is configured as a primary key, and other configuration information of the each attribute is configured as a value corresponding to the primary key.

[0387] In the first mapping relationship, an attribute name of each attribute is configured as a primary key, and a value of the each attribute is configured as a value corresponding to the primary key.

[0388] In some embodiments of the present application, the verification processing module 1004 is further configured to:

[0389] obtain each primary key in the first mapping relationship in sequence, and determine whether the primary key exists in the target attribute data template;

[0390] In a case where the primary key exists, a value corresponding to the primary key in the first mapping relationship is obtained, and data type verification processing or regular expression verification processing is performed on the value of the primary key.

[0391] In some embodiments of the present application, the verification processing module 1004 is further configured to:

[0392] According to the configuration information of each attribute defined by the target attribute data template, at least one of default value processing, mandatory item verification processing, and attribute value emptiness verification processing is performed on unrecorded attribute data of the target attribute data.

[0393] In some embodiments of the present application, the verification processing module 1004 is further configured to:

[0394] if the first key field of the first attribute is not entered, but the target attribute data template defines that the value of the first key field of the first attribute is not allowed to be empty, and the target attribute data template defines a default value of the first key field of the first attribute, the default value is taken as the value of the first key field of the first attribute, and the target attribute data is updated; or

[0395] if the first key field of the first attribute is not entered, but the target attribute data template defines that the value of the first key field of the first attribute is a mandatory item, and the target attribute data template defines a default value of the first key field of the first attribute, the default value is taken as the value of the first key field of the first attribute, and the target attribute data is updated.

[0396] In some embodiments of the present application, the storage module 1005 is further configured to:

[0397] in the case of confirming to save the attribute data, converting the target attribute data into a target format;

[0398] storing the target attribute data in the target format to a database.

[0399] In some embodiments of the present application, the device 1000 further comprises:

[0400] an input module configured to receive a query condition of attribute data input by a user;

[0401] a query module configured to take the query condition as a primary key of attribute data to be queried, and acquire attribute data satisfying the query condition from the database according to the primary key of the attribute data to be queried;

[0402] a data type conversion module configured to convert the data type of each attribute of the attribute data into the data type of each attribute defined by the target attribute data template;

[0403] a data format conversion module configured to convert the data format of the attribute data into the data format defined by the target attribute data template;

[0404] an output module configured to output the target attribute data in the data format defined by the target attribute data template.

[0405] In some embodiments of the present application, in the first mapping relationship, a child node attribute of a parent node corresponds to an identification information, and the identification information is used to identify the parent node attribute corresponding to the child node attribute.

[0406] In some embodiments of the present application, the verification processing module 1003 is further configured to:

[0407] According to the configuration information of each attribute defined by the target attribute data template, the target attribute data subjected to the flattening mapping processing is subjected to dynamic attribute verification, to obtain a verification result of the target attribute data.

[0408] According to the configuration information of each attribute defined by the target attribute data template, the target attribute data subjected to the flattening mapping processing is subjected to dynamic attribute processing, to obtain a processing result of the target attribute data.

[0409] In some embodiments of the present application, the verification processing result of the target attribute data can include the verification result of the target attribute data and the processing result of the target attribute data.

[0410] In some embodiments of the present application, the verification processing module 1003 is further configured to:

[0411] In a case where the verification result of the target attribute data is passed, the target attribute data subjected to the flattening mapping processing is subjected to dynamic attribute processing according to the configuration information of each attribute defined by the target attribute data template, to obtain a processing result of the target attribute data.

[0412] In some embodiments of the present application, the verification processing module 1003 is further configured to:

[0413] In a case where the verification result of the actual input attribute data of the target attribute data is passed, the un-input attribute data of the target attribute data is subjected to dynamic attribute processing, to obtain a processing result of the target attribute data.

[0414] In some embodiments of the present application, the verification processing module 1003 is further configured to:

[0415] The dynamic attribute processing on the un-input attribute data of the target attribute data can include at least one of the following processing: default value processing, mandatory item verification processing, and attribute value emptiness verification processing.

[0416] In some embodiments of the present application, the apparatus 1000 further includes:

[0417] An attribute data preprocessing module, configured to perform preprocessing on the input first attribute data, to obtain target attribute data.

[0418] In some embodiments of the present application, the attribute data preprocessing module is specifically configured to:

[0419] Perform at least one of the following on the first attribute data: data type verification processing, regular expression verification processing, and data value verification processing.

[0420] In some embodiments of this application, the device 1000 further includes:

[0421] The template data preprocessing module is used to validate the entered first attribute data template in order to obtain the target attribute data template.

[0422] In some embodiments of this application, the template data preprocessing module is further configured to:

[0423] The first attribute data template undergoes at least one of data format validation processing and data type validation processing. It should be noted that the functions of each module in the attribute data dynamic expansion device 1000 in this embodiment can be referred to in the above-described method embodiments. Figures 2 to 10 The specific implementation methods of any embodiment will not be described in detail here.

[0424] Each module in the aforementioned dynamic expansion device for attribute data can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0425] The dynamic extension device 1000 for attribute data can be integrated, for example, into a terminal or server that has storage and a processor and computing capabilities, such as a tablet computer, a handheld device, or a laptop computer, or the dynamic extension device 1000 for attribute data can be the terminal or server.

[0426] Figure 12 Another schematic structural diagram of the dynamic expansion device for attribute data provided in the embodiments of this application is shown below. Figure 12 As shown, the dynamic expansion device 1100 for attribute data may include: a communication interface 1101, a memory 1102, a processor 1103, and a communication bus 1104. The communication interface 1101, memory 1102, and processor 1103 communicate with each other via the communication bus 1104. The communication interface 1101 is used for data communication between the device 1100 and external devices. The memory 1102 can be used to store software programs and modules, and the processor 1103 runs the software programs and modules stored in the memory 1102, such as the software programs for corresponding operations in the aforementioned method embodiments.

[0427] In some embodiments, the processor 1103 may invoke software programs and modules stored in the memory 1102 to perform the following operations:

[0428] obtain target attribute data to be dynamically extended, wherein a format of the target attribute data can reflect a hierarchical relationship between attributes of the target attribute data;

[0429] obtain a target attribute data template corresponding to the target attribute data, the target attribute data template being used to define configuration information of each attribute of attribute data, wherein the configuration information of each attribute includes a key field included in the each attribute and a usage rule of a data type of the each attribute;

[0430] perform a flat mapping process on the target attribute data to obtain a first mapping relationship, the first mapping relationship being a mapping relationship between each attribute of the target attribute data and a value of the each attribute;

[0431] perform dynamic attribute verification processing on the value of the each attribute in the first mapping relationship according to the configuration information of the each attribute defined by the target attribute data template to obtain a verification processing result of the target attribute data;

[0432] perform dynamic extension on the target attribute data according to the verification processing result of the target attribute data.

[0433] In some embodiments, the attribute data dynamic extension apparatus 1100 can be integrated in a terminal or a server with a storage and a processor, or the attribute data dynamic extension apparatus 1100 is the terminal or the server.

[0434] In some embodiments, the present application further provides a computer device including a memory and a processor, the memory storing a computer program, and the processor implementing steps in the above-mentioned method embodiments when executing the computer program.

[0435] The present application embodiments further provide a computer readable storage medium for storing a computer program. The computer readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute corresponding processes in the attribute data dynamic extension method of the present application embodiments, which will not be described herein again for brevity.

[0436] The present application embodiments further provide a computer program product including computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to execute corresponding processes in the attribute data dynamic extension method of the present application embodiments, which will not be described herein again for brevity.

[0437] The embodiment of the present application further provides a computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes corresponding procedures in the attribute data dynamic expansion method in the embodiment of the present application. For brevity, details are not described herein again.

[0438] It should be understood that the processor of the embodiment of the present application can be an integrated circuit chip with a signal processing capability. In the implementation process, each step of the method embodiment can be completed by integrated logic circuits or instructions in the form of software in the processor. The processor can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method.

[0439] It is to be understood that the memory in the embodiments of the present application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (Random Access Memory, RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM). It should be noted that the memory of the system and method described herein is intended to include, but not limited to, these and any other suitable types of memory.

[0440] It should be understood that the above-mentioned memory is exemplary but not limiting, for example, the memory in the embodiments of the present application can also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM) and the like. That is, the memory in the embodiments of the present application is intended to include, but not limited to, these and any other suitable types of memory.

[0441] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0442] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0443] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division, and actual implementation can have another division manner. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0444] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0445] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.

[0446] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the essential part of the technical solutions or the part of the technical solutions that make contributions to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk and various program code storage media.

[0447] The above descriptions are only the specific embodiments of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for dynamically extending attribute data, characterized by, The method comprises the following steps: obtaining target attribute data to be dynamically extended; obtaining a target attribute data template corresponding to the target attribute data, the target attribute data template being used to define configuration information of each attribute of attribute data, wherein the configuration information of each attribute comprises a key field included in the each attribute and a use rule of a data type of the each attribute; performing flat mapping processing on the target attribute data to obtain a first mapping relationship, the first mapping relationship being a mapping relationship between each attribute of the target attribute data and a value of the each attribute; performing dynamic attribute check processing on the value of the each attribute in the first mapping relationship according to the configuration information of the each attribute defined by the target attribute data template to obtain a check processing result of the target attribute data; performing dynamic extension on the target attribute data according to the check processing result of the target attribute data.

2. The method of claim 1, wherein, The flat mapping processing on the target attribute data to obtain the first mapping relationship comprises the following steps: traversing parent node attributes in the target attribute data according to a hierarchical relationship between attributes of the target attribute data to obtain a mapping relationship between each parent node attribute in the target attribute data and a value of the each parent node attribute; after the each parent node attribute is traversed, traversing child node attributes corresponding to the each parent node attribute in the target attribute data to obtain a mapping relationship between the each child node attribute and a value corresponding to the each child node attribute; wherein, in the first mapping relationship, a child node attribute having a parent node corresponds to an identification information, and the identification information is used to identify a parent node attribute corresponding to the child node attribute.

3. The method of claim 1, wherein, Before the flat mapping processing on the target attribute data, the method further comprises the following steps: performing preprocessing on input attribute data to obtain the target attribute data, wherein the preprocessing comprises at least one of data type check processing, regular expression check processing and data value check processing.

4. The method of claim 1, wherein, The method further comprises the following steps: receiving first attribute data template input by a user, the first attribute data template being an initial data template capable of representing a hierarchical relationship between attributes of attribute data; performing flat mapping processing on the first attribute data template to obtain a second mapping relationship, wherein the second mapping relationship is a mapping relationship between each attribute defined by the first attribute data template and configuration information of the each attribute; determining the second mapping relationship as the target attribute data template.

5. The method of claim 4, wherein, The flat mapping processing on the first attribute data template to obtain the second mapping relationship comprises the following steps: traversing parent node attributes in the first attribute data template according to a hierarchical relationship between attributes in the first attribute data template to obtain a mapping relationship between each parent node attribute and configuration information of the each parent node attribute; After traversing each parent node attribute, child node attributes of each parent node attribute in the first attribute data template are traversed in turn to obtain a mapping relationship between each child node attribute and configuration information of each child node attribute.

6. The method of claim 4, wherein, Before performing the flattening mapping processing on the first attribute data template, the method further comprises: performing preprocessing on the input first attribute data template, wherein the preprocessing comprises at least one of data type verification processing and data type verification processing.

7. The method of claim 4, wherein, In the second mapping relationship, a child node attribute having a parent node corresponds to an identification information, and the identification information is used to identify the parent node attribute corresponding to the child node attribute. The method further comprises: According to the identification information of the attributes in the second mapping relationship, the hierarchical relationship between the attributes in the second mapping relationship is determined. According to the hierarchical relationship between the attributes in the second mapping relationship, the parent node attributes in the second mapping relationship are traversed first to obtain information of each key field of each parent node attribute, and the information of each key field of each parent node attribute is mapped to a corresponding field in a target format one by one. After traversing each parent node attribute, child node attributes of each parent node attribute are traversed to obtain information of each key field of each child node attribute, and the information of each key field of each child node attribute is mapped to a corresponding field in the target format one by one to obtain an attribute data template of the target format.

8. The method according to any one of claims 1-7, characterized in that, In the target attribute data template, the attribute name configuration of each attribute is configured as a primary key, and other configuration information of each attribute is configured as a value corresponding to the primary key. In the first mapping relationship, the attribute name configuration of each attribute is configured as a primary key, and the value of each attribute is configured as a value corresponding to the primary key. The dynamic attribute verification processing on the value of each attribute in the first mapping relationship according to the configuration information of each attribute defined by the target attribute data template comprises: Each primary key in the first mapping relationship is obtained in turn to determine whether the primary key exists in the target attribute data template. In the case where the primary key exists, the value corresponding to the primary key in the first mapping relationship is obtained, and data type verification processing or regular expression verification processing is performed on the value of the primary key.

9. The method of claim 8, wherein, The dynamic attribute verification processing on the value of each attribute in the first mapping relationship according to the configuration information of each attribute defined by the target attribute data template comprises: According to the configuration information of each attribute defined by the target attribute data template, at least one of default value processing, mandatory item verification processing and attribute value null verification processing is performed on unrecorded attribute data of the target attribute data.

10. The method of claim 9, wherein, The dynamic attribute verification processing on the value of each attribute in the first mapping relationship according to the configuration information of each attribute defined by the target attribute data template comprises: According to the configuration information of each attribute defined by the target attribute data template, at least one of default value processing, mandatory item verification processing and attribute value null verification processing is performed on unrecorded attribute data of the target attribute data. if the first key field of the first attribute is not entered, but the target attribute data template defines that the value of the first key field of the first attribute is not allowed to be empty, and the target attribute data template defines a default value of the first key field of the first attribute, the default value is taken as the value of the first key field of the first attribute, and the target attribute data is updated; or if the first key field of the first attribute is not entered, but the target attribute data template defines that the value of the first key field of the first attribute is a mandatory item, and the target attribute data template defines a default value of the first key field of the first attribute, the default value is taken as the value of the first key field of the first attribute, and the target attribute data is updated.

11. The method of claim 1, wherein, The dynamic extension of the target attribute data according to the check processing result of the target attribute data comprises: if the check processing result of the target attribute is passed, it is determined to dynamically extend the target attribute data, the target attribute data is converted into a target format, and the target attribute data in the target format is stored in a database.

12. The method of claim 11, wherein, The method further comprises: receiving a query condition of attribute data input by a user; taking the query condition as a primary key of attribute data to be queried; obtaining attribute data satisfying the query condition from the database according to the primary key of the attribute data to be queried; converting the data type of each attribute of the attribute data into the data type of each attribute defined by the target attribute data template; converting the data format of the attribute data into the data format defined by the target attribute data template; outputting the attribute data in the data format defined by the target attribute data template.

13. An apparatus for dynamically extending attribute data, the apparatus comprising: comprise: a first acquisition module configured to acquire target attribute data to be dynamically extended; a second acquisition module configured to acquire a target attribute data template corresponding to the target attribute data, the target attribute data template being configured to define configuration information of each attribute of attribute data, wherein the configuration information of each attribute comprises a key field included in the each attribute and a usage rule of the data type of the each attribute; a flattening processing module configured to perform flattening mapping processing on the target attribute data to obtain a first mapping relationship, the first mapping relationship being a mapping relationship between each attribute of the target attribute data and a value of the each attribute; a check processing module configured to perform dynamic attribute check processing on the value of each attribute in the first mapping relationship according to the configuration information of each attribute defined by the target attribute data template, to obtain a check processing result of the target attribute data; a dynamic extension module configured to perform dynamic extension of the target attribute data according to the check processing result of the target attribute data.

14. An apparatus for dynamically extending attribute data, the apparatus comprising: comprise: a processor; and a memory configured to store executable instructions of the processor; wherein the processor is configured to execute the method of any one of claims 1 to 12 by executing the executable instructions.

15. A computer-readable storage medium, characterized in that, A computer program product for storing a computer program which causes a computer to perform the method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Database query interface engine based on XML template

    CN111752542A

  • Information acquisition method and device, computer equipment and storage medium

    CN112380213A