CN-121996231-A - Visualized component generation method, device, equipment and storage medium
Abstract
The invention belongs to the technical field of artificial intelligence, and is suitable for the medical field and the financial field, and discloses a visual component generating method which comprises the steps of obtaining multisource component data, analyzing the multisource component data to extract component entities and identify layout, style and interaction attribute of the component entities, constructing a component knowledge graph through semantic relation mining, obtaining business requirement input, converting the business requirement input into component design constraint through a semantic mapping model based on the component knowledge graph to generate layout, style and interaction logic of a target component, converting the layout, style and interaction logic of the target component into component codes adapting to different terminal platforms, executing multi-terminal synchronous rendering and consistency verification, and generating and outputting the visual component with unified vision and interaction on a Web end, a mobile end and a desktop end. The method solves the technical problems of insufficient flexibility of component generation and poor cross-platform consistency in the existing visual component generation technology.
Inventors
- WANG JIANZONG
- SUN AOLAN
Assignees
- 平安科技(深圳)有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260127
Claims (10)
- 1. A method of generating a visualization component, comprising: acquiring multi-source component data comprising design manuscripts, codes and business documents; Analyzing the multi-source component data to extract component entities and identify the layout, style and interaction attribute of the component entities, establishing association relations between the component entities through semantic relation mining, and constructing a component knowledge graph; Acquiring business demand input, converting the business demand input into component design constraints through a semantic mapping model based on the component knowledge graph, and generating layout, style and interaction logic of a target component based on the design constraints; Based on a preset component description specification, converting the layout, style and interaction logic of the target component into component codes adapting to different terminal platforms, executing multi-terminal synchronous rendering and consistency verification, and generating and outputting a visual component with unified vision and interaction on a Web end, a mobile end and a desktop end.
- 2. The method for generating a visual component according to claim 1, wherein the parsing the multi-source component data, establishing association relationships between the component entities through semantic relationship mining, and constructing a component knowledge graph includes: A UI parser based on deep learning automatically extracts component entities and layout, style and interactive behavior attributes thereof from the design manuscript, codes and business documents; analyzing the extracted component entities by utilizing a graph neural network, and constructing and storing inheritance relationships, combination relationships and dependency relationships among the component entities to form a component semantic association network; And forming a component knowledge graph based on the component entities, the attributes and the constructed relationship.
- 3. The method for generating a visual component according to claim 1, wherein the obtaining the business requirement input, based on the component knowledge graph, converts the business requirement input into the component design constraint through a semantic mapping model, comprises: based on a natural language processing algorithm, carrying out semantic analysis and understanding on the business demand input; And mapping the semantically analyzed business requirement into the component design constraint based on the component entity, the attribute and the association relation in the component knowledge graph.
- 4. The method for generating a visual component according to claim 1, wherein the generating the layout, style and interaction logic of the target component based on the design constraint comprises: Generating a layout and a style of the target component based on the design constraint by adopting an antagonism network and a reinforcement learning method; Based on the functional logic contained in the design constraints, interaction logic of the target component is generated by a rules engine and a state machine model.
- 5. The method for generating a visual component according to claim 1, wherein the converting the layout, style and interaction logic of the target component into component codes adapted to different terminal platforms based on a preset component description specification, and performing multi-terminal synchronous rendering and consistency check, comprises: defining a group of component description elements irrelevant to a concrete implementation platform, wherein the description elements at least comprise component type identifiers, configurable attribute sets, supported event lists and subspecies relations which can be contained; Establishing conversion rules oriented to different terminal platforms for each description element, and carrying out standardized encapsulation on the description elements and the conversion rules thereof to form unified description on the layout, the style and the interaction logic of the target assembly; Synchronously generating component codes applicable to at least two different platforms in a Web end, a mobile end and a desktop end according to the unified description by adopting a code generation engine based on templates and rules; In an integrated sandbox environment, performing real-time preview and interactive debugging on the generated component codes of the at least two different terminal platforms; And comparing and checking the consistency of the components of the at least two different platforms in visual presentation and interaction behaviors through a consistency checking tool.
- 6. The method for generating a visual component according to claim 1, further comprising quality assessment and optimization of the generated visual component, comprising: establishing a quality evaluation model, and evaluating the visualization component in a plurality of dimensions of code specification, performance indexes, accessibility and maintainability; generating an automated reconfiguration suggestion for the visualization component based on static analysis and code difference detection according to the evaluation result; and generating or associating corresponding unit test and integrated test cases for the visual component.
- 7. The method for generating a visual component according to claim 1, wherein the quality evaluation and optimization of the generated visual component further comprises: Constructing a dynamic user portrait system, and updating user preferences and design habits in real time based on user behavior data; recommending matched components from the component knowledge graph by analyzing the current design task, project specification, technical stack and user portraits; And feeding back the personalized recommendation and quality evaluation results to the component knowledge graph so as to continuously optimize the component generation effect.
- 8. A visualization component generation apparatus, comprising: The multi-source data acquisition module is used for acquiring multi-source component data comprising design manuscripts, codes and business documents; the knowledge graph construction module is used for analyzing the multi-source component data to extract component entities and identify layout, style and interaction attribute of the component entities, and establishing association relations among the component entities through semantic relation mining to construct a component knowledge graph; The component generation module is used for acquiring service demand input, converting the service demand input into component design constraint through a semantic mapping model based on the component knowledge graph, and generating layout, style and interaction logic of a target component based on the design constraint; The multi-terminal rendering and checking module is used for converting the layout, the style and the interaction logic of the target assembly into assembly codes adapting to different terminal platforms according to preset assembly description specifications, executing multi-terminal synchronous rendering and consistency checking, and generating and outputting a visual assembly with unified vision and interaction on a Web end, a mobile end and a desktop end.
- 9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the visualization component generation method of any of claims 1 to 7 when the computer program is executed.
- 10. A computer-readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the visualization component generation method of any of claims 1 to 7.
Description
Visualized component generation method, device, equipment and storage medium Technical Field The invention belongs to the technical field of artificial intelligence, is suitable for the medical field and the financial field, and particularly relates to a method, a device, equipment and a storage medium for generating a visual component. Background Along with the wide application of low-code and code-free development modes, the front-end component is quickly generated in a visual mode, so that the front-end component has become an important technical means for improving the development efficiency of a software system and reducing the development threshold. The prior art relies on a predefined component template or style library to generate a target component by simple configuration of template parameters. The method is difficult to flexibly adjust according to different service scenes, interaction requirements or user characteristics, and is difficult to meet the requirements of a complex service system on component differentiation and individuation. Existing visualization component generation tools typically treat components as static interface elements, describing their appearance or underlying behavior solely by attribute configuration, lacking systematic modeling of component functional semantics, business implications, and usage context. The generated component is difficult to intelligently expand or adaptively adjust according to the service change, and the situation that the function of the component is not matched with the service requirement easily occurs. Therefore, it is necessary to provide a new method and system for generating a visual component, so as to overcome the defects in the prior art, realize effective modeling of component semantics and business scenes, improve flexibility and intelligence level of component generation, and enhance cross-platform compatibility and personalized adaptation of the component. Disclosure of Invention The invention provides a method, a device, equipment and a storage medium for generating a visual component, which are used for solving the technical problems of insufficient flexibility of component generation and poor cross-platform consistency in the existing visual component generation technology. In a first aspect, the present invention provides a method for generating a visualization component, including: acquiring multi-source component data comprising design manuscripts, codes and business documents; Analyzing the multi-source component data to extract component entities and identify the layout, style and interaction attribute of the component entities, establishing association relations between the component entities through semantic relation mining, and constructing a component knowledge graph; Acquiring business demand input, converting the business demand input into component design constraints through a semantic mapping model based on the component knowledge graph, and generating layout, style and interaction logic of a target component based on the design constraints; Based on a preset component description specification, converting the layout, style and interaction logic of the target component into component codes adapting to different terminal platforms, executing multi-terminal synchronous rendering and consistency verification, and generating and outputting a visual component with unified vision and interaction on a Web end, a mobile end and a desktop end. In a second aspect, the present invention provides a visualization component generating apparatus, including: The multi-source data acquisition module is used for acquiring multi-source component data comprising design manuscripts, codes and business documents; the knowledge graph construction module is used for analyzing the multi-source component data to extract component entities and identify layout, style and interaction attribute of the component entities, and establishing association relations among the component entities through semantic relation mining to construct a component knowledge graph; The component generation module is used for acquiring service demand input, converting the service demand input into component design constraint through a semantic mapping model based on the component knowledge graph, and generating layout, style and interaction logic of a target component based on the design constraint; The multi-terminal rendering and checking module is used for converting the layout, the style and the interaction logic of the target assembly into assembly codes adapting to different terminal platforms according to preset assembly description specifications, executing multi-terminal synchronous rendering and consistency checking, and generating and outputting a visual assembly with unified vision and interaction on a Web end, a mobile end and a desktop end. In a third aspect, the present invention provides a computer device comprising a memory, a processor and a computer pr