CN117215552A - Interactive component generation method and device, storage medium and computer equipment - Google Patents

Interactive component generation method and device, storage medium and computer equipment Download PDF

Info

Publication number
CN117215552A
CN117215552A CN202311138947.4A CN202311138947A CN117215552A CN 117215552 A CN117215552 A CN 117215552A CN 202311138947 A CN202311138947 A CN 202311138947A CN 117215552 A CN117215552 A CN 117215552A
Authority
CN
China
Prior art keywords
component
metadata
initial
interaction
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311138947.4A
Other languages
Chinese (zh)
Inventor
支凯伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kangjian Information Technology Shenzhen Co Ltd
Original Assignee
Kangjian Information Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kangjian Information Technology Shenzhen Co Ltd filed Critical Kangjian Information Technology Shenzhen Co Ltd
Priority to CN202311138947.4A priority Critical patent/CN117215552A/en
Publication of CN117215552A publication Critical patent/CN117215552A/en
Pending legal-status Critical Current

Links

Abstract

The invention relates to the technical field of computers and the field of digital medical treatment, and discloses a method and a device for generating an interaction component, a storage medium and computer equipment. The method comprises the steps of firstly determining an initial component, obtaining a metadata structure of the initial component, defining the metadata structure, then converting the initial component into component metadata by using a preset rule based on the defined metadata structure, and then inputting the component metadata into a preset interactive design model to obtain a view code, wherein the view code carries a logic arrangement interface, finally obtaining the view code, and logically filling the view code based on the logic arrangement interface to obtain an interactive component corresponding to the initial component. The method converts the component into the component metadata, and generates the view code and logically fills the view code based on the component metadata, so that the development efficiency, the reusability, the flexibility and the stability of the component can be improved, and the maintenance cost and the development workload are reduced.

Description

Interactive component generation method and device, storage medium and computer equipment
Technical Field
The present invention relates to the field of computer technology and digital medical technology, and in particular, to a method and apparatus for generating an interaction component, a storage medium, and a computer device.
Background
In the process of on-line hospital visit or on-line consultation, most of the carriers for the patient to acquire information are screens, for example, registration, payment and queuing are carried out by a self-help machine under the line, or doctor selection and consultation treatment are carried out on the line, the information is acquired by the screens and interacted to complete the complete medical treatment process, so that the interaction design of components in the carriers is an essential key link in the development process of various medical software.
In the existing software internal component development process, one or more sets of interactive component generation specifications are usually maintained, then delivery is carried out and a corresponding component system is developed, in the process, whether the design specifications maintained by an interactive designer and the component specifications maintained by a front-end development engineer are basically views on a user side are defined, so that a large amount of repeated work content exists between the two specifications, alignment between the design specifications and the component specifications is difficult, high communication cost is usually caused, time and labor are wasted, efficiency is low, consistency and stability of a finally generated software system in the use process cannot be guaranteed, and the interactive component system construction process is not universal.
Disclosure of Invention
In view of this, the application provides a method, a device, a storage medium and a computer device for generating an interactive component, which mainly aims to solve the technical problems that in the prior art, the generating efficiency of the interactive component is low, the generating process can not be reused, and the consistency and stability of the generated interactive component are poor.
According to a first aspect of the present application, there is provided an interactive component generating method, the method comprising:
determining an initial component, acquiring a metadata structure of the initial component, and defining the metadata structure;
based on the defined metadata structure, converting the initial component into component metadata by using a preset rule;
inputting the component metadata into a preset interactive design model to obtain a view code, wherein the view code carries a logic arrangement interface;
and acquiring the view code, and logically filling the view code based on the logic arrangement interface to obtain an interaction component corresponding to the initial component.
According to a second aspect of the present application, there is provided an apparatus for generating an interaction component, the apparatus comprising:
the data acquisition module is used for determining an initial component, acquiring a metadata structure of the initial component and defining the metadata structure;
The data conversion module is used for converting the initial component into component metadata by utilizing a preset rule based on the defined metadata structure;
the model training module is used for inputting the component metadata into a preset interactive design model to obtain a view code, wherein the view code carries a logic arrangement interface;
and the component output module is used for acquiring the view codes, and logically filling the view codes based on the logic arrangement interface to obtain the interaction components corresponding to the initial components.
According to a third aspect of the present invention, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the method of generating an interactive component as described above.
According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a method of generating the interactive component as described above when executing the program.
The invention provides a method, a device, a storage medium and computer equipment for generating an interaction component, which are characterized in that an initial component is firstly determined, a metadata structure of the initial component is obtained, the metadata structure is defined, then the initial component is converted into component metadata by utilizing a preset rule based on the defined metadata structure, and then the component metadata is input into a preset interaction design model to obtain a view code, wherein the view code carries a logic arrangement interface, finally the view code is obtained, and the view code is logically filled based on the logic arrangement interface to obtain the interaction component corresponding to the initial component.
In the method, after the initial component is converted into the component metadata, definition and attribute of the component can be managed through maintaining and updating the metadata structure, subsequent modification and maintenance are facilitated, different view codes are generated by utilizing the component metadata, further, repeated development workload is reduced in projects in different fields, the set logic arrangement interface can be filled according to specific business logic, interaction and data circulation among different components can be flexibly processed, complexity and flexibility of the interaction component are improved, stability and consistency of the interaction component are improved, visual development can be realized through formulating an interaction design model and a logic arrangement interface, and a developer can intuitively design and understand interaction and logic among the components, so that generation efficiency of the interaction component is effectively improved. The method is applied to the medical field, so that the development process of the medical application is more standardized and normalized, the customized generation of the interaction assembly is realized according to various requirements in the medical field, the reusability and development efficiency of the assembly are improved, the interaction and data transmission among different assemblies are flexibly processed through the logic arrangement interface, and the effective integration and inquiry of medical data are realized.
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a schematic flow chart of a method for generating an interaction component according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method for generating an interaction component according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a method for generating an interaction component according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a generating device of an interaction component according to an embodiment of the present application;
fig. 5 shows a schematic structural diagram of a generating device of an interaction component according to an embodiment of the present application;
fig. 6 shows a schematic device structure of a computer device according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
The embodiment of the application provides a method for generating an interaction component, which is shown in fig. 1 and comprises the following steps:
101. and determining an initial component, acquiring a metadata structure of the initial component, and defining the metadata structure.
In the method for generating the interaction component, the interaction component is widely applied to software systems in various fields and is used for realizing data display and various interaction functions with users, and is particularly applied to the medical field, the interaction component can be used for displaying medical data, such as basic information of patients, medical records, test results, image data and the like, and the visualization of the data can be realized through the interaction component, so that doctors and patients can conveniently view and analyze the medical data; through the interactive component, the patient can also directly carry out operations such as medical appointment, registration and cancellation appointment, and the interactive component provides a visual appointment calendar or time selector, so that the patient can select and operate according to the needs, and meanwhile, the interactive component can also realize functions of on-line inquiry and consultation, integration with health monitoring equipment, display of medical knowledge and education content, and sending of medical reports and result notification.
Specifically, the metadata structure refers to a data structure that defines and describes the structure and properties of the initial component, describes basic information, configurable properties, behavior rules, relationships with other components, and the like of the initial component, and generally includes a component name for uniquely identifying the component; component types such as buttons, input boxes, forms, and the like; configurable properties of the components, such as text content, color, size, visibility, etc.; the style of the component comprises fonts, background colors, frame styles and the like; events triggered when the component interacts with the user, such as click events, input events, etc.; behavior and rules of the component, such as verification rules, data formatting rules, etc.; association between components and data models to enable binding and updating of data.
In the embodiment of the application, by defining the metadata structure, a developer can describe and define the initial component in a standardized way, so that the attribute and the behavior of the component have configurability and expandability, and further the dynamic configuration and behavior control of the component are realized, therefore, the metadata structure of the initial component is introduced, the development efficiency of the component and the maintainability of codes are improved, and the definition and the configuration of the component are separated from the specific implementation, thereby facilitating the multiplexing and the customized development of the component.
102. Based on the defined metadata structure, the initial component is converted into component metadata by utilizing a preset rule.
In particular, component metadata is a dynamic data representation that represents the properties and behavior of an initial component in a structured manner based on rules defined by the metadata structure. The component metadata specifically includes information such as the name, type, attribute list, style definition, event trigger, behavior rules, and relationships with other components of the initial component. The metadata structure is a specification of an initial component definition, and the component metadata is a result of converting the initial component into a data form according to the metadata structure definition, i.e., the metadata structure is used to describe the initial component, and the component metadata is a specific instance describing the initial component.
Wherein for components within the system, typically comprising business components and view components, whatever the components, the metadata can be used in nature to express, and the component-to-metadata process is reversible, extracting metadata in the forward direction, building components through an interactive design model in the reverse direction, and the reverse process is used to generate components as instructed by the designer.
In the embodiment of the application, the high configurability of the component can be realized by converting the initial component into the component metadata, and the information such as the attribute, the style, the behavior and the like of the component can be defined and configured by the component metadata, so that the source code is not required to be modified, and the flexibility and the expandability of the system are improved. The multiplexing and customization of the components can be realized by utilizing the component metadata, the development cost of the components is reduced, and the maintenance and management of the components are facilitated. After the initial component is converted into the component metadata, dynamic rendering can be performed in the running process according to the metadata structure, and corresponding component views and interaction effects are dynamically generated by analyzing the component metadata, so that page rendering and display are more flexible and controllable, further different components are dynamically generated according to different data and conditions, definition and attribute of the components are separated from specific realization, decoupling of the components and logic is realized, definition and maintenance of the components are independent and maintainable, and meanwhile, the components are easier and controllable to modify and adjust due to the fact that the attribute and behavior of the components are centralized in the component metadata for configuration and management. In conclusion, the method and the device for generating the component metadata can achieve multiplexing, high configurability and flexible rendering of the component by converting the initial component into the component metadata, meanwhile, decoupling and maintainability are promoted, and efficiency of component generation is effectively improved.
103. And inputting the component metadata into a preset interactive design model to obtain a view code, wherein the view code carries a logic arrangement interface.
Specifically, the interactive design model is a design mode defined based on a metadata structure and rules, corresponding view codes can be generated according to information such as attributes, styles and the like in the metadata structure, and layout, arrangement, interactive logic and the like of components can be defined in the interactive design model. And the generated view code will contain information defined in the interactive design model. The logic arrangement interface specifically provides a plurality of preset methods, events and the like, so that a developer can flexibly perform logic processing and interactive operation, and the functions of business logic, data operation and the like related to the view can be realized by utilizing the logic arrangement interface. Flexibility and extensibility of view code are enhanced.
In the embodiment, the corresponding view codes can be generated rapidly by inputting the component metadata into the interactive design model, so that the development and debugging process is simplified, the development efficiency is improved, and the workload of manually writing the view codes is reduced. And because the view code is generated based on the interactive design model, the definition of the interactive design model is met, the error probability of a developer is reduced, the time for debugging and repairing errors is reduced, and meanwhile, the consistency and coordination of an interface and logic are ensured. By providing the logic arrangement interface, a developer can conveniently carry out logic debugging and testing, and the development efficiency is improved.
104. And obtaining the view codes, and logically filling the view codes based on the logic arrangement interface to obtain the interaction components corresponding to the initial components.
Specifically, logic filling is to write corresponding logic codes to control the behavior of the component according to requirements of service logic definition, back-end data acquisition and the like so as to realize personalized customization of the component, and specifically comprises rule definition, data processing logic, view update and the like of the component behavior, so that the component meets specific functional requirements.
In the embodiment of the application, the view codes are logically filled based on the logic arrangement interface, so that the interaction behavior of the component can be realized, wherein the logic arrangement interface provides interfaces which can be called and triggered by a preset method, an event and the like, a developer can realize the interaction logic of the component in the filling logic, such as processing user input, responding to the event, carrying out data interaction with the rear end and the like, and the finally generated component is the interaction component, and has the capability of interacting with the user. The logic filling can avoid repeated writing of similar codes, reduce development workload, improve development efficiency, and simultaneously, centralize and control code logic, thereby facilitating subsequent code maintenance and debugging. By memorizing the logical filling, the behavior of the component can be customized according to the service requirement, more functions and flexibility can be added for the component, and the functions and expandability of the component are improved. In sum, the view codes are logically filled based on the logic arrangement interface, so that the interaction behavior of the components can be realized, the component behavior is customized, the functions and flexibility of the components are enhanced, the development efficiency and the code maintainability are improved, and finally, the generated interaction components have stronger functions and adaptability.
The invention provides a method, a device, a storage medium and computer equipment for generating an interaction component, which are characterized in that an initial component is firstly determined, a metadata structure of the initial component is obtained, the metadata structure is defined, then the initial component is converted into component metadata by utilizing a preset rule based on the defined metadata structure, and then the component metadata is input into a preset interaction design model to obtain a view code, wherein the view code carries a logic arrangement interface, finally the view code is obtained, and the view code is logically filled based on the logic arrangement interface to obtain the interaction component corresponding to the initial component. In the method, after the initial component is converted into the component metadata, definition and attribute of the component can be managed through maintaining and updating the metadata structure, subsequent modification and maintenance are facilitated, different view codes are generated by utilizing the component metadata, further, repeated development workload is reduced in projects in different fields, the set logic arrangement interface can be filled according to specific business logic, interaction and data circulation among different components can be flexibly processed, complexity and flexibility of the interaction component are improved, stability and consistency of the interaction component are improved, visual development can be realized through formulating an interaction design model and a logic arrangement interface, and a developer can intuitively design and understand interaction and logic among the components, so that generation efficiency of the interaction component is effectively improved. The method is applied to the medical field, so that the development process of the medical application is more standardized and normalized, the customized generation of the interaction assembly is realized according to various requirements in the medical field, the reusability and development efficiency of the assembly are improved, the interaction and data transmission among different assemblies are flexibly processed through the logic arrangement interface, and the effective integration and inquiry of medical data are realized.
The embodiment of the application provides a method for generating an interaction component, as shown in fig. 2, which comprises the following steps:
201. and determining an initial component, acquiring a metadata structure of the initial component, and defining the metadata structure.
Specifically, firstly, a metadata structure of an initial component is obtained, a plurality of index items in the metadata structure are extracted, the index items are used for describing the attribute and the behavior of the initial component, then a definition rule among the index items is obtained, the definition rule comprises a priority order and an association relation among the index items, then the weights of the index items are set according to the priority order, the index items are associated according to the association relation, a defined metadata structure is obtained, finally, the defined metadata structure is evaluated based on preset conditions, an evaluation result is obtained, and iteration is carried out on the defined metadata structure according to the evaluation result.
In the embodiment of the application, the standardization and consistency of the metadata structure can be ensured by extracting the index items in the metadata structure and carrying out standardization processing according to the definition rules. In particular, the index items specifically include attributes, methods, events, etc. required to determine the components, and extraction of the index items and formulation of definition rules may be used to comb and sort the metadata structure, making it easier to understand and use. The weight setting and association are further performed on the multiple index items, for example, the weight is set for each attribute, method, event and the like to indicate the relative importance or priority thereof, the weight can be a numerical value or a label, the association relationship among the attribute, method and event is determined, the association relationship and priority order among the index items can be clarified, and the attribute and behavior of the component can be further enriched and expanded, so that the component has flexibility and customization. By evaluating the defined metadata structure based on the preset condition, an evaluation result can be obtained, the evaluation result can clearly show the rationality and the coincidence degree of the metadata structure, and further the metadata structure is iterated based on the evaluation result, so that the metadata structure can be continuously optimized and improved, and the metadata structure is more in accordance with actual requirements and use scenes. In summary, according to the index item and the definition rule, the process of evaluation and iteration can obtain the metadata structure which is normative and meets the requirements, the development efficiency and maintainability are improved, the process can effectively standardize the metadata structure, and the attribute and the behavior of the component are optimized, so that the metadata structure meets the actual requirements and the use scene.
202. Based on the defined metadata structure, the initial component is converted into component metadata by utilizing a preset rule.
Specifically, firstly, a blank object of component metadata is constructed based on a defined metadata structure, wherein the blank object comprises an attribute field and an event field, then the defined metadata structure is analyzed to obtain attribute information and behavior data of an initial component, then the attribute information is subjected to format conversion, the attribute information after format conversion is stored in the attribute field of the blank object, the behavior data is mapped in the event field of the blank object to generate a component metadata object, finally, the component metadata object is verified based on a preset rule to obtain a verification result, and when the verification result indicates that the component metadata object meets the preset rule, the metadata object is output as the component metadata.
In the embodiment of the application, firstly, the code of an initial component is required to be analyzed so as to acquire key information therein, the key information is realized by technologies such as static code analysis, grammar analyzer and the like, the name, type, attribute, event processing function and the like of the initial component can be identified in the analysis process, a blank object of the component metadata is created according to the definition of a metadata structure, the blank object is used for storing the analyzed attribute field and event field, the attribute of the component is extracted from the analyzed code, the attribute can be style information, layout parameters, data binding and the like of the component, the attribute can be converted into a proper format according to the definition of the metadata structure, and is stored in the attribute field in the blank object, meanwhile, the analyzed event processing function is acquired and mapped into the event field in the metadata structure, the event can comprise a clicking event, a keyboard event, a mouse event and the like of the component, and the blank object is filled with all the key information of the initial component according to the definition of the metadata structure, the name and the corresponding processing function of the recording event, the generated component metadata is verified and corrected, the generated key information of the component metadata can be ensured to accord with the preset style information, layout parameters, the metadata and the metadata can be finally output in a metadata can be stored in a metadata interface, a system or a development interface, and can be used for generating metadata, and a development interface or other media.
The conversion process is performed according to preset rules, the design of the rules is determined according to specific requirements and technical options, and the design of the rules needs to consider different component types and frame characteristics and ensure the accuracy and reliability of analysis.
203. The component metadata is updated based on the component update instructions.
Specifically, firstly, responding to a component updating instruction, acquiring updating metadata carried by the component updating instruction, then comparing the updating metadata with the component metadata based on a metadata difference algorithm to obtain a comparison result, finally generating a difference operation instruction according to the comparison result, updating the component metadata based on the difference operation instruction, and updating the metadata structure of an initial component corresponding to the component metadata.
In the embodiment of the application, in the process of generating the interactive component, the component may need to be updated at any time along with the change of the demand, and the component can be updated by using a metadata difference algorithm, namely a metadata diff algorithm, so that the metadata of the original component and the difference between updated metadata can be effectively obtained, and only the difference part is updated instead of re-rendering the whole component. Specifically, the metadata difference algorithm is utilized to compare the updated metadata with the component metadata so as to determine the difference between the updated metadata and the component metadata, and then a difference operation instruction is generated according to the comparison result and used for representing the difference between the updated metadata and the component metadata, wherein the difference operation instruction can be an instruction for adding, deleting, updating or moving the component, the operation instruction can be generally stored by utilizing a data structure, the generated difference operation instruction is used for specifically applying the difference to the actual component, namely, the updating of the state, the attribute, the style or the re-rendering of part of the content of the component is completed, and finally, other subsequent operations, such as updating of the sub-component of the component, triggering of events or executing of other user interaction actions, can be triggered according to the updated result. The key of the metadata difference algorithm is to compare and identify the difference part so as to minimize the updating quantity and improve the performance and efficiency.
204. And inputting the component metadata into a preset interaction design model to obtain view codes, and logically filling the view codes to obtain interaction components corresponding to the initial components.
The specific training process of the interactive design model comprises the steps of firstly obtaining a component database, constructing an initial model based on the component database, then obtaining a plurality of basic components, defining component metadata of each basic component, defining component relations and interaction behaviors among the basic components, determining a model interface of the initial model based on the defined basic components, generating a test model, testing the test model to obtain a test result, improving the test model based on the test result to obtain the interactive design model, and documenting the interactive design model.
In the embodiment of the application, the interactive design model needs to be trained in advance, and the specific process includes firstly defining the requirement and the target of interface design, and knowing the specific patient, the specific medical scene applied by the patient and the functions and interactions required by the corresponding interface in the medical scene in the medical field. Component metadata of a set of base components, such as buttons, input boxes, check boxes, drop-down menus, etc., are then defined, which should contain properties, styles, states, and interactions of the base components, and the defining process can be implemented in particular using JSON, XML, or other similar formats, and then further requires defining relationships and layout patterns between the base components, considering the hierarchical structure of the components, coordination between containers and sub-components, etc., helping to ensure adaptability of the components under different layouts and screen sizes, and requiring defining interactions and state changes of the components, such as click events of the buttons, validation rules of the input boxes, or lists of options of the drop-down menus, ensuring that the definition matches the user's desires and needs. After the definition of the above is completed, a visual design is created by using a design tool or a UI library framework, a plurality of defined basic components are converted into an actual initial model interface, style setting is carried out according to requirements, a test model is generated, finally the test model is tested, feedback is carried out according to a test result, potential problems are found and solved, and the usability and user experience of the interface are improved. And the finally obtained interactive design model is documented, so that a developer can generate view codes according to the model to realize a specific interface.
205. And inputting the component metadata and the corresponding preset logic codes into the interaction design model to directly obtain the interaction component corresponding to the initial component.
According to the content record in step 204, after the view code is obtained by inputting the component metadata into the interaction design model, the view code is logically filled to obtain the interaction component with complete functions, and the above is the conventional generation mode of the interaction component.
The application provides another implementation mode, namely when the content of the component metadata is rich enough and the logic codes meeting the requirements are enough, the forward output of the current interactive design model is not only the view codes with the logic programming interfaces, but also some logic code fragments, and when the training of the interactive design model is perfect enough, the interactive design model can also directly generate the interactive components with complete component functions.
206. And automatically testing the interaction assembly.
Specifically, a plurality of test cases are firstly obtained, the plurality of test cases are respectively input into an interaction component, a test report of the test cases is obtained, wherein the test report comprises a test result of each test case, then the test result of each test case is detected based on a preset execution result to obtain a detection result, when the detection result indicates that the test result of each test case is consistent with the execution result, the interaction component is output, and when the detection result indicates that the test result of any test case is inconsistent with the execution result, a problem report of the test case is obtained, and the interaction component is corrected based on the problem report.
In the embodiment of the application, after the interactive component is obtained, the interactive component is required to be tested to ensure that the interactive component is truly available, and the test report corresponding to each test case is obtained by acquiring a plurality of test cases and respectively inputting the plurality of test cases into the interactive component, wherein the test report specifically comprises the execution result of the test case, the coverage rate and other related information. And then checking whether each test case passes or not and the indexes such as the test coverage rate and the like according to the execution result in the test report, verifying that the passed test case means that the interactive component is normal in function, and can operate in an expected mode, and checking the test coverage rate according to requirements to determine whether the test case fully covers all aspects of the component, and finally checking the problem report in the test report, wherein the problem report possibly contains the failed test case, abnormal condition, insufficient code coverage rate and the like, and analyzing the problem report is helpful for understanding which potential problems exist in the generated component function or parts needing improvement, further correcting the interactive component, improving the function of the interactive component, and finally enabling the interactive component which is qualified in the test and the corrected interactive component to be normally put into use in the field of medical systems.
The invention provides a method, a device, a storage medium and a computer device for generating an interactive component, the principle of which is shown in fig. 3, wherein an initial component is firstly determined, a metadata structure of the initial component is obtained, the metadata structure is defined, then the initial component is converted into component metadata by using a preset rule based on the defined metadata structure, the component metadata is updated based on a component updating instruction, then the component metadata is input into a preset interactive design model to obtain a view code, the view code is logically filled to obtain an interactive component corresponding to the initial component, or the component metadata and a corresponding preset logic code are input into the interactive design model to directly obtain the interactive component corresponding to the initial component, and finally the interactive component is automatically tested.
According to the method, the initial component is determined and the metadata structure of the initial component is acquired, the component can be normalized and defined, after the initial component is converted into the component metadata, the attribute, style, behavior and other information of the component can be configured and adjusted based on the metadata structure, the high configurability of the component is realized, the flexibility and expandability of the system are improved, the view code can be quickly generated or the interactive component can be directly obtained by inputting the component metadata into the interactive design model, the interactive design model provides a preset interactive behavior and logic arrangement interface, and the view code or the interactive component generated according to the component metadata already comprises the preset interactive behavior and logic processing. Therefore, time and workload for manually writing the interactive component in the development process can be saved, modularized and normalized code writing can be realized by inputting component metadata and preset logic codes into an interactive design model, definition and display of the logic and the component are separated, the coupling degree of the codes can be reduced, maintainability is improved, the logic code can be written according to service requirements in the logic filling process, functions and flexibility of the interactive component are increased, finally, automatic testing on the interactive component can help to ensure quality and stability of the component, and whether various behaviors and logics of the interactive component work according to expectations can be verified through automatic testing, so that potential problems and errors can be found and repaired, and reliability and stability of the interactive component are improved. The method has the advantages of standardization, configurability, rapid generation of the interactive components, code maintainability, automatic test and the like, the development efficiency can be improved in the process, flexible and maintainable component development modes are provided, and the quality and stability of the interactive components are ensured.
The method provided by the application can be applied to the medical field, and firstly, the accuracy and consistency requirements of the medical field on data and information are very high, so that the input, storage and processing of medical data can be standardized and normalized by determining an initial component and defining a metadata structure of the medical field, the reliability of the data is improved, errors and inconsistencies are reduced, the quality and safety of medical services are improved, and the requirements and specifications of the medical field are often changed, so that the method is required to flexibly adapt to different scenes and requirements. After the initial component is converted into the component metadata, the attribute, the behavior and the display mode of the medical component can be configured and adjusted through preset rules, so that the diversified requirements of the medical field can be met, personalized medical services can be provided, and the adaptability and the expandability of a medical system are enhanced. By rapidly generating the interaction component, the time and cost for developing the medical system can be reduced, and based on a preset interaction design model, the medical interface and the functional component can be rapidly generated, and various operations and logics in the medical procedure can be automatically processed, so that the efficiency of the medical procedure can be improved, heavy manual work can be reduced, and faster and accurate medical services can be provided. In the medical field, a large amount of medical data accumulation has important value, can be used in aspects of medical research, medical decision, health management and the like, and can improve the utilization value and repeatability of the medical data by normalizing and standardizing the medical data and associating the data with the defined metadata structure, thereby being beneficial to accelerating the progress of medical research, improving the scientificity of medical decision and optimizing the effect of individual health management. And finally, through automatic testing, the interactive assembly can be subjected to comprehensive functional verification, logic inspection and performance testing, so that potential problems and errors can be found and repaired, and the risk and the loophole of the system are reduced. The quality and the safety of the medical system are improved, and the privacy of a patient and the safety of medical data are guaranteed. Therefore, the method provided by the application can bring standardization, flexibility, efficiency improvement, data utilization value improvement and medical system quality and safety enhancement when applied to the medical field, and is beneficial to improving the quality, efficiency and sustainable development of medical service.
Further, as a specific implementation of the method of fig. 1, an embodiment of the present application provides a generating device of an interaction component, as shown in fig. 4, where the device includes: a data acquisition module 301, a data conversion module 302, a model training module 303, and a component output module 304.
The data acquisition module 301 is configured to determine an initial component, acquire a metadata structure of the initial component, and define the metadata structure;
the data conversion module 302 is configured to convert the initial component into component metadata by using a preset rule based on the defined metadata structure;
the model training module 303 is configured to input component metadata into a preset interactive design model to obtain a view code, where the view code carries a logic arrangement interface;
and the component output module 304 is configured to obtain a view code, and logically fill the view code based on the logic arrangement interface to obtain an interaction component corresponding to the initial component.
In a specific application scenario, the data acquisition module 301 may be specifically configured to acquire a metadata structure of an initial component, and extract a plurality of index items in the metadata structure, where the plurality of index items are used to describe attributes and behaviors of the initial component; acquiring definition rules among a plurality of index items, wherein the definition rules comprise priority orders and association relations among the plurality of index items; setting weights of a plurality of index items according to the priority order, and associating the index items according to the association relation to obtain a defined metadata structure; and evaluating the defined metadata structure based on a preset condition to obtain an evaluation result, and iterating the defined metadata structure according to the evaluation result.
In a specific application scenario, the data conversion module 302 is specifically configured to construct a blank object of the component metadata based on the defined metadata structure, where the blank object includes an attribute field and an event field; analyzing the defined metadata structure to obtain attribute information and behavior data of the initial component; performing format conversion on the attribute information, storing the attribute information subjected to format conversion in an attribute field of the blank object, mapping behavior data in an event field of the blank object, and generating a component metadata object; and verifying the component metadata object based on the preset rule to obtain a verification result, and outputting the metadata object as component metadata when the verification result indicates that the component metadata object meets the preset rule.
In a specific application scenario, the device further includes a data update module 305, where the data update module 305 is specifically configured to respond to a component update instruction and obtain update metadata carried by the component update instruction; based on a metadata difference algorithm, comparing the updated metadata with the component metadata to obtain a comparison result; and generating a difference operation instruction according to the comparison result, updating the component metadata based on the difference operation instruction, and updating the metadata structure of the initial component corresponding to the component metadata.
In a specific application scenario, in the model training module 303, a method for constructing an interactive design model includes obtaining a component database, and constructing an initial model based on the component database, wherein the base component database includes a plurality of base components; acquiring a plurality of basic components, defining component metadata of each basic component, and defining component relationships and interaction behaviors among the plurality of basic components; determining a model interface of the initial model based on the defined multiple basic components, and generating a test model; and testing the test model to obtain a test result, improving the test model based on the test result to obtain an interactive design model, and documenting the interactive design model.
In a specific application scenario, the generating device of the interaction component further includes a component generating module 306, where the component generating module 306 is specifically configured to obtain a preset logic code corresponding to the component metadata; and fusing the component metadata with a preset logic code, and inputting the fused component metadata into the interactive design model to obtain an interactive component corresponding to the initial component.
In a specific application scenario, the generating device of the interaction component further comprises an automatic test module 307, wherein the automatic test module 307 is specifically configured to obtain a plurality of test cases, input the plurality of test cases to the interaction component respectively, and obtain a test report of the test cases, where the test report includes a test result of each test case; detecting a test result of each test case based on a preset execution result to obtain a detection result; outputting an interaction component when the detection result indicates that the test result of each test case is consistent with the execution result; when the detection result indicates that the test result of any test case is inconsistent with the execution result, acquiring a problem report of the test case, and correcting the interaction component based on the problem report.
It should be noted that, other corresponding descriptions of each functional unit related to the generating device of the interaction component provided in this embodiment may refer to corresponding descriptions in fig. 1 and fig. 2, and are not described herein again.
Based on the above method as shown in fig. 1, correspondingly, the present embodiment further provides a storage medium, on which a computer program is stored, which when executed by a processor, implements the method for generating the interaction component described above.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, where the software product to be identified may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disc, a mobile hard disk, etc.), and includes several instructions for causing a computer device (may be a personal computer, a server, or a network device, etc.) to execute the method for generating the interaction component of each implementation scenario of the present application.
Based on the method shown in fig. 1 and fig. 2 and the generating device embodiment of the interactive component shown in fig. 4 and fig. 5, in order to achieve the above object, as shown in fig. 6, this embodiment further provides an entity device for generating the interactive component, where the device includes a communication bus, a processor, a memory, a communication interface, and may further include an input/output interface and a display device, where each functional unit may complete communication with each other through the bus. The memory stores a computer program and a processor for executing the program stored in the memory to perform the method for generating the interactive component in the above embodiment.
Optionally, the physical device may further include a user interface, a network interface, a camera, radio Frequency (RF) circuitry, sensors, audio circuitry, WI-FI modules, and the like. The user interface may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
It will be appreciated by those skilled in the art that the structure of the generating entity device of the interaction component provided in this embodiment is not limited to the entity device, and may include more or fewer components, or some components may be combined, or different arrangements of components.
The storage medium may also include an operating system, a network communication module. The operating system is a program for managing the entity equipment hardware and the software resources to be identified, and supports the operation of the information processing program and other software and/or programs to be identified. The network communication module is used for realizing communication among all components in the storage medium and communication with other hardware and software in the information processing entity equipment.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented by means of software plus necessary general hardware platforms, or may be implemented by hardware. By applying the technical scheme of the application, an initial component is firstly determined, a metadata structure of the initial component is obtained, the metadata structure is defined, then the initial component is converted into component metadata by utilizing a preset rule based on the defined metadata structure, and then the component metadata is input into a preset interactive design model to obtain a view code, wherein the view code carries a logic arrangement interface, finally the view code is obtained, and the view code is logically filled based on the logic arrangement interface to obtain an interactive component corresponding to the initial component. In the method, after the initial component is converted into the component metadata, definition and attribute of the component can be managed through maintaining and updating the metadata structure, subsequent modification and maintenance are facilitated, different view codes are generated by utilizing the component metadata, further, repeated development workload is reduced in projects in different fields, the set logic arrangement interface can be filled according to specific business logic, interaction and data circulation among different components can be flexibly processed, complexity and flexibility of the interaction component are improved, stability and consistency of the interaction component are improved, visual development can be realized through formulating an interaction design model and a logic arrangement interface, and a developer can intuitively design and understand interaction and logic among the components, so that generation efficiency of the interaction component is effectively improved. The method is applied to the medical field, so that the development process of the medical application is more standardized and normalized, the customized generation of the interaction assembly is realized according to various requirements in the medical field, the reusability and development efficiency of the assembly are improved, the interaction and data transmission among different assemblies are flexibly processed through the logic arrangement interface, and the effective integration and inquiry of medical data are realized.
Those skilled in the art will appreciate that the drawing is merely a schematic illustration of a preferred implementation scenario and that the modules or flows in the drawing are not necessarily required to practice the application. Those skilled in the art will appreciate that modules in an apparatus in an implementation scenario may be distributed in an apparatus in an implementation scenario according to an implementation scenario description, or that corresponding changes may be located in one or more apparatuses different from the implementation scenario. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above-mentioned inventive sequence numbers are merely for description and do not represent advantages or disadvantages of the implementation scenario. The foregoing disclosure is merely illustrative of some embodiments of the application, and the application is not limited thereto, as modifications may be made by those skilled in the art without departing from the scope of the application.

Claims (10)

1. A method for generating an interaction component, the method comprising:
determining an initial component, acquiring a metadata structure of the initial component, and defining the metadata structure;
based on the defined metadata structure, converting the initial component into component metadata by using a preset rule;
Inputting the component metadata into a preset interactive design model to obtain a view code, wherein the view code carries a logic arrangement interface;
and acquiring the view code, and logically filling the view code based on the logic arrangement interface to obtain an interaction component corresponding to the initial component.
2. The method of claim 1, wherein the determining an initial component, obtaining a metadata structure of the initial component, and defining the metadata structure, comprises:
acquiring a metadata structure of the initial component, and extracting a plurality of index items in the metadata structure, wherein the index items are used for describing the attribute and the behavior of the initial component;
acquiring definition rules among the plurality of index items, wherein the definition rules comprise priority orders and association relations among the plurality of index items;
setting weights of the index items according to the priority order, and associating the index items according to the association relation to obtain a defined metadata structure;
and evaluating the defined metadata structure based on preset conditions to obtain an evaluation result, and iterating the defined metadata structure according to the evaluation result.
3. The method of claim 1, wherein the converting the initial component into component metadata using a preset rule based on the defined metadata structure comprises:
constructing a blank object of component metadata based on the defined metadata structure, wherein the blank object comprises an attribute field and an event field;
analyzing the defined metadata structure to obtain attribute information and behavior data of the initial component;
performing format conversion on the attribute information, storing the attribute information subjected to format conversion in an attribute field of the blank object, mapping the behavior data in an event field of the blank object, and generating a component metadata object;
and verifying the component metadata object based on the preset rule to obtain a verification result, and outputting the metadata object as the component metadata when the verification result indicates that the component metadata object meets the preset rule.
4. The method of claim 1, wherein after said converting said initial component into component metadata using preset rules, said method comprises:
Responding to a component updating instruction, and acquiring updating metadata carried by the component updating instruction;
comparing the updated metadata with the component metadata based on a metadata difference algorithm to obtain a comparison result;
and generating a difference operation instruction according to the comparison result, updating the component metadata based on the difference operation instruction, and updating the metadata structure of the initial component corresponding to the component metadata.
5. The method of claim 1, wherein the method of constructing the interactive design model comprises:
acquiring a component database, and constructing an initial model based on the component database, wherein the component database comprises a plurality of basic components;
acquiring the plurality of basic components, defining component metadata of each basic component, and defining component relationships and interaction behaviors among the plurality of basic components;
determining a model interface of the initial model based on the defined multiple basic components, and generating a test model;
and testing the test model to obtain a test result, improving the test model based on the test result to obtain an interactive design model, and documenting the interactive design model.
6. The method of claim 1, wherein prior to said entering the component metadata into a pre-set interaction design model, the method further comprises:
acquiring a preset logic code corresponding to the component metadata;
and fusing the component metadata with the preset logic codes, and inputting the fused component metadata into the interactive design model to obtain the interactive component corresponding to the initial component.
7. The method according to claim 1, wherein after the obtaining of the interaction component corresponding to the initial component, the method comprises:
acquiring a plurality of test cases, respectively inputting the plurality of test cases to the interaction component, and acquiring a test report of the test cases, wherein the test report comprises a test result of each test case;
detecting the test result of each test case based on a preset execution result to obtain a detection result;
outputting the interaction component when the detection result indicates that the test result of each test case is consistent with the execution result;
when the detection result indicates that the test result of any test case is inconsistent with the execution result, acquiring a problem report of the test case, and correcting the interaction component based on the problem report.
8. An apparatus for generating an interaction component, the apparatus comprising:
the data acquisition module is used for determining an initial component, acquiring a metadata structure of the initial component and defining the metadata structure;
the data conversion module is used for converting the initial component into component metadata by utilizing a preset rule based on the defined metadata structure;
the model training module is used for inputting the component metadata into a preset interactive design model to obtain a view code, wherein the view code carries a logic arrangement interface;
and the component output module is used for acquiring the view codes, and logically filling the view codes based on the logic arrangement interface to obtain the interaction components corresponding to the initial components.
9. A storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the method of any of claims 1 to 7.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program when executed by the processor implements the steps of the method according to any one of claims 1 to 7.
CN202311138947.4A 2023-09-04 2023-09-04 Interactive component generation method and device, storage medium and computer equipment Pending CN117215552A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311138947.4A CN117215552A (en) 2023-09-04 2023-09-04 Interactive component generation method and device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311138947.4A CN117215552A (en) 2023-09-04 2023-09-04 Interactive component generation method and device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN117215552A true CN117215552A (en) 2023-12-12

Family

ID=89034620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311138947.4A Pending CN117215552A (en) 2023-09-04 2023-09-04 Interactive component generation method and device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN117215552A (en)

Similar Documents

Publication Publication Date Title
CN106844217B (en) Method and device for embedding point of applied control and readable storage medium
US8949770B2 (en) Automated management of software requirements verification
US10572360B2 (en) Functional behaviour test system and method
US7051243B2 (en) Rules-based configuration problem detection
US7480893B2 (en) Rule-based system and method for checking compliance of architectural analysis and design models
EP1236104B1 (en) Method for computer-assisted testing of software application components
EP2228726B1 (en) A method and system for task modeling of mobile phone applications
KR20210100600A (en) software testing
US20050144529A1 (en) Method for defined derivation of software tests from use cases
US20080086627A1 (en) Methods and apparatus to analyze computer software
US11074162B2 (en) System and a method for automated script generation for application testing
CN104090776A (en) Software development method and system
EP3113016A1 (en) Tracing dependencies between development artifacts in a development project
CN110209902B (en) Method and system for visualizing feature generation process in machine learning process
JP2003114813A (en) Analysis server, program analysis network system and program analysis method
CN113342692A (en) Test case automatic generation method and device, electronic equipment and storage medium
US20200327125A1 (en) Systems and methods for hierarchical process mining
CN114360671A (en) Electronic medical record generation method and device, storage medium and electronic device
Wojszczyk et al. The process of verifying the implementation of design patterns—used data models
US9218388B1 (en) Declarative cluster management
CN117215552A (en) Interactive component generation method and device, storage medium and computer equipment
US20220237108A1 (en) Source traceability-based impact analysis
US20080195453A1 (en) Organisational Representational System
CN112381509A (en) Management system for major special topic of national science and technology for creating major new drug
do Nascimento et al. A method for rewriting legacy systems using business process management technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination