Low-code business data storage method and system based on EAV model
By transforming data type and generating library tables for the EAV model, combined with collaborative optimization of front-end and back-end components, the traditional database table structure and EAV model in resource and efficiency are solved, and efficient data query and flexible business attribute management are realized. .
Patent Information
- Application Number
- CN202510032636.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When the prior art deals with entities with multiple features but only a few characteristics per instance, the traditional database table structure is inefficient. Although the EAV model is flexible, it leads to memory waste, high CPU resource utilization, low query efficiency, and lacks front-end and back-end. Component packaging processing of EAV model.
By transforming the EAV model of each entity in the database for common data types, generating data model transformation library tables, using front-end components to simplify EAV model management and data input, and optimizing data model update strategy in combination with back-end components to ensure that Maximize query efficiency within memory and CPU resource limitations.
It realizes fast data query, avoids the problem of low query efficiency caused by data format conversion, improves the efficiency of data model management of entity data type in the database, ensures the rational use of system resources, and provides flexible and scalable low-code development Business attribute dynamic database model.
Smart Images

Figure CN119441197A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a low-code business data storage method and system based on an EAV model. Background Art
[0002] In today's data-driven era, flexible and space-efficient data storage models are particularly important. Traditional database table structures are unable to cope with entities that have many features but only require a few characteristics per instance.
[0003] During development, it is customary to use a regular relational database to design database tables. This is a very good choice for scenarios where the fields of some business tables are relatively fixed, and when querying, the performance is basically optimal because the query is based on fixed table fields. However, in some scenarios, business information changes frequently, and using a regular relational database to create table fields and delete fields is definitely not a suitable solution. Therefore, JSON data storage may be used, and many relational databases today also support JSON storage and subquery processing, but JSON retrieval is still relatively troublesome, and the performance is not satisfactory for complex subqueries.
[0004] The EAV (Entity-Attribute-Value) model is a flexible database design method that is particularly suitable for storing entities with variable attributes. Entity: Entity, representing a business object, such as the product in the above example. Attribute: The attribute of an object. Attributes are not stored as a separate column of the entity, but are stored in a set of separate database tables. Value: refers to the value associated with a specific attribute. The above attribute values have no type restrictions and are all VARCHAR, which is not database-friendly, will lead to memory waste, and data format conversion is required for access. Indexes created for values stored as strings do not allow search range optimization for numeric and date types, which is a common problem of using key-value pairs of mixed data types to describe data. If EAV models of all data types are generated for each entity, the memory load will increase. If the EAV model of each entity stored in the database is frequently changed, more CPU resources will be occupied, making it difficult to manage the data model of the corresponding data type of the entity in the database. At the same time, there is a lack of supporting front-end and back-end components to encapsulate and process EAV model data, resulting in low query efficiency, difficulty in maintaining data integrity, and increased development workload.
[0005] Therefore, how to improve the efficiency of data model management for entity-corresponding data types in the database, improve data query efficiency while ensuring that not too much system memory and CPU resources are occupied, and provide a dynamic database model that can achieve low-code development of flexible and scalable business attributes is a technical problem that needs to be solved urgently. Summary of the invention
[0006] The present invention provides a low-code business data storage method and system based on the EAV model, aiming to solve at least one of the above-mentioned technical problems.
[0007] To achieve the above objectives, the present invention provides a low-code business data storage method based on the EAV model, comprising: Obtain software system business requirements and extract EAV model transformation requirements; Using the EAV model transformation requirement, the EAV model corresponding to the main table entity stored in the database is transformed into a data model to obtain a data model transformation library table; In response to the interactive instructions of the front-end component of the software system, the interactive actions of data model management selection and input display for the demand entity are executed, and the interactive actions are transmitted to the back-end component of the software system that interacts with the database to realize the execution of each interactive action; Drive the back-end components of the software system to update the data model transformation library table stored in the database.
[0008] Optionally, obtain the business requirements of the software system and extract the steps required for EAV model transformation, including: Obtaining software system business requirements; wherein the software system business requirements include a pre-stored master table entity and a common data type comparison table; The mapping relationship between each main table entity and the commonly used data type recorded in the main table entity and commonly used data type comparison table is extracted, and the mapping relationship is used as the EAV model transformation requirement.
[0009] Optionally, the EAV model transformation requirement is used to transform the EAV model corresponding to the main table entity stored in the database to obtain the data model transformation library table step, which specifically includes: Extract the mapping relationship between each main table entity and the commonly used data type in the EAV model transformation requirements, and determine the commonly used data type of each main table entity; Based on the common data types, modify the attribute values in the varchar format in the EAV model corresponding to each main table entity stored in the database into the common data types, and generate a separate data model for each common data type of the main table entity; A data model transformation library table is generated in the database according to the data model generated separately for each commonly used data type of each main table entity.
[0010] Optionally, common data types include a combination of one or more of int type, varchar type, text type, decimal type, and datetime type.
[0011] Optionally, the step of generating a data model transformation library table according to the data model generated separately for each commonly used data type of each main table entity specifically includes: Extract the data model generated separately for each common data type of each main table entity in the database, and classify each data model according to the common data type; Create a library table for each data model category, and import several data models corresponding to each category into the corresponding library table for storage to generate a data model transformation library table.
[0012] Optionally, in response to the interactive instruction of the front-end component of the software system, the interactive action of selecting and inputting the display of the data model management for the demand entity is executed, and the interactive action is transmitted to the back-end component of the software system that interacts with the database, and the execution steps of each interactive action are implemented, which specifically include: Responding to interactive instructions of the front-end component of the software system; wherein the interactive instructions include attribute management instructions, type selection instructions, data input instructions and data display instructions; Execute interactive actions of data model management selection and input display for demand entities according to attribute management instructions, type selection instructions, data input instructions and data display instructions; Each interactive action is passed to the back-end component of the software system, and the execution of each interactive action is realized based on the interaction between the back-end component of the software system and the front-end component of the software system and the database.
[0013] Optionally, in the steps of performing interactive actions of data model management selection and input display for demand entities according to attribute management instructions, type selection instructions, data input instructions and data display instructions, the attribute management instructions are configured to perform interactive actions of adding, modifying or removing entities from attributes of demand entities in the database; the type selection instructions are configured to perform interactive actions of selecting attribute data types of demand entities in the database; the data input instructions are configured to execute calls to input controls corresponding to attribute data types; and the data display instructions are configured to perform interactive actions of displaying the attributes of demand entities in the database in a list or table view.
[0014] Optionally, the step of driving the backend component of the software system to update the data model transformation library table stored in the database specifically includes: The back-end component of the software system obtains the response time of the interaction instruction corresponding to the attribute data type selection interaction action executed on each demand entity, and takes the demand entity, attribute data type selection and response time having a corresponding relationship as a set of response interaction data information; According to several groups of response interaction data information received in several consecutive historical operation cycles in the past, the number of attribute data type selections of each demand entity in each operation unit period in the next operation cycle is predicted, the number of attribute data type selections is sorted in descending order, the first N attribute data types are selected as the attribute data type requirements of each demand entity in each operation unit period, and the attribute data type requirement sequence of each demand entity is generated; Based on the attribute data type requirement sequence of each demand entity, after the data model transformation library table is updated, the cumulative sum of the number of data model corresponding data types stored in the database for each demand entity in each operating unit period shall not exceed the preset upper limit of memory resource usage as the first constraint condition, and after the data model transformation library table is updated, the cumulative sum of the number of changes in the data model corresponding data type stored in the database for each demand entity in each operating unit period and the data model corresponding data type stored in the database for each demand entity in the previous operating unit period shall not exceed the preset upper limit of CPU resource usage as the second constraint condition, after the data model transformation library table is updated, the similarity ratio of the data model corresponding data type stored in the database for each demand entity in each operating unit period and the attribute data type requirement sequence of each demand entity in each operating unit period and the maximum weighted sum of the number of interaction actions performed by the demand entity are used as the optimization target, and the update strategy of the data model transformation library table for the data model corresponding data type stored for each demand entity in each operating unit period is optimized; The data type corresponding to the data model stored in each demand entity in the update strategy is used as the common data type, and the step of modifying the attribute value in the varchar format in the EAV model corresponding to each main table entity stored in the database into the common data type based on the common data type is returned to implement the update of the data model transformation library table stored in the database.
[0015] Optionally, the step of predicting the number of attribute data type selections for each demand entity in each operation unit time period in the next operation cycle according to a number of groups of response interaction data information received in a number of consecutive historical operation cycles in the past specifically includes: Acquire several groups of response interaction data information received in several consecutive historical operation cycles in the past, and construct several training samples using the corresponding demand entities, attribute data type selection and response time in each group of response interaction data information; Input the plurality of training samples into a pre-built LSTM neural network model for training, and predict the attribute data type selection of each demand entity in the next operation cycle; According to the operating unit time period to which the predicted response time of the attribute data type selection of each demand entity in the next operating cycle belongs, the number of attribute data type selections of each demand entity in each operating unit time period in the next operating cycle is determined.
[0016] In addition, in order to achieve the above objectives, the present invention also provides a low-code business data storage system based on the EAV model, including: The acquisition module is used to obtain the business requirements of the software system and extract the EAV model transformation requirements; A transformation module, used to perform data model transformation on the EAV model corresponding to the main table entity stored in the database using the EAV model transformation requirement, and obtain a data model transformation library table; An execution module is used to respond to the interactive instructions of the front-end component of the software system, execute the interactive actions of data model management selection and input display for the demand entity, and transmit the interactive actions to the back-end component of the software system that interacts with the database to realize the execution of each interactive action; The update module is used to drive the back-end components of the software system to update the data model transformation library table stored in the database.
[0017] The beneficial effects of the present invention are as follows: a low-code business data storage method and system based on the EAV model are proposed, which transforms the EAV model of each entity in the database into a data model for commonly used data types, and uses the constructed data model to transform the library table. When the user performs an interactive action on the target entity, the corresponding data model can be called to realize fast data query, thus avoiding the problem of low query efficiency caused by data format conversion. At the same time, considering the load limit on system memory and CPU resources caused by the data model transformation of each entity in each operating unit period in the current operating cycle, with the load limit as the constraint condition and the goal of maximizing query efficiency, the most reasonable data model transformation and update of each entity is performed for each operating unit period, thereby improving the data model management efficiency for the corresponding data type of the entity in the database, while ensuring that the system does not occupy too much memory and CPU resources, improving data query efficiency, and providing a dynamic database model that can realize low-code development of flexible and extensible business attributes. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a flowchart of the low-code business data storage method based on the EAV model of the present invention; Figure 2 It is a schematic diagram of the principle of the interaction between the front-end component, the back-end component and the database of the present invention; Figure 3 This is a structural diagram of the low-code business data storage system based on the EAV model of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0020] The embodiment of the present invention provides a low-code business data storage method based on the EAV model. Figure 1 , Figure 1 This is a flow chart of a low-code business data storage method based on an EAV model according to an embodiment of the present invention. The low-code business data storage method based on an EAV model includes the following steps: S1: Obtain software system business requirements and extract EAV model transformation requirements; S2: using the EAV model transformation requirement, perform data model transformation on the EAV model corresponding to the main table entity stored in the database to obtain a data model transformation library table; S3: In response to the interactive instructions of the front-end component of the software system, the interactive actions of data model management selection and input display for the demand entity are executed, and the interactive actions are transmitted to the back-end component of the software system that interacts with the database to realize the execution of each interactive action; S4: drives the backend components of the software system to update the data model transformation library table stored in the database.
[0021] It should be noted that the attribute values of the existing EAV (Entity-Attribute-Value) model have no type restrictions and are all VARCHAR, which is not friendly to the database and will lead to memory waste. In addition, data format conversion is required for storage and access. The index created for the value stored as a string does not allow for optimization of the search range for numeric and date types. This is a common problem in describing data using key-value pairs of mixed data types. If an EAV model of all data types is generated for each entity, the memory load will increase. If the EAV model of each entity stored in the database is changed frequently, more CPU resources will be occupied, making it difficult to manage the data model of the corresponding data type of the entity in the database. At the same time, there is a lack of supporting front-end and back-end components to encapsulate and process EAV model data, resulting in low query efficiency, difficulty in maintaining data integrity, and increased development workload.
[0022] In order to solve the above problems, this embodiment transforms the EAV model of each entity in the database into a data model for commonly used data types, and uses the constructed data model to transform the library table. When the user performs an interactive action on the target entity, the corresponding data model can be called to achieve fast data query, avoiding the problem of low query efficiency caused by data format conversion. At the same time, considering the load limit on system memory and CPU resources caused by the data model transformation of each entity in each operating unit period in the current operating cycle, with the load limit as the constraint condition and the goal of maximizing query efficiency, the most reasonable data model transformation and update of each entity is performed for each operating unit period, thereby improving the data model management efficiency for the corresponding data types of entities in the database, ensuring that not too much system memory and CPU resources are occupied, while improving data query efficiency, and providing a dynamic database model that can realize low-code development of flexible and scalable business attributes.
[0023] In a preferred embodiment, the steps of obtaining the business requirements of the software system and extracting the EAV model transformation requirements specifically include: S11: Obtaining software system business requirements; wherein the software system business requirements include a pre-stored master table entity and a common data type comparison table; S12: extracting the mapping relationship between each main table entity and the commonly used data type recorded in the main table entity and commonly used data type comparison table, and using the mapping relationship as the EAV model transformation requirement.
[0024] Furthermore, the EAV model transformation requirement is used to transform the EAV model corresponding to the main table entity stored in the database, and the steps of obtaining the data model transformation library table specifically include: S21: extract the mapping relationship between each main table entity and the common data type in the EAV model transformation requirements, and determine the common data type of each main table entity; S22: Based on the common data types, modify the attribute values in the varchar format in the EAV model corresponding to each main table entity stored in the database into the common data types, and generate a separate data model for each common data type of the main table entity; S23: Generate a data model transformation library table in the database according to the data model generated separately for each commonly used data type of each main table entity.
[0025] Furthermore, commonly used data types include a combination of one or more of an int type, a varchar type, a text type, a decimal type, and a datetime type.
[0026] On this basis, according to the data model generated separately for each commonly used data type of each main table entity, the step of generating a data model transformation library table specifically includes: S231: extracting the data model generated separately for each common data type of each main table entity from the database, and classifying each data model according to the common data type; S232: Create a library table for each data model category, and import a number of data models corresponding to each category into the corresponding library table for storage, thereby generating a data model transformation library table.
[0027] In this embodiment, firstly, according to the business requirements of the software system, the EAV model transformation requirements are extracted, and then based on the mapping relationship between each main table entity and the commonly used data types in the EAV model transformation requirements, a separate data model is generated for each commonly used data type of the main table entity, and finally stored in the database in the form of a data model transformation library table. Specifically, the transformation of the data model is used to convert the varchar type of Value in the EAV model to other data types, and construct a data model transformation library table corresponding to each data type to store the transformed data model; the data model transformation library table includes attibulte_value_int table, attibulte_value_varchar table, attibulte_value_text table, attibulte_value_decimal table and attibulte_value_datetime table, so as to realize the storage of data models of different data types.
[0028] In a preferred embodiment, in response to the interactive instruction of the front-end component of the software system, the interactive action of data model management selection and input display for the demand entity is executed, and the interactive action is transmitted to the back-end component of the software system that interacts with the database, and the execution steps of each interactive action are implemented, which specifically include: S31: responding to the interaction instructions of the front-end component of the software system; wherein the interaction instructions include attribute management instructions, type selection instructions, data input instructions and data display instructions; S32: Execute interactive actions of data model management selection and input display for the demand entity according to the attribute management instruction, the type selection instruction, the data input instruction and the data display instruction; S33: passing each interactive action to the back-end component of the software system, and implementing the execution of each interactive action based on the interaction between the back-end component of the software system and the front-end component of the software system and the database.
[0029] Furthermore, in the step of performing interactive actions of data model management selection and input display for demand entities according to attribute management instructions, type selection instructions, data input instructions and data display instructions, the attribute management instructions are configured to perform interactive actions of adding, modifying or removing entities from attributes of demand entities in the database; the type selection instructions are configured to perform interactive actions of selecting attribute data types of demand entities in the database; the data input instructions are configured to execute calls to input controls corresponding to attribute data types; and the data display instructions are configured to perform interactive actions of displaying the attributes of demand entities in the database in a list or table view.
[0030] In this embodiment, Figure 2 As shown in the figure, after building the data model transformation library table corresponding to each data type to store the transformed data model, the management and data input process of the EAV model are simplified by configuring the front-end components, while maintaining flexibility and ease of use. The application of the front-end components can help users perform the following interactive actions: (1) Attribute management: Users can add, modify, or remove entity attributes. (2) Type selection: Attributes should support multiple data types, including integers, floating-point numbers, strings, text, and dates and times. (3) Data input: Provide input controls that automatically adjust according to the data type of the attribute, such as numeric input boxes, text boxes, date selectors, etc. (4) Data display: Display a list or table view of entities and their attributes, supporting sorting and filtering.
[0031] In a preferred embodiment, the step of driving the software system backend component to update the data model transformation library table stored in the database specifically includes: S41: The software system backend component obtains the response time of the interaction instruction corresponding to the attribute data type selection interaction action executed on each requirement entity, and takes the requirement entity, attribute data type selection and response time having a corresponding relationship as a set of response interaction data information; S42: predicting the number of attribute data type selections of each demand entity in each operation unit period in the next operation cycle according to the number of groups of response interaction data information received in the past several continuous historical operation cycles, sorting the attribute data type selection numbers in descending order, selecting the first N attribute data types as the attribute data type requirements of each demand entity in each operation unit period, and generating the attribute data type requirement sequence of each demand entity; S43: Based on the attribute data type requirement sequence of each demand entity, after the data model transformation library table is updated, the cumulative sum of the number of data model corresponding data types stored in the database of each demand entity in each operating unit period does not exceed the preset upper limit of memory resource occupancy as the first constraint condition, after the data model transformation library table is updated, the cumulative sum of the number of changes in the data model corresponding data type stored in the database of each demand entity in each operating unit period and the data model corresponding data type stored in the database of each demand entity in the previous operating unit period does not exceed the preset upper limit of CPU resource occupancy as the second constraint condition, after the data model transformation library table is updated, the similarity ratio of the data model corresponding data type stored in the database of each demand entity in each operating unit period and the attribute data type requirement sequence of each demand entity in each operating unit period and the maximum weighted sum of the number of interactive actions performed by the demand entity are used as the optimization target, and the update strategy of the data model transformation library table for the data model corresponding data type stored in each demand entity in each operating unit period is optimized; S44: The data type corresponding to the data model stored in each demand entity in the update strategy is used as the common data type, and the step of returning to execute based on the common data type to modify the attribute value in the varchar format in the EAV model corresponding to each main table entity stored in the database into the common data type step, thereby realizing the update of the data model transformation library table stored in the database.
[0032] On this basis, according to several groups of response interaction data information received in several consecutive historical operation cycles in the past, the number of attribute data type selection steps for each demand entity in each operation unit period in the next operation cycle are predicted, specifically including: S421: Acquire several groups of response interaction data information received in several consecutive historical operation cycles in the past, and construct several training samples using the corresponding demand entities, attribute data type selection and response time in each group of response interaction data information; S422: inputting the plurality of training samples into a pre-built LSTM neural network model for training, and predicting the attribute data type selection of each demand entity in the next operation cycle; S423: Determine the number of attribute data type selections of each demand entity in each operation unit time period in the next operation cycle according to the operation unit time period to which the predicted response time of the attribute data type selection of each demand entity in the next operation cycle belongs.
[0033] In this embodiment, by configuring the coordination between the back-end component and the front-end component, the execution of each interactive action can be realized based on each interactive action transmitted by the front-end component, based on the interaction between the back-end component of the software system and the front-end component of the software system and the database. Based on the Mybatis framework, an encapsulation interface for CRUD (create, read, update, delete) operations is provided to realize batch insertion and update of attribute values.
[0034] On this basis, the back-end component can consider the load limit brought to the system memory and CPU resources by performing data model transformation on each entity in each operation unit period in the current operation cycle, and use the load limit as the constraint condition (that is, after the data model transformation library table is updated, the cumulative sum of the number of data types corresponding to the data model stored in the database for each demand entity in each operation unit period does not exceed the preset upper limit of memory resource usage as the first constraint condition, and after the data model transformation library table is updated, the cumulative sum of the number of changes in the corresponding data type of the data model stored in the database for each demand entity in each operation unit period and the corresponding data type of the data model stored in the database for each demand entity in the previous operation unit period does not exceed the preset upper limit of CPU resource usage). The second constraint condition) is to maximize query efficiency as the goal (that is, after the data model transformation library table is updated, the similarity ratio of the data type corresponding to the data model stored in the database for each demand entity in each operating unit period and the attribute data type requirement sequence of each demand entity in each operating unit period and the weighted sum of the number of interaction actions performed by the demand entity is the maximum as the optimization goal), and the most reasonable data model transformation and update is performed on each entity in each operating unit period to improve the data model management efficiency for the corresponding data types of entities in the database, while ensuring that the system does not occupy too much memory and CPU resources, improving data query efficiency, and providing a dynamic database model that can realize low-code development of flexible and scalable business attributes.
[0035] Therefore, the present invention optimizes the existing EAV data model data storage solution and is suitable for processing entities with uncertain or changing attribute sets. It does not need to predefine all attributes and attribute types, but dynamically transforms and updates the data model for each entity according to user needs during operation. It is particularly useful when processing unstructured or semi-structured data, effectively solving the problem of business attribute expansion in software systems, improving development efficiency, and enhancing product delivery capabilities.
[0036] Reference Figure 3 , Figure 3 The structure diagram of the low-code business data storage system based on the EAV model according to an embodiment of the present invention is as follows: The acquisition module 10 is used to acquire the business requirements of the software system and extract the EAV model transformation requirements; A transformation module 20 is used to transform the EAV model corresponding to the main table entity stored in the database using the EAV model transformation requirement to obtain a data model transformation library table; The execution module 30 is used to respond to the interactive instructions of the front-end component of the software system, execute the interactive actions of data model management selection and input display for the demand entity, and transmit the interactive actions to the back-end component of the software system that interacts with the database to realize the execution of each interactive action; The updating module 40 is used to drive the back-end component of the software system to update the data model transformation library table stored in the database.
[0037] Other embodiments or specific implementation methods of the low-code business data storage system based on the EAV model of the present invention can refer to the above-mentioned method embodiments and will not be repeated here.
[0038] It is understood that, in the description of this specification, the description with reference to the terms "one embodiment", "another embodiment", "other embodiments", or "first to Nth embodiments" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0039] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0040] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A low-code business data storage method based on the EAV model, characterized in that: include: Obtain software system business requirements and extract EAV model transformation requirements; Using the EAV model transformation requirement, the EAV model corresponding to the main table entity stored in the database is transformed into a data model to obtain a data model transformation library table; In response to the interactive instructions of the front-end component of the software system, the interactive actions of data model management selection and input display for the demand entity are executed, and the interactive actions are transmitted to the back-end component of the software system that interacts with the database to realize the execution of each interactive action; Drive the back-end components of the software system to update the data model transformation library table stored in the database.
2. The low-code business data storage method based on the EAV model as claimed in claim 1 is characterized in that: Obtain the business requirements of the software system and extract the steps required for EAV model transformation, including: Obtaining software system business requirements; wherein the software system business requirements include a pre-stored master table entity and a common data type comparison table; The mapping relationship between each main table entity and the commonly used data type recorded in the main table entity and commonly used data type comparison table is extracted, and the mapping relationship is used as the EAV model transformation requirement.
3. The low-code business data storage method based on the EAV model as claimed in claim 1 is characterized in that: The EAV model transformation requirement is used to transform the EAV model corresponding to the main table entity stored in the database, and the steps of obtaining the data model transformation library table specifically include: Extract the mapping relationship between each main table entity and the commonly used data type in the EAV model transformation requirements, and determine the commonly used data type of each main table entity; Based on the common data types, modify the attribute values in the varchar format in the EAV model corresponding to each main table entity stored in the database into the common data types, and generate a separate data model for each common data type of the main table entity; A data model transformation library table is generated in the database according to the data model generated separately for each commonly used data type of each main table entity.
4. The low-code business data storage method based on the EAV model as claimed in claim 3 is characterized in that: Common data types include one or more combinations of int type, varchar type, text type, decimal type, and datetime type.
5. The low-code business data storage method based on the EAV model as described in claim 3 is characterized in that: The step of generating a data model transformation library table according to the data model generated separately for each commonly used data type of each main table entity specifically includes: Extract the data model generated separately for each common data type of each main table entity in the database, and classify each data model according to the common data type; Create a library table for each data model category, and import several data models corresponding to each category into the corresponding library table for storage to generate a data model transformation library table.
6. The low-code business data storage method based on the EAV model as claimed in claim 3 is characterized in that: In response to the interactive instructions of the front-end component of the software system, the interactive actions of data model management selection and input display for the demand entity are executed, and the interactive actions are transmitted to the back-end component of the software system that interacts with the database, and the execution steps of each interactive action are implemented, which specifically include: Responding to interactive instructions of the front-end component of the software system; wherein the interactive instructions include attribute management instructions, type selection instructions, data input instructions and data display instructions; Execute interactive actions of data model management selection and input display for demand entities according to attribute management instructions, type selection instructions, data input instructions and data display instructions; Each interactive action is passed to the back-end component of the software system, and the execution of each interactive action is realized based on the interaction between the back-end component of the software system and the front-end component of the software system and the database.
7. The low-code business data storage method based on the EAV model as claimed in claim 6 is characterized in that: In the steps of executing interactive actions of data model management selection and input display for demand entities according to attribute management instructions, type selection instructions, data input instructions and data display instructions, the attribute management instructions are configured to execute interactive actions of adding, modifying or removing entities for attributes of demand entities in the database; the type selection instructions are configured to execute interactive actions of selecting attribute data types of demand entities in the database; the data input instructions are configured to execute calls to input controls corresponding to attribute data types; and the data display instructions are configured to execute interactive actions of displaying the attributes of demand entities in the database in a list or table view.
8. The low-code business data storage method based on the EAV model as claimed in claim 7 is characterized in that: The steps to drive the backend components of the software system to update the data model transformation library table stored in the database include: The back-end component of the software system obtains the response time of the interaction instruction corresponding to the attribute data type selection interaction action executed on each demand entity, and takes the demand entity, attribute data type selection and response time having a corresponding relationship as a set of response interaction data information; According to several groups of response interaction data information received in several consecutive historical operation cycles in the past, the number of attribute data type selections of each demand entity in each operation unit period in the next operation cycle is predicted, the number of attribute data type selections is sorted in descending order, the first N attribute data types are selected as the attribute data type requirements of each demand entity in each operation unit period, and the attribute data type requirement sequence of each demand entity is generated; Based on the attribute data type requirement sequence of each demand entity, after the data model transformation library table is updated, the cumulative sum of the number of data model corresponding data types stored in the database for each demand entity in each operating unit period shall not exceed the preset upper limit of memory resource usage as the first constraint condition, and after the data model transformation library table is updated, the cumulative sum of the number of changes in the data model corresponding data type stored in the database for each demand entity in each operating unit period and the data model corresponding data type stored in the database for each demand entity in the previous operating unit period shall not exceed the preset upper limit of CPU resource usage as the second constraint condition, after the data model transformation library table is updated, the similarity ratio of the data model corresponding data type stored in the database for each demand entity in each operating unit period and the attribute data type requirement sequence of each demand entity in each operating unit period and the maximum weighted sum of the number of interaction actions performed by the demand entity are used as the optimization target, and the update strategy of the data model transformation library table for the data model corresponding data type stored for each demand entity in each operating unit period is optimized; The data type corresponding to the data model stored in each demand entity in the update strategy is used as the common data type, and the step of modifying the attribute value in the varchar format in the EAV model corresponding to each main table entity stored in the database into the common data type based on the common data type is returned to implement the update of the data model transformation library table stored in the database.
9. The low-code business data storage method based on the EAV model as claimed in claim 8, characterized in that: According to several groups of response interaction data information received in several consecutive historical operation cycles in the past, the number of attribute data type selection steps of each demand entity in each operation unit time period in the next operation cycle is predicted, specifically including: Acquire several groups of response interaction data information received in several consecutive historical operation cycles in the past, and construct several training samples using the corresponding demand entities, attribute data type selection and response time in each group of response interaction data information; Input the plurality of training samples into a pre-built LSTM neural network model for training, and predict the attribute data type selection of each demand entity in the next operation cycle; According to the operating unit time period to which the predicted response time of the attribute data type selection of each demand entity in the next operating cycle belongs, the number of attribute data type selections of each demand entity in each operating unit time period in the next operating cycle is determined.
10. A low-code business data storage system based on the EAV model, characterized in that: include: The acquisition module is used to obtain the business requirements of the software system and extract the EAV model transformation requirements; A transformation module, used to perform data model transformation on the EAV model corresponding to the main table entity stored in the database using the EAV model transformation requirement, and obtain a data model transformation library table; An execution module is used to respond to the interactive instructions of the front-end component of the software system, execute the interactive actions of data model management selection and input display for the demand entity, and transmit the interactive actions to the back-end component of the software system that interacts with the database to realize the execution of each interactive action; The update module is used to drive the back-end components of the software system to update the data model transformation library table stored in the database.
Citation Information
Patent Citations
Heterogeneous manufacturing service discovery system and method for cloud manufacturing
CN106951419A
Consistent set of interfaces derived from a business object model
US20080120129A1
Unified data model
US20170116303A1
Interactive interfaces as computerized tools to present summarization data of dataset attributes for collaborative datasets
US20210109629A1