Method and apparatus for developing application program
By receiving device information configured by users, determining the variable library and firmware function library, and generating executable code, it solves the problem of front-end and back-end incompatibility in industrial software development, and improves the scalability and flexibility of the application.
Patent Information
- Application Number
- PCT/CN2023/142917
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-03
AI Technical Summary
In industrial software development, front-end engineers and back-end engineers are inefficient in communicating and negotiating application functions, which affects the scalability and flexibility of applications.
By receiving the device information configured by the user, determining the corresponding variable library and firmware function library, and the user readability language description, the user can select variables and firmware functions from the library, generate executable code, and use the computing power of industrial equipment to achieve functional requirements, reducing front-end and back-end incompatibility problems.
It improves the scalability and flexibility of application development, reduces the requirements for front-end operation capabilities, and achieves rapid response to user functional needs.
Smart Images

Figure CN2023142917_03072025_PF_FP_ABST
Abstract
Description
Application development method and device Technical Field
[0001] The present disclosure mainly relates to the field of industrial digitalization, and in particular to a method and device for developing an application. Background Art
[0002] When developing industrial software, front-end engineers are responsible for UI development, while back-end engineers are responsible for algorithm development. These engineers communicate and negotiate on application functionality, including the data format for interaction. New user requests for functionality require multiple steps, including requirement definition, UI design, algorithm development, and code implementation. This is inefficient and sometimes requires repeated testing, hindering the application's scalability and flexibility.
[0003] Public content
[0004] In order to solve the above technical problems, the present disclosure provides a method and device for developing an application program to improve the scalability and flexibility of application program development.
[0005] To achieve the above objectives, the present disclosure proposes a method for developing an application, the method comprising:
[0006] Receive configuration information input by the user through the UI component, wherein the configuration information includes device information;
[0007] determining a variable library and a firmware function library of a corresponding device according to the device information, and receiving variables and firmware functions selected by a user from the variable library and the firmware function library, wherein the variable library and the firmware function library are described in a user-readable language;
[0008] An executable code is generated according to the variables and the firmware functions selected by the user, and the executable code can be executed on the industrial device.
[0009] To this end, embodiments of the present disclosure provide an application development method that displays a corresponding variable library and firmware function library based on user-configured device information. The variable library and firmware function library are described in a user-readable language, allowing users to intuitively operate and edit them to select target variables and target firmware functions from the variable library and firmware function library. Based on the target variables and target firmware functions, corresponding executable code is generated. This method can quickly respond to user functional requirements, avoid incompatibility issues between the front-end and back-end, and improve the scalability and flexibility of application development. Furthermore, users only need to define functional requirements, which can be implemented using the algorithms and computing power of industrial equipment, reducing the requirements for front-end operational capabilities.
[0010] Optionally, the method includes receiving variables and firmware functions selected by a user from the variable library and the firmware function library, generating a message in a predefined format; the executable code includes a message processing function that calls the firmware function, uses the message processing function to receive the message in the predefined format and execute the logic of the firmware function. Thus, the message processing function enables message distribution and processing, improves processing speed, and provides message feedback.
[0011] Optionally, the logic for using the message processing function to receive the message in the predefined format and execute the firmware function includes: parsing the message in the predefined format, determining configuration parameters and firmware functions in the message, and using the message processing function to call the firmware function according to the configuration parameters to process the message. Thus, the message processing function is implemented to distribute and process messages.
[0012] Optionally, the method further includes receiving user-entered custom variables and custom functions, determining predefined variables and predefined firmware functions from the variable library and the firmware function library based on the custom functions, invoking the predefined variables and predefined firmware functions to generate executable code, and importing the executable code into the industrial device. This enables user-entered custom variables and utilizes the computing power of the industrial device to implement user-defined functions, thereby increasing the flexibility of meeting user needs and reducing the requirements for front-end operational capabilities.
[0013] Optionally, the method further includes: receiving real-time data related to the variable from the industrial device, and displaying the real-time data on the UI component. To this end, by displaying the real-time data on the UI component, the real-time data can be presented intuitively.
[0014] Optionally, generating executable code based on the user-selected variables and firmware functions includes generating WebAssembly code based on the user-selected variables and firmware functions, and importing the WebAssembly code into the industrial device. Thus, the WebAssembly code enables dynamic loading of applications and also achieves lightweight application performance.
[0015] The present disclosure also provides an application development device, the device comprising:
[0016] A receiving module receives configuration information input by a user through a UI component, wherein the configuration information includes device information;
[0017] a determination module, which determines a variable library and a firmware function library of a corresponding device according to the device information, and receives variables and firmware functions selected by a user from the variable library and the firmware function library, wherein the variable library and the firmware function library are described in a user-readable language;
[0018] A generation module generates executable code according to the variables and the firmware functions selected by the user, wherein the executable code can be executed on the industrial device.
[0019] The present disclosure also provides an electronic device, comprising a processor, a memory, and instructions stored in the memory, wherein the instructions implement the above-mentioned method when executed by the processor.
[0020] The present disclosure also provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed, the method described above is executed.
[0021] The present disclosure also provides a computer program product, comprising a computer program, which implements the method described above when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The following figures are only intended to illustrate and explain the present disclosure, and do not limit the scope of the present disclosure.
[0023] FIG1 is a flowchart of a method for developing an application according to an embodiment of the present disclosure;
[0024] FIG2 is a schematic diagram of a user interface of an application according to an embodiment of the present disclosure;
[0025] FIG3 is a schematic diagram of a device for developing an application according to an embodiment of the present disclosure;
[0026] FIG4 is a schematic diagram of an electronic device according to an embodiment of the present disclosure.
[0027] DESCRIPTION OF REFERENCE NUMERALS 100 Application development method 110 - 130 Step 20 User interface 21 Device 22 Message 221 Variable 222 Firmware function 223 Display area 300 Application development apparatus 310 Receiving module 320 Determining module 330 Generating module 400 Electronic device 410 Processor 420 Memory DETAILED DESCRIPTION
[0028] In order to have a clearer understanding of the technical features, purposes and effects of the present disclosure, specific embodiments of the present disclosure are now described with reference to the accompanying drawings.
[0029] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure. However, the present disclosure may also be implemented in other ways different from those described herein. Therefore, the present disclosure is not limited to the specific embodiments disclosed below.
[0030] As used in this application and the claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not intended to refer to the singular but may include the plural. Generally speaking, the terms "comprises" and "include" only indicate the inclusion of the steps and elements specifically identified, and these steps and elements do not constitute an exclusive list. A method or apparatus may also include other steps or elements.
[0031] The present disclosure provides a method for developing an application. FIG1 is a flowchart of a method 100 for developing an application according to an embodiment of the present disclosure. As shown in FIG1 , the method 100 includes:
[0032] Step 110: receiving configuration information input by the user through the UI component, the configuration information including device information;
[0033] Users can configure the application through the UI component of a mobile device (such as a mobile phone, tablet, etc.), and the mobile device receives the configuration information entered by the user through the UI component. Users can use graphical programming, instruction coding or scripting to configure in the UI component. The configuration information includes device information, which indicates the object device selected by the user and may include information such as the device type and device ID. Taking the industrial inverter as an example, the user can select the industrial inverter in a specific scenario, that is, the industrial inverter located at a certain workstation on a certain production line in a certain factory, or the ID of the industrial inverter. The configuration information can be the configuration information of a single device or the configuration information of multiple devices. For multiple devices, they can be devices of the same type or different types, and these devices work together to achieve a specified workflow.
[0034] Figure 2 is a schematic diagram of a user interface of an application according to an embodiment of the present disclosure. As shown in Figure 2, the user interface 20 is the front-end development environment of the application. The user can drag the device 21 from the device library (not shown) to the user interface 20 to determine the operation object of the application.
[0035] Step 120, determining a variable library and a firmware function library of the corresponding device based on the device information, and receiving variables and firmware functions selected by the user from the variable library and the firmware function library, wherein the variable library and the firmware function library are described in a user-readable language;
[0036] After receiving the device information, the device's supported variables, firmware functions, data structures, and other information are determined accordingly. This includes the device's variable library and firmware function library. These libraries are described in a user-readable language, meaning they are directly understandable and readable. For example, if the device the user inputs is an industrial inverter, its variable library includes power, torque, speed, and PID control variables, while its firmware function library includes read / write functions and a stop / stop function. Subsequently, the user selects the specific variables and firmware functions from the variable and firmware function libraries. For example, the user may select power as a variable and a read function as a firmware function.
[0037] As shown in FIG. 2 , the user can drag a target variable 221 into a message 22 and drag a target firmware function 222 into the message 22 .
[0038] Step 130 : Generate executable code based on the variables and firmware functions selected by the user. The executable code can be executed on the industrial device.
[0039] User-selected variables and firmware function information are synchronized to the backend development environment, which can be accessed via mobile devices. Executable code is generated based on the user's selected variables and firmware functions. This executable code is then executed on the industrial device, enabling the user's customized functional requirements to be met. This allows for rapid response to user functional requirements, avoiding incompatibilities between the frontend and backend, and improving the scalability and flexibility of application development.
[0040] In some embodiments, generating executable code based on user-selected variables and firmware functions includes generating WebAssembly code based on the user-selected variables and firmware functions, and importing the WebAssembly code into the industrial device. Thus, the WebAssembly code enables dynamic loading of applications and also achieves lightweight applications.
[0041] In some embodiments, the method includes: receiving variables and firmware functions selected by a user from a variable library and a firmware function library, and generating a message in a predefined format; the executable code includes a message processing function that calls the firmware function, and uses the message processing function to receive the message in the predefined format and execute the logic of the firmware function. To this end, the distribution and processing of messages are realized through the message processing function, which improves the processing speed and provides message feedback. Table 1 shows the predefined message format according to an embodiment of the present disclosure, which includes the application name, device name, message type, message name, variable name list and variable value. After the user selects the variables and functions, this information will be recorded and converted into a message in a predefined format, and the message in the predefined format will be used for subsequent processing.
[0042] Table 1 Predefined message format
[0043] The following shows a message according to the predefined format, in which the application name is fuzzyPID, the device name is inverter, the message type is write, the message name is parameter, the variable name list is "pval", "ival", "dval" (P value, I value and D value in PID control), and the variable values are 0.4, 0.8 and 0.0 respectively.
[0044] Another message according to the predefined format is shown below. In this message, the application name is fuzzyPID, the device name is inverter, the message type is read, the message name is output, the variable name is "setpoint", and the variable value is 0.75.
[0045] In some embodiments, the logic of using a message processing function to receive a message in a predefined format and execute a firmware function includes: parsing the message in the predefined format, determining the configuration parameters and firmware functions in the message, and using the message processing function to call the firmware function to process the message according to the configuration parameters. For example, in one of the messages shown above, the firmware function in the message is parsed to write parameters, the variable is p value is 0.4, i value is 0.8, and d value is 0.0, and the code of the corresponding firmware function is used to implement writing the p value to 0.4, the i value to 0.8, and the d value to 0.0. For another example, in another message shown above, the firmware function in the message is parsed to read output, the variable is set point 0.75, and the output of reading the set point 0.75 is implemented through the corresponding firmware function. To this end, the distribution and processing of messages by the message processing function is implemented.
[0046] In some embodiments, the method further includes: receiving user-defined variables and user-defined functions input, determining predefined variables and predefined firmware functions from a variable library and a firmware function library based on the user-defined functions, calling the predefined variables and predefined firmware functions to generate executable code, and importing the executable code into the industrial equipment. For example, the inverter provides a predefined variable power, the user inputs a custom variable power consumption, the power value is read from the inverter through a predefined function reading function, and the user-defined power consumption is calculated based on the power value and duration. To this end, the user's custom variable input is realized, and the user-defined function is realized by utilizing the computing power of the industrial equipment, thereby improving the flexibility of realizing user needs and reducing the requirements for front-end operation capabilities.
[0047] In some embodiments, the method further includes receiving real-time data related to the variables from the industrial equipment and displaying the real-time data on the UI component. As shown in FIG2 , the user interface 20 also includes a display area 223 for displaying real-time data, such as user-defined real-time power consumption data. Displaying the real-time data on the UI component allows for intuitive presentation of the real-time data.
[0048] The embodiments of the present disclosure provide an application development method that displays a corresponding variable library and firmware function library based on user-configured device information. The variable library and firmware function library are described in a user-readable language, allowing users to intuitively operate and edit them to select target variables and target firmware functions from the variable library and firmware function library. Based on the target variables and target firmware functions, corresponding executable code is generated. This method can quickly respond to user functional requirements, avoid incompatibility issues between the front-end and back-end, and improve the scalability and flexibility of application development. Furthermore, users only need to define functional requirements, which can be implemented using the algorithms and computing power of industrial equipment, reducing the requirements for front-end operational capabilities.
[0049] The present disclosure further provides an application development device. FIG3 is a schematic diagram of an application development device 300 according to an embodiment of the present disclosure. As shown in FIG3 , the device 300 includes:
[0050] The receiving module 310 receives configuration information input by the user through the UI component, where the configuration information includes device information;
[0051] The determination module 320 determines a variable library and a firmware function library of a corresponding device according to the device information, and receives variables and firmware functions selected by a user from the variable library and the firmware function library, wherein the variable library and the firmware function library are described in a user-readable language;
[0052] The generation module 330 generates executable code based on the variables and firmware functions selected by the user. The executable code can be executed on the industrial device.
[0053] The present disclosure also provides an electronic device 400. FIG4 is a schematic diagram of an electronic device 400 according to an embodiment of the present disclosure. As shown in FIG4 , the electronic device 400 includes a processor 410 and a memory 420. The memory 420 stores instructions, wherein the instructions, when executed by the processor 410, implement the method 100 described above.
[0054] The present disclosure further provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed, the method 100 described above is executed.
[0055] The present disclosure also provides a computer program product, including a computer program, which implements the method 100 described above when the computer program is executed by a processor.
[0056] Some aspects of the methods and apparatus of the present disclosure may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks," "modules," "engines," "units," "components," or "systems." The processor may be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLCs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, various aspects of the present disclosure may be expressed as computer products located in one or more computer-readable media, the product including computer-readable program code. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes, etc.), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., cards, sticks, key drives, etc.).
[0057] Flowcharts are used herein to illustrate the operations performed by the methods according to the embodiments of the present application. It should be understood that the preceding operations are not necessarily performed in exact order. Instead, the various steps may be performed in reverse order or simultaneously. Furthermore, other operations may be added to these processes, or one or more operations may be removed from these processes.
[0058] It should be understood that although this specification is described according to various embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
[0059] The above description is only an illustrative embodiment of the present disclosure and is not intended to limit the scope of the present disclosure. Any equivalent changes, modifications and combinations made by any person skilled in the art without departing from the concept and principle of the present disclosure shall fall within the scope of protection of the present disclosure.
[0060] Nouns and pronouns referring to persons in this patent application are not limited to a specific gender.
Claims
1. A development method (100) of an application program, characterized in that The method (100) includes: Receiving configuration information input by a user through a UI component, where the configuration information includes device information (110); Determining a variable library and a firmware function library corresponding to a device according to the device information, and receiving variables and firmware functions selected by the user from the variable library and the firmware function library, where the variable library and the firmware function library are described in a user-readable language (120); Generating executable code according to the variables and the firmware functions selected by the user, where the executable code can be executed on an industrial device (130).
2. The method (100) according to claim 1, characterized in that, The method (100) includes: receiving variables and firmware functions selected by the user from the variable library and the firmware function library, and generating a message in a predefined format; the executable code includes a message processing function that calls the firmware function, and uses the message processing function to receive the message in the predefined format and execute the logic of the firmware function.
3. The method (100) according to claim 2, characterized in that, Using the message processing function to receive the message in the predefined format and execute the logic of the firmware function includes: parsing the message in the predefined format to determine configuration parameters and a firmware function in the message, and using the message processing function to call the firmware function according to the configuration parameters to process the message.
4. The method (100) according to any one of claims 1-3, characterized in that, The method (100) further includes: receiving custom variables and custom functions input by the user, determining predefined variables and predefined firmware functions from the variable library and the firmware function library according to the custom functions, calling the predefined variables and the predefined firmware functions to generate executable code, and importing the executable code onto the industrial device.
5. The method (100) according to claim 1, characterized in that, The method (100) further includes: receiving real-time data related to the variables from the industrial device, and displaying the real-time data on the UI component.
6. The method (100) according to claim 1, characterized in that Generating executable code according to the variables and the firmware functions selected by the user includes: generating WebAssembly code according to the variables and the firmware functions selected by the user, and importing the WebAssembly code onto the industrial device.
7. A development device (300) for an application program, characterized in that, The device (300) includes: A receiving module (310) that receives configuration information input by a user through a UI component, where the configuration information includes device information; A determining module (320) that determines a variable library and a firmware function library corresponding to a device according to the device information, and receives variables and firmware functions selected by the user from the variable library and the firmware function library, where the variable library and the firmware function library are described in a user-readable language; A generating module (330) that generates executable code according to the variables and the firmware functions selected by the user, where the executable code can be executed on an industrial device.
8. An electronic device (400) includes a processor (410), a memory (420), and instructions stored in the memory (420), where when the instructions are executed by the processor (410), the method (100) described in any one of claims 1-6 is implemented.
9. A computer-readable storage medium having computer instructions stored thereon, the computer instructions, when run, performing the method (100) according to any one of claims 1-6.
10. A computer program product, characterized in that, Comprising a computer program which, when executed by a processor, implements the method (100) according to any one of claims 1-6.
Citation Information
Patent Citations
Method and script engine for realizing service function
CN110908640A
Software architecture and software architecture development method
CN111258550A
Method and system for controlling programmable equipment based on graphic block programming
CN113406922A
Low-code development platform function expression configuration method, system, equipment and medium
CN114089986A
Method for automatically generating chip software code engineering
CN116382663A