Plug-in generation method, device, equipment and storage medium

By obtaining the list of functions and mutually exclusive relationships of smart home devices in the visual configuration interface, generating configuration files and running the file, the problem of large amount of plug-in development and low efficiency is solved, and the configurationable development of plug-in interface and control logic is realized, saving development costs and improving efficiency.

CN114064023BActive Publication Date: 2025-08-08GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111413114.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2025-08-08
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

There are problems of large development volume and low efficiency during the plug-in development process.

Method used

By obtaining the list of functional data and list of mutually exclusive relationships of the smart home device from the first visual configuration interface, a configuration file is generated, and the file is run to generate the plug-in.

Benefits of technology

It realizes configurable development of plug-in interface and control logic, significantly saving development costs and improving development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064023B_ABST
    Figure CN114064023B_ABST
Patent Text Reader

Abstract

The present application relates to a plug-in generation method, apparatus, device, and storage medium. The method includes obtaining, from a first visual configuration interface, a data list indicating the functions of a smart home device and a mutually exclusive list indicating the mutually exclusive relationships between the functions corresponding to the data list; generating a configuration file corresponding to the data list and the mutually exclusive list; and running the configuration file to generate a plug-in corresponding to the smart home device. Because the functions of the smart home device and the mutually exclusive relationships between the functions can be configured in the visual configuration interface, this solution makes the development of the plug-in interface and control logic configurable and visualizes the development process, thereby significantly saving development costs and improving development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a plug-in generation method, apparatus, device, and storage medium. Background Art

[0002] In recent years, smart homes have begun to emerge and are becoming increasingly popular. A key feature of smart homes is the ability to control smart devices in the home through mobile apps. Controlling smart devices from a phone requires a corresponding interface, so each smart device has a plug-in within the app. However, this involves extensive plug-in development. Summary of the Invention

[0003] The present application provides a plug-in generation method, apparatus, device and storage medium to solve the problems of large development workload and low efficiency in the plug-in development process.

[0004] In a first aspect, a plug-in generation method is provided, comprising:

[0005] Obtaining, from the first visual configuration interface, a data list indicating functions of smart home devices and a mutually exclusive list indicating mutually exclusive relationships between functions corresponding to the data list;

[0006] generating a configuration file corresponding to the data list and the mutually exclusive list;

[0007] Run the configuration file to generate a plug-in corresponding to the smart home device.

[0008] Optionally, running the configuration file to generate a plug-in corresponding to the smart home device includes:

[0009] Obtaining a page template that matches the smart home device;

[0010] The data indicating the data list in the configuration file is injected into the page template, and the data indicating the mutually exclusive list in the configuration file is injected into the state machine to generate the plug-in.

[0011] Optionally, injecting data indicating the data list in the configuration file into the page template includes:

[0012] Obtain the folder storing the page template;

[0013] When the data in the data list is obtained from the configuration file, the data in the data list is downloaded to the folder.

[0014] Optionally, the data list includes:

[0015] a function name and a control field of the function corresponding to the data list, and a type of the function corresponding to the data list;

[0016] The type is used to indicate the display position of the component corresponding to the function on the plug-in.

[0017] Optionally, the mutually exclusive list includes a vertical axis indicating an occurrence condition of a mutually exclusive relationship, and a horizontal axis indicating a display state of the plug-in of a second state of the second function in response to the occurrence condition;

[0018] The mutually exclusive relationship indicates that the first state and the second state of the first function of the smart home device cannot occur at the same time; the first state is any state of the first function, and the second state is any state of the second function.

[0019] Optionally, before injecting the data indicating the mutex list in the configuration file into the state machine, the method further includes:

[0020] The state attributes of the functions of the smart home device are configured in the state machine through the second visual configuration interface.

[0021] Optionally, after running the configuration file to generate a plug-in corresponding to the smart home device, the method further includes:

[0022] Obtaining the identifier of the component being operated in the plug-in;

[0023] Determining the display state of each component in the plug-in through the mutually exclusive list in the state machine of the plug-in and the identifier of the component;

[0024] According to the display status of each component, each component is displayed in the display interface of the plug-in.

[0025] In a second aspect, a plug-in generating device is provided, comprising:

[0026] an acquiring unit, configured to acquire, from the first visual configuration interface, a data list indicating functions of the smart home device and a mutually exclusive list indicating mutually exclusive relationships between the functions corresponding to the data list;

[0027] a generating unit, configured to generate a configuration file corresponding to the data list and the mutually exclusive list;

[0028] The running unit is used to run the configuration file to generate a plug-in corresponding to the smart home device.

[0029] In a third aspect, an electronic device is provided, comprising: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other via the communication bus;

[0030] The memory is used to store computer programs;

[0031] The processor is configured to execute the program stored in the memory to implement the plug-in generation method described in the first aspect.

[0032] In a fourth aspect, a computer-readable storage medium is provided, storing a computer program, wherein when the computer program is executed by a processor, the plug-in generation method described in the first aspect is implemented.

[0033] The technical solution provided by the embodiments of the present application has the following advantages over the prior art: the method provided by the embodiments of the present application obtains, from a first visual configuration interface, a data list indicating the functions of a smart home device and a mutually exclusive list indicating the mutually exclusive relationships between the functions corresponding to the data list; generates a configuration file corresponding to the data list and the mutually exclusive list; and runs the configuration file to generate a plug-in corresponding to the smart home device. Because the functions of the smart home device and the mutually exclusive relationships between the functions can be configured in the visual configuration interface, the present solution makes the development of the plug-in interface and control logic configurable and visualizes the development process, thereby significantly saving development costs and improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0036] Figure 1 This is a flow chart of a plug-in generation method according to an embodiment of the present application;

[0037] Figure 2 This is a screenshot diagram of the functional pool in the embodiment of this application;

[0038] Figure 3 This is a screenshot diagram of a piece of function data in the function pool in an embodiment of the present application;

[0039] Figure 4 This is a screenshot diagram of the data list in the embodiment of the present application;

[0040] Figure 5 This is a schematic diagram of the principle of a mutually exclusive list in an embodiment of the present application;

[0041] Figure 6 This is a structural diagram of the second visual configuration interface in an embodiment of the present application;

[0042] Figure 7 This is a schematic diagram of the structure of the plug-in generating device in an embodiment of the present application;

[0043] Figure 8 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0044] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0046] The embodiment of the present application provides a plug-in generation method, which can be applied to any electronic device;

[0047] The electronic devices described in the embodiments of the present application may include smart phones (such as Android phones, iOS phones, Windows Phone phones, etc.), tablet computers, PDAs, laptops, video matrices, monitoring platforms, mobile Internet devices (MIDs) or wearable devices, etc. The above are only examples and not exhaustive, including but not limited to the above devices. Of course, the above electronic devices can also be servers, for example, cloud servers.

[0048] like Figure 1 , the method may include the following steps:

[0049] Step 101: Obtain, from a first visual configuration interface, a data list indicating functions of smart home devices and a mutually exclusive list indicating mutually exclusive relationships between functions corresponding to the data list.

[0050] In the application, the functions of smart home devices are the functions that can be realized by smart home devices. Taking air conditioners as an example, the functions of air conditioners can include auxiliary heating, power on, power off, fan speed, etc.

[0051] In this embodiment, the data list includes the function name, control field, and type of the function corresponding to the data list; the type is used to indicate the display position of the component corresponding to the function on the plug-in.

[0052] In this embodiment, a function pool is pre-established for the functions of different smart home devices, so the user can indicate a data list of the functions of the smart home devices from the function pool list displayed in the first visual configuration interface.

[0053] In applications, a function pool is a collection of all the functions of a product category. For example, the function pool for household cabinet air conditioners would include all the functions of household cabinet air conditioners. These functions are continuously accumulated and updated in the database. Once the function pool is complete, it is equivalent to having all the functions developed. Subsequent products only need to select the corresponding functions from the function pool to combine them. This avoids the repeated development of the same function.

[0054] Please refer to Figure 2 , Figure 2 This is a screenshot diagram of the function pool shown in this embodiment. Each piece of data in the function pool represents a function of the smart home device. Each piece of data has information such as function name, identifier, field name of the control field, type, and status summary. The function name is used to uniquely identify the function; the identifier is used to indicate the type of the function. It should be understood that different functions may have the same type. For example, the types of the power query and light functions are the same type; the field name is the name of the control field. The control field is a field specified by the wifi module. The status of the function can be obtained through the control field; the type is used to indicate the location where the component corresponding to the function is displayed; the status summary is used to indicate the different states of the function.

[0055] Please refer to Figure 3 , Figure 3 This is a screenshot diagram of a piece of function data in the function pool shown in this embodiment. Figure 3As shown, for the light function, its identifier is Lig, the control field is Lig, the type is advanced button, and the status briefly indicates that this function has two states, namely the default state and the on state, wherein the control field Lig of the default state is 0, and the control field Lig of the on state is 1, that is, when Lig=0, the light is off, and when Lig=1, the light is on.

[0056] Please refer to Figure 4 , Figure 4 This is a screenshot diagram of the data list shown in this embodiment. Figure 4 As shown in the figure, the user has selected temperature control, automatic mode, cooling mode, dehumidification mode, fan mode, and heating mode from the function pool. The field name for temperature control is SetTem, with the identifier Tem; the field name for automatic mode is Mod, with the identifier Mod_auto; the field name for cooling mode is Mod, with the identifier Mod_Cool; the field name for dehumidification mode is Mod, with the identifier Mod_dry; and the field name for fan mode is Mod, with the identifier Mod_fan.

[0057] In this embodiment, the mutually exclusive list includes a vertical axis indicating the occurrence conditions of the mutually exclusive relationship, and a horizontal axis indicating the display state of the second state of the second function in the plug-in in response to the occurrence conditions; the mutually exclusive relationship indicates that the first state and the second state of the first function of the smart home device cannot occur at the same time; the first state is any state of the state of the first function, and the second state is any state of the state of the second function.

[0058] The mutually exclusive relationship between functions can be understood as follows: when function A is turned on, function B needs to perform some other operations; here we take the air conditioner on / off and "auxiliary heating" function as an example: when the air conditioner is turned off, the auxiliary heating needs to be turned off and cannot be turned on again; the configuration example is Figure 5 As shown; As can be seen in the figure, the table is divided into horizontal and vertical axes, which is why it is called a "two-dimensional mutually exclusive table"; the vertical axis is the condition of this mutually exclusive relationship, that is, when the state of the vertical axis is executed, the horizontal axis executes the corresponding operation; the "√" and "×" in the table are the corresponding operations; "√" means off and "×" means hidden; it is understood that: when the power on and off executes the default state (that is, shutdown), the function status of "auxiliary heating" should be closed and hidden (that is, auxiliary heating is turned off and auxiliary heating can no longer be set).

[0059] Step 102: Generate a configuration file corresponding to the data list and the mutex list.

[0060] Step 103: Run the configuration file to generate a plug-in corresponding to the smart home device.

[0061] In this embodiment, since different smart home devices have different design requirements for plug-in pages, the data list in the configuration file is run using a page template that matches the smart home device, and the mutually exclusive list in the configuration file is run using a state machine.

[0062] In a specific embodiment, a page template matching the smart home device is obtained; data indicating a data list in a configuration file is injected into the page template, and data indicating a mutually exclusive list in the configuration file is injected into a state machine to generate a plug-in.

[0063] The main function of the page template is to display the functions configured by the developer, where each advanced function should be displayed, and in what form the mutual exclusion between two buttons should be reflected.

[0064] In this embodiment, different page templates are pre-configured for different types of smart home devices. Therefore, when obtaining a page template that matches a smart home device, the type of the smart home device is first obtained, and then the page template corresponding to the smart home device is obtained based on the type of the smart home device.

[0065] In the application, the types of smart home devices can be refrigerators, air conditioners, electric fans, washing machines, etc.

[0066] In this embodiment, there are two ways of injecting the data indicating the data list in the configuration file into the page template: active injection and passive injection.

[0067] In the active injection method, the template code of the page template calls the data indicating the data list in the configuration file; in the passive injection method, the folder storing the page template is obtained; when the data list data is obtained from the configuration file, the data list data is downloaded to the folder.

[0068] In this embodiment, the state machine is a pre-written method for processing events based on the state. In order for the state machine to be able to identify the state of the function, before injecting the data indicating the mutex list in the configuration file into the state machine, the state attributes of the function of the smart home device can also be configured in the state machine through the second visual configuration interface.

[0069] In an application, the status attribute may include the name of the function, the status value of the function, whether to check the mutually exclusive setting, the button icon, the status icon, etc.

[0070] It should be understood that each function can be refined into different states. For example, the "mode" function of the air conditioner can be further refined into: mode_cooling (state 1), mode_heating (state 2), mode_automatic (state 3), mode_dehumidification (state 4), mode_air supply (state 5), a total of 5 states. After refinement, the "mode" function can be defined, and it can be defined as having 5 states. Each state has a corresponding state name, corresponding copy, corresponding state value, and which state each state should point to, such as Figure 6 As shown in the figure, by writing the page in the figure through js and H5 code, the visualization of the entire definition process is achieved.

[0071] After configuring the various states of the functions in the state machine, you can configure the mutual exclusion between the functions. The mutual exclusion logic has been abstracted, and all mutual exclusion logic is divided into two categories: hidden and closed. The corresponding relationship selected between the functions is actually the mutual exclusion between the different states of each function. For example, the cooling state of "mode" and the high wind state of "wind speed" can choose to be "closed" or "hidden". The specific relationship is also handled by pre-written logic. One advantage of this abstraction is that new functions do not require writing new mutual exclusion code. Instead, you only need to select the corresponding mutual exclusion relationship, and the state machine will automatically perform the calculation. Finally, there is the connection between the page and the state machine. When writing the page code, we will pre-write what functions of the state machine need to be introduced in the page template (find it according to the function ID). Then, when we introduce the functions we defined previously, we will know what specific functions are being introduced and what icons need to be displayed.

[0072] In the technical solution provided by the embodiments of the present application, a data list indicating the functions of a smart home device and a mutually exclusive list indicating the mutually exclusive relationships between the functions corresponding to the data list are obtained from a first visual configuration interface; a configuration file corresponding to the data list and the mutually exclusive list is generated; and the configuration file is executed to generate a plug-in corresponding to the smart home device. Because the functions of the smart home device and the mutually exclusive relationships between the functions can be configured in the visual configuration interface, this solution makes the development of the plug-in interface and control logic configurable and visualizes the development process, thereby significantly reducing development costs and improving development efficiency.

[0073] In another embodiment of the present application, after the plug-in is generated, the state machine can update the page of the plug-in based on the user's operation.

[0074] In a specific embodiment, the identifier of the component being operated in the plug-in is obtained; the display status of each component in the plug-in is determined through the mutually exclusive list and the identifier of the component in the state machine of the plug-in; and each component is displayed in the display interface of the plug-in according to the display status of each component.

[0075] In the application, the state machine can be abstractly understood as a black box. All operations on the page will be processed according to the established rules after entering this box, and then the processed events will be output from the state machine. After the events are parsed, they are fed back to the plug-in page, and the plug-in page is updated according to the results. This whole process completes an operation you have on the plug-in page; the general implementation process is: the operation on the plug-in page will create an event, the event enters the state machine instance, the state machine processes the event, puts it into the event queue (when there are multiple events), takes the event from the head of the queue and parses it, executes the event, outputs the instruction, and updates the status.

[0076] In order to more clearly describe the embodiments of the present application, the present application also provides the following implementation methods:

[0077] This application is used to configure the plug-in, including the visual configuration platform interface, plug-in page templates and state machine code;

[0078] The state machine code is the core point; it can be abstractly understood as a black box. After all operations on the page enter this box, they will be processed according to the established rules. Then, the processed events will be output from the state machine. After the events are parsed, they will be fed back to the page. According to the results, the page will be updated. This whole process completes an operation on your plug-in page. The general implementation process is: the operation on the plug-in page will create an event → the event enters the state machine instance → the state machine processes the event → puts it into the event queue (when there are multiple events) → removes the event from the head of the queue and parses it → executes the event → outputs the instruction → updates the status;

[0079] Different products have different functions. Here we take air conditioner as an example. First define all the functions of the air conditioner, as shown in the figure. Figure 3 As shown in the figure, the light function of the air conditioner is defined, and its identifier is Lig; the control field is Lig (this is the name specified by the wifi module, and the status of the light function can be obtained through this field); its type is advanced function, and it will appear where the advanced function button corresponding to the template is displayed; it has two states: default (i.e. off) and on, corresponding to 0 and 1 of the control field Lig respectively; that is, when Lig = 0, the light is off; when Lig = 1, the light is on; the entire definition process is visual and does not require writing code; by defining each function of the air conditioner in this way, it becomes a function pool of this type of air conditioner;

[0080] Before configuring the plug-in, you need to select the template used by the plug-in. The template is pre-written. Different templates have different UI designs, with different layouts, interactions, and visuals. After selecting the template, define the basic information of the plug-in, such as product model, etc.

[0081] Next, go to the previously defined function pool of this type of air conditioner to select the functions required for this air conditioner; for example, if the developed air conditioner has the functions of power on / off, mode control, and windshield control, then you only need to select these functions from the function pool and add them to this plug-in; Figure 2 and Figure 4 As shown; Figure 2 It is all functions of the function pool; Figure 4 is the selected function;

[0082] After selecting the functions, it is time to configure the mutual exclusion relationship for these functions. The intuitive explanation of mutual exclusion is: when function A is turned on, function B needs to perform some other operations. Here we take the air conditioner on and off and the "auxiliary heat" function as an example: when the air conditioner is turned off, the auxiliary heat needs to be turned off and cannot be turned on again. The configuration example is Figure 5 As shown in the figure, the table is divided into horizontal and vertical axes, which is why it is called a "two-dimensional mutually exclusive table"; the vertical axis is the condition of this mutually exclusive relationship, that is, when the state of the vertical axis is executed, the horizontal axis executes the corresponding operation; the "√" and "×" in the table are the corresponding operations; "√" means off, and "×" means hidden; it can be understood that when the power on and off executes the default state (i.e., shut down), the "auxiliary heating" function should be turned off and hidden (i.e., auxiliary heating is turned off and cannot be set again);

[0083] After configuring the mutual exclusion, the entire plug-in, from the page to the business, has been configured; then download this configuration, put it into the template code and run it; finally, you will get a completed plug-in.

[0084] Based on the same concept, a plug-in generating device is provided in the embodiment of the present application. The specific implementation of the device can be found in the description of the method embodiment part, and the repeated parts will not be repeated. Figure 7 As shown, the device mainly includes:

[0085] An acquiring unit 701 is configured to acquire, from the first visual configuration interface, a data list indicating functions of smart home devices and a mutually exclusive list indicating mutually exclusive relationships between functions corresponding to the data list;

[0086] A generating unit 702 is configured to generate a configuration file corresponding to the data list and the mutex list;

[0087] The running unit 703 is used to run the configuration file to generate a plug-in corresponding to the smart home device.

[0088] Optionally, the running unit 703 is configured to:

[0089] Get page templates that match smart home devices;

[0090] The data indicating the data list in the configuration file is injected into the page template, and the data indicating the mutually exclusive list in the configuration file is injected into the state machine to generate a plug-in.

[0091] Optionally, the running unit 703 is configured to:

[0092] Get the folder where page templates are stored;

[0093] When the data in the data list is obtained from the configuration file, the data in the data list is downloaded to the folder.

[0094] Optionally, the data list includes:

[0095] a function name and a control field of the function corresponding to the data list, and a type of the function corresponding to the data list;

[0096] The type is used to indicate where on the plugin the component corresponding to the function should appear.

[0097] Optionally, the mutual exclusion list includes a vertical axis indicating an occurrence condition of the mutual exclusion relationship, and a horizontal axis indicating a display state of the plug-in in response to the occurrence condition and the second state of the second function;

[0098] The mutually exclusive relationship indicates that the first state and the second state of the first function of the smart home device cannot occur at the same time; the first state is any state of the first function, and the second state is any state of the second function.

[0099] Optionally, the device is further used to:

[0100] Before injecting the data indicating the mutually exclusive list in the configuration file into the state machine, the state attributes of the functions of the smart home device are configured in the state machine through the second visual configuration interface.

[0101] Optionally, the device is further used to:

[0102] After running the configuration file and generating a plug-in corresponding to the smart home device, obtain the identifier of the component being operated in the plug-in;

[0103] Determine the display status of each component in the plug-in through the mutually exclusive list and component identification in the plug-in's state machine;

[0104] Each component is displayed in the display interface of the plug-in according to the display status of each component.

[0105] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Figure 8As shown, the electronic device mainly includes: a processor 801, a memory 802 and a communication bus 803, wherein the processor 801 and the memory 802 communicate with each other via the communication bus 803. The memory 802 stores a program that can be executed by the processor 801, and the processor 801 executes the program stored in the memory 802 to implement the following steps:

[0106] Obtaining, from the first visual configuration interface, a data list indicating functions of the smart home device and a mutually exclusive list indicating mutually exclusive relationships between functions corresponding to the data list;

[0107] Generate configuration files corresponding to data lists and mutex lists;

[0108] Run the configuration file to generate the plug-in corresponding to the smart home device.

[0109] The communication bus 803 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 803 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0110] The memory 802 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor 801.

[0111] The above-mentioned processor 801 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0112] In another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is run on a computer, the computer executes the plug-in generation method described in the above embodiment.

[0113] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions are transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (e.g., a DVD) or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0114] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0115] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A plug-in generation method, characterized in that: include: Obtaining, from the first visual configuration interface, a data list indicating functions of the smart home device and a mutually exclusive list indicating mutually exclusive relationships between the functions corresponding to the data list, wherein the mutually exclusive list includes a vertical axis indicating a condition for occurrence of the mutually exclusive relationship and a horizontal axis indicating a display state of a second state of a second function in a plug-in in response to the condition; the mutually exclusive relationship indicates that a first state and a second state of a first function of the smart home device cannot occur simultaneously; the first state is any state of the first function, and the second state is any state of the second function; when the first function on the vertical axis is in the first state, the second function, which is mutually exclusive with the first state of the first function, is closed and hidden; generating a configuration file corresponding to the data list and the mutually exclusive list; Run the configuration file to generate a plug-in corresponding to the smart home device.

2. The method according to claim 1, characterized in that Running the configuration file to generate a plug-in corresponding to the smart home device includes: Obtaining a page template that matches the smart home device; The data indicating the data list in the configuration file is injected into the page template, and the data indicating the mutually exclusive list in the configuration file is injected into the state machine to generate the plug-in.

3. The method according to claim 2, characterized in that Injecting the data indicating the data list in the configuration file into the page template includes: Obtain the folder storing the page template; When the data in the data list is obtained from the configuration file, the data in the data list is downloaded to the folder.

4. The method according to any one of claims 1 to 3, characterized in that The data list includes: a function name and a control field of the function corresponding to the data list, and a type of the function corresponding to the data list; The type is used to indicate the display position of the component corresponding to the function on the plug-in.

5. The method according to any one of claims 1 to 3, characterized in that The mutual exclusion list includes a vertical axis indicating an occurrence condition of a mutual exclusion relationship, and a horizontal axis indicating a display state of the plug-in of a second state of the second function in response to the occurrence condition; The mutually exclusive relationship indicates that the first state and the second state of the first function of the smart home device cannot occur at the same time; the first state is any state of the first function, and the second state is any state of the second function.

6. The method according to claim 2, characterized in that Before injecting the data indicating the mutex list in the configuration file into the state machine, the method further includes: The state attributes of the functions of the smart home device are configured in the state machine through the second visual configuration interface.

7. The method according to claim 1, characterized in that After running the configuration file to generate a plug-in corresponding to the smart home device, the method further includes: Obtaining the identifier of the component being operated in the plug-in; Determining the display state of each component in the plug-in through the mutually exclusive list in the state machine of the plug-in and the identifier of the component; According to the display status of each component, each component is displayed in the display interface of the plug-in.

8. A plug-in generating device, characterized in that: include: an acquisition unit, configured to acquire, from the first visual configuration interface, a data list indicating functions of the smart home device and a mutually exclusive list indicating mutually exclusive relationships between the functions corresponding to the data list, wherein the mutually exclusive list includes a vertical axis indicating a condition for occurrence of the mutually exclusive relationship and a horizontal axis indicating a display state of the plug-in of a second state of the second function in response to the condition; the mutually exclusive relationship indicates that a first state and a second state of a first function of the smart home device cannot occur simultaneously; the first state is any state of the first function, and the second state is any state of the second function; when the first function on the vertical axis is in the first state, the second function, which is mutually exclusive with the first state of the first function, is closed and hidden; a generating unit, configured to generate a configuration file corresponding to the data list and the mutually exclusive list; The running unit is used to run the configuration file to generate a plug-in corresponding to the smart home device.

9. An electronic device, characterized in that: include: A processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is configured to execute the program stored in the memory to implement the plug-in generation method according to 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 plug-in generation method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Function component generation method and device, storage medium and electronic device

    CN112596815A