Functional interface generation method and device, equipment and storage medium
By retrieving and configuring functional unit components from the preset component library, a product control interface that meets product functional needs is generated, which solves the problems of high development costs and low efficiency in traditional development methods, and achieves the effect of simplifying development and improving efficiency.
Patent Information
- Application Number
- CN202411769528.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional functional interface development methods require separate design and code for each product, resulting in high development costs, difficulty in maintenance and inefficiency.
By responsive to the received product functional requirements, matching functional unit components are retrieved from the preset component library and configured with unified protocol parameters to generate a product control interface that meets product functional requirements.
It simplifies the workload of functional interface development for different products, improves development efficiency, and makes the functions of product control interface flexible and configurable.
Smart Images

Figure CN119473296A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of functional interface development, and in particular to a functional interface generation method, device, equipment and storage medium. Background Art
[0002] With the popularity of electronic devices and smart devices, the control methods and user interface designs of different products are becoming more and more complicated. Traditional development methods usually require separate design and coding for each product, which not only increases development costs, but also easily leads to maintenance difficulties and low efficiency. Therefore, there is an urgent need for a universal method to simplify and accelerate the control method development and UI design process for different products. Summary of the invention
[0003] The purpose of the present invention is to at least provide a method, device, equipment and storage medium for generating a functional interface, which can at least reduce the development workload of product control interfaces for different products and improve development efficiency.
[0004] To solve the above technical problems, at least one embodiment of the present application provides a method for generating a functional interface, comprising:
[0005] In response to the received product function requirement, a function unit component matching the product function requirement is retrieved from a preset component library, wherein the component library includes a plurality of function unit components;
[0006] Configuring unified protocol parameters for the retrieved functional unit components;
[0007] A product control interface that meets the product function requirements is generated according to the functional unit component that has completed the configuration of the protocol parameters.
[0008] In some optional embodiments, the generating of a product control interface that meets the product function requirements according to the functional unit component that completes the configuration of the protocol parameters includes:
[0009] Sorting the functional unit components that have completed configuring the protocol parameters;
[0010] According to the order of the functional unit components that have completed the configuration of the protocol parameters, the function icons corresponding to the functional unit components are sequentially filled in the initial interface to generate the product control interface.
[0011] In some optional embodiments, the sorting of the functional unit components that have completed the configuration of the protocol parameters includes:
[0012] Perform a first sorting according to the names of the functional unit components that have completed the configuration of the protocol parameters or the sizes of the function icons corresponding to the functional unit components;
[0013] Counting the usage frequency of each of the functional unit components that completes the configuration of the protocol parameters;
[0014] On the basis of the first sorting, a second sorting is performed according to the usage frequency of each of the functional unit components that have completed the configuration of the protocol parameters.
[0015] In some optional embodiments, the function interface generating method further includes: providing a frequently used area in the product control interface, wherein the frequently used area is an area in the product control interface that is easy for a user to click.
[0016] In some optional embodiments, the function interface generation method further includes: hiding function icons in the product control interface whose usage frequency is lower than a preset frequency threshold.
[0017] In some optional embodiments, the function interface generation method further includes: in response to a drag operation on a target function icon in the product control interface, moving the target function icon to change a position of the target function icon in the product control interface.
[0018] In some optional embodiments, the function interface generation method also includes: in response to a selection instruction of a target function icon in the product control interface, displaying an icon setting interface of the target function icon, the icon setting interface including icon display settings, icon position settings and icon size settings.
[0019] At least one embodiment of the present application further provides a functional interface generating device, including:
[0020] A retrieval module, configured to retrieve, in response to a received product function requirement, a function unit component matching the product function requirement from a preset component library, wherein the component library includes a plurality of function unit components;
[0021] A configuration module, used to configure unified protocol parameters for the retrieved functional unit components;
[0022] The interface generation module is used to generate a product control interface that meets the product function requirements according to the functional unit components that have completed the configuration of the protocol parameters.
[0023] At least one embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned functional interface generation method.
[0024] At least one embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned function interface generation method when executed by a processor.
[0025] The embodiments of the present application provide a method, device, equipment and storage medium for generating a functional interface. In response to received product functional requirements, a functional unit component matching the product functional requirements is retrieved from a preset component library, wherein the component library includes multiple functional unit components; and a unified protocol parameter is configured for the retrieved functional unit component to ensure that the functional unit component can be reused, and then a product control interface that meets the product functional requirements can be generated according to the functional unit component that has completed the configuration of the protocol parameters, ensuring that the user can control the functions of different devices through a unified interface. The present application can simplify the development workload of product control interfaces for different products and improve development efficiency, and the functions of the product control interface can be set according to the product functional requirements, thereby improving the flexibility of the product control interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0027] Figure 1 is a flow chart of a method for generating a functional interface provided by an embodiment of the present application;
[0028] Figure 2 It is a schematic diagram of a functional interface generating device provided in another embodiment of the present application. DETAILED DESCRIPTION
[0029] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0030] In order to facilitate understanding of the embodiments of the present application, relevant content about product user interface design is first introduced here.
[0031] With the popularity of electronic devices and smart devices, the control methods and user interface designs of different products have become increasingly complex. Traditional development methods usually require separate design and coding for each product, which not only increases development costs, but also easily leads to maintenance difficulties and inefficiency.
[0032] In order to solve the above-mentioned traditional development method, which usually requires separate design and code writing for each product, which not only increases the development cost, but also easily leads to technical problems such as difficult maintenance and low efficiency, the present invention proposes a function interface generation method, device, equipment and storage medium. The implementation details of the function interface method of this embodiment are specifically described below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for the implementation of this solution.
[0033] Embodiment 1:
[0034] The functional interface generation method of this embodiment can be applied to electronic devices with communication, computing and data storage capabilities. The specific process can be as follows: Figure 1 As shown, including:
[0035] Step S11, in response to the received product function requirement, retrieve a function unit component matching the product function requirement from a preset component library, wherein the component library includes a plurality of function unit components.
[0036] Specifically, the functional unit components included in the component library are components corresponding to the smallest functional units that divide the functions of the device, and each functional unit component has independent functions and interface definitions under the same protocol. For example, the functional unit components of air-conditioning equipment include switch components, refrigeration components, heating components, dehumidification components, light switch components, heating components, cooling components, timing components, etc., and the functional unit components of smart light devices include light switch components, dimming components, and light color adjustment components, etc. Therefore, the functional unit components of different products can also be used to control the same functions in other products. For example, the light switch component of air-conditioning equipment can also be used to realize the light switch function of smart light devices.
[0037] Step S12: configuring unified protocol parameters for the retrieved functional unit components.
[0038] Specifically, a unified protocol such as MQTT protocol, HTTP protocol or custom protocol is adopted to configure unified protocol parameters for the retrieved functional unit components to ensure that the communication format and data structure of the instructions issued by each functional unit component are consistent. For example, data exchange can be carried out in json format, and the field "devType" is required to indicate the device type, the field "controlType" indicates the control type, and the field "operation" indicates the specific operation, so as to ensure that the functional unit components can be reused.
[0039] Step S13 generates a product control interface that meets the product function requirements according to the functional unit components that have completed the configuration of the protocol parameters.
[0040] For example, the component library includes components corresponding to the smallest functional unit of the air conditioner, such as switch components, refrigeration components, heating components, dehumidification components, light switch components, heating components, cooling components, timing components, etc. At this time, the product function requirement is a functional interface with a switch function, a timing function, a heating function, and a cooling function to control the water heater. The switch component, heating component, cooling component and timing component corresponding to the air conditioner can be retrieved from the component library according to the product function requirement, and then the retrieved functional unit components are uniformly configured with protocol parameters. Then, the water heater control interface that meets the water heater function requirements can be generated according to the functional unit components that have completed the configuration of the protocol parameters.
[0041] When new functions appear after product updates, you only need to add functional unit components corresponding to the new functions on the basis of the original product control interface, and then update the original product control interface. For example, the original electric heater already has power adjustment and timing functions, and the newly released electric heater adds the function of automatic power adjustment on the basis of the original functions. For the development of the control interface of the newly released electric heater, you can only add the product function requirement of automatic power adjustment on the basis of the functional unit components used in the original electric heater control interface, and then complete the development of the control interface of the newly released electric heater.
[0042] In some embodiments, step S13 includes:
[0043] Step S131, sorting the functional unit components that have completed the configuration of the protocol parameters.
[0044] Specifically, there is an initial interface template, and the positions of the function icons on the initial interface template are fixed. After the function unit components of the protocol parameters are configured, the function icons corresponding to these function unit components can be filled in order according to the initial interface template.
[0045] In some examples, a first sorting may be performed according to the name of the functional unit component that completes the configuration of the protocol parameters or the size of the function icon corresponding to the functional unit component; the usage frequency of each of the functional unit components that completes the configuration of the protocol parameters is counted; and on the basis of the first sorting, a second sorting may be performed according to the usage frequency of each of the functional unit components that completes the configuration of the protocol parameters.
[0046] Step S132, filling in the function icons corresponding to the function unit components in sequence in the initial interface according to the order of the function unit components that have completed the configuration of the protocol parameters, and generating the product control interface.
[0047] In some embodiments, the function interface generation method further includes: hiding function icons in the product control interface whose usage frequency is lower than a preset frequency threshold.
[0048] Specifically, there is a risk that infrequently used function icons may be accidentally touched by the user. By hiding the infrequently used function icons, accidental touching by the user can be avoided.
[0049] In some embodiments, the function interface generation method further includes: in response to a drag operation on a target function icon in the product control interface, moving the target function icon to change a position of the target function icon in the product control interface.
[0050] Specifically, the function icons in the product control interface can be moved and repositioned by the user.
[0051] In some embodiments, the function interface generation method also includes: in response to a selection instruction of a target function icon in the product control interface, displaying an icon setting interface of the target function icon, the icon setting interface including icon display settings, icon position settings and icon size settings.
[0052] Specifically, the function icons in the product control interface can be changed by the user in terms of icon position, display status, and icon size.
[0053] In some embodiments, the function interface generating method further includes: providing a frequently used area in the product control interface, wherein the frequently used area is an area in the product control interface that is easy for a user to click.
[0054] Specifically, for example, in the product control interface on a mobile phone, most users are accustomed to using their right thumb to click on the function icons on the product control interface. However, when the right hand holds the mobile phone normally, the thumb's click range is limited and cannot cover the entire screen, making operation inconvenient. By setting a commonly used area in the product control interface, the commonly used area is an area in the product control interface that is easy for users to click. For example, if a user is accustomed to using the right thumb, the screen range that can be clicked by the right thumb can be used as the commonly used area, and commonly used function icons can be placed in the commonly used area to facilitate user operation.
[0055] In this embodiment, in response to the received product function requirements, a function unit component matching the product function requirements is retrieved from a preset component library, wherein the component library includes multiple function unit components; and a unified protocol parameter is configured for the retrieved function unit component to ensure that the function unit component can be reused, and then a product control interface that meets the product function requirements can be generated according to the function unit component that has completed the configuration of the protocol parameters, ensuring that the user can control the functions of different devices through a unified interface. In this way, the development workload of the product control interface for different products can be simplified, the development efficiency can be improved, and the functions of the product control interface can be set according to the product function requirements, which improves the flexibility of the product control interface.
[0056] Embodiment 2:
[0057] Another embodiment of the present application relates to a functional interface generation device. The implementation details of the functional interface device of this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details, and is not necessary for the implementation of this solution. The schematic diagram of the functional interface generation device of this embodiment can be as follows Figure 2 As shown, it includes a retrieval module 201, a configuration module 202 and an interface generation module 203.
[0058] The retrieval module 201 is used to retrieve a functional unit component matching the product functional requirement from a preset component library in response to the received product functional requirement, wherein the component library includes a plurality of functional unit components.
[0059] Specifically, the functional unit components included in the component library are components corresponding to the smallest functional units that divide the functions of the device, and each functional unit component has independent functions and interface definitions under the same protocol. For example, the functional unit components of air-conditioning equipment include switch components, refrigeration components, heating components, dehumidification components, light switch components, heating components, cooling components, timing components, etc., and the functional unit components of smart light devices include light switch components, dimming components, and light color adjustment components, etc. Therefore, the functional unit components of different products can also be used to control the same functions in other products. For example, the light switch component of air-conditioning equipment can also be used to realize the light switch function of smart light devices.
[0060] The configuration module 202 is used to configure unified protocol parameters for the retrieved functional unit components.
[0061] Specifically, a unified protocol such as MQTT protocol, HTTP protocol or custom protocol is adopted to configure unified protocol parameters for the retrieved functional unit components to ensure that the communication format and data structure of the instructions issued by each functional unit component are consistent. For example, data exchange can be carried out in json format, and the field "devType" is required to indicate the device type, the field "controlType" indicates the control type, and the field "operation" indicates the specific operation, so as to ensure that the functional unit components can be reused.
[0062] The interface generation module 203 is used to generate a product control interface that meets the product function requirements according to the functional unit components that have completed the configuration of the protocol parameters.
[0063] For example, the component library includes components corresponding to the smallest functional unit of the air conditioner, such as switch components, refrigeration components, heating components, dehumidification components, light switch components, heating components, cooling components, timing components, etc. At this time, the product function requirement is a functional interface with a switch function, a timing function, a heating function, and a cooling function to control the water heater. The switch component, heating component, cooling component and timing component corresponding to the air conditioner can be retrieved from the component library according to the product function requirement, and then the retrieved functional unit components are uniformly configured with protocol parameters. Then, the water heater control interface that meets the water heater function requirements can be generated according to the functional unit components that have completed the configuration of the protocol parameters.
[0064] When new functions appear after product updates, you only need to add functional unit components corresponding to the new functions on the basis of the original product control interface, and then update the original product control interface. For example, the original electric heater already has power adjustment and timing functions, and the newly released electric heater adds the function of automatic power adjustment on the basis of the original functions. For the development of the control interface of the newly released electric heater, you can only add the product function requirement of automatic power adjustment on the basis of the functional unit components used in the original electric heater control interface, and then complete the development of the control interface of the newly released electric heater.
[0065] In some embodiments, the product control interface that meets the product function requirements is generated according to the functional unit components that have completed the configuration of the protocol parameters, including: sorting the functional unit components that have completed the configuration of the protocol parameters; filling in the function icons corresponding to the functional unit components in sequence in the initial interface according to the sorting of the functional unit components that have completed the configuration of the protocol parameters, to generate the product control interface.
[0066] Specifically, there is an initial interface template, and the positions of the function icons on the initial interface template are fixed. After the function unit components of the protocol parameters are configured, the function icons corresponding to these function unit components can be filled in order according to the initial interface template.
[0067] In some examples, a first sorting may be performed according to the name of the functional unit component that completes the configuration of the protocol parameters or the size of the function icon corresponding to the functional unit component; the usage frequency of each of the functional unit components that completes the configuration of the protocol parameters is counted; and on the basis of the first sorting, a second sorting may be performed according to the usage frequency of each of the functional unit components that completes the configuration of the protocol parameters.
[0068] In some embodiments, the interface generation module 203 is further used to hide function icons in the product control interface whose usage frequency is lower than a preset frequency threshold.
[0069] Specifically, there is a risk that infrequently used function icons may be accidentally touched by the user. By hiding the infrequently used function icons, accidental touching by the user can be avoided.
[0070] In some embodiments, the interface generation module 203 is further configured to move the target function icon in response to a drag operation on the target function icon in the product control interface to change the position of the target function icon in the product control interface.
[0071] Specifically, the function icons in the product control interface can be moved and repositioned by the user.
[0072] In some embodiments, the interface generation module 203 is also used to respond to a selection instruction of a target function icon in the product control interface to display an icon setting interface of the target function icon, wherein the icon setting interface includes icon display settings, icon position settings and icon size settings.
[0073] Specifically, the function icons in the product control interface can be changed by the user in terms of icon position, display status, and icon size.
[0074] In some embodiments, the interface generation module 203 is further used to set a commonly used area in the product control interface, and the commonly used area is an area in the product control interface that is easy for users to click.
[0075] Specifically, for example, in the product control interface on a mobile phone, most users are accustomed to using their right thumb to click on the function icons on the product control interface. However, when the right hand holds the mobile phone normally, the thumb's click range is limited and cannot cover the entire screen, making operation inconvenient. By setting a commonly used area in the product control interface, the commonly used area is an area in the product control interface that is easy for users to click. For example, if a user is accustomed to using the right thumb, the screen range that can be clicked by the right thumb can be used as the commonly used area, and commonly used function icons can be placed in the commonly used area to facilitate user operation.
[0076] In this embodiment, in response to the received product function requirements, a function unit component matching the product function requirements is retrieved from a preset component library, wherein the component library includes multiple function unit components; and a unified protocol parameter is configured for the retrieved function unit component to ensure that the function unit component can be reused, and then a product control interface that meets the product function requirements can be generated according to the function unit component that has completed the configuration of the protocol parameters, ensuring that the user can control the functions of different devices through a unified interface. In this way, the development workload of the product control interface for different products can be simplified, the development efficiency can be improved, and the functions of the product control interface can be set according to the product function requirements, which improves the flexibility of the product control interface.
[0077] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0078] Embodiment three:
[0079] Another embodiment of the present application relates to an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the functional interface generation method in the above-mentioned embodiments.
[0080] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0081] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0082] Embodiment 4:
[0083] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0084] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.
[0085] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A method for generating a functional interface, characterized in that: include: In response to the received product function requirement, a function unit component matching the product function requirement is retrieved from a preset component library, wherein the component library includes a plurality of function unit components; Configuring unified protocol parameters for the retrieved functional unit components; A product control interface that meets the product function requirements is generated according to the functional unit component that has completed the configuration of the protocol parameters.
2. The method for generating a functional interface according to claim 1, characterized in that: The generating of a product control interface that meets the product function requirements according to the functional unit component that completes the configuration of the protocol parameters includes: Sorting the functional unit components that have completed configuring the protocol parameters; According to the order of the functional unit components that have completed the configuration of the protocol parameters, the function icons corresponding to the functional unit components are sequentially filled in the initial interface to generate the product control interface.
3. The method for generating a functional interface according to claim 2, characterized in that: The step of sorting the functional unit components that have completed configuring the protocol parameters includes: Perform a first sorting according to the names of the functional unit components that have completed the configuration of the protocol parameters or the sizes of the function icons corresponding to the functional unit components; Counting the usage frequency of each of the functional unit components that completes the configuration of the protocol parameters; On the basis of the first sorting, a second sorting is performed according to the usage frequency of each of the functional unit components that have completed the configuration of the protocol parameters.
4. The method for generating a functional interface according to claim 1, characterized in that: Also includes: A frequently used area is provided in the product control interface, and the frequently used area is an area in the product control interface that is easy for a user to click.
5. The method for generating a functional interface according to claim 1, characterized in that: Also includes: Function icons in the product control interface whose usage frequency is lower than a preset frequency threshold are hidden.
6. The method for generating a functional interface according to any one of claims 2 to 5, characterized in that: Also includes: In response to a drag operation on a target function icon in the product control interface, the target function icon is moved to change a position of the target function icon in the product control interface.
7. The method for generating a functional interface according to any one of claims 2 to 5, characterized in that: Also includes: In response to an instruction to select a target function icon in the product control interface, an icon setting interface of the target function icon is displayed, and the icon setting interface includes icon display settings, icon position settings, and icon size settings.
8. A functional interface generating device, characterized in that: include: A retrieval module, configured to retrieve, in response to a received product function requirement, a function unit component matching the product function requirement from a preset component library, wherein the component library includes a plurality of function unit components; A configuration module, used to configure unified protocol parameters for the retrieved functional unit components; The interface generation module is used to generate a product control interface that meets the product function requirements according to the functional unit components that have completed the configuration of the protocol parameters.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the function interface generation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the function interface generation method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Internet-of-Things plug-in realization method and device and terminal
CN108170429A
Intelligent device function page configuration method, server and client
CN113590101A
Equipment control application generation method, electronic equipment and computer storage medium
CN116360755A
Configuration development and configuration method, device and terminal
CN117453275A