A method, device and storage medium for obtaining a visualization component

By comparing and updating the feature information of visual components in and out of the library, the problem of low component acquisition efficiency in interface development in the prior art is solved, and the extension of the visual component library and efficient acquisition of target components is achieved.

CN113885857BActive Publication Date: 2025-03-25EVERSEC BEIJING TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111153389.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2025-03-25
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

In the interface development of application software, traditional waterfall development takes a long time, and the component configuration library is less flexible. It is impossible to modify the interface components in the configuration library, nor is it compatible with the configuration libraries of other software projects, and cannot provide complete available components for software development.

Method used

By obtaining the feature information of the target visualization component to be created, and comparing it with the feature information of the visualization component in the library and outside the library, if there is no matching in-library component, the attribute value of the component outside the library is updated, and the component is displayed and stored to extend the visualization component library.

Benefits of technology

The visual component library is expanded based on the visual component outside the library, which improves the acquisition efficiency of target visual components and meets the needs of visual components in software interface development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113885857B_ABST
    Figure CN113885857B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method and device for obtaining a visualization component, the method comprising: obtaining characteristic information of a target visualization component to be created, judging whether there is a first visualization component in the library that matches the target visualization component in the visualization components in the library; if it is determined that there is no first visualization component in the library, judging whether there is a first visualization component outside the library that matches the target visualization component in the visualization components outside the library; if it is determined that there is a first visualization component outside the library, updating the attribute value of the first visualization component outside the library according to the attribute value of the target visualization component; displaying the updated first visualization component outside the library and storing it in the visualization component library. The technical solution provided by the embodiment of the present invention realizes the expansion of the visualization component library based on the visualization components outside the library, meets the demand for visualization components in software interface development, and improves the efficiency of obtaining the target visualization component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of software development, and in particular to a method, device, electronic device and storage medium for obtaining a visualization component. Background Art

[0002] With the continuous development of computer technology, a large number of application software have appeared in people's sight. However, in the interface development of application software, most of the application software interface development is homogeneous software development projects.

[0003] For the interface development of application software, traditional waterfall development or obtaining interface components through component configuration library is usually adopted; however, waterfall interface development is time-consuming and is not suitable for the interface development of application software. Obtaining interface components through component configuration library has poor flexibility, cannot modify the interface components in the configuration library, is not compatible with the configuration libraries of other software projects, and cannot provide complete available components for software development. Summary of the invention

[0004] The embodiments of the present invention provide a method, device, electronic device and storage medium for obtaining a visualization component, so as to obtain a target visualization component according to feature information of the target visualization component to be created and a visualization component outside a library.

[0005] In a first aspect, an embodiment of the present invention provides a method for obtaining a visualization component, comprising:

[0006] Acquire characteristic information of a target visualization component to be created, and compare the characteristic information of the target visualization component with the characteristic information of the visualization components in the library to determine whether there is a first visualization component in the library that matches the target visualization component in the visualization components in the library; wherein the characteristic information includes a name and attributes;

[0007] If it is determined that the first in-library visualization component does not exist, the characteristic information of the target visualization component is compared with the characteristic information of the out-library visualization component to determine whether there is a first out-library visualization component matching the target visualization component among the out-library visualization components;

[0008] If it is determined that there is a first out-of-library visualization component, updating the property value of the first out-of-library visualization component according to the property value of the target visualization component;

[0009] The updated first out-of-library visualization component is displayed, and the first out-of-library visualization component is stored in the visualization component library.

[0010] In a second aspect, an embodiment of the present invention provides a device for obtaining a visualization component, including:

[0011] The library visualization component judgment module is used to obtain the characteristic information of the target visualization component to be created, and compare the characteristic information of the target visualization component with the characteristic information of the library visualization component to determine whether there is a first library visualization component matching the target visualization component in the library visualization component; wherein the characteristic information includes a name and attributes;

[0012] The external-library visualization component judgment module is used to compare the characteristic information of the target visualization component with the characteristic information of the external-library visualization component if it is determined that the first internal-library visualization component does not exist, so as to judge whether there is a first external-library visualization component matching the target visualization component in the external-library visualization component;

[0013] An attribute value updating module, configured to update the attribute value of the first out-of-library visualization component according to the attribute value of the target visualization component if it is determined that the first out-of-library visualization component exists;

[0014] The target visual component acquisition module is used to display the updated first out-of-library visual component and store the first out-of-library visual component in a visual component library.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0016] one or more processors;

[0017] A storage device for storing one or more programs;

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for obtaining a visualization component described in any embodiment of the present invention.

[0019] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, implements the method for obtaining a visualization component described in any embodiment of the present invention.

[0020] The technical solution provided by the embodiment of the present invention, when it is determined that there is no in-library visualization component matching the target visualization component, and it is determined that there is an out-library visualization component matching the target visualization component, updates the attribute value of the matching out-library visualization component according to the attribute value of the target visualization component to be created, displays and stores the out-library visualization component, realizes the expansion of the visualization component library based on the out-library visualization component, meets the demand for visualization components in software interface development, and improves the efficiency of obtaining the target visualization component. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flowchart of a method for obtaining a visualization component provided in Embodiment 1 of the present invention;

[0022] Figure 2 is a flow chart of a method for obtaining a visualization component provided in Embodiment 2 of the present invention;

[0023] Figure 3 It is a structural block diagram of a visualization component acquisition device provided in Embodiment 3 of the present invention;

[0024] Figure 4 This is a structural block diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0026] Embodiment 1

[0027] Figure 1 This is a flowchart of a method for obtaining a visualization component provided in the first embodiment of the present invention. This embodiment can be applied to obtaining a target visualization component according to feature information of a target visualization component to be created and visualization components outside a library. The method can be executed by a visualization component obtaining device in the embodiment of the present invention. The device can be implemented by software and / or hardware and integrated on an electronic device, typically, integrated on a server equipped with a software development system. The method specifically includes the following steps:

[0028] S110. Obtain feature information of a target visualization component to be created, and compare the feature information of the target visualization component with the feature information of the visualization components in the library to determine whether there is a first visualization component in the library that matches the target visualization component; wherein the feature information includes a name and attributes.

[0029] Visual components are visual graphics displayed in the interface of application software, such as buttons, list boxes, edit boxes, and dialog boxes. In the software development system, the compiled code files of visual components can be rendered by the rendering engine to obtain visual graphics displayed in the interface. In the embodiment of the present invention, visual components include interface controls with user interface functions, and also include static components without interactive functions. The properties of visual components may include shape, font color, display style, length, width, height and other related information that determine the appearance of the component.

[0030] The properties of the visualization components in the library, i.e., the visualization components stored in the visualization component library, can be obtained by parsing the code files of the visualization components in the library and obtaining them based on the property keywords obtained by the parsing, or by the storage tags filled in by the user when the visualization components in the library are stored in the visualization component library; wherein, the storage information tags include information such as the storage person, software type, component name, and component properties.

[0031] When the characteristic information of the target visualization component to be created is obtained, the characteristic information of the target visualization component is compared with the characteristic information of the visualization component in the library. If the name of the target visualization component is the same as the name of a visualization component in the library, and the properties are the same, it indicates that the visualization component in the library is the first visualization component in the library that matches the target visualization component; if there is no visualization component in the library that has the same name and properties as the target visualization component in the visualization component library, it indicates that there is no first visualization component in the library that matches the target visualization component in the visualization component library.

[0032] Optionally, in an embodiment of the present invention, after determining whether there is a first in-library visualization component that matches the target visualization component in the in-library visualization component, it further includes: if it is determined that the first in-library visualization component exists, then according to the attribute value of the target visualization component, the attribute value of the first in-library visualization component is updated; and the updated first in-library visualization component is displayed. If it is determined that the first in-library visualization component exists, the attribute value of the target visualization component to be created is assigned to the first in-library visualization component to update the attribute value of the first in-library visualization component, and the updated first in-library visualization component is the target visualization component to be created, and then the first in-library visualization component is displayed in the software development interface for the convenience of software developers.

[0033] In particular, since the visualization components in the first library have been stored in the visualization component library, the only difference between the updated visualization components in the first library and the visualization components in the first library stored in the visualization component library is the attribute value. Therefore, for components with the same name and attributes, there is no need to store them repeatedly, that is, the updated visualization components in the first library are not stored to avoid repeated storage of the same type of visualization components; after obtaining the display instruction of the visualization components in the library and displaying the corresponding visualization components in the library, if the attribute value update instruction is obtained, the attribute value of the visualization component in the library is updated and displayed according to the obtained attribute value update instruction.

[0034] S120. If it is determined that the first in-library visualization component does not exist, the feature information of the target visualization component is compared with the feature information of the out-library visualization component to determine whether there is a first out-library visualization component that matches the target visualization component among the out-library visualization components.

[0035] The external visualization components, i.e., the external visualization components not stored in the visualization component library, can obtain the code files of the visualization components in each web page through crawler technology or component identification engine, and obtain the characteristic information of each external visualization component through code parsing, or directly obtain the external visualization components uploaded by the user. In the embodiment of the present invention, the source of the external visualization components is not specifically limited. If the name of the target visualization component is the same as the name of a certain external visualization component, and the properties are the same, it indicates that the external visualization component is the first external visualization component that matches the target visualization component; if there is no external visualization component with the same name and properties as the target visualization component among the above-mentioned external visualization components, it indicates that there is no first external visualization component that matches the target visualization component.

[0036] Optionally, in an embodiment of the present invention, after determining that the first in-library visualization component does not exist, it also includes: determining whether there is a second in-library visualization component in the in-library visualization component that hits all the attributes of the target visualization component; if it is determined that the second in-library visualization component exists, obtaining a first target code paragraph related to the all the attributes through the code file of the second in-library visualization component; obtaining the target visualization component according to the first target code paragraph; or displaying a visualization component editing interface, and displaying the first target code paragraph in the visualization component editing interface to guide the user to write the target visualization component; comparing the feature information of the target visualization component with the feature information of the visualization component outside the library includes: if it is determined that the second in-library visualization component does not exist, comparing the feature information of the target visualization component with the feature information of the visualization component outside the library.

[0037] Specifically, the second in-library visualization component is an in-library visualization component that hits all the attributes of the target visualization component, that is, the attributes of the second in-library visualization component include all the attributes of the target visualization component. At the same time, since the first in-library visualization component does not exist in the in-library visualization component library, the number of attributes of the second in-library visualization component must be greater than that of the target visualization component, that is, the second in-library visualization component not only includes all the attributes of the target visualization component, but also includes other attributes that the target visualization component does not have; for example, the attributes of the target visualization component are "length", "width" and "display color", and the attributes of the second in-library visualization component are "length", "width", "height", "display color" and "rotation angle".

[0038] In the code file of the visualization component in the second library, the attribute keyword matching the attribute of the target visualization component is obtained, and the code paragraph where the attribute keyword is located is determined as the first target code paragraph; according to the first target code paragraph, the code file of the target visualization component is directly generated; in addition, in order to ensure the code accuracy of the target visualization component, the visualization component editing interface can be displayed, and the first target code paragraph is displayed in the visualization component editing interface to guide the user to write the target visualization component; because the first target code paragraph already includes all the codes related to the attributes of the target code paragraph, the user only needs to perform format editing or other operations to obtain the target visualization component, which greatly reduces the amount of code development and improves the editing efficiency of the target visualization component.

[0039] In particular, in the code file of the visualization component in the second library, the attribute values ​​of other attributes that the target visualization component does not have can be set to 0, so that the valid attributes in the visualization component in the second library whose attribute values ​​are not 0 are the same as the attributes of the target visualization component, so as to ensure the code integrity of the visualization component in the second library and avoid omissions during code segment extraction, which may affect the code accuracy of the target visualization component.

[0040] S130: If it is determined that there is a first out-of-library visualization component, update the property value of the first out-of-library visualization component according to the property value of the target visualization component.

[0041] If it is determined that the first external visualization component exists, the property value of the target visualization component is assigned to the first external visualization component to update the property value of the first external visualization component. The updated first external visualization component is the target visualization component to be created.

[0042] Optionally, in an embodiment of the present invention, after determining whether there is a first out-of-library visualization component that matches the target visualization component in the out-of-library visualization component, it also includes: if it is determined that the first out-of-library visualization component does not exist, determining whether there is a second out-of-library visualization component that hits all the attributes of the target visualization component in the out-of-library visualization component; if it is determined that the second out-of-library visualization component exists, obtaining a second target code paragraph related to all the attributes through the code file of the second out-of-library visualization component; obtaining the target visualization component based on the second target code paragraph; or displaying a visualization component editing interface, and displaying the second target code paragraph in the visualization component editing interface to guide the user to write the target visualization component; if it is determined that the second out-of-library visualization component does not exist, displaying a visualization component editing interface to guide the user to write the target visualization component.

[0043] Specifically, the second out-of-library visualization component is an out-of-library visualization component that hits all the attributes of the target visualization component. The second out-of-library visualization component also includes all the attributes of the target visualization component, as well as other attributes that the target visualization component does not have. According to the second target code paragraph, the code file of the target visualization component is directly generated, or by displaying the visualization component editing interface, and displaying the second target code paragraph in the visualization component editing interface, to guide the user to write the target visualization component, which greatly reduces the amount of code development and improves the editing efficiency of the target visualization component. In particular, in the code file of the second out-of-library visualization component, the attribute values ​​of other attributes that the target visualization component does not have can be set to 0 to ensure the integrity of the code file of the second out-of-library visualization component, and avoid omissions caused when extracting code paragraphs, which affect the code accuracy of the target visualization component.

[0044] Optionally, in an embodiment of the present invention, after determining that there is no visualization component outside the second library, it also includes: obtaining the alternative visualization component with the largest number of attributes hitting the target visualization component based on the comparison results of the feature information of the target visualization component with the feature information of the visualization component within the library, and the comparison results of the feature information of the target visualization component with the feature information of the visualization component outside the library; determining whether the number of attribute hits of the alternative visualization component is greater than or equal to a preset number threshold; and displaying a visualization component editing interface to guide the user to write the target visualization component, including: if it is determined that the number of attribute hits of the alternative visualization component is less than the preset number threshold, displaying a visualization component editing interface to guide the user to write the target visualization component.

[0045] Specifically, if the visualization component in the library or the visualization component outside the library has the same name as the target visualization component and has the same one or more attributes, it indicates that the target visualization component has a certain similarity with the visualization component; the more the number of identical attributes, the greater the similarity. When editing the code based on the code files of the visualization components with similar attributes, the user's code development time can also be saved; the critical threshold value pre-set when the preset quantity threshold is set can be a specific value, for example, 3, or a percentage, that is, the number of attributes that hit the target visualization component and the percentage of the number of all attributes of the target visualization component, for example, 75%. If the number of attribute hits of the alternative visualization component is less than the preset quantity threshold, it indicates that the attribute similarity between the alternative visualization component and the target visualization component is low. When developing code based on the code files of the alternative visualization component, it may mislead the user in code writing. Therefore, only the visualization component editing interface is displayed to avoid misleading the user's code writing.

[0046] Optionally, in an embodiment of the present invention, after determining whether the number of attribute hits of the candidate visualization component is greater than or equal to a preset number threshold, the method includes: if it is determined that the number of attribute hits of the candidate visualization component is greater than or equal to the preset number threshold, obtaining the same attributes between the candidate visualization component and the target visualization component, and the remaining attributes of the target visualization component except the same attributes; obtaining a third target code paragraph related to the same attributes through the code file of the candidate visualization component; the display of the visualization component editing interface to guide the user to write the target visualization component includes: displaying the visualization component editing interface, and displaying the third target code paragraph and the remaining attributes in the visualization component editing interface to guide the user to write the target visualization component. If the number of attribute hits of the candidate visualization component is greater than or equal to the preset number threshold, it indicates that the attribute similarity between the candidate visualization component and the target visualization component is high. When code editing is performed based on the code file of the candidate visualization component, the amount of code development by the user can be reduced. Therefore, the third target code paragraph and the remaining attributes are displayed in the visualization component editing interface to facilitate the user to develop code and improve code development efficiency.

[0047] S140: Display the updated first external visualization component, and store the first external visualization component in a visualization component library.

[0048] Since the first outside-library visual component itself is not stored in the visual component library, and there is no first outside-library visual component with the same name and attributes as the target visual component in the visual component library, after displaying the updated first outside-library visual component, the updated first outside-library visual component needs to be stored in the visual component library to ensure the integrity of the visual components in the visual component library.

[0049] The technical solution provided by the embodiment of the present invention, when it is determined that there is no in-library visualization component matching the target visualization component, and it is determined that there is an out-library visualization component matching the target visualization component, updates the attribute value of the matching out-library visualization component according to the attribute value of the target visualization component to be created, displays and stores the out-library visualization component, realizes the expansion of the visualization component library based on the out-library visualization component, meets the demand for visualization components in software interface development, and improves the efficiency of obtaining the target visualization component.

[0050] Embodiment 2

[0051] Figure 2 A method for obtaining a visualization component provided by the second embodiment of the present invention. In the embodiment of the present invention, the target visualization component includes a continuous interaction component. The method specifically includes:

[0052] S210. Obtain feature information of a target visualization component to be created, and compare the feature information of the target visualization component with the feature information of the visualization components in the library to determine whether there is a first visualization component in the library that matches the target visualization component; wherein the feature information includes a name, attributes, and events; the target visualization component includes a continuous interaction component; and the continuous interaction component includes multiple associated visualization components.

[0053] An event is the response of a visual component to an operation instruction. When the application software detects that an event of a visual component has occurred, the event is executed. Among them, events may include single-click events, double-click events, scanning events, long-click events, and sliding events, etc. A continuous interaction component is composed of multiple visual components with associated relationships, and according to the execution order of each associated visual component, the latter visual component is executed through the event of the previous visual component; for example, in the payment method interface of the application software, a QR code for payment is displayed, and after obtaining the scanning instruction of the QR code, the corresponding payment details interface continues to be displayed to the user. The QR code in the payment method interface and the information prompt box in the payment details interface together constitute a continuous interaction component, and the display of the information prompt box is based on the scanning event of the QR code; each associated visual component in the continuous interaction component is displayed in different interfaces.

[0054] S220. If it is determined that the first in-library visualization component does not exist, the feature information of the target visualization component is compared with the feature information of the out-library visualization component to determine whether there is a first out-library visualization component that matches the target visualization component among the out-library visualization components.

[0055] If the target visualization component to be created is a continuous interaction component, when comparing the current continuous interaction component with the continuous interaction component in or outside the library, the feature information of each associated visualization component of the current continuous interaction component is compared with each associated visualization component of the continuous interaction component in or outside the library. If the feature information of the associated visualization component of the current continuous interaction component matches the feature information of the associated visualization component of a continuous interaction component in or outside the library one by one, and the display order of each associated visualization component is also the same, it indicates that the above-mentioned continuous interaction component matches the continuous interaction component to be created.

[0056] When comparing the current continuous interaction component with the non-continuous interaction components in and outside the library, each associated visualization component of the current continuous interaction component is compared with the non-continuous interaction components in and outside the library, and the non-continuous interaction components that match each associated visualization component are obtained. According to the display order of each associated visualization component, the obtained non-continuous interaction components are event-associated to obtain the continuous interaction component to be created.

[0057] S230: If it is determined that there is no visual component outside the first library, a visual component editing interface is displayed, and characteristic information and attribute values ​​of each of the associated visual components are obtained through the visual component editing interface.

[0058] S240: Obtain the target visualization component according to the display order of each of the associated visualization components.

[0059] In the visualization component editing interface, characteristic information of each associated visualization component is obtained, and the event association relationship between the associated visualization components represents the display order of each associated visualization component. For example, the event of associated visualization component A is associated with associated visualization component B, that is, when the event of associated visualization component A is triggered, associated visualization component B is displayed; accordingly, the edited target visualization component is obtained.

[0060] The technical solution provided by the embodiment of the present invention, when it is determined that there is no in-library visualization component matching the target visualization component, and when it is determined that there is no out-library visualization component matching the target visualization component, obtains the characteristic information and attribute values ​​of each associated visualization component through the visualization component editing interface, and then obtains the target visualization component according to the display order of each associated visualization component. While realizing continuous interactive component acquisition, the types of visualization components in the visualization component library are expanded, meeting the component development requirements of multiple software interfaces with interactive relationships.

[0061] Embodiment 3

[0062] Figure 3 It is a structural block diagram of a visualization component acquisition device provided in the third embodiment of the present invention, which specifically includes: an in-library visualization component judgment module 310, an out-library visualization component judgment module 320, an attribute value update module 330 and a target visualization component acquisition module 340.

[0063] The library visualization component judgment module 310 is used to obtain the characteristic information of the target visualization component to be created, and compare the characteristic information of the target visualization component with the characteristic information of the library visualization component to determine whether there is a first library visualization component matching the target visualization component in the library visualization component; wherein the characteristic information includes a name and attributes;

[0064] The external-library visualization component judgment module 320 is used to compare the characteristic information of the target visualization component with the characteristic information of the external-library visualization component if it is determined that the first internal-library visualization component does not exist, so as to judge whether there is a first external-library visualization component matching the target visualization component in the external-library visualization component;

[0065] The property value updating module 330 is used to update the property value of the first out-of-library visualization component according to the property value of the target visualization component if it is determined that the first out-of-library visualization component exists;

[0066] The target visual component acquisition module 340 is used to display the updated first out-of-library visual component and store the first out-of-library visual component in the visual component library.

[0067] The technical solution provided by the embodiment of the present invention, when it is determined that there is no in-library visualization component matching the target visualization component, and it is determined that there is an out-library visualization component matching the target visualization component, updates the attribute value of the matching out-library visualization component according to the attribute value of the target visualization component to be created, displays and stores the out-library visualization component, realizes the expansion of the visualization component library based on the out-library visualization component, meets the demand for visualization components in software interface development, and improves the efficiency of obtaining the target visualization component.

[0068] Optionally, based on the above technical solution, the attribute value updating module 330 is further used to update the attribute value of the first in-library visualization component according to the attribute value of the target visualization component if it is determined that the first in-library visualization component exists;

[0069] The target visual component acquisition module 340 is also used to display the updated visual components in the first library.

[0070] Optionally, based on the above technical solution, the device for obtaining the visualization component further includes:

[0071] A first attribute hit judgment module is used to judge whether there is a second in-library visualization component that hits all attributes of the target visualization component in the in-library visualization component;

[0072] The first target code section acquisition module is used to acquire the first target code section related to all the attributes through the code file of the second library visualization component if it is determined that the second library visualization component exists.

[0073] Optionally, based on the above technical solution, the target visualization component acquisition module 340 is also used to acquire the target visualization component based on the first target code paragraph; or to display a visualization component editing interface, and display the first target code paragraph in the visualization component editing interface to guide the user to write the target visualization component.

[0074] Optionally, based on the above technical solution, the off-library visualization component judgment module 320 is also used to compare the feature information of the target visualization component with the feature information of the off-library visualization component if it is determined that the second in-library visualization component does not exist.

[0075] Optionally, based on the above technical solution, the device for obtaining the visualization component further includes:

[0076] A second attribute hit judgment module is used to judge whether there is a second out-of-library visualization component that hits all attributes of the target visualization component among the out-of-library visualization components if it is determined that the first out-of-library visualization component does not exist;

[0077] The second target code paragraph acquisition module is used to acquire the second target code paragraph related to all the attributes through the code file of the second external library visualization component if it is determined that the second external library visualization component exists.

[0078] Optionally, based on the above technical solution, the target visualization component acquisition module 340 is further used to acquire the target visualization component according to the second target code paragraph; or to display a visualization component editing interface, and display the second target code paragraph in the visualization component editing interface to guide the user to write the target visualization component;

[0079] Optionally, based on the above technical solution, the target visualization component acquisition module 340 is further used to display a visualization component editing interface to guide the user to write the target visualization component if it is determined that the second external visualization component does not exist.

[0080] Optionally, based on the above technical solution, the device for obtaining the visualization component further includes:

[0081] The candidate visualization component is used to obtain the candidate visualization component with the largest number of attributes that hit the target visualization component based on the comparison result of the characteristic information of the target visualization component with the characteristic information of the visualization components in the library, and the comparison result of the characteristic information of the target visualization component with the characteristic information of the visualization components outside the library;

[0082] The attribute hit quantity judgment module is used to judge whether the attribute hit quantity of the candidate visualization component is greater than or equal to a preset quantity threshold.

[0083] Optionally, based on the above technical solution, the target visualization component acquisition module 340 is also used to display a visualization component editing interface to guide the user to write the target visualization component if the number of attribute hits of the alternative visualization component is determined to be less than a preset number threshold.

[0084] Optionally, based on the above technical solution, the device for obtaining the visualization component further includes:

[0085] A same attribute acquisition module, used for acquiring the same attributes between the candidate visualization component and the target visualization component, and the remaining attributes of the target visualization component except the same attributes, if it is determined that the number of attribute hits of the candidate visualization component is greater than or equal to a preset number threshold;

[0086] The third target code paragraph acquisition module is used to acquire the third target code paragraph related to the same attribute through the code file of the candidate visualization component.

[0087] Optionally, based on the above technical solution, the target visualization component acquisition module 340 is also used to display a visualization component editing interface, and in the visualization component editing interface, display the third target code paragraph and the remaining attributes to guide the user to write the target visualization component.

[0088] Optionally, based on the above technical solution, the target visualization component includes a continuous interaction component; wherein the continuous interaction component includes a plurality of associated visualization components; and the feature information also includes an event.

[0089] Optionally, based on the above technical solution, the target visualization component acquisition module 340 is also used to display a visualization component editing interface if it is determined that there is no visualization component outside the first library, and obtain the characteristic information and attribute values ​​of each associated visualization component through the visualization component editing interface; and obtain the target visualization component according to the display order of each associated visualization component.

[0090] The above device can execute the method for obtaining the visualization component provided by any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by any embodiment of the present invention.

[0091] Embodiment 4

[0092] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 4 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0093] like Figure 4 As shown, the electronic device 12 is in the form of a general purpose computer device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that connects various system components (including the memory 28 and the processing unit 16).

[0094] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0095] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0096] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0097] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0098] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0099] The processing unit 16 executes various functional applications and data processing by running the program stored in the memory 28, such as implementing the method for obtaining the visualization component provided in the embodiment of the present invention. That is: obtaining the characteristic information of the target visualization component to be created, and comparing the characteristic information of the target visualization component with the characteristic information of the visualization component in the library to determine whether there is a first visualization component in the library that matches the target visualization component in the visualization component in the library; wherein the characteristic information includes a name and attributes; if it is determined that the first visualization component in the library does not exist, then comparing the characteristic information of the target visualization component with the characteristic information of the visualization component outside the library to determine whether there is a first visualization component outside the library that matches the target visualization component in the visualization component outside the library; if it is determined that there is a first visualization component outside the library, then updating the attribute value of the first visualization component outside the library according to the attribute value of the target visualization component; displaying the updated first visualization component outside the library, and storing the first visualization component outside the library in the visualization component library.

[0100] Embodiment 5

[0101] Embodiment 5 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for obtaining a visualization component as described in any embodiment of the present invention is implemented; the method includes:

[0102] Acquire characteristic information of a target visualization component to be created, and compare the characteristic information of the target visualization component with the characteristic information of the visualization components in the library to determine whether there is a first visualization component in the library that matches the target visualization component in the visualization components in the library; wherein the characteristic information includes a name and attributes;

[0103] If it is determined that the first in-library visualization component does not exist, the characteristic information of the target visualization component is compared with the characteristic information of the out-library visualization component to determine whether there is a first out-library visualization component matching the target visualization component among the out-library visualization components;

[0104] If it is determined that there is a first out-of-library visualization component, updating the property value of the first out-of-library visualization component according to the property value of the target visualization component;

[0105] The updated first out-of-library visualization component is displayed, and the first out-of-library visualization component is stored in the visualization component library.

[0106] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0107] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0108] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0109] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0110] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for obtaining a visualization component, characterized in that: include: Acquire characteristic information of a target visualization component to be created, and compare the characteristic information of the target visualization component with the characteristic information of the visualization components in the library, so as to determine whether there is a first visualization component in the library that matches the target visualization component; wherein the characteristic information includes a name and attributes; the name of the first visualization component in the library is the same as the name of the target visualization component, and the attributes of the first visualization component in the library are the same as the attributes of the target visualization component; If it is determined that the first in-library visualization component does not exist, the characteristic information of the target visualization component is compared with the characteristic information of the out-library visualization component to determine whether there is a first out-library visualization component matching the target visualization component among the out-library visualization components; wherein the name of the first out-library visualization component is the same as the name of the target visualization component, and the attributes of the first out-library visualization component are the same as the attributes of the target visualization component; If it is determined that there is a first out-of-library visualization component, updating the property value of the first out-of-library visualization component according to the property value of the target visualization component; The updated first out-of-library visualization component is displayed, and the first out-of-library visualization component is stored in the visualization component library.

2. The method according to claim 1, characterized in that After determining whether there is a first in-library visualization component matching the target visualization component in the in-library visualization components, the method further includes: If it is determined that the first in-library visualization component exists, updating the attribute value of the first in-library visualization component according to the attribute value of the target visualization component; Display the updated visualization components in the first library.

3. The method according to claim 1, characterized in that After determining that the first in-library visualization component does not exist, the method further includes: Determine whether there is a second in-library visualization component in the in-library visualization component that hits all attributes of the target visualization component; If it is determined that the second in-library visualization component exists, obtaining the first target code segment related to all the attributes through the code file of the second in-library visualization component; Directly generate a code file of the target visualization component according to the first target code paragraph; Or displaying a visualization component editing interface, and displaying the first target code paragraph in the visualization component editing interface to guide the user to write the target visualization component; The comparing the characteristic information of the target visualization component with the characteristic information of the visualization component outside the library includes: If it is determined that the second visualization component does not exist in the library, the feature information of the target visualization component is compared with the feature information of the visualization component outside the library.

4. The method according to claim 1, characterized in that After determining whether there is a first out-of-library visualization component matching the target visualization component in the out-of-library visualization components, the method further includes: If it is determined that the first out-of-library visualization component does not exist, determining whether there is a second out-of-library visualization component that hits all attributes of the target visualization component among the out-of-library visualization components; If it is determined that the second external-library visualization component exists, obtaining a second target code segment related to all the attributes through a code file of the second external-library visualization component; Directly generate a code file of the target visualization component according to the second target code paragraph; Or displaying a visualization component editing interface, and displaying the second target code segment in the visualization component editing interface to guide the user to write the target visualization component; If it is determined that there is no visual component outside the second library, a visual component editing interface is displayed to guide the user to edit the target visual component.

5. The method according to claim 4, characterized in that After determining that the second external visualization component does not exist, the method further includes: According to the comparison result of the characteristic information of the target visualization component with the characteristic information of the visualization components in the library, and the comparison result of the characteristic information of the target visualization component with the characteristic information of the visualization components outside the library, the candidate visualization component with the largest number of attributes hitting the target visualization component is obtained; Determine whether the number of attribute hits of the candidate visualization component is greater than or equal to a preset number threshold; The display visualization component editing interface is used to guide the user to edit the target visualization component, including: If it is determined that the number of attribute hits of the candidate visualization component is less than a preset number threshold, a visualization component editing interface is displayed to guide the user to edit the target visualization component.

6. The method according to claim 5, characterized in that After determining whether the number of attribute hits of the candidate visualization component is greater than or equal to a preset number threshold, the method includes: If it is determined that the number of attribute hits of the candidate visualization component is greater than or equal to a preset number threshold, then obtaining the same attributes between the candidate visualization component and the target visualization component, and the remaining attributes of the target visualization component except the same attributes; Obtaining, through the code file of the candidate visualization component, a third target code segment related to the same attribute; The display visualization component editing interface is used to guide the user to edit the target visualization component, including: A visualization component editing interface is displayed, and in the visualization component editing interface, the third target code segment and the remaining attributes are displayed to guide the user to write the target visualization component.

7. The method according to any one of claims 1 to 6, characterized in that: The target visualization component includes a continuous interaction component; wherein the continuous interaction component includes a plurality of associated visualization components; the feature information also includes an event; After determining whether there is a first out-of-library visualization component matching the target visualization component in the out-of-library visualization components, the method further includes: If it is determined that there is no visual component outside the first library, displaying a visual component editing interface, and obtaining feature information and attribute values ​​of each of the associated visual components through the visual component editing interface; The target visualization component is obtained according to the display order of each of the associated visualization components.

8. A device for obtaining a visualization component, characterized in that: include: The library visualization component judgment module is used to obtain the characteristic information of the target visualization component to be created, and compare the characteristic information of the target visualization component with the characteristic information of the library visualization component to determine whether there is a first library visualization component matching the target visualization component in the library visualization component; wherein the characteristic information includes a name and attributes; the name of the first library visualization component is the same as the name of the target visualization component, and the attributes of the first library visualization component are the same as the attributes of the target visualization component; The external library visualization component judgment module is used for comparing the characteristic information of the target visualization component with the characteristic information of the external library visualization component if it is determined that the first internal library visualization component does not exist, so as to judge whether there is a first external library visualization component matching the target visualization component in the external library visualization components; wherein the name of the first external library visualization component is the same as the name of the target visualization component, and the attributes of the first external library visualization component are the same as the attributes of the target visualization component; An attribute value updating module, configured to update the attribute value of the first out-of-library visualization component according to the attribute value of the target visualization component if it is determined that the first out-of-library visualization component exists; The target visual component acquisition module is used to display the updated first out-of-library visual component and store the first out-of-library visual component in the visual component library.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for obtaining a visualization component as described in any one of claims 1 to 7.

10. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the method for obtaining a visualization component according to any one of claims 1 to 7 when executed by a computer processor.

Citation Information

Patent Citations

  • Graphic user interface generation method and device, computer equipment and storage medium

    CN109582411A

  • Component library generation method, device and equipment

    CN110147223A