CN113312025B - Component library generation method and device, storage medium and electronic equipment - Google Patents

Component library generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113312025B
CN113312025B CN202010118725.6A CN202010118725A CN113312025B CN 113312025 B CN113312025 B CN 113312025B CN 202010118725 A CN202010118725 A CN 202010118725A CN 113312025 B CN113312025 B CN 113312025B
Authority
CN
China
Prior art keywords
component library
interface
variables
style attribute
style
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.)
Active
Application number
CN202010118725.6A
Other languages
Chinese (zh)
Other versions
CN113312025A (en
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.)
Beijing Tongbang Zhuoyi Technology Co ltd
Original Assignee
Beijing Tongbang Zhuoyi Technology 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 Beijing Tongbang Zhuoyi Technology Co ltd filed Critical Beijing Tongbang Zhuoyi Technology Co ltd
Priority to CN202010118725.6A priority Critical patent/CN113312025B/en
Publication of CN113312025A publication Critical patent/CN113312025A/en
Application granted granted Critical
Publication of CN113312025B publication Critical patent/CN113312025B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the disclosure relates to a component library generation method and device, a storage medium and electronic equipment, and relates to the technical field of computers, wherein the method comprises the following steps: acquiring interface style attributes expressed by language rules, wherein the interface style attributes are determined by a plurality of variables; determining variable values of the multiple variables aiming at the application scene according to the application scene where the multiple variables are located; and forming a style attribute file according to the variable values of the variables, and generating the component library by combining the interface style attribute and the style attribute file. According to the technical scheme, the operation steps can be reduced, the operation difficulty is reduced, and the efficiency of generating the component library is improved.

Description

Component library generation method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a component library generating method, a component library generating device, a computer readable storage medium, and an electronic apparatus.
Background
In the development process of daily projects, in order to keep the style uniform among a plurality of systems, component library technology has been developed.
In the related art, the existing component library cannot meet the requirement of the internal design style of each application object. For each application object, if the existing component library of other application unique objects is used, the existing component library needs to be modified in a large range to be suitable for the application object, the operation steps are more and more complex, the labor cost is wasted, the function of the component library technology cannot be really exerted, and the limitation is large.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure provides a component library generation method and apparatus, a computer-readable storage medium, and an electronic device, thereby overcoming the problems of complex operation and low operation efficiency in the related art at least to some extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to one aspect of the present disclosure, there is provided a component library generation method including:
acquiring interface style attributes expressed by language rules, wherein the interface style attributes are determined by a plurality of variables;
determining variable values of the multiple variables aiming at the application scene according to the application scene where the multiple variables are located;
and forming a style attribute file according to the variable values of the variables, and generating a component library by combining the interface style attribute and the style attribute file.
In an exemplary embodiment of the present disclosure, before obtaining the interface style attribute represented using the language rules, the method further includes:
the language rule is determined according to the state information of the reference rule.
In an exemplary embodiment of the present disclosure, the determining, according to an application scenario in which the plurality of variables are located, a variable value of the variable with respect to the application scenario includes:
and determining a variable value of the variable aiming at the application scene according to the corresponding relation between the application scene and the variable.
In an exemplary embodiment of the present disclosure, the forming a style attribute file according to variable values of the plurality of variables includes:
and combining variable values of all variables in the plurality of variables to determine a variable value set, and generating the style attribute file based on the variable value set.
In an exemplary embodiment of the disclosure, the generating a component library in combination with the style attribute and the style attribute file includes:
and combining the style attribute file with the style attribute, and calling the style attribute file to generate a component library conforming to the style attribute of the interface.
In an exemplary embodiment of the present disclosure, the method further comprises:
and acquiring the repetition times of the repeated language information, extracting the repeated language information based on the repetition times, and adjusting the extracted language information to form the component library.
In an exemplary embodiment of the present disclosure, the method further comprises:
after the component library is generated, a plurality of components conforming to the application scene are obtained from the component library according to the application scene, and the components are combined to generate an interface.
According to an aspect of the present disclosure, there is provided a component library generating apparatus including: the style acquisition module is used for acquiring interface style attributes expressed by using language rules, and the interface style attributes are determined by a plurality of variables; the variable value determining module is used for determining variable values of the plurality of variables aiming at the application scene according to the application scene where the plurality of variables are located; and the component library construction module is used for forming a style attribute file according to the variable values of the variables and generating the component library by combining the interface style attribute and the style attribute file.
According to one aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the component library generation method of any one of the above.
According to one aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the component library generating method of any one of the above via execution of the executable instructions.
According to the component library generating method, the component library generating device, the computer readable storage medium and the electronic equipment, the specification and the format of the variable can be limited through the language rule, so that the interface style attribute is represented to determine the interface style attribute, the corresponding variable value is determined according to the application scene of the variable contained in the interface style attribute, and the style attribute file is formed according to the variable value, so that the component library is generated based on the combination of the interface style attribute and the style attribute file. On the one hand, the method does not need to modify the existing component library in a large range, reduces operation steps and operation complexity when determining the component library of each application object, avoids the operation of modifying the existing component library, can improve the efficiency of generating the component library, avoids misoperation possibly caused in the modification process, and improves the accuracy of generating the component library. On the other hand, as the variable values of the variables can be determined according to the application scene so as to generate the style attribute file, and the interface style attribute is described according to the language rule, the component library can be generated on the basis of the interface style attribute and the style attribute file, the component library can be generated individually based on the actual requirements, the limitation that the existing component library can only be modified is avoided, the application range is increased, the function of the component library can be better played, the application object is more suitable for internal use, the applicability is improved, the generated component library can be more suitable for the aimed application object, and the reliability is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 schematically illustrates a system architecture diagram for implementing a component library generation method according to an embodiment of the present disclosure.
Fig. 2 schematically illustrates a schematic diagram of a component library generation method in an embodiment of the present disclosure.
FIG. 3 schematically illustrates a schematic diagram of a specific flow chart for building a component library in an embodiment of the disclosure.
Fig. 4 schematically shows a block diagram of the component library generating apparatus in the embodiment of the present disclosure.
Fig. 5 schematically illustrates a block diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. Furthermore, the drawings are only schematic illustrations of the present disclosure, in which the same reference numerals denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include a first end 101, a network 102, and a second end 103. The first end 101 may be a client, for example, may be various handheld devices (smart phones) with display functions, desktop computers, vehicle-mounted devices, wearable devices, and the like. Network 102 is a medium used to provide a communication link between first end 101 and second end 103. Network 102 may include various connection types, such as a wired communication link, a wireless communication link, etc., and in embodiments of the present disclosure, network 102 between first end 101 and second end 103 may be a wired communication link, such as a communication link may be provided over a serial connection, or a wireless communication link may be provided over a wireless network. The second terminal 103 may be a client, such as a terminal device with data processing functions, e.g. a portable computer, a desktop computer, a smart phone, etc., for generating the component library. When the first end and the second end are both clients, they may be the same client. The second end may also be a server, which is not limited herein.
It should be understood that the number of first ends, networks, and second ends in fig. 1 are merely illustrative. There may be any number of clients, networks, and servers, as desired for implementation.
It should be noted that, the component library generating method provided in the embodiment of the present disclosure may be completely executed by the second end or the first end, or may be partially executed by the first end and partially executed by the second end, where the execution body of the component library generating method is not limited in particular. Accordingly, the component library generating device may be disposed in the second end 103 or in the first end 101.
Based on the system architecture, the embodiment of the disclosure provides a component library generating method. Referring to fig. 2, the component library generating method includes steps S210 to S230, which are described in detail as follows:
in step S210, an interface style attribute expressed using language rules is acquired, and the interface style attribute is determined by a plurality of variables;
in step S220, according to the application scenario where the multiple variables are located, determining variable values of the multiple variables for the application scenario;
in step S230, a style attribute file is formed according to the variable values of the plurality of variables, and a component library is generated by combining the interface style attribute and the style attribute file.
In the component library generation method provided by the embodiment of the disclosure, on one hand, the existing component library does not need to be modified in a large range, and when the component library of each application object is determined, the operation steps and the operation complexity are reduced, the operation of modifying the existing component library is avoided, the efficiency of generating the component library can be improved, the misoperation possibly caused in the modification process is avoided, and the accuracy of generating the component library is improved. On the other hand, as the variable values of the variables can be determined according to the application scene so as to generate the style attribute file, and the interface style attribute is described according to the language rule, the component library can be generated on the basis of the interface style attribute and the style attribute file, the component library can be generated individually based on the actual requirements, the limitation that the existing component library can only be modified is avoided, the application range is increased, the function of the component library can be better played, the application object is more suitable for internal use, the applicability is improved, the generated component library can be more suitable for the aimed application object, and the reliability is improved.
Next, a component library generation method in an embodiment of the present disclosure will be further explained with reference to the drawings.
Referring to fig. 2, in step S210, an interface style attribute expressed using a language rule is acquired, and the interface style attribute is determined by a plurality of variables.
In the embodiment of the present disclosure, the Interface style attribute refers to a UI (User Interface) style. Interface style attributes may include, for example, but are not limited to, the following: the tone is stable, the style is lively, the tone is vivid, and the like. For an interface style attribute of an application object, a default interface style attribute may be provided, such as being relatively stable. The user can also adjust the default interface style attribute according to the actual requirement, so as to take the adjusted style attribute as the final interface style attribute.
Language rules refer to interface design language, i.e., UI design language. The UI design language may be understood as chinese lexicon, grammar, and thus is a specification. And combining variables through contracted specifications to form corresponding sentences, paragraphs and articles. The language rule in the embodiment of the disclosure is used for representing and describing the interface style attribute of the interface in the form of variables. Thus, upon determining the UI design language, the presentation means of the variables may be used to determine and describe the corresponding interface style attributes.
Before obtaining the interface style attributes expressed using language rules, the language rules may first be determined in order to ensure the accuracy of the interface style attributes of the description. Specifically, it may be determined according to state information of the reference rule. The reference rule may be a history rule used for a preset period of time. The preset duration may be within half a year, within three months, etc., which is not limited herein. Since the reference rule used each time may be different or the same, the reference rule may include a plurality of rules within a preset time period, for example, rule 1, rule 2, rule 3, and the like. The state information may be used to describe whether the usage situation of the reference rule satisfies the preset condition, and the usage situation may be, for example, the usage number or the repetition number of the reference rule, and the usage number is described herein as an example. When the number of times of use of a certain reference rule reaches the threshold number of times, the use condition of the reference rule can be considered to satisfy the preset condition. The number threshold may be a relatively large value, for example, 50 times, 100 times, or the like. In addition, all the reference rules may be scored, and if the score of a certain reference rule is greater than the score threshold, the reference rule may be considered to satisfy the preset condition. The reference rules may be scored according to their rating information. For example, if the evaluation information is good, the score is 10; the evaluation information is general, and the score is 5 points; the evaluation information is poor, the score is 3 points, and so on.
The variables may be some parameters of the components used to construct the interface, and may specifically be used to express the style attribute of the interface, and the variables may be any of the parameters of font, color, space, and the like, for example. It follows that some grammars and specifications may be defined by language rules, further defining final interface style attributes in the form of a plurality of variables with this language rule being limiting.
Next, in step S220, variable values of the plurality of variables for the application scenario are determined according to the application scenario in which the plurality of variables are located.
In the disclosed embodiments, for a plurality of variables used to represent the interface style attribute, the value of each variable may be determined as a variable value. Specifically, it may be determined according to application scenarios of a plurality of variables. The application scenario may be used to represent features of the function, location, etc. of the variable. For example, the application scenario may include, but is not limited to, a management background, a data platform, an operation platform, websites in various pairs of pairs, and the like. Different interface style attributes may need to be formed under different application scenes, for example, some application scenes need to be more stable in tone, some application scenes need to be more lively, some applications need to be more vivid, and some applications need to be more bright, etc. The variable values of the same variable may also be different in different application scenarios for the variable. Specifically, a one-to-one correspondence relationship can be configured between each application scene and the variable value of each variable, and the variable value of the variable in the current application scene is obtained further based on the correspondence relationship between the current application scene of a certain variable and each configured variable and variable value. That is, each variable may have a different value in different application scenarios, in conjunction with a particular different application scenario. For example, for a variable font, the size is 20px when the font is the title, 18px when the font is the subtitle, and 14px when the font is the body.
With continued reference to FIG. 2, in step S230, a style properties file is formed from the variable values of the plurality of variables, and a library of components is generated in conjunction with the interface style properties and the style properties file.
In the embodiment of the disclosure, the style attribute file may be a configuration file corresponding to the style attribute of the interface. The style property file may be formed from variable values of a plurality of variables, and thus may be considered a configuration file for a set of variable values. Multiple different sets of variable values may be included in each style property file.
The specific operation of generating the style attribute file according to the variable value can be as follows: and combining variable values of all variables in the plurality of variables to determine a variable value set, and generating a style attribute file based on the variable value set. Specifically, the number of the variables may be multiple, and in order to ensure accuracy and comprehensiveness of the configuration file, all variable values corresponding to all the variables in the multiple variables in different application scenarios may be combined, so that all variable values corresponding to all the variables are combined to obtain a variable value set. For example, there are 10 variables, and each variable has 5 variable values, and all variable values of the 10 variables may be combined to obtain the variable value set. After determining the set of variable values, a style attribute file corresponding to the interface style attribute may be generated from the set of variable values.
After generating the style properties file, a library of components may be generated in conjunction with the style properties and the style properties file. The component library is constructed relative to one application object, and the component libraries of different application objects may be different, and may be specifically set according to the actual requirements of the application object. The application object may be an enterprise or a system of institutions, etc. Since a style properties file is a collection of specific variable values, an interface style property is an abstract concept, such as business style, such as vivid style, etc., and can be represented by different variable values. The component library includes a plurality of components, and the component library can form different interface style attributes (UI styles) through a style attribute file. Therefore, after the interface style attribute and the style attribute file are determined, the interface style attribute and the style attribute file can be simply combined, and then the component library which accords with the current interface style attribute can be obtained. Specifically, after determining the interface style attribute, the style attribute file corresponding thereto may be invoked to generate a component library conforming to the current interface style attribute based on the style attribute file. The component library may include a plurality of components, and a component generation interface may be selected from the plurality of components included in the component library based on configuration instructions given by a user for determining a style level of the interface. In the embodiment of the disclosure, the component library is generated through the style attribute file, so that the modification of the existing component library can be avoided, the component library is formed directly through the configuration file, the component library can be formed by more flexibly combining the variable expression means, the operability and the flexibility can be improved, the generated component library is more suitable for application objects, and personalized configuration is realized.
Other methods may be used to construct the component library in addition to generating the component library from language rules. The method comprises the steps of carrying out a first treatment on the surface of the For example, a library of components may be generated and built according to preset rules. The preset rules can be design rules of consistency, feedback, efficiency, controllability and the like. For another example, a component library may be constructed from the repetition code. Specifically, the language information that is repeatedly used may be extracted based on the number of repetitions, and the extracted language information may be adjusted to form the component library. The number of repetitions refers to the number of repetitions of the language information in a certain item. The language information may be represented by codes. For the language information to be reused, if the number of repetition times reaches the repetition threshold, the language information can be extracted, and the extracted language information is subjected to adjustment operations such as processing modification and the like, so that a component library is formed according to the adjusted language information. The repetition threshold may be a larger value, and may be different or the same for different application objects, specifically set according to actual requirements.
Regardless of the method by which the component library is built, the component library of the interface style attribute may be adjusted if the user finds that the component library of the interface style attribute does not meet the requirements of the user or wants to change. The style configuration file can be called to replace the component library of the interface style attribute without modifying other contents, so that the operation steps and the operation difficulty are reduced, and the operation convenience is improved.
It should be noted that, for different operating systems, the same variable may be compatible with all operating systems without being affected by the operating system, so that component libraries generated for different operating systems may be the same, thereby improving consistency of the component libraries and increasing specificity for a certain application object.
A flow chart of the construction of a library of components is schematically shown in fig. 3, and with reference to fig. 3, mainly comprises the following parts: user 301, interface design language 302, interface style properties 303, style properties file 304, and component library 305. Specifically, first, an interface design language of a user (UI designer) specification is acquired, and the interface design language may be determined according to whether or not state information of a reference language meets preset conditions. The interface style attributes may then be described in terms of variables using a canonical interface design language. Further, a style property file formulated by the UI designer can be obtained, and the style property file is called to construct a component library conforming to the style property of the interface under the limit condition of the style property of the interface. In the embodiment of the disclosure, the component library is determined by adopting the language rules through the interface style attribute described by the variables and the style attribute file determined by the variable value set, other contents are not required to be modified, the operation steps and the operation difficulty are reduced, the operation convenience is improved, and convenience and auxiliary effects are provided for constructing the interface.
After the component library is built, since a plurality of different components are included in the component library, an interface may be generated based on the plurality of different components included in the component library. Specifically, a plurality of components conforming to an application scene can be selected therefrom to be combined and built in a preset order to form an interface. For example, the selected components may be all types of components in the component library, or may be some types of components in the component library, which is determined according to the application scenario. In addition, the method can be determined according to the number of components of the interface to be constructed while being determined according to the application scene; of course, the number of components may be not affected, and the present invention is not limited thereto. In this way, for an interface to be generated, the interface construction can be completed in different manners through different components in the component library. In the embodiment of the disclosure, the interface is constructed by the components contained in the component library, so that the accuracy of the interface can be improved, and the process of constructing the interface is more convenient.
A schematic diagram of a component library generating apparatus in an embodiment of the present disclosure is schematically shown in fig. 4, and referring to fig. 4, the component library generating apparatus 400 mainly includes the following modules: a style acquisition module 401, a variable value determination module 402 and a component library construction module 403; wherein:
a style acquisition module 401, configured to acquire an interface style attribute represented by a language rule, where the interface style attribute is determined by a plurality of variables;
a variable value determining module 402, configured to determine, according to an application scenario in which the plurality of variables are located, variable values of the plurality of variables with respect to the application scenario;
and the component library construction module 403 is configured to form a style attribute file according to the variable values of the multiple variables, and combine the interface style attribute and the style attribute file to generate the component library.
In an exemplary embodiment of the present disclosure, before obtaining the interface style attribute expressed using the language rule, the apparatus further includes: and the language rule determining module is used for determining the language rule according to the state information of the reference rule.
In an exemplary embodiment of the present disclosure, the variable value determination module is configured to: and determining the variable value of the variable according to the corresponding relation between the application scene and the variable.
In one exemplary embodiment of the present disclosure, the component library construction module includes: and the file forming module is used for combining variable values of all the variables in the plurality of variables to determine a variable value set and generating the style attribute file based on the variable value set.
In one exemplary embodiment of the present disclosure, the component library construction module includes: and the file combination module is used for combining the style attribute file with the style attribute and calling the style attribute file to generate a component library conforming to the style attribute of the interface.
In an exemplary embodiment of the present disclosure, the apparatus further comprises: the language extraction module is used for obtaining the repetition times of the repeated language information, extracting the repeated language information based on the repetition times, and adjusting the extracted language information to form the component library.
In an exemplary embodiment of the present disclosure, the apparatus further comprises: and the interface generation module is used for acquiring a plurality of components conforming to the application scene from the component library according to the application scene after the component library is generated, and combining the components to generate an interface.
It should be noted that, the specific details of each module in the above component library generating device have been described in detail in the corresponding component library generating method, so that the details are not repeated here.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
In an embodiment of the disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 500 according to such an embodiment of the present disclosure is described below with reference to fig. 5. The electronic device 500 shown in fig. 5 is merely an example and should not be construed to limit the functionality and scope of use of embodiments of the present disclosure in any way.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of electronic device 500 may include, but are not limited to: the at least one processing unit 510, the at least one memory unit 520, a bus 530 connecting the different system components (including the memory unit 520 and the processing unit 510), and a display unit 540.
Wherein the storage unit stores program code that is executable by the processing unit 510 such that the processing unit 510 performs steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "exemplary methods" section of the present specification. For example, the processing unit 510 may perform the steps as shown in fig. 2.
The storage unit 520 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 5201 and/or cache memory unit 5202, and may further include Read Only Memory (ROM) 5203.
The storage unit 520 may also include a program/utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 530 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration interface, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 500 may also communicate with one or more external devices 600 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 500, and/or any device (e.g., router, modem, etc.) that enables the electronic device 500 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 550. Also, electronic device 500 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 560. As shown, network adapter 560 communicates with other modules of electronic device 500 over bus 530. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 500, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
In an embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
A program product for implementing the above-described method according to an embodiment of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a 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.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (9)

1. A component library generation method, comprising:
determining a language rule according to state information of the reference rule, acquiring an interface style attribute expressed by the language rule, wherein the interface style attribute is determined by a plurality of variables; the reference rule is a history rule used in a preset time period, and the state information is used for describing whether the use times or the repetition times of the reference rule meet preset conditions; the language rule refers to an interface design language; the interface style attribute refers to a user interface style; the variables are parameters of components for forming the interface and are used for expressing the style attribute of the interface, and the variables are any one of fonts, colors and intervals;
determining variable values of the multiple variables aiming at the application scene according to the application scene where the multiple variables are located;
and forming a style attribute file according to the variable values of the variables, and generating a component library by combining the interface style attribute and the style attribute file.
2. The component library generating method according to claim 1, wherein the determining, according to an application scenario in which the plurality of variables are located, a variable value of the variable for the application scenario includes:
and determining a variable value of the variable aiming at the application scene according to the corresponding relation between the application scene and the variable.
3. The component library generating method according to claim 1, wherein the forming a style attribute file from the variable values of the plurality of variables includes:
and combining variable values of all variables in the plurality of variables to determine a variable value set, and generating the style attribute file based on the variable value set.
4. The component library generating method according to claim 3, wherein said generating said component library in combination with said style attribute and said style attribute file comprises:
and combining the style attribute file with the style attribute, and calling the style attribute file to generate a component library conforming to the style attribute of the interface.
5. The component library generation method of claim 1, wherein the method further comprises:
and acquiring the repetition times of the repeated language information, extracting the repeated language information based on the repetition times, and adjusting the extracted language information to form the component library.
6. The component library generation method according to any one of claims 1 to 5, further comprising:
after the component library is generated, a plurality of components conforming to the application scene are obtained from the component library according to the application scene, and the components are combined to generate an interface.
7. A component library generating apparatus, comprising:
the style acquisition module is used for determining language rules according to the state information of the reference rules, acquiring interface style attributes expressed by the language rules, wherein the interface style attributes are determined by a plurality of variables; the reference rule is a history rule used in a preset time period, and the state information is used for describing whether the use times or the repetition times of the reference rule meet preset conditions; the language rule refers to an interface design language; the interface style attribute refers to a user interface style; the variables are parameters of components for forming the interface and are used for expressing the style attribute of the interface, and the variables are any one of fonts, colors and intervals;
the variable value determining module is used for determining variable values of the plurality of variables aiming at the application scene according to the application scene where the plurality of variables are located;
and the component library construction module is used for forming a style attribute file according to the variable values of the variables and generating the component library by combining the interface style attribute and the style attribute file.
8. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the component library generating method of any of claims 1-6.
9. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the component library generating method of any one of claims 1-6 via execution of the executable instructions.
CN202010118725.6A 2020-02-26 2020-02-26 Component library generation method and device, storage medium and electronic equipment Active CN113312025B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010118725.6A CN113312025B (en) 2020-02-26 2020-02-26 Component library generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010118725.6A CN113312025B (en) 2020-02-26 2020-02-26 Component library generation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113312025A CN113312025A (en) 2021-08-27
CN113312025B true CN113312025B (en) 2024-04-05

Family

ID=77370162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010118725.6A Active CN113312025B (en) 2020-02-26 2020-02-26 Component library generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113312025B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253536A (en) * 2021-12-13 2022-03-29 中国联合网络通信集团有限公司 Calling method of interface design component, terminal device and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101295249A (en) * 2008-06-26 2008-10-29 腾讯科技(深圳)有限公司 Method and system for dynamic configuration management of software interface style
CN102207872A (en) * 2011-06-04 2011-10-05 中国移动通信集团内蒙古有限公司 Method and system for customizing Web UI (User Interface) control according to user requirements
CN105511873A (en) * 2015-12-02 2016-04-20 网易(杭州)网络有限公司 User interface control display method and device
CN106293658A (en) * 2015-05-20 2017-01-04 腾讯科技(深圳)有限公司 A kind of interface assembly generates method and equipment thereof
CN108376091A (en) * 2018-02-23 2018-08-07 中国平安人寿保险股份有限公司 Assembly operating method, device, equipment and computer storage media
CN109766097A (en) * 2018-12-15 2019-05-17 中国平安人寿保险股份有限公司 UI generation method, device, electronic equipment and computer readable storage medium
CN110221824A (en) * 2019-06-03 2019-09-10 精硕科技(北京)股份有限公司 The generation method and device of component

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6873337B1 (en) * 2000-04-06 2005-03-29 Microsoft Corporation Application programming interface for changing the visual style
US20080059504A1 (en) * 2005-11-30 2008-03-06 Jackie Barbetta Method and system for rendering graphical user interface

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101295249A (en) * 2008-06-26 2008-10-29 腾讯科技(深圳)有限公司 Method and system for dynamic configuration management of software interface style
CN102207872A (en) * 2011-06-04 2011-10-05 中国移动通信集团内蒙古有限公司 Method and system for customizing Web UI (User Interface) control according to user requirements
CN106293658A (en) * 2015-05-20 2017-01-04 腾讯科技(深圳)有限公司 A kind of interface assembly generates method and equipment thereof
CN105511873A (en) * 2015-12-02 2016-04-20 网易(杭州)网络有限公司 User interface control display method and device
CN108376091A (en) * 2018-02-23 2018-08-07 中国平安人寿保险股份有限公司 Assembly operating method, device, equipment and computer storage media
CN109766097A (en) * 2018-12-15 2019-05-17 中国平安人寿保险股份有限公司 UI generation method, device, electronic equipment and computer readable storage medium
CN110221824A (en) * 2019-06-03 2019-09-10 精硕科技(北京)股份有限公司 The generation method and device of component

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Promoting Creative Design through Toolkits;Saul Greenberg 等;《2009 Latin American Web Congress》;92-93 *
可定制的WEB界面设计技术研究;黄俊莲;《中国优秀硕士学位论文全文数据库信息科技辑》;I139-172 *
复杂产品集成设计中的可定制用户界面的研究与实现;杨亚利;《中国优秀硕士学位论文全文数据库信息科技辑》;I138-573 *

Also Published As

Publication number Publication date
CN113312025A (en) 2021-08-27

Similar Documents

Publication Publication Date Title
US10474693B2 (en) Resolving conflicts within saved state data
JP7324831B2 (en) DEPLOYMENT METHOD, DEPLOYMENT DEVICE AND ELECTRONIC DEVICE OF OPERATORS IN DEEP LEARNING FRAMEWORK
CN109976793B (en) Application program running method, device, equipment and medium
CN111880813B (en) Method for realizing android card UI (user interface) and storage medium
CN116955569A (en) Dialogue generation method, device, equipment and storage medium
KR20220009338A (en) Configuration method, device, electronic equipment and computer storage medium of modeling parameters
CN114218890A (en) Page rendering method and device, electronic equipment and storage medium
CN113312025B (en) Component library generation method and device, storage medium and electronic equipment
US20210074265A1 (en) Voice skill creation method, electronic device and medium
CN114997117A (en) Document editing method, device, terminal and non-transitory storage medium
CN117539975A (en) Method, device, equipment and medium for generating prompt word information of large language model
CN114911541B (en) Processing method and device of configuration information, electronic equipment and storage medium
CN111061466A (en) Automatic conversion method, system, terminal and medium of behavior control scripting language
CN113642295B (en) Page typesetting method, device and computer program product
CN110275735A (en) A kind of interface configuration method, device, terminal and storage medium
CN110647327A (en) Method and device for dynamic control of user interface based on card
CN113110829B (en) Multi-UI component library data processing method and device
US20220284371A1 (en) Method, device and medium for a business function page
CN115629763A (en) Target code generation method and NPU instruction display method and device
CN117015781A (en) Generating a natural language interface from a graphical user interface
CN112100553B (en) Webpage configuration method and device, electronic equipment and storage medium
CN114625379A (en) H5 project source code generation method and H5 project source code development system
CN113849164A (en) Data processing method and device, electronic equipment and memory
CN109857503B (en) Page interaction effect self-adaption method and device and electronic equipment
CN114218166A (en) Data processing method and device, electronic equipment and readable storage medium

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
GR01 Patent grant
GR01 Patent grant