CN117873457A - Method, device, equipment and storage medium for generating object model control card - Google Patents

Method, device, equipment and storage medium for generating object model control card Download PDF

Info

Publication number
CN117873457A
CN117873457A CN202311834594.1A CN202311834594A CN117873457A CN 117873457 A CN117873457 A CN 117873457A CN 202311834594 A CN202311834594 A CN 202311834594A CN 117873457 A CN117873457 A CN 117873457A
Authority
CN
China
Prior art keywords
control card
card
object model
terminal
component
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
CN202311834594.1A
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.)
Midea Group Co Ltd
GD Midea Air Conditioning Equipment Co Ltd
Midea Group Shanghai Co Ltd
Original Assignee
Midea Group Co Ltd
GD Midea Air Conditioning Equipment Co Ltd
Midea Group Shanghai 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 Midea Group Co Ltd, GD Midea Air Conditioning Equipment Co Ltd, Midea Group Shanghai Co Ltd filed Critical Midea Group Co Ltd
Priority to CN202311834594.1A priority Critical patent/CN117873457A/en
Publication of CN117873457A publication Critical patent/CN117873457A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of computers, and provides a method, a device, equipment and a storage medium for generating an object model control card, wherein the method comprises the following steps: acquiring information of a terminal of a control card to be generated and an object model description file, wherein the information of the terminal comprises a terminal type; generating an initialization data packet according to the object model description file and the terminal type; performing visualization processing on the initialized data packet to obtain a visual operation interface; the visual operation interface comprises a control card component; updating card event response information in the control card assembly based on an operation instruction of a user on the visual operation interface; based on the updated control card assembly, the resultant model controls the card. By means of the method, the device control card code can be automatically generated according to the object model description information, dependence on a professional development team is reduced, manual coding is reduced, and overall development and maintenance cost is reduced.

Description

Method, device, equipment and storage medium for generating object model control card
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating an object model control card.
Background
The object model is a product data model defined by an internet of things platform, and devices with different functions are arranged under the same product, and each device needs to have corresponding control cards in a plurality of terminal systems or a plurality of platforms.
At present, each device needs to develop corresponding interactive card programs at different terminals, which requires professional team to design, so that a great deal of time is required for developing control cards, and the development period of new products is long; and rely on personnel's professional skill for the development threshold becomes high, is unfavorable for controlling the floor use of card.
Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the related art. Therefore, the method for generating the object model control card can automatically generate the equipment control card code according to the object model description information, so that the dependence on professional development teams is reduced, the manual coding is reduced, and the overall development and maintenance cost is reduced.
The application also proposes a generation device, an electronic device, a non-transitory computer readable storage medium and a computer program product of the model control card.
The method for generating the object model control card according to the embodiment of the first aspect of the application comprises the following steps: acquiring information of a terminal of a control card to be generated and an object model description file, wherein the information of the terminal comprises a terminal type; generating an initialization data packet according to the object model description file and the terminal type; performing visualization processing on the initialized data packet to obtain a visual operation interface; the visual operation interface comprises a control card component; updating card event response information in the control card assembly based on an operation instruction of a user on the visual operation interface; based on the updated control card assembly, the resultant model controls the card.
According to the method for generating the object model control card, the initialization data packet can be automatically generated according to the object model description file and the terminal type, and the visual operation interface is generated; the user can conduct instruction operation on the visual operation interface so as to update card event response information in the control card assembly, and finally the object model control card is obtained. By means of the method, the card can be visually edited, dependence on professional development teams is reduced, manual coding is reduced, and overall development and maintenance cost is reduced.
According to one embodiment of the present application, the visualization processing is performed on the initialized data packet to obtain a visualization operation interface, including: and carrying out visualization processing on the initialization data packet to generate a visual operation interface comprising an editing component and a multi-terminal card canvas.
According to one embodiment of the application, the editing component comprises at least one of a text component, a picture component, a state button component, a common button component, a stepping component, a selection component, a sliding bar component, a temperature bar component and a view component; the multi-terminal card canvas has a control card assembly displayed therein.
According to one embodiment of the application, based on the operation instruction of the user to the visual operation interface, updating the card event response information in the control card assembly includes: based on an operation instruction of a user on the visual operation interface, calling an editing component to modify the control card component; wherein modifying includes at least one of adding an event, deleting an event, and adjusting an event parameter; based on the modification in the control card assembly, attribute information and/or action execution information of the event in the object model is adjusted to complete updating of card event response information in the control card assembly.
According to one embodiment of the present application, a product model control card based on an updated control card assembly includes: performing static code inspection and dynamic operation analysis on the updated control card assembly; when the static code inspection and the dynamic operation analysis pass, the product model controls the card.
According to one embodiment of the application, obtaining information of a terminal that is to generate a control card includes: the information of the terminal is determined by the connection state of the connected terminal or the input information of the user.
According to one embodiment of the application, after controlling the card based on the updated control card assembly, the product model includes: uploading the object model control card to a cloud card management background, so that the terminal can download the object model control card through the cloud card management background.
According to one embodiment of the application, after controlling the card based on the updated control card assembly, the product model includes: and sending the object model control card to the terminal for display by the terminal.
According to an embodiment of the second aspect of the present application, an object model control card generating device includes: the system comprises an acquisition module, a control card generation module and a control card generation module, wherein the acquisition module is used for acquiring information of a terminal of the control card to be generated and an object model description file, and the information of the terminal comprises a terminal type; the initialization module is used for generating an initialization data packet according to the object model description file and the terminal type; the visualization module is used for carrying out visualization processing on the initialized data packet to obtain a visual operation interface; the visual operation interface comprises a control card component; the updating module is used for updating and controlling card event response information in the card assembly based on an operation instruction of a user on the visual operation interface; and the generating module is used for controlling the card based on the updated control card assembly and the product model.
The electronic device according to the embodiment of the third aspect of the application comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the generation method of any object model control card when executing the program.
A non-transitory computer readable storage medium according to an embodiment of the fourth aspect of the present application, having stored thereon a computer program which, when executed by a processor, implements a method of generating a model control card as any one of the above.
A computer program product according to an embodiment of a fifth aspect of the present application comprises a computer program which, when executed by a processor, implements a method of generating a model control card as any one of the above.
The above technical solutions in the embodiments of the present application have at least one of the following technical effects:
the method can automatically generate an initialization data packet adapting to the type of the terminal, provide a visual operation interface, reduce the dependence on professional development teams and reduce the development threshold;
the card event response information in the control card assembly can be updated according to the operation instruction of the user on the visual operation interface, and the card is controlled by the automatic product model, so that the manual coding is reduced, and the overall development and maintenance cost is reduced.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
Fig. 1 is a flow chart of a method for generating an object model control card according to an embodiment of the present application;
fig. 2 is a schematic functional architecture diagram in a method for generating an object model control card according to an embodiment of the present application;
fig. 3 is a schematic instruction interaction diagram of a method for generating an object model control card according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a device for generating an object model control card according to an embodiment of the present application;
fig. 5 is a schematic entity structure of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in further detail below with reference to the accompanying drawings and examples. The following examples are illustrative of the present application but are not intended to limit the scope of the present application.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for generating an object model control card according to an embodiment of the present application, where the method for generating an object model control card may include steps 110 to 150, and the steps specifically include:
Step 110: and acquiring terminal information and object model description files of the control card to be generated.
The method for generating the object model control card of the embodiment can be applied to an object model card tool, and the object model card tool can be used as a software program of a client and can be installed in a computer. The control card terminal to be generated may include, but is not limited to, an electronic device such as a smart phone, a smart tablet, a smart watch, etc.
The information of the terminal may include a terminal type. In some embodiments, the information of the terminal may also include information of an operating system, a processor, a memory, a screen, and the like of the terminal.
The object model description file is a basic template of the object model control card. It should be noted that the object model card tool may be provided with a plurality of object model description files in advance for selection by a user.
In some embodiments, there is a correspondence between the object model description file and the terminal information. After the user selects the object model description file, the object model card tool can detect the suitability of the object model description file and the terminal information, and if the object model description file and the terminal information are not suitable, the object model card tool returns error information to remind the user.
Optionally, the object model card tool may also determine terminal information of the control card to be generated, and select an adapted object model description file from preset object model description files according to the terminal information for selection by a user, so as to avoid the user from selecting an unadapted object model description file.
In some embodiments, the terminal information of the control card to be generated may be determined by the connection state of the connected terminals.
For example, the object model card tool detects the connected device, judges whether a terminal of the control card to be generated exists in the connected device, if so, determines the connection state with the terminal of the control card to be generated, and acquires information of the terminal based on the connection state.
In some embodiments, the terminal information of the control card to be generated may be determined by input information of a user.
For example, the object model card tool may determine the information of the terminal by means of manual input by the user.
For example, the cloud card management background may store information of a plurality of terminals, and the object model card tool may retrieve information of a terminal corresponding to the terminal name from the cloud card management background according to the terminal name input by the user.
Step 120: and generating an initialization data packet according to the object model description file and the terminal type.
It should be noted that, the object model description file includes a plurality of preset fields, for example, modules fields, code fields, and the like, and these fields can be adaptively adjusted according to the terminal type and other terminal information, and can be matched to a preset template according to these preset fields, so as to generate an initialization data packet.
The object model description file is code data for realizing general, basic functions in the object model control card, for example, when the object model control card is a music play class, the object model description file may include basic codes for playing music; when the object model control card is a timing class, the object model description file may include a base code for timing.
The initialization data packet is code data for generating a control card assembly and can adapt to terminal information. The adaptation terminal information includes software control and hardware structure of the adaptation terminal.
Adaptation to hardware architecture: the control logic for initializing the data packet needs to be supported by the hardware of the terminal information. For example, the function that can be implemented by the code data in the object model description file is to play music, and the sensor of the terminal that is known through the terminal information includes a touch screen and an acceleration sensor, so that the function that can be implemented by the code data of the generated initialization data packet includes playing music by clicking to confirm or shaking.
Adaptation to software control: the control logic of the initialization data packet cannot be violated with the original control logic of the terminal. For example, the function that can be implemented by the code data in the object model description file is a function of playing music and implementing "pause/play" through one button, and the sensor that knows the terminal through the terminal information includes a touch screen and a first button, whereas the original control logic in the terminal is a function of clicking the button to implement "pause/light screen", so in this case, the function that can be implemented by the code data of the generated initialization data packet includes only a click confirmation manner to play music, and does not include a function of implementing "pause/play" through the button.
Although the control logic of the initialization packet cannot be violated with the original control logic of the terminal, in the subsequent steps, the original control logic of the terminal can be changed by an operation instruction of the user to the visual operation interface.
Step 130: and carrying out visualization processing on the initialized data packet to obtain a visual operation interface.
A visual operation interface can be generated according to the initialization data packet. Wherein the visual operation interface comprises a control card component.
Specifically, the visual operation interface may include a function button and an editor, and optionally, the function button may include uploading, code management, template management, card compiling, card previewing, card debugging, and the like. The editor may include an editing component and a multi-terminal card canvas in which a control card component is generated.
Step 140: based on the operation instruction of the user to the visual operation interface, the card event response information in the card assembly is updated and controlled.
Step 150: based on the updated control card assembly, the resultant model controls the card.
The user can send an operation instruction to the visual operation interface through the editor and the function buttons, and based on the operation instruction of the user to the visual operation interface, card event response information in the control card assembly can be updated. The control card can be automatically generated based on the updated control card component, and the user does not need to knock the code.
By way of example, the operation instructions may include clicking, dragging, entering, etc. operations. For example, the user may select a function button by a click operation.
In some embodiments, the user issues the operation instructions through an editor. For example, by clicking, dragging and other operations, a new event can be added to the control card assembly; alternatively, event parameters may be adjusted for the control card assembly by clicking, inputting, etc.
The card event response information refers to an event that the object model controls the card to execute a specific operation or trigger a specific function when a specific condition is met. These events may be user interactions, system triggers, or other specific conditions.
Alternatively, the card event response information is classified according to a specific condition, and may include response information of a user interaction event, response information of a time event, and response information of a data change time.
Response information of the user interaction event: the object model control card can capture interactive operations of a user, such as mouse clicking, keyboard input, scrolling and the like. When the user performs these operations, the object model control card may respond to the user's operations according to the corresponding events and execute the corresponding logic.
Response information of the time event: the object model control card may trigger a response event based on time. For example, a timer may be set that triggers a particular event after a period of time.
Response information of data change time: when the state of the data changes, the object model control card can detect the changes and trigger corresponding events. For example, when the value of one variable is changed, a corresponding event may be triggered to update other related data or perform a corresponding operation.
It should be noted that, the user's operation instruction for the visual operation interface is essentially to bind the selected attribute change and the action execution information in the object model information with the operation of the object model device.
The embodiment provides a method for generating a control card of an object model, which comprises the following steps: acquiring terminal information and object model description files of a control card to be generated; wherein the information includes a terminal type; generating an initialization data packet according to the object model description file and the terminal type; performing visualization processing on the initialized data packet to obtain a visual operation interface; the visual operation interface comprises a control card component; updating card event response information in the control card assembly based on an operation instruction of a user on the visual operation interface; based on the updated control card assembly, the resultant model controls the card. By means of the mode, the method and the device can automatically generate the initialization data packet adapting to the terminal type, provide a visual operation interface, reduce dependence on professional development teams and reduce development thresholds; the card event response information in the control card assembly can be updated according to the operation instruction of the user on the visual operation interface, and the card is controlled by the automatic product model, so that the manual coding is reduced, and the overall development and maintenance cost is reduced.
Based on any one of the above embodiments, the step of performing visualization processing on the initialization data packet to obtain a visual operation interface may specifically include:
step 131: and carrying out visualization processing on the initialization data packet to generate a visual operation interface comprising an editing component and a multi-terminal card canvas.
In this embodiment, the visual operation interface may include an editor, and the editor may include the visual operation interface and an editing component. The multi-terminal card canvas has a control card assembly displayed therein.
Illustratively, the user may drag an editing component in the editor to the multi-terminal card canvas and generate an association with the control card component by instruction operations to form new card event response information.
The editing component comprises at least one of a text component, a picture component, a state button component, a common button component, a stepping component, a selection component, a sliding bar component, a temperature bar component and a view component.
In some embodiments, the parameters of the text component may include component ID, component type, component style, and component layout.
The component styles may include, among other things, set text content, font size, font color, font style (bolded, tilted, underlined), font position (left aligned, centered, right aligned), transparency, and maximum number of lines of text, etc.
The component layout may include, among other things, relative/absolute layout, whether to spring layout, how to stretch the spring layout, width, height, distance from top, distance from left, etc., adjustable parameters.
Illustratively, table 1 is a description of the text components:
TABLE 1
In some embodiments, parameters of the status button component may include component ID, component type, component status value, component font size, component icon array, and component layout.
The component icon array can comprise adjustable parameters such as text icons, button states, button text colors, frame widths, frame colors, component transparency and the like.
Illustratively, table 2 is a description of the status button assembly:
TABLE 2
In some embodiments, the parameters of the step component may include component ID, component type, component style, and component layout.
The component style may include a component current value, a stepping component maximum value, a stepping component minimum value, a step number increased each time, a width of the button, a height of the button, a plus sign display icon of the button, and a minus sign display icon of the button.
Illustratively, table 3 is a description of the stepping assembly:
TABLE 3 Table 3
In this embodiment, the object model card tool is designed for object model features, such as a text component, a picture component, a state button component, a common button component, a stepping component, a selection component, a sliding bar component, a view component and other editing components, and develops a card by visually dragging the component to a multi-terminal card canvas mode, and component properties and operations are bound by selecting object model parameters.
Based on any of the above embodiments, the step of updating the card event response information in the control card assembly based on the operation instruction of the user to the visual operation interface may specifically include:
step 141: and calling the editing component to modify the control card component based on an operation instruction of the user on the visual operation interface.
Step 142: based on the modification in the control card assembly, attribute information and/or action execution information of the event in the object model is adjusted to complete updating of card event response information in the control card assembly.
Wherein modifying includes at least one of adding an event, deleting an event, and adjusting an event parameter.
For example, when modifying to add an event, the user may select an edit component in the visual operation interface and add a corresponding event to the selected component, i.e. add corresponding card event response information.
For example, when modifying to delete an event, the user may select and delete an event in the control card assembly in the visual operation interface, that is, delete the corresponding card event response information.
For example, when modifying to adjust the event parameters, the user may select a certain event in the control card assembly in the visual operation interface, and adjust the parameter information for the selected event, i.e. configure the corresponding card event response information.
Based on any of the above embodiments, the step of controlling the card by the product model based on the updated control card assembly may specifically include:
step 151: and performing static code inspection and dynamic operation analysis on the updated control card assembly.
Step 152: when the static code inspection and the dynamic operation analysis pass, the product model controls the card.
In this embodiment, when the updated control card assembly is obtained, the compiled content may also be compiled, where the compiled content may include static code checks and dynamic run analyses. When a user clicks a compiling button through the object model card tool, static code checking and dynamic operation analysis can be carried out on the updated control card component, and when the static code checking and the dynamic operation analysis pass, the object model control card is produced. Meanwhile, the object model control card can be pushed to the connected terminal equipment application at the same time, and the card can be previewed and debugged by opening the application in the terminal equipment.
Optionally, in the static code inspection and the dynamic operation analysis, the static code inspection is performed first, if the static code inspection is not passed, an error prompt is given, and the dynamic operation analysis is not performed until the static code inspection is passed. And after the static code is checked to pass, carrying out dynamic operation analysis, giving an error prompt if the dynamic operation analysis is not passed, and controlling the card by the product model if the dynamic operation analysis is passed.
In this embodiment, the object model card tool can compile and check the card code file, and the problem is indicated and reported, and after the compiling, the card code can be debugged by local equipment, so as to ensure the correctness of the card file uploaded to the management background.
Based on any of the above embodiments, the step of controlling the card based on the updated control card assembly and the product model may specifically include at least one of the following:
and 161, uploading the object model control card to a cloud card management background so that the terminal can download the object model control card through the cloud card management background.
And 162, sending the object model control card to the terminal for display by the terminal.
In this embodiment, after the object model card tool generates the object model control card, two ways of obtaining the object model control card by the terminal are provided: the object model card tool uploads an object model control card to a card management background of the cloud, and a terminal downloads a corresponding object model control card from the card management background of the cloud; the other is that the object model card tool directly sends the object model control card to the terminal, and the terminal can render the object model control card according to the object model control card, so that card display is completed.
The cloud card management background can serve as a cloud server and is responsible for storing and releasing various object model control cards. The card management background can receive and store the object model control card uploaded by the object model card tool, and can release the stored object model control card according to the user's wish.
Optionally, the card management background can also perform card audit, namely audit is performed on the object model control card to be released, the release can be performed after the audit passes, and if the audit does not pass, the object model control card cannot be released.
In some embodiments, the object model control card that has been issued also performs an audit, and if the audit of the object model control card that has been issued does not pass, the issuance of the card is withdrawn.
It should be noted that, the data transmission between the object model card tool and the cloud card management background may be through a wireless connection manner. The data transfer between the object model card tool and the terminal may be by way of a wireless connection or a wired connection, for example by way of a universal serial bus (Universal Serial Bus, USB).
Referring to fig. 2, fig. 2 is a schematic functional architecture diagram of a method for generating an object model control card according to an embodiment of the present application.
In this embodiment, the execution subject involved in the method for generating the object model control card includes a card management background 210, an object model card tool 220, and a terminal application 230.
After the object model controls the card to finish local development, the card compiling product can be uploaded and released by the card management background 210, the card can be subjected to version management, and after release, card files can be acquired at a plurality of terminals for rendering and displaying.
The object model card tool 220 can be responsible for importing object model description information, editing visual components, controlling a card by a product model, binding card events, compiling the card, previewing in real time, debugging and the like.
The terminal application 230 is an application program installed on the terminal device, and is a host for controlling the card operation by the object model, and the terminal application 230 can pull the card file from the card management background 210 or load the local file for rendering and displaying.
Specifically, the card management background 210 is used for card uploading, card auditing, card issuing, and the like. The end application 230 includes a card instance and a card engine. Included in the object model card tool 220 is an editor 221 that includes an editing component and a multi-terminal card canvas 222. The editing component comprises a text component, a picture component, a state button component, a common button component, a stepping component, a selection component, a sliding bar component, a temperature bar component and a view component.
The object model card tool 220 has functions of data uploading, code management, template management, card compiling, chip previewing, card debugging, and the like.
The embodiment provides a model card tool for primary development, which can create equipment control cards running on a plurality of terminals or a plurality of platforms, and simultaneously enables non-professional teams to participate in card program development, thereby reducing dependence on professional development teams, reducing manual coding and reducing overall development and maintenance cost; the object model card tool can automatically generate equipment control card codes according to object model description information files, and can realize visual card preview, visual binding attribute change and action execution, object model information editing, card editing, local debugging, code management and online release. Meanwhile, the component style and layout attribute of the equipment control card are designed according to the characteristics of the object model.
Referring to fig. 3, fig. 3 is a schematic instruction interaction diagram of a method for generating an object model control card according to an embodiment of the present application.
In this embodiment, the object model card tool is used as an interaction front end, and a user can select a terminal type and an object model description file in the object model card tool through instruction operation. And the object model card tool generates a card component and a code according to the terminal type and the object model description file, and performs visual editing on the card component. The user can write business control codes through the card model and compile files and codes.
And then, the object model card tool can push the card file to the connected local equipment for debugging, the local equipment is provided with a terminal application, and after the debugging is successful, the object model card tool uploads the card file to a card management background for storage.
The terminal application can acquire the card file from the card management background remotely, load the card file to the rendering engine and finally display the card file on the interface of the terminal application.
The user opens the object model card tool, selects the terminal type when creating a new card, imports the object model description file, matches the object model and the fields in the template to a preset template according to the terminal type and the modules and the codes in the description file, adds and removes related components to the fields in the object model and the template, and displays the components on a multi-terminal card canvas of the editor.
And visually dragging the new component to the canvas according to the service requirement, setting component style and layout attribute information, and writing and modifying service logic codes. The user may select "component" - > "event" - > "add event", i.e. the card event response information may be configured, and selecting attribute change and action execution information from the carried-out model information, so that the card and the operation of the object model equipment can be bound.
The user clicks 'code management' in the object model card tool, and the configured git address can upload the card file to which the equipment belongs to the cloud code warehouse. Clicking 'compiling' in the tool, carrying out static inspection and Javascript operation analysis on the object model control card, giving error prompt if compiling is not passed, simultaneously sending the file PUSH to the connected terminal equipment application, and opening the application to preview and debug the card.
And clicking 'uploading' in the object model card tool by the user, configuring the URL address of the card management background, selecting the appointed equipment, and uploading the object model card to the cloud card management background. The terminal application can acquire the object model control card from the cloud card management background according to the SPID (Service Profile Identifier ), and transmit the object model control card to a built-in rendering engine SDK (Software Development Kit ) to display the card content.
On the other hand, the embodiment of the application provides a device for generating a model control card. Referring to fig. 4, fig. 4 is a schematic structural diagram of an apparatus for generating object model control cards according to an embodiment of the present application. In this embodiment, the generating device of the object model control card may include an acquiring module 410, an initializing module 420, a visualizing module 430, an updating module 440, and a generating module 450. Specifically:
The obtaining module 410 is configured to obtain information of a terminal that generates the control card and an object model description file, where the information of the terminal includes a terminal type.
An initialization module 420, configured to generate an initialization data packet according to the object model description file and the terminal type.
The visualization module 430 is configured to perform visualization processing on the initialized data packet to obtain a visual operation interface; wherein the visual operation interface comprises a control card component.
The updating module 440 is configured to update card event response information in the control card assembly based on an operation instruction of the user to the visual operation interface.
And the generating module 450 is used for controlling the card based on the updated control card assembly and the product model.
Based on any of the embodiments described above, the visualization module 430 may be specifically configured to:
and carrying out visualization processing on the initialization data packet to generate a visual operation interface comprising an editing component and a multi-terminal card canvas.
Based on any of the above embodiments, the editing component includes at least one of a text component, a picture component, a status button component, a normal button component, a step component, a select piece, a slider component, a temperature bar component, and a view component; the multi-terminal card canvas has a control card assembly displayed therein.
Based on any of the embodiments described above, the update module 440 may be specifically configured to: based on an operation instruction of a user on the visual operation interface, calling an editing component to modify the control card component; wherein modifying includes at least one of adding an event, deleting an event, and adjusting an event parameter; based on the modification in the control card assembly, attribute information and/or action execution information of the event in the object model is adjusted to complete updating of card event response information in the control card assembly.
Based on any of the above embodiments, the generating module 450 may specifically be configured to:
performing static code inspection and dynamic operation analysis on the updated control card assembly; when the static code inspection and the dynamic operation analysis pass, the product model controls the card.
Based on any of the above embodiments, the obtaining module 410 may specifically be configured to:
the information of the terminal is determined by the connection state of the connected terminal or the input information of the user.
Based on any of the above embodiments, the generation device of the object model control card may further include a first communication module, where the first communication module may specifically be configured to:
uploading the object model control card to a cloud card management background, so that the terminal can download the object model control card through the cloud card management background.
Based on any of the above embodiments, the generation device of the object model control card may further include a second communication module, where the second communication module may specifically be configured to:
and sending the object model control card to the terminal for display by the terminal.
The embodiment provides a generating device of an object model control card, which comprises: the acquisition module is used for acquiring an information object model description file of a terminal of the control card to be generated; wherein the information includes a terminal type; the initialization module is used for generating an initialization data packet according to the object model description file and the terminal type; the visualization module is used for carrying out visualization processing on the initialized data packet to obtain a visual operation interface; the visual operation interface comprises a control card component; the updating module is used for updating and controlling card event response information in the card assembly based on an operation instruction of a user on the visual operation interface; and the generating module is used for controlling the card based on the updated control card assembly and the product model. The device control card code can be automatically generated according to the object model description information, so that the dependence on a professional development team is reduced, the manual coding is reduced, and the overall development and maintenance cost is reduced.
In yet another aspect, an embodiment of the present application further provides an electronic device. Referring to fig. 5, fig. 5 is a schematic physical structure of an electronic device according to an embodiment of the present application, where the electronic device may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform the following method:
acquiring an information object model description file of a terminal of a control card to be generated; wherein the information includes a terminal type; generating an initialization data packet according to the object model description file and the terminal type; performing visualization processing on the initialized data packet to obtain a visual operation interface; the visual operation interface comprises a control card component; updating card event response information in the control card assembly based on an operation instruction of a user on the visual operation interface; based on the updated control card assembly, the resultant model controls the card.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the related art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In yet another aspect, embodiments of the present application disclose a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the methods provided by the above-described method embodiments, for example comprising:
acquiring information of a terminal of a control card to be generated and an object model description file; wherein the information includes a terminal type; generating an initialization data packet according to the object model description file and the terminal type; performing visualization processing on the initialized data packet to obtain a visual operation interface; the visual operation interface comprises a control card component; updating card event response information in the control card assembly based on an operation instruction of a user on the visual operation interface; based on the updated control card assembly, the resultant model controls the card.
In yet another aspect, embodiments of the present application further provide a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, is implemented to perform the method provided by the above embodiments, for example, comprising:
Acquiring information of a terminal of a control card to be generated and an object model description file; wherein the information includes a terminal type; generating an initialization data packet according to the object model description file and the terminal type; performing visualization processing on the initialized data packet to obtain a visual operation interface; the visual operation interface comprises a control card component; updating card event response information in the control card assembly based on an operation instruction of a user on the visual operation interface; based on the updated control card assembly, the resultant model controls the card.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the related art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that the above embodiments are only for illustrating the present application, and are not limiting of the present application. While the present application has been described in detail with reference to the embodiments, those skilled in the art will understand that various combinations, modifications, or equivalents of the technical solutions of the present application may be made without departing from the spirit and scope of the technical solutions of the present application, and all such modifications are intended to be covered by the claims of the present application.

Claims (12)

1. A method for generating a model control card, comprising:
acquiring information of a terminal of a control card to be generated and an object model description file, wherein the information of the terminal comprises a terminal type;
generating an initialization data packet according to the object model description file and the terminal type;
performing visualization processing on the initialized data packet to obtain a visual operation interface; wherein the visual operation interface comprises a control card component;
updating card event response information in the control card assembly based on an operation instruction of a user on the visual operation interface;
based on the updated control card assembly, the resultant model controls the card.
2. The method for generating object model control cards according to claim 1, wherein the step of performing visualization processing on the initialization data packet to obtain a visual operation interface includes:
And carrying out visualization processing on the initialization data packet to generate a visual operation interface comprising an editing component and a multi-terminal card canvas.
3. The method of claim 2, wherein,
the editing component comprises at least one of a text component, a picture component, a state button component, a common button component, a stepping component, a piece of selection, a sliding bar component, a temperature bar component and a view component; and a control card component is displayed in the multi-terminal card canvas.
4. The method for generating an object model control card according to claim 2, wherein updating card event response information in the control card assembly based on an operation instruction of the user to the visual operation interface comprises:
based on an operation instruction of a user on the visual operation interface, calling the editing component to modify the control card component; wherein modifying includes at least one of adding an event, deleting an event, and adjusting an event parameter;
and adjusting attribute information and/or action execution information of the event in the object model based on the modification in the control card assembly so as to finish updating card event response information in the control card assembly.
5. The method of claim 1, wherein the generating the object model control card based on the updated control card assembly comprises:
performing static code inspection and dynamic operation analysis on the updated control card assembly;
and when the static code inspection and the dynamic operation analysis pass, generating the object model control card.
6. The method for generating object model control cards according to claim 1, wherein the obtaining information of a terminal that is to generate the control card includes:
the information of the terminal is determined by the connection state of the connected terminal or the input information of the user.
7. The method of any one of claims 1 to 6, wherein after generating the object model control card based on the updated control card assembly, the method comprises:
uploading the object model control card to a cloud card management background, so that the terminal can download the object model control card through the cloud card management background.
8. The method of any one of claims 1 to 6, wherein after generating the object model control card based on the updated control card assembly, the method comprises:
And sending the object model control card to a terminal for display by the terminal.
9. A device for generating a model control card, comprising:
the system comprises an acquisition module, a control card generation module and a control card generation module, wherein the acquisition module is used for acquiring information of a terminal of the control card to be generated and an object model description file, and the information of the terminal comprises a terminal type;
the initialization module is used for generating an initialization data packet according to the object model description file and the terminal type;
the visualization module is used for carrying out visualization processing on the initialization data packet to obtain a visual operation interface; wherein the visual operation interface comprises a control card component;
the updating module is used for updating card event response information in the control card assembly based on an operation instruction of a user on the visual operation interface;
and the generating module is used for controlling the card based on the updated control card assembly and the product model.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of generating object model control cards according to any one of claims 1 to 6 when executing the program.
11. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements a method of generating an object model control card according to any of claims 1 to 8.
12. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements a method of generating an object model control card according to any one of claims 1 to 8.
CN202311834594.1A 2023-12-27 2023-12-27 Method, device, equipment and storage medium for generating object model control card Pending CN117873457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311834594.1A CN117873457A (en) 2023-12-27 2023-12-27 Method, device, equipment and storage medium for generating object model control card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311834594.1A CN117873457A (en) 2023-12-27 2023-12-27 Method, device, equipment and storage medium for generating object model control card

Publications (1)

Publication Number Publication Date
CN117873457A true CN117873457A (en) 2024-04-12

Family

ID=90584101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311834594.1A Pending CN117873457A (en) 2023-12-27 2023-12-27 Method, device, equipment and storage medium for generating object model control card

Country Status (1)

Country Link
CN (1) CN117873457A (en)

Similar Documents

Publication Publication Date Title
Mori et al. Tool support for designing nomadic applications
US20130272679A1 (en) Video Generator System
JP5599400B2 (en) Method system and software for providing an image sensor based human machine interface
CN104823158B (en) Method and system for simplified knowledge engineering
CN109032568A (en) Generation method, terminal device and the storage medium of programmed logic
CN110851134A (en) Low-code page design device and page design method
Masiello et al. Mastering React Native
Whiting et al. Creating an iPhone application for collecting continuous ABC data
CN112445564B (en) Interface display method, electronic device and computer readable storage medium
CN111679818A (en) Method and system for editing display software
JP7280388B2 (en) Apparatus and method, equipment and medium for implementing a customized artificial intelligence production line
US20070240131A1 (en) Application prototyping
KR101161946B1 (en) Smart-phone application development system and developing method thereof
Snell et al. Microsoft Visual Studio 2012 Unleashed: Micro Visua Studi 2012 Unl_p2
Eng Qt5 C++ GUI Programming Cookbook: Practical recipes for building cross-platform GUI applications, widgets, and animations with Qt 5
CN116304442A (en) Page code generation method and device, electronic equipment and storage medium
CN112445501A (en) Data burning method and device and computer readable storage medium
US8392151B1 (en) Preview of an object in graphical modeling environments
CN117215556A (en) Modularized page rapid construction method, system, equipment and medium
CN117873457A (en) Method, device, equipment and storage medium for generating object model control card
US20070005811A1 (en) Computer-implemented method, system, and interface for managing commands for a terminal session
Clark et al. Sencha Touch Mobile JavaScript Framework
CN113407078A (en) Method and device for editing character icon, storage medium and terminal
KR101987183B1 (en) Apparatus, method and server for app development supporting front-end development using app development utility
Rahmel Advanced joomla!

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