A data assembling component and a data assembling method
By converting data assembly components into custom syntactic sugar rule scripts and combining them with data processing steps, the visualization and automation levels of the data assembly process in existing technologies are addressed, thereby improving the effectiveness and efficiency of the data model assembly process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI HUIHANG JIEXUN NETWORK TECH CO LTD
- Filing Date
- 2022-06-14
- Publication Date
- 2026-04-21
AI Technical Summary
Existing data assembly components are insufficient in terms of clarity, intuitiveness, and automation, resulting in low R&D efficiency.
This provides a data assembly component that converts data models into custom syntactic sugar rule scripts and combines them with data processing steps, including the definition of the schema data model, assignment operations, simulator testing, and the use of the snack3 package and the mvel executor to parse data values, reducing code writing and improving automation.
It enables visualization and automation of the data assembly process, improves the work efficiency of R&D personnel, and enhances the intuitive display of the relationship between the data model and the source data.
Smart Images

Figure CN115268885B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data assembly, specifically to a data assembly component and a data assembly method. Background Technology
[0002] Currently available data assembly components achieve their purpose by drawing and dragging controls, which is not clear or intuitive enough, and the internal attribute assignment function is not automated enough, resulting in low efficiency. Therefore, this paper provides a data assembly component and a data assembly method. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of the prior art by providing a data assembly component and a data assembly method to solve the problems mentioned in the background.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a data assembly component, comprising data model conversion and data processing; wherein the data model conversion is to convert the entity object schema data model to be assembled into a custom syntactic sugar rule script.
[0005] A method for assembling data, with the following specific steps:
[0006] Step 1: On the Schema-tab page, complete the definition of the schema data model for the entity objects to be assembled;
[0007] Step 2: Then, on the Assignment-tab page, use data association, automatic matching, and function meta-methods to assign values to the Schema data model. It also provides search, clear, collapse, deduplication, and empty checks for Scheme data model node attributes.
[0008] Step 3: For the assignment of each node attribute, use multiple auxiliary functions in the text box of the corresponding node in the tab to complete the assignment of the schema data model. After saving, convert the schema data model into a custom syntactic sugar rule script.
[0009] Step 4: Then, execute the custom syntax sugar rule script on the local simulator in the Test tab to obtain the simulated target assembly data;
[0010] Step 5: When executing the custom syntactic sugar rule script in the production environment, the JsonPath and mvel executors from the snack3 package are used to parse the value of each node from the context source data. For composite object nodes, ThreadLocal is used to store each level of the composite object and then the JsonPath or mvel executor is used to parse and obtain the target assembled data.
[0011] As a preferred technical solution of the present invention, the multiple auxiliary functions in step 3 include using the association function, using the function metamethod, and viewing the assignment use cases.
[0012] As a preferred technical solution of the present invention, step 1 is to define the entity object schema data model to be assembled by importing public VO, importing dependent interfaces and importing context operations.
[0013] The beneficial effects of this invention are: This invention enables researchers to assemble entity objects by simply visually matching their attributes on a webpage, either automatically or manually, instead of relying solely on writing code, thereby greatly improving the efficiency of online research and development. Attached Figure Description
[0014] Figure 1 This is a system framework diagram of the present invention;
[0015] Figure 2 This is a page diagram of the Schema-tab of this invention;
[0016] Figure 3 Assign the value -tab to the page image of this invention;
[0017] Figure 4 This is a page image of the test tab of this invention;
[0018] Figure 5 This is a page diagram for the context of this invention;
[0019] Figure 6 This is a page diagram of the functions of this invention;
[0020] Figure 7 This is a page diagram illustrating the use cases of the functions in this invention. Detailed Implementation
[0021] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer and more explicit definition of the scope of protection of the present invention.
[0022] Example: According to Figure 1 As shown: This invention provides a technical solution: a data assembly component, including data model conversion and data processing; the data model conversion is to convert the entity object schema data model to be assembled into a custom syntactic sugar rule script.
[0023] A method for assembling data, with the following specific steps:
[0024] Step 1: As Figure 2 As shown, developers can define the schema data model of the entity objects to be assembled by importing public VOs, importing dependent interfaces, and importing contexts on the Schema-tab page.
[0025] Step 2: Then you can do as follows Figure 3 The assignment tab shown allows you to assign values to the schema data model through data association, automatic matching, and function metamethods. It also provides operations such as searching, clearing, collapsing, deduplicating, and checking for empty nodes in the schema data model.
[0026] Step 3: For the assignment of values to each node attribute, developers can, for example... Figure 5 The tab shown allows you to use the predictive text function in the text box of the corresponding node, such as... Figure 6 The function metamethods shown can also be viewed as follows: Figure 7 The example shown illustrates multiple auxiliary functions, such as the assignment use case, to complete the assignment of values to the schema data model. After saving, the schema data model is converted into a custom syntactic sugar rule script.
[0027] Step 4: Then, as follows Figure 4 The test tab shown executes a custom syntactic sugar rule script in the local simulator to obtain simulated target assembly data.
[0028] Step 5: When executing the custom syntactic sugar rule script in the production environment, the JsonPath and mvel executors from the snack3 package are used to parse the value of each node from the context source data. For composite object nodes, ThreadLocal is used to store each level of the composite object and then the JsonPath or mvel executor is used to parse and obtain the target assembled data.
[0029] Unlike existing technologies, this data assembly component is divided into two parts: data model transformation and data processing. Data model transformation converts the entity object schema data model to be assembled into a custom syntactic sugar rule script. First, data association and automatic matching are visualized on the page, and function meta-methods are used to populate the schema data model. Then, the schema data model is converted into a custom syntactic rule script. When processing the custom syntactic rule script, the execution engine parses the custom syntactic rule script from the context to generate the target data, and sets the target data into the context. When needed, the target data can be retrieved from the context.
[0030] The entity objects to be assembled can be automatically generated into a schema data model by importing a common VO (common data dictionary), parsing dependent interfaces, and importing data nodes from the context. Alternatively, the schema data model can be manually generated by manually filling in attribute names, attribute types, and attribute descriptions. The common VO data is maintained in the database, dependent interfaces are obtained by parsing the interfaces of JAR packages in the Maven repository, and context data is maintained in a distributed cache. The data association function assigns values to individual nodes in the schema data model by retrieving individual node attributes from the context using JsonPath (a JSON parsing tool). Values can also be assigned to individual nodes using MVEL expressions (a runtime embeddable expression language for dynamic / static mixed types). The automatic matching function recursively matches a composite node from the context with composite attributes in the schema data model to assign values to the composite nodes. For complex attributes, values are assigned using function metamethods. For attribute nodes that cannot be assigned using function metamethods, the assignment operation can be completed using JavaScript.
[0031] When executing custom syntactic sugar rule scripts, the efficient JsonPath and mvel executors from the snack3 package are first used to parse the value of each node from the context source data. For composite object nodes, ThreadLocal (thread-local variable) is used to store each level of the composite object and then the JsonPath or mvel executor is used to parse them for efficient processing.
[0032] During development, developers only need to manually import the public VO, dependent interfaces, and context on the page to define the schema data model of the entity objects to be assembled. Then, they can assign values to the schema data model of the entity objects to be assembled through data association, automatic matching, function metamethods, and JavaScript. By removing the model definition and data assignment operations from the traditional way of writing code and instead making them concrete and automatic on the page, the development efficiency of developers can be greatly improved, and the relationship between the data model and the source data can be displayed more intuitively and clearly.
[0033] To address the challenge of accurately locating specific attribute nodes when dealing with numerous entity object attributes, two functions were designed: node search and viewing assigned attributes, to precisely pinpoint attribute nodes. Furthermore, considering the convenience of local debugging for developers, a local simulation testing function was included. Users simply need to define the schema data model, assign values to it, input the simulation context data, and execute the simulator to obtain the desired target data.
[0034] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A method of assembling data, characterized by: This includes data model transformation and data processing; the data model transformation involves converting the entity object schema data model to be assembled into a custom syntactic sugar rule script, with the specific steps as follows: Step 1: On the Schema-tab page, complete the definition of the entity object schema data model to be assembled; on the Schema-tab page, complete the definition of the entity object schema data model to be assembled by importing public VO, importing dependent interfaces, and importing context operations; Step 2: Then, on the Assignment-tab page, use data association, automatic matching, and function meta-methods to assign values to the Schema data model. It also provides search, clear, collapse, deduplication, and empty checks for Scheme data model node attributes. Step 3: For the assignment operation of each node attribute, use multiple auxiliary functions in the text box of the corresponding node in the tab to complete the assignment of the schema data model. After saving, convert the schema data model into a custom syntactic sugar rule script. Multiple auxiliary functions include using the auto-completion function, using function metamethods, and viewing assignment use cases. Step 4: Then, execute the custom syntax sugar rule script on the local simulator in the Test tab to obtain the simulated target assembly data; Step 5: When executing the custom syntactic sugar rule script in the production environment, the JsonPath and mvel executors from the snack3 package are used to parse the value of each node from the context source data. For composite object nodes, ThreadLocal is used to store each level of the composite object and then the JsonPath or mvel executor is used to parse and obtain the target assembled data.
Citation Information
Patent Citations
Code automatic generation method and equipment based on XSLT and XSD
CN112052012A