CN115237396A - Dynamic form construction method, construction device, computer equipment and medium - Google Patents

Dynamic form construction method, construction device, computer equipment and medium Download PDF

Info

Publication number
CN115237396A
CN115237396A CN202210861721.6A CN202210861721A CN115237396A CN 115237396 A CN115237396 A CN 115237396A CN 202210861721 A CN202210861721 A CN 202210861721A CN 115237396 A CN115237396 A CN 115237396A
Authority
CN
China
Prior art keywords
equipment
monitored
data
item
object model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210861721.6A
Other languages
Chinese (zh)
Inventor
文亚美
王仲远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202210861721.6A priority Critical patent/CN115237396A/en
Publication of CN115237396A publication Critical patent/CN115237396A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention discloses a dynamic form construction method and a dynamic form construction device based on the Internet of things, wherein the dynamic form construction method provided by one embodiment comprises the following steps: the method comprises the steps of configuring the equipment to be monitored on a front-end configuration page, responding to query operation of the equipment to be monitored to obtain an object model and equipment operation data of the equipment to be monitored, generating form construction data according to the object model and the equipment operation data of the equipment to be monitored, dynamically constructing a form of the equipment to be monitored according to the form construction data by using a preset control component library, and displaying the form on the front-end configuration page. The embodiment provided by the invention can effectively solve the problems of high development cost and difficult operation caused by various types of equipment to be monitored and frequent change of monitoring requirements in the Internet of things platform, effectively improve the development efficiency, and is easy to update and maintain, thereby reducing the development cost and having practical application value.

Description

Dynamic form construction method, construction device, computer equipment and medium
Technical Field
The invention relates to the technical field of the Internet of things, in particular to a dynamic form construction method, a dynamic form construction device, computer equipment and a dynamic form medium based on the Internet of things.
Background
The method comprises the following steps that equipment forms of various types of equipment needing to be accessed in an Internet of things platform are realized, and the functions of the equipment forms comprise: 1. displaying the attribute value of the equipment; 2. controlling an attribute of the device; 3. and submitting form data to a server and the like.
In the related technology, considering that the device form has high reusability in the internet of things platform, the form is usually developed in a customized manner for the access device, when the requirement changes, the code of the internet of things platform needs to be modified, and the internet of things platform needs to be tested and deployed again. Therefore, the problems of low development efficiency, difficult updating, difficult maintenance and high development cost exist.
It is noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure and therefore may include information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In order to solve at least one of the above problems, a first embodiment of the present invention provides a dynamic form construction method based on the internet of things, including:
configuring at least one equipment item of equipment to be monitored on a front-end configuration page, wherein the equipment item comprises an equipment icon, an equipment type and an equipment code;
the method comprises the steps of responding to the operation of a user on an equipment icon of equipment to be monitored to obtain the equipment type and the equipment code of the equipment to be monitored, obtaining an object model of the equipment to be monitored according to the equipment type, and obtaining equipment operation data of the equipment to be monitored according to the equipment code, wherein the object model comprises a data structure representing the equipment to be monitored, each data item of the data structure corresponds to a data control of a preset control library, and the equipment operation data comprises a real-time operation numerical value of each data item of the equipment to be monitored;
and forming form construction data of the equipment to be monitored according to the object model and the equipment operation data, constructing a form of the equipment to be monitored by using a preset control library according to the form construction data, and displaying the form on the front-end configuration page.
Further, the forming of the form construction data of the device to be monitored according to the object model and the device operation data further includes:
generating an equipment form object of each equipment to be monitored according to the equipment code of each equipment to be monitored, wherein the equipment form object comprises an item to be monitored of the equipment to be monitored, and the item to be monitored is at least one item in each data item of the object model;
and synthesizing the object model and the equipment operation data according to the equipment form object to generate form construction data, wherein the form construction data comprises the item to be monitored and a real-time operation numerical value corresponding to the item to be monitored.
Further, the generating the device form object of the device to be monitored according to the device code of each device to be monitored includes:
and screening each data item of the object model according to the data item parameters in the object model to obtain the item to be monitored.
Further, the synthesizing the object model and the device operating data to generate the form build data according to the device form object further comprises:
and classifying and typesetting according to the type of the item to be monitored.
Further, the building the form of the device to be monitored by using a preset control library according to the form building data further includes:
and generating a monitoring item checking rule according to the item to be monitored of the form construction data, wherein the monitoring item checking rule is used for checking the input data of the item to be monitored.
Further, configuring, on the front-end configuration page, an equipment item of at least one equipment to be monitored, where the equipment item includes an equipment icon, an equipment type, and an equipment code, and further includes:
if the equipment to be monitored is of the newly added equipment type, establishing an object model of the equipment to be monitored;
and judging whether each data item of the object model of the equipment to be monitored has a corresponding data control in the control library, and if not, establishing the corresponding data control and storing the data control in the control library.
Further, configuring, on the front-end configuration page, a device item of at least one device to be monitored, where the device item includes a device icon, a device type, and a device code, and further includes:
configuring the equipment to be monitored on the map of the front-end configuration page;
and/or
The equipment item also includes a selectable list of data items including data items of an object model corresponding to the equipment type.
A second embodiment of the present invention provides a dynamic form construction apparatus, including a front-end configuration unit, a control unit, and a form construction unit, wherein the control unit is configured to:
configuring at least one equipment item of equipment to be monitored in a front-end configuration unit, wherein the equipment item comprises an equipment icon, an equipment type and an equipment code;
the method comprises the steps of responding to the operation of a user on an equipment icon of equipment to be monitored to obtain the equipment type and the equipment code of the equipment to be monitored, obtaining an object model of the equipment to be monitored according to the equipment type, and obtaining equipment operation data of the equipment to be monitored according to the equipment code, wherein the object model comprises a data structure representing the equipment to be monitored, each data item of the data structure corresponds to a data control of a preset control library, and the equipment operation data comprises a real-time operation numerical value of each data item of the equipment to be monitored;
and the form construction unit is used for forming form construction data of the equipment to be monitored according to the object model and the equipment operation data, constructing a form of the equipment to be monitored according to the form construction data by using a preset control library, and displaying the form on the front-end configuration unit.
A third embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored which, when executed by a processor, implements the method of the first embodiment.
A fourth embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method of the second embodiment.
The invention has the following beneficial effects:
aiming at the existing problems, the invention provides a dynamic form construction method, a construction device, computer equipment and a readable storage medium based on the Internet of things, wherein the dynamic form construction method configures the equipment to be monitored through a front-end configuration page, responds to the query operation of the equipment to be monitored, generates form construction data according to an object model and equipment operation data of the equipment to be monitored, and dynamically constructs a form of the equipment to be monitored through a preset control component library, so that the form of the equipment to be monitored is dynamically constructed, the development efficiency is high, the form is easy to update and maintain, the development cost can be effectively reduced, the applicability is improved, and the dynamic form construction method has a wide application prospect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a method for dynamic form construction according to one embodiment of the invention;
FIG. 2 is a code structure diagram illustrating properties of an object model according to one embodiment of the invention;
FIG. 3 is a code structure diagram of the device operation data according to an embodiment of the present invention;
FIG. 4 is a code structure diagram of form build data according to an embodiment of the invention;
FIG. 5 is a diagram illustrating a dynamically built form according to one embodiment of the invention;
6a-6c illustrate schematic diagrams of data controls of the integer type according to one embodiment of the invention;
FIGS. 7a-7b are schematic diagrams illustrating a floating point type data control according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating a Boolean-type data control according to one embodiment of the present invention;
FIG. 9 is a diagram illustrating an enumerated type data control according to one embodiment of the present invention;
FIG. 10 is a structural diagram of the dynamic form building apparatus according to an embodiment of the present invention;
fig. 11 shows a schematic structural diagram of a computer device according to another embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the present invention, the present invention is further described below with reference to preferred embodiments and the accompanying drawings. Similar parts in the figures are denoted by the same reference numerals. It is to be understood by persons skilled in the art that the following detailed description is illustrative and not restrictive, and is not to be taken as limiting the scope of the invention.
In view of the above situation, the inventor indicates that the reason that the existing internet of things platform is low in development efficiency is that the form of the device to be monitored is manually and statically customized, and cannot be dynamically constructed.
In light of the above problems and the causes that cause the problems, as shown in fig. 1, an embodiment of the present invention provides a dynamic form construction method, including:
configuring at least one equipment item of equipment to be monitored on a front-end configuration page, wherein the equipment item comprises an equipment icon, an equipment type and an equipment code;
the method comprises the steps of responding to the operation of a user on an equipment icon of equipment to be monitored to obtain the equipment type and the equipment code of the equipment to be monitored, obtaining an object model of the equipment to be monitored according to the equipment type, and obtaining equipment operation data of the equipment to be monitored according to the equipment code, wherein the object model comprises a data structure representing the equipment to be monitored, each data item of the data structure corresponds to a data control of a preset control library, and the equipment operation data comprises a real-time operation numerical value of each data item of the equipment to be monitored;
and forming form construction data of the equipment to be monitored according to the object model and the equipment operation data, constructing a form of the equipment to be monitored by using a preset control library according to the form construction data, and displaying the form on the front-end configuration page.
The embodiment configures the device to be monitored on the front-end configuration page, responds to the query operation of the device to be monitored, generates form construction data according to the object model and the device operation data of the device to be monitored, and dynamically constructs the form of the device to be monitored through the preset control library, so that the dynamic form construction of the device to be monitored is realized, and the method has the advantages of high development efficiency, easiness in updating and maintenance, can effectively reduce development cost, improves applicability, and has wide application prospect.
In a specific example, taking an internet of things platform of a certain park as an example, the internet of things platform needs to process multiple types of devices, control forms of the different types of devices are different, and a description is given by taking a dynamic form of 10 air conditioners for constructing an air conditioner room as an example, and specific implementation steps are as follows:
firstly, configuring at least one equipment item of equipment to be monitored on a front-end configuration page.
In this embodiment, the front-end configuration page includes functions of configuring, modifying, deleting, and presenting the equipment items. The equipment items comprise equipment icons, equipment types and equipment codes, wherein the equipment icons are patterns which visually represent the equipment to be monitored on a front-end configuration page through graphs; each device type corresponds to one device type, each device type comprises an object model preset in the Internet of things platform in advance, the object model comprises an attribute set of the device type, for example, a monitoring item of the device to be monitored, and the object model of the device to be monitored can be obtained by setting the device type of the device to be monitored; the device code is a unique identifier used to characterize a particular device to be monitored.
In this embodiment, the park includes an air conditioner room, contain ten air conditioners that wait to monitor in the air conditioner room, set gradually the equipment icon of every air conditioner at the front end control page, for example "air conditioner icon", the equipment type is "KT", the equipment code is "HPLC00000001" to "HPLC00000010" in proper order. The device type KT correspondingly represents an object model of air-conditioning equipment in the platform of the Internet of things, and the data structure of the attribute set contained in the object model is defined as the following table:
TABLE 1 data Structure definition of object model
Figure BDA0003758848860000051
Figure BDA0003758848860000061
Fig. 2 shows details included in the first attribute "winter supply air temperature setting" of the object model of the air conditioning apparatus according to the present embodiment. The attribute type object comprises an attribute identification id, a description desc, a name, an attribute read-write identification accessMode, an essential attribute isNecessary or not and a data type object (comprising a data type and a data constraint specs). The object model of the air-conditioning equipment comprises an attribute set common to all the air-conditioning equipment, and is preset in the Internet of things platform, and all the attributes of the air-conditioning equipment can be obtained according to the equipment type 'KT'.
As shown in fig. 3, the device code devicid of the first air conditioner of the air conditioner room is set to "HPLC00000001", and the device operation data of the first air conditioner is obtained through the device code, for example, the data value of the first piece of operation data "winter supply air temperature setting" of the first air conditioner is obtained to be "17", and other device operation data. Namely, the equipment operation data of the first air conditioner can be inquired through the equipment code of 'HPLC 00000001'.
In this embodiment, the user completes the configuration of the equipment items of 10 air conditioners by configuring the page at the front end. It is worth mentioning that, through the front-end control page, the user can configure, modify, delete and display the equipment items of each equipment to be monitored, that is, can flexibly operate each equipment to be monitored.
In an optional embodiment, the front-end configuration page is a flat map of a campus, and a user can configure a device to be monitored on the map in a what-you-see-is-what-you-get manner, for example, configure a device item of the device to be monitored on the map, specifically, ten "air conditioner icons" displayed at a location of the air conditioner room indicate that there are ten air conditioner devices to be monitored, and each "air conditioner icon" corresponds to one device item.
It should be noted that the presentation form of the equipment item is not specifically limited in the present application, and those skilled in the art should select an appropriate presentation form according to specific requirements to implement the functions of configuring, modifying, deleting and presenting the equipment item as design criteria, for example, the presentation form includes, but is not limited to, a flat map, a 3D stereo map, a digital companion virtual interface, a two-dimensional data table, a three-dimensional data array, a command line, a search box, a menu user interface, and the like. .
In an optional embodiment, the equipment item further comprises a selectable data item list, and the data item list comprises data items of an object model corresponding to the equipment type. For example, the object model corresponding to the air conditioner in this example includes an operation mode data item, such as cooling or heating, and if the operation mode is not required to be displayed for a single-cooling air conditioner, the data item of the finally constructed form is determined by selecting whether to display the data item. Therefore, in this embodiment, by configuring the selectable data item list of each device to be monitored in the front-end configuration page, the forms constructed by different devices to be monitored have different data items, thereby effectively reducing data redundancy, compressing data volume, reducing interface complexity, and improving system efficiency and operation convenience.
In this embodiment, each data item of the data structure of the object model corresponds to a data control of a preset control library. For example, in the internet of things platform, a control library for displaying each data item of the device to be monitored is previously built in, and the control library includes a plurality of controls for supporting attribute display and control in the object model. The specific implementation method of the control library is not specifically limited in the present application, and those skilled in the art should select an appropriate control library to implement according to the actual application scenario and the specific requirements. In the embodiment, the Vue-Cli framework and the Element UI are selected to realize the function of the control component library, wherein the Vue-Cli framework is based on the scaffold function provided by the Vue framework, the Element UI framework widely used in the technical field of front ends is combined, the interface display and the data logic are decoupled by using a modularized framework, the code complexity and the development cost are effectively reduced, the capacity of increasing the control component library for the type increment of newly-added equipment is realized by means of the advantages of modularized development and the mode of mounting new components, and the control component library has high adaptability and good expandability.
In an optional embodiment, when a device to be monitored of a device type is newly added, an object model is established for the newly added device to be monitored, whether data controls corresponding to all data items of the object model of the newly added device to be monitored are available in the control library is judged, and if the corresponding data controls are lacked in the control library, the corresponding data controls need to be established and stored in the control library.
In a specific example, for example, the newly added device type is a refrigerator, an object model of the refrigerator is first established, a data item of the object model of the refrigerator includes an energy consumption identifier, and a control library does not have a data control corresponding to the energy consumption identifier. Specifically, according to the newly added refrigerator monitoring requirement, the energy consumption identification of each refrigerator device needs to be displayed in the form, for example, light green is used for primary energy consumption, dark green is used for secondary energy consumption, and red is used for tertiary energy consumption. And establishing an object model of the refrigerator equipment, wherein the object model comprises the attribute of the energy consumption identifier, the type of the attribute is enumeration type, the value range is 0 for no energy consumption identifier, 1 for 1-level energy consumption, 2 for 2-level energy consumption, 3 for 3-level energy consumption, and the default value is 0 no energy consumption identifier. Based on the advantages of the modular architecture, the support of the type of the newly added equipment can be realized only by correspondingly adding an energy consumption identification control in the control library to correspond to the energy consumption identification attribute in the object model. In other words, based on the componentized architecture adopted by the embodiment, when the control library needs to be updated, incremental updating is performed on the original basis, the use is flexible and convenient, and the development time and the development cost are reduced.
Further, in the internet of things platform of this embodiment, for data item update of the existing device, data items can also be added according to specific demand increments, and accordingly, incremental update is performed on the control library, for example, an energy consumption identification function is added incrementally. Meanwhile, based on the selectable data item list of the foregoing embodiment, for an existing device that does not need to display an energy consumption identifier, the setting may be performed by selecting the data item list, that is, the energy consumption identifier is not displayed, so that there is no need to modify any code level, for example, the energy consumption identifier is not displayed in a default case, and if the energy consumption identifier needs to be displayed, the energy consumption identifier attribute in the refrigerator object model is selected as a specific energy consumption level. In other words, for the data item update of the newly added device and the existing device, the newly added attribute and the control can be set and updated according to the logic, secondary development, test and deployment of the existing subsystem are not needed, only the object model and the control library need to be established or edited, and any service logic code does not need to be modified, so that the service requirement of the internet of things platform on the update of the existing device type and the newly added device type can be met.
And then, responding to the operation of a user on an equipment icon of one equipment to be monitored to obtain the equipment type and the equipment code of the equipment to be monitored, obtaining the object model of the equipment to be monitored according to the equipment type, and obtaining the equipment running data of the equipment to be monitored according to the equipment code.
In this embodiment, the front-end configuration page presents the device to be monitored by using a device icon in a form of a two-dimensional planar map, and specifically presents a form of the device to be monitored, including various data items, in response to an operation of the device icon of the device to be monitored by a user. Specifically, when the corresponding operation mode of the user on the device icon of the device to be monitored is a click operation, including but not limited to mouse click, touch screen hot spot area click, or keyboard click, in other optional embodiments, for the digital accompanying virtual interface, an operation response can be realized through a handle, a motion sensing mode, a voice control mode, a gesture operation mode, a brain-computer interface mode, an eyeball motion capture mode, and the like; the operation response can be realized by executing instructions for the command line. The operation mode of the device icon of the device to be monitored is not specifically limited, and a person skilled in the art should select an appropriate operation mode according to a specific requirement to select the device icon of the device to be monitored as a design criterion, which is not described herein again.
According to the operation of the equipment icon of the equipment to be monitored, the equipment type and the equipment code of the equipment to be monitored can be obtained, wherein an object model of the equipment to be monitored is obtained through the equipment type, namely, each data item representing the data structure of the equipment to be monitored is obtained through the object model, so that the corresponding data control of a preset control library can be used for presentation; meanwhile, the equipment running data of the equipment to be monitored, namely the real-time running numerical values of all data items of the equipment to be monitored, can be obtained through equipment coding. And finally, forming form construction data of the equipment to be monitored according to the object model and the equipment operation data, constructing a form of the equipment to be monitored by using a preset control library according to the form construction data, and displaying the form on the front-end configuration page.
In this embodiment, an equipment form object of each to-be-monitored equipment is generated according to an equipment code of each to-be-monitored equipment, where the equipment form object includes an item to be monitored of the to-be-monitored equipment, and the item to be monitored is at least one item in each data item of the object model.
Figure BDA0003758848860000091
The items to be monitored of the equipment list comprise WinterTempSp, mode, suplyFanFreq, damperSwitchStatus and RoomHumidity and real-time running data.
Specifically, as shown in fig. 4, the object model and the device operation data are synthesized according to the device form object to generate the form construction data, that is, the object model and the real-time operation value of each specific device to be monitored are merged according to the value of the deviceId field, where the form construction data includes the item to be monitored and the real-time operation value corresponding to the item to be monitored. In the embodiment, by means of synthesizing various items of data of the object model and the device operation data, on one hand, inheritance of public attributes is realized, on the other hand, the specific device attributes of the device can be customized according to specific conditions of the specific device, and the method has high expandability and practicability.
And according to the generated form construction data, constructing the form of the equipment to be monitored by using a preset control library. Specifically, a form of the equipment is constructed by using a corresponding data control in the control library through the item to be monitored in the form construction data; and rendering the form according to the real-time running numerical value of the item to be monitored of the form construction data. As shown in fig. 5, the form of the device to be monitored, which is automatically formed by using the data controls of the control library, includes a plurality of controls to display the air conditioning device to be monitored, and implements dynamic construction of the form, thereby shortening the development cycle and effectively improving the form construction efficiency.
Considering that an object model includes a plurality of developed and to-be-developed data items, in an alternative embodiment, as shown in fig. 2 or fig. 4, each data item of the object model is screened according to a value of a data item parameter isNecessary in the object model to obtain the to-be-monitored item. Furthermore, considering that the object model contains public attributes and private attributes of all similar devices, data item screening can be formed through the isNecessary field, so that the data volume is effectively reduced, the form response speed is increased, and the practicability of the Internet of things platform is improved; meanwhile, a development interface of the object model can be reserved, and real-time updating is easy.
In an optional embodiment, the classification and the typesetting are performed according to the type of the item to be monitored.
In the embodiment, different items to be monitored in the form data are pre-classified, and the data controls of the same type are intensively arranged to realize dynamic typesetting, so that the readability of the control form is effectively improved on one hand, and the operation efficiency of the form is improved on the other hand. As shown in fig. 5, the same type of items to be monitored are collected and typeset, for example, the read-only information is set at the top of the form, the readable and writable text box is set below the read-only information, and the boolean switch is set below the text box.
In an optional embodiment, a monitoring item check rule is generated according to an item to be monitored of the form construction data, and the monitoring item check rule is used for checking input data of the item to be monitored.
In this embodiment, a check rule is formed according to constraint conditions such as a maximum value and a minimum value defined in an item to be monitored, and a check code of the item to be monitored is dynamically generated, for example, a value range of integer data is judged, and if the value range exceeds a range, a corresponding prompt message is positioned through a preset prompt message placeholder, so that the system stability and the usability are effectively improved.
In one particular example, during the form build process:
in the first step, the read-write attribute (accessMode = r) is read-only.
As shown in fig. 5, the read-only device management and control information is set at the top of the form, and the read-only information in the management and control parameters is: for example, indoor temperature, air supply humidity, air supply temperature and unit alarm are placed below equipment management and control information.
Second, the read-write attribute (accessMode = rw | | | w) is displayed as the read-write and write-only attributes, and the attribute type (type) is judged.
As shown in fig. 5, the text box that can be read and written: text boxes such as summer air supply temperature setting, winter air supply temperature setting, fixed frequency of an air supply blower and the like are arranged below the control parameters, and finally switches of Boolean type unit start-stop and fan start-stop states are arranged below the text boxes.
Specifically, as shown in fig. 6a, type = int, the input box is used, and type = Number of the input box of the device includes a minimum value (min), a maximum value (max), and a data step size (step) in a data constraint (iotDataTypeVO) defined in the item to be monitored, so as to form a monitoring item checking rule, and when the input content does not conform to the checking rule, prompt information is displayed, as shown in fig. 6b and fig. 6 c.
Specifically, as shown in fig. 7a, type = float type, and as with int type, an input box is used; meanwhile, a monitoring item check rule is formed according to min, max, step and placeholder of the set input, the check rule is different from the int type, and when the input content does not accord with the check rule, prompt information is displayed, as shown in fig. 7b.
Specifically, type = string type, and as with int type, an input box is used; meanwhile, a monitoring item check rule is formed according to the set data length, and the data length of the input content is checked.
Specifically, as shown in fig. 8, type = bool type, switch switches are used, and data bound by the switches is threshold data in a data constraint (iotDataTypeVO).
Specifically, as shown in fig. 9, type = enum type, a select selector is used, and data in the selector is threshold data in a data constraint (iotDataTypeVO).
Finally, as shown in FIG. 5, the built form is displayed on a front-end configuration page for user monitoring and control. In this embodiment, the form is a page form or a drawer form, and the cancel, reset, refresh, and determine operations are implemented by function keys provided on the form. Specifically, the operation is cancelled, the pop-up window page or the drawer page is used, and the pop-up window page or the drawer page is triggered to be closed after the click operation of a user is responded; resetting operation, namely, the form is reinitialized after the clicking operation of the user is responded, and the data of the form is updated and then reset; refreshing operation, namely acquiring real-time attribute data of the equipment to be monitored after responding to the clicking operation of the user and displaying the real-time attribute data on the form; and determining operation, checking the form after responding to the clicking operation of the user, and sending the data to the equipment to be monitored after the check is passed.
And the form of the air conditioner room to be monitored is constructed, the configuration and query operation of a front-end configuration page of one device to be monitored by a user is responded, form construction data is generated according to the object model and the device operation data of the device to be monitored, and the form of the device to be monitored is dynamically constructed through a preset control library, so that the form of the device to be monitored is dynamically constructed. It should be noted that, in the using process, the internet of things platform responds to the configuration of the device to be monitored on the front-end configuration page by the user and the query of the device to be monitored to construct the form of the device to be monitored, responds to the specific setting of the user on the form, for example, content of a data item displayed by an editing or modifying form, compares the modified content with the original content, and if an update exists, forms an instruction transmitted to the device to be monitored and sends the instruction, thereby implementing remote control of the device to be monitored, that is, implementing monitoring and control of the device to be monitored by the internet of things platform.
Because the management and control operation of the internet of things platform on each device to be monitored is asynchronous operation, the situation that the content set on the form is successfully processed on the internet of things platform but the attribute of the device to be monitored is not changed can occur. For the situation, in this embodiment, a data polling operation is used, when the attribute of the device to be monitored is set or updated on the form, the user is prompted that "the service processing is successful", and if the attribute of the device to be monitored is not changed but the return processing is successful, the user is prompted that "the device instruction is successfully issued", so that whether the setting operation of the user on the form realizes the setting of the device to be monitored is confirmed through the data polling operation, and if the setting operation is not successful, the setting operation is performed again until the setting is successful or an alarm is prompted.
Corresponding to the dynamic form construction method provided in the foregoing embodiment, an embodiment of the present application further provides a dynamic form construction apparatus for implementing the dynamic form construction method, and since the dynamic form construction apparatus provided in the embodiment of the present application corresponds to the dynamic form construction methods provided in the foregoing embodiments, the foregoing embodiment is also applicable to the dynamic form construction apparatus provided in the embodiment, and detailed description is not given in this embodiment.
As shown in fig. 10, an embodiment of the present application further provides a dynamic form building apparatus for implementing the above dynamic form building method, including a front-end configuration unit, a control unit, and a form building unit, where the control unit is configured to:
configuring at least one equipment item of equipment to be monitored in a front-end configuration unit, wherein the equipment item comprises an equipment icon, an equipment type and an equipment code;
the method comprises the steps of responding to the operation of a user on an equipment icon of equipment to be monitored to obtain the equipment type and the equipment code of the equipment to be monitored, obtaining an object model of the equipment to be monitored according to the equipment type, and obtaining equipment operation data of the equipment to be monitored according to the equipment code, wherein the object model comprises a data structure representing the equipment to be monitored, each data item of the data structure corresponds to a data control of a preset control library, and the equipment operation data comprises a real-time operation numerical value of each data item of the equipment to be monitored;
and forming form construction data of the equipment to be monitored according to the object model and the equipment operation data by using the form construction unit, constructing a form of the equipment to be monitored by using a preset control library according to the form construction data, and displaying the form on the front-end configuration unit.
The embodiment configures the device to be monitored in the front-end configuration unit, responds to the query operation of the device to be monitored, generates form construction data through the form construction unit according to the object model and the device operation data of the device to be monitored, and dynamically constructs the form of the device to be monitored by using the preset control library, so that the dynamic form construction of the device to be monitored is realized, the development efficiency is high, the updating and the maintenance are easy, the development cost can be effectively reduced, the applicability is improved, and the method has a wide application prospect.
Another embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements:
configuring at least one equipment item of equipment to be monitored on a front-end configuration page, wherein the equipment item comprises an equipment icon, an equipment type and an equipment code; the method comprises the steps of responding to the operation of a user on an equipment icon of equipment to be monitored to obtain the equipment type and the equipment code of the equipment to be monitored, obtaining an object model of the equipment to be monitored according to the equipment type, and obtaining equipment operation data of the equipment to be monitored according to the equipment code, wherein the object model comprises a data structure representing the equipment to be monitored, each data item of the data structure corresponds to a data control of a preset control library, and the equipment operation data comprises a real-time operation numerical value of each data item of the equipment to be monitored; and forming form construction data of the equipment to be monitored according to the object model and the equipment operation data, constructing a form of the equipment to be monitored by using a preset control library according to the form construction data, and displaying the form on the front-end configuration page.
In practice, the computer readable storage medium may take any combination of one or more computer readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present embodiment, a computer 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. 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 thereof. A computer readable signal medium may be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, 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 computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
As shown in fig. 11, another embodiment of the present invention provides a schematic structural diagram of a computer device. The computer device 12 shown in fig. 11 is only an example and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
As shown in FIG. 11, computer device 12 is embodied in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 11 and commonly referred to as a "hard drive"). Although not shown in FIG. 11, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown in FIG. 11, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be appreciated that although not shown in FIG. 11, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, to name a few.
The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a dynamic form construction method based on the internet of things provided by the embodiment of the present invention.
It should be understood that the above-mentioned embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention, and it will be obvious to those skilled in the art that other variations or modifications may be made on the basis of the above description, and all embodiments may not be exhaustive, and all obvious variations or modifications may be included within the scope of the present invention.

Claims (10)

1. A dynamic form construction method based on the Internet of things is characterized by comprising the following steps:
configuring at least one equipment item of equipment to be monitored on a front-end configuration page, wherein the equipment item comprises an equipment icon, an equipment type and an equipment code;
the method comprises the steps of responding to the operation of a user on an equipment icon of equipment to be monitored to obtain the equipment type and the equipment code of the equipment to be monitored, obtaining an object model of the equipment to be monitored according to the equipment type, and obtaining equipment operation data of the equipment to be monitored according to the equipment code, wherein the object model comprises a data structure representing the equipment to be monitored, each data item of the data structure corresponds to a data control of a preset control library, and the equipment operation data comprises a real-time operation numerical value of each data item of the equipment to be monitored;
and forming form construction data of the equipment to be monitored according to the object model and the equipment operation data, constructing a form of the equipment to be monitored by using a preset control library according to the form construction data, and displaying the form on the front-end configuration page.
2. The method of claim 1, wherein the forming form build data for the device to be monitored from the object model and device operational data further comprises:
generating an equipment form object of each equipment to be monitored according to the equipment code of each equipment to be monitored, wherein the equipment form object comprises an item to be monitored of the equipment to be monitored, and the item to be monitored is at least one item in each data item of the object model;
and synthesizing the object model and the equipment operation data according to the equipment form object to generate form construction data, wherein the form construction data comprises the item to be monitored and a real-time operation numerical value corresponding to the item to be monitored.
3. The method according to claim 2, wherein the generating the device form object of the device to be monitored according to the device code of each device to be monitored comprises:
and screening each data item of the object model according to the data item parameters in the object model to obtain the item to be monitored.
4. The dynamic form construction method of claim 2 wherein the synthesizing the object model and the device operational data to generate the form construction data from the device form object further comprises:
and classifying and typesetting according to the type of the item to be monitored.
5. The method of claim 2, wherein the building the form of the device to be monitored using a preset controls library according to the form building data further comprises:
and generating a monitoring item checking rule according to the item to be monitored of the form construction data, wherein the monitoring item checking rule is used for checking the input data of the item to be monitored.
6. The dynamic form building method according to any one of claims 1-5, wherein the configuring at the front-end configuration page configures a device item of at least one device to be monitored, the device item comprising a device icon, a device type, and a device code further comprises:
if the equipment to be monitored is of the newly-added equipment type, establishing an object model of the equipment to be monitored;
and judging whether each data item of the object model of the equipment to be monitored has a corresponding data control in the control library, and if not, establishing the corresponding data control and storing the data control in the control library.
7. The dynamic form building method of claim 1, wherein configuring, on a front-end configuration page, equipment items of at least one device to be monitored, the equipment items including equipment icons, equipment types, and equipment codes further comprises:
configuring the equipment to be monitored on the map of the front-end configuration page;
and/or
The equipment item also includes a selectable data item list including data items of an object model corresponding to the equipment type.
8. A dynamic form construction apparatus comprising a front-end configuration unit, a control unit, and a form construction unit, wherein the control unit is configured to:
configuring at least one equipment item of equipment to be monitored in a front-end configuration unit, wherein the equipment item comprises an equipment icon, an equipment type and an equipment code;
the method comprises the steps of responding to the operation of a user on an equipment icon of equipment to be monitored to obtain the equipment type and the equipment code of the equipment to be monitored, obtaining an object model of the equipment to be monitored according to the equipment type, and obtaining equipment operation data of the equipment to be monitored according to the equipment code, wherein the object model comprises a data structure representing the equipment to be monitored, each data item of the data structure corresponds to a data control of a preset control library, and the equipment operation data comprises a real-time operation numerical value of each data item of the equipment to be monitored;
and forming form construction data of the equipment to be monitored according to the object model and the equipment operation data by using the form construction unit, constructing a form of the equipment to be monitored by using a preset control library according to the form construction data, and displaying the form on the front-end configuration unit.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-7 when executing the program.
CN202210861721.6A 2022-07-22 2022-07-22 Dynamic form construction method, construction device, computer equipment and medium Pending CN115237396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210861721.6A CN115237396A (en) 2022-07-22 2022-07-22 Dynamic form construction method, construction device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210861721.6A CN115237396A (en) 2022-07-22 2022-07-22 Dynamic form construction method, construction device, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN115237396A true CN115237396A (en) 2022-10-25

Family

ID=83675047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210861721.6A Pending CN115237396A (en) 2022-07-22 2022-07-22 Dynamic form construction method, construction device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN115237396A (en)

Similar Documents

Publication Publication Date Title
CN111931097B (en) Information display method and device, electronic equipment and storage medium
US20130173667A1 (en) Acyclic graph navigator
CN110781067A (en) Method, device, equipment and storage medium for calculating starting time consumption
CN113849175A (en) Code generation method, device, equipment and storage medium
CN111736825B (en) Information display method, device, equipment and storage medium
CN115237396A (en) Dynamic form construction method, construction device, computer equipment and medium
CN110968311A (en) Front-end page construction method and device and electronic equipment
CN114327709A (en) Control page generation method and device, intelligent device and storage medium
KR101957916B1 (en) Building energy simulation server and operation system inculding the same
EP2626783A1 (en) Software generation device, software generation method and program
CN112578961B (en) Application identifier display method and device
CN114968235A (en) Page form generation method and device, computer equipment and storage medium
CN115687704A (en) Information display method and device, electronic equipment and computer readable storage medium
CN113741953A (en) Form processing method and device, electronic equipment and computer storage medium
CN113806556A (en) Method, device, equipment and medium for constructing knowledge graph based on power grid data
CN113434585A (en) Resource saving method and equipment
CN109471410B (en) Dynamic preview generation in a product lifecycle management environment
CN107220045B (en) Station building method, device, equipment and storage medium based on artificial intelligence
KR102567773B1 (en) Log information extraction device and method in combat system system
EP3017355A1 (en) Enriching building information modeling data
CN114969383B (en) Application processing method and device based on zero code development
CN111930451B (en) Display method and device of equipment management system, storage medium and terminal
CN108363619B (en) Service flow control method, server, and computer-readable storage medium
US20240005235A1 (en) Method and system for dynamically recommending commands for performing a product data management operation
JP3168527B2 (en) Air conditioning simulation support system

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