Automatic programming method and device, electronic device and storage medium

By generating device variable identifiers and automatically establishing program blocks, and automatically connecting program blocks using mapping relationships, the problem of low interconnection efficiency of device icons and program blocks in complex projects is solved, the compilation efficiency and accuracy are improved, and errors and testing work are reduced. quantity.

CN118034669BActive Publication Date: 2024-11-01MORIMATSU (SUZHOU) LIFESCIENCES TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410175876.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-07
Publication Date
2024-11-01
Estimated Expiration
2044-02-07

AI Technical Summary

Technical Problem

In complex industrial automation control projects, the number of equipment icons, equipment program blocks, equipment group program blocks and functional program blocks is huge, which makes them corresponding and interconnected for a lot of time, reducing program preparation efficiency and increasing the probability of error and test workload affects program delivery efficiency.

Method used

By generating device variable identification based on the device bit number of the device icon, the device program block is automatically established, and the corresponding program is automatically connected to the mapping relationship between the device group program block and the device program block and the mapping relationship between the function program block and the device group program block. Blocks reduce manual operations and page switching, improving connection accuracy and efficiency.

Benefits of technology

It improves the correspondence efficiency between device icons and device program blocks, reduces the probability of error, simplifies the interconnection process of program blocks, reduces the testing and modification workload, and improves program delivery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118034669B_ABST
    Figure CN118034669B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an automated programming method and device, an electronic device and a storage medium, the method comprising: generating at least one device variable identifier corresponding to each device icon according to the device bit number corresponding to each device icon; establishing a device program block corresponding to each device icon according to each device variable identifier; connecting the corresponding device program block to each device group program block according to the first mapping relationship between each device group program block and each device program block, and a single device group program block is used to implement at least one sub-function; connecting the corresponding device group program block to each function program block according to the second mapping relationship between each function program block and each device group program block, and a single function program block is used to implement at least one function. The efficiency and accuracy of the correspondence and connection between device icons, device program blocks, device group program blocks and function program blocks are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of automated control, and in particular to an automated programming method and device, an electronic device, and a storage medium. Background Art

[0002] In the field of industrial automation control (IAC), users can manipulate device icons on a screen to issue commands to programs to control device operation. They can also monitor device operating status through on-screen content. Programs can include device blocks, device group blocks, and function blocks. Therefore, achieving automated device control requires that device icons on a screen correspond to device blocks, and that the device blocks, device group blocks, and function blocks are properly interconnected.

[0003] However, complex projects often involve a vast number of device icons, device blocks, device group blocks, and function blocks. Matching and interconnecting these blocks consumes considerable time, reducing programming efficiency. Furthermore, the large number of screens involved and the limited screen display range necessitate constant page switching, which can lead to errors and reduce program accuracy. This reduced accuracy increases the workload of troubleshooting and program modifications during testing, impacting program delivery efficiency. Summary of the Invention

[0004] In view of this, the present disclosure proposes an automated programming solution.

[0005] According to one aspect of the present disclosure, an automated programming method is provided, comprising: generating at least one device variable identifier corresponding to each device icon according to the device bit number corresponding to each device icon; establishing a device program block corresponding to each device icon according to each device variable identifier; connecting each device group program block to a corresponding device program block according to a first mapping relationship between each device group program block and each device program block, wherein a single device group program block is used to implement at least one sub-function; connecting each function program block to a corresponding device group program block according to a second mapping relationship between each function program block and each device group program block, wherein a single function program block is used to implement at least one function.

[0006] In one possible implementation, the device variable identifier includes: icon type, and the device program block corresponding to each device icon is established based on each device variable identifier, including: determining the device function type based on each icon type, and a single device function type corresponds to a device program block template; importing the device variable identifier corresponding to the same-function device icon group belonging to the same device function type into the device program block template corresponding to the same device function type, and batch generating device program blocks corresponding to each of the same-function device icon groups.

[0007] In one possible implementation, the method includes: establishing at least one device group program block, a single device group program block corresponding to at least one functional interface identifier for connecting the functional program block, and corresponding to at least one device interface identifier for connecting the device program block; establishing at least one functional program block, a single functional program block corresponding to at least one device group interface identifier for connecting the device group program block.

[0008] In one possible implementation, the establishment of at least one device group program block includes: importing the device group variable identifier and the value of the device group variable corresponding to the first device group of the same sub-function type into the device group program block template corresponding to the same sub-function type, and batch generating device group program blocks corresponding to each of the first device groups.

[0009] In one possible implementation, a single functional program block corresponds to an identifier of a functional program block, and a single device group program block corresponds to an identifier of a device group program block. The second mapping relationship includes: a mapping relationship between the identifiers of each functional program block and the identifiers of each device group program block. The second mapping relationship is displayed in a first table. According to the second mapping relationship between each functional program block and each device group program block, each functional program block is connected to the corresponding device group program block, including: importing the identifier of the functional program block and the device group interface identifier in each functional program block into the first table; importing the identifier of the device group program block and the function interface identifier in each device group program block into the second table; determining the identifier of the target device group program block corresponding to the identifier of each functional program block in the first table according to the second mapping relationship; in the second table, querying the target function interface identifier corresponding to the identifier of each target device group program, and updating each target function interface identifier to the first table; using the identifier of the functional program block and the device group interface identifier of each row of the updated first table as the first index, each target function interface identifier in the updated first table is imported into the corresponding functional program block.

[0010] In one possible implementation, a single device program block corresponds to the identifier of a device program block, and a single device group program block corresponds to the identifier of a device group program block. The first mapping relationship is displayed in a third table. The first mapping relationship includes: a mapping relationship between the identifier of each device group program block and the identifier of each device program block. According to the first mapping relationship between each device group program block and each device program block, the corresponding device program block is connected to each device group program block, including: importing the identifier of the device group program block and the device interface identifier in each device group program block into the third table; generating the identifier of the device program block corresponding to each device interface identifier according to the preset device program block naming rule, and updating it to the third table; using the identifier of the device group program block in the updated third table as the second index, importing the identifier of each device program block in the third table into the corresponding device group program block.

[0011] In one possible implementation, generating at least one device variable identifier corresponding to each device icon based on the device bit number corresponding to each device icon includes: importing the variable identifier and device bit number to be modified corresponding to each device icon into a fourth table; using the device bit number to batch replace the bit number part of the variable to be modified to obtain an updated variable identifier; using each device bit number in the fourth table as a third index, importing each updated variable identifier into the corresponding device icon.

[0012] According to another aspect of the present disclosure, there is provided an automatic programming device, the device comprising:

[0013] a device variable identifier generating unit, configured to generate at least one device variable identifier corresponding to each device icon according to the device bit number corresponding to each device icon;

[0014] A device program block creating unit, configured to create a device program block corresponding to each of the device icons according to each of the device variable identifiers;

[0015] a first connecting unit, configured to connect each device group program block to a corresponding device program block according to a first mapping relationship between each device group program block and each device program block, wherein a single device group program block is configured to implement at least one sub-function;

[0016] The second connecting unit is used to connect each functional program block to the corresponding device group program block according to the second mapping relationship between each functional program block and each device group program block, and a single functional program block is used to implement at least one function.

[0017] In a possible implementation, the device variable identifier includes: an icon type; the device program block creation unit includes:

[0018] a device function type determining unit, configured to determine a device function type according to each of the icon types, wherein each of the device function types corresponds to a device program block template;

[0019] The device program block creation sub-unit is used to import the device variable identifiers corresponding to the same-function device icon groups belonging to the same device function type into the device program block template corresponding to the same device function type, and batch generate device program blocks corresponding to each of the same-function device icon groups.

[0020] In one possible implementation, the apparatus includes:

[0021] a device group program block creating unit, configured to establish at least one device group program block, wherein each device group program block corresponds to at least one function interface identifier for connecting to the function program block, and corresponds to at least one device interface identifier for connecting to the device program block;

[0022] The function program block creation unit is used to create at least one function program block, and each function program block corresponds to at least one device group interface identifier for connecting to the device group program block.

[0023] In a possible implementation, the device group program block creation unit includes:

[0024] The device group program block creation sub-unit is used to import the device group variable identifier and the value of the device group variable corresponding to the first device group of the same sub-function type into the device group program block template corresponding to the same sub-function type, and batch generate device group program blocks corresponding to each of the first device groups.

[0025] In a possible implementation, a single functional program block corresponds to an identifier of a functional program block, and a single device group program block corresponds to an identifier of a device group program block. The second mapping relationship includes a mapping relationship between the identifiers of each functional program block and the identifiers of each device group program block. The second mapping relationship is displayed in the first table.

[0026] The second connecting unit includes:

[0027] a first importing unit, configured to import the functional program block identifier and the device group interface identifier in each functional program block into the first table;

[0028] a second importing unit, configured to import the identifiers of the device group program blocks and the functional interface identifiers in each of the device group program blocks into a second table;

[0029] a target device group program block determining unit, configured to determine, based on the second mapping relationship, an identifier of a target device group program block corresponding to an identifier of each function program block in the first table;

[0030] a target function interface identifier determining unit, configured to search the second table for a target function interface identifier corresponding to an identifier of each target device group program, and update each target function interface identifier into the first table;

[0031] The third importing unit is configured to import each target function interface identifier in the updated first table into the corresponding function program block using the identifier of the function program block and the device group interface identifier of each row of the updated first table as a first index.

[0032] In a possible implementation, a single device program block corresponds to an identifier of a device program block, and a single device group program block corresponds to an identifier of a device group program block. The first mapping relationship is presented in a third table, and the first mapping relationship includes: a mapping relationship between the identifiers of each device group program block and the identifiers of each device program block,

[0033] The first connecting unit includes:

[0034] a fourth importing unit, configured to import the identifier of the device group program block and the device interface identifier in each of the device group program blocks into the third table;

[0035] a device interface identifier generating unit, configured to generate identifiers of device program blocks corresponding to the device interface identifiers according to a preset device program block naming rule, and update the identifiers to the third table;

[0036] The fifth importing unit is configured to import the identifier of each device program block in the third table into the corresponding device group program block using the identifier of the updated device group program block in the third table as the second index.

[0037] In a possible implementation, the device variable identifier generating unit includes:

[0038] a sixth importing unit, configured to import the variable identifier to be modified and the device bit number corresponding to each of the device icons into the fourth table;

[0039] A replacement unit, configured to replace the bit number portion of the variables to be modified in batches with the device bit number to obtain updated variable identifiers;

[0040] The seventh importing unit is configured to import each of the updated variable identifiers into a corresponding device icon using each device bit number in the fourth table as a third index.

[0041] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0042] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.

[0043] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0044] In the disclosed embodiment, when establishing a device icon, it is only necessary to determine the device bit number in order to generate the device variable identifier corresponding to each device icon, thereby improving work efficiency and reducing the probability of errors in the device variable identifier caused by manual modification one by one. Directly using device variables to automatically establish device program blocks can make the device icon correspond to the device program block one-to-one; and according to the first mapping relationship, the device program block corresponding to the device group program block is automatically connected, and according to the second mapping relationship, the device group program block corresponding to the function program block is automatically connected, without manual connection, thereby improving efficiency, and using the first mapping relationship and the second mapping relationship to connect the program blocks, without switching back and forth between multiple pages and connecting lines, reducing the probability of errors, and improving the probability of accurate interconnection of device program blocks, device group program blocks, and functional program blocks, reducing the workload of the program testing link, and improving program delivery efficiency.

[0045] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0047] Figure 1 A flowchart of the automated programming method according to an embodiment of the present disclosure is provided.

[0048] Figure 2 Another flowchart of the automated programming method according to an embodiment of the present disclosure is provided.

[0049] Figure 3 A schematic structural diagram of an automated programming device according to an embodiment of the present disclosure is provided.

[0050] Figure 4 A schematic structural diagram of an electronic device for automated programming according to an embodiment of the present disclosure is provided. DETAILED DESCRIPTION

[0051] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.

[0052] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0053] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.

[0054] In the industrial field, the emergence of automated control systems allows users to remotely control equipment, reducing the need to physically visit the site to control the equipment. Users can also remotely monitor equipment and take appropriate actions based on the monitoring results. Automated control systems include a human-computer interface (HMI) and a program. Users can remotely issue commands to the program through the HMI to control the operation of the equipment. The program then automatically executes according to the control logic based on the user's instructions or data fed back by the equipment.

[0055] The program may include: device program block, device group program block, and function program block.

[0056] The human-computer interaction interface may include device icons, and a single device icon may correspond to a device program block.

[0057] A function block can call a device group block to complete a function. A single function can include at least one sub-function. A device group block can call a device block to control the device to complete the sub-function.

[0058] It can be seen from this that the device group program block can correspond to at least one functional program block, and can also correspond to at least one device program block. The device group program block can include at least one interface connected to the functional program block. For the convenience of the following description, the interface can be named as a functional interface. In the programming interface, the functional interface can be displayed in the device group program block in the form of a functional interface identifier. The device group program block can include at least one interface connected to the device program block. For the convenience of the following description, the interface can be named as a device interface. In the programming interface, the device interface can be displayed in the device group program block in the form of a device interface identifier.

[0059] The functional program block may include at least one device group interface connected to the device group program block. For ease of description below, the interface may be named a device group interface. In the programming interface, the device group interface may be displayed in the functional program block in the form of a device group interface identifier.

[0060] A single function block corresponds to an identifier, i.e., the identifier of the function block. A single device group block corresponds to an identifier, i.e., the identifier of the device group block. A single device block corresponds to an identifier, i.e., the identifier of the device block.

[0061] Each device group interface identifier in a certain functional program block can be a type of variable in the functional program block. The value of each device group interface identifier can be the functional interface identifier of the device group program block called by the functional program block to complete a certain function. Each device interface identifier in a certain device group program block can be another type of variable in the device group program block. The value of each device interface identifier can be the identifier of the device program block called by the device group program block to complete a certain sub-function. In order to realize the function, it is necessary to assign values ​​to the device group interface identifiers in each functional program block, and to assign values ​​to the device interface identifiers in each device group program block. In the programming interface, the corresponding interfaces of the device program block, the device group program block, and the functional program block can be interconnected using connecting lines to complete the above-mentioned assignment. In addition, in the programming interface, the device group interface identifiers of each functional program block and / or the functional interface identifiers of each device program block can be displayed in a table, and the values ​​of each interface identifier are filled in the table.

[0062] Complex projects often involve a vast number of device icons, device blocks, device group blocks, and function blocks. Matching and interconnecting these blocks consumes considerable time, reducing programming efficiency. Furthermore, the numerous pages involved and the limited screen display require constant page switching to complete these assignments, which can be error-prone and reduce program accuracy. This reduced accuracy increases the workload of troubleshooting and program modifications during testing, impacting program delivery efficiency.

[0063] Figure 1Provide a flow chart of the automated programming method of the embodiment of the present disclosure. Figure 1 As shown, the method includes:

[0064] S11 , generating at least one device variable identifier corresponding to each device icon according to the device bit number corresponding to each device icon.

[0065] On the human-computer interaction interface, a single device icon can represent a single device, such as a pump or a mixing tank, or a group of devices, such as a battery pack. Users can create different device icons to correspond to each device or group of devices. A single device icon can correspond to a device tag. The device tag is used to identify a single device or a single device group and is unique within the same project. A single device icon can correspond to at least one device variable. For example, a device icon can correspond to a device variable such as device status, device on, or device off. A single device variable can correspond to a device variable identifier to distinguish between the variables. The device variable identifier can be expressed as a device tag and an identifier, with the device tag and identifier connected by " / CM.". For example, a valve with device tag AV1010 has an identifier representing its status, Status1. Therefore, the device variable identifier representing the status of the valve can be: AV1010 / CM.Status1.

[0066] Devices of the same type can use the same device icon style. For example, icon A can be used as the device icon for a ball valve, while icon B can be used for a safety valve. Device icons for devices of the same type correspond to the same device variant, but the device bit number portion of the device variant identifier differs. For example, ball valve A can correspond to device variant 1, and ball valve B can also correspond to device variant 1. However, the device bit number portion of device variant 1 identifier for ball valve A differs from the bit number portion of device variant 1 identifier for ball valve B.

[0067] When creating a human-computer interaction interface, you can copy the device icons corresponding to the same type of device to save interface generation time. For a single device icon, use its corresponding device bit number to batch update the device variable identifier in any copied device icon to obtain the device variable identifier corresponding to the single device icon.

[0068] S12: Establishing a device program block corresponding to each of the device icons according to each of the device variable identifiers.

[0069] As previously mentioned, a single device icon can correspond to a device program block. Therefore, in the disclosed embodiments, a device variable identifier can be used to establish a device program block, thereby establishing an association between the device icon and the device program block, so that the status of the device can be displayed on the device icon, or the user can control the device through the device icon.

[0070] S13 , connecting each device group program block to a corresponding device program block according to a first mapping relationship between each device group program block and each device program block, wherein a single device group program block is used to implement at least one sub-function.

[0071] In the embodiments of the present disclosure, a first mapping relationship may be preset. The first mapping relationship may be expressed as a program statement presented in a program document; may also be presented in a spreadsheet format; or may be presented in a text format. The embodiments of the present disclosure do not limit the form of the first mapping relationship.

[0072] In this way, the device group program blocks that implement each sub-function can be automatically connected to the device program blocks based on the first mapping relationship, thereby improving the efficiency of connecting the device group program blocks to the device program blocks. Furthermore, there is no need to repeatedly switch between interfaces containing device program blocks and device program group blocks, which reduces the probability of errors and improves the accuracy of connecting the device group program blocks to the device program blocks.

[0073] S14, connecting each functional program block to a corresponding device group program block according to the second mapping relationship between each functional program block and each device group program block, wherein a single functional program block is used to implement at least one function.

[0074] In the embodiments of the present disclosure, a second mapping relationship may be preset. The second mapping relationship may be expressed as a program statement presented in a program document; may also be presented in a spreadsheet format; or may be presented in a text format. The embodiments of the present disclosure do not limit the form of the second mapping relationship.

[0075] In this way, the function blocks implementing each function can be automatically connected to the device group blocks based on the second mapping relationship, improving the efficiency of connecting the function blocks and the device group blocks. Furthermore, there is no need to repeatedly switch between the interfaces containing the function blocks and the device group blocks, reducing the probability of errors and improving the accuracy of connecting the function blocks and the device group blocks.

[0076] In the disclosed embodiment, when establishing a device icon, it is only necessary to determine the device bit number in order to generate the device variable identifier corresponding to each device icon, thereby improving work efficiency and reducing the probability of errors in the device variable identifier caused by manual modification one by one. Directly using the device variable identifier to automatically establish the device program block, the device icon can correspond one to one with the device program block; and according to the first mapping relationship, the device program block corresponding to the device group program block is automatically connected, and according to the second mapping relationship, the device group program block corresponding to the function program block is automatically connected, without manual connection, thereby improving efficiency, and using the first mapping relationship and the second mapping relationship to connect the program blocks, without switching back and forth between multiple pages and connecting lines, thereby reducing the probability of errors, improving the probability of accurate interconnection of the device program block, the device group program block, and the function program block, reducing the workload of the program testing link, and improving the efficiency of program delivery.

[0077] In one possible implementation, the device variable identifier includes: icon type, and the device program block corresponding to each device icon is established based on each device variable identifier, including: determining the device function type based on each icon type, and a single device function type corresponds to a device program block template; importing the device variable identifier corresponding to the same-function device icon group belonging to the same device function type into the device program block template corresponding to the same device function type, and batch generating device program blocks corresponding to each of the same-function device icon groups.

[0078] A single icon type can correspond to a device icon style and a set of device variants. An icon type can be represented by a device type abbreviation and an icon type number. There can be no space between the device type abbreviation and the icon type number. For example, if a valve has a device type abbreviation of V and an icon type number of 001, the corresponding icon type for the valve would be V001. Another example: if a pump has a device type abbreviation of PMP and an icon type number of 101, the corresponding icon type for the pump would be PMP101.

[0079] In the embodiment of the present disclosure, the icon type numbers can be divided for device icons of the same device type to determine the device function type to which each device icon belongs. The device function type can be a type obtained by classifying devices of the same type according to their functions.

[0080] For example, for valves, the device function type can be a signal feedback type. The device function type for device icons with icon type numbers 001 to 020 can be determined as a single-feedback valve. The device function type for device icons with icon type numbers 021 to 040 can be determined as a dual-feedback valve. The device function type for device icons with icon type numbers 041 to 060 can be determined as a non-feedback valve.

[0081] As mentioned above, a single device icon corresponds to a group of device variables, one of which can be an icon type. After the above classification by icon type, multiple device icons of the same device function type can be screened out, and these multiple device icons correspond to their respective device variables. For the sake of convenience, the device icons of the same function type are named as the same-function device icon group. In addition, since a single device function type can correspond to a device program block template, that is, a single same-function device icon group can correspond to the same device program block template. In this way, the device variables corresponding to each device icon in a certain same-function device icon group can be imported into the same device program block template. Similar operations can be performed for other same-function device icon groups, which will not be repeated here. Then, the device program blocks corresponding to each device icon in each same-function device icon group can be generated in batches.

[0082] A single device program block template can be a fixed program statement that controls the device and / or feedback device status, as well as a fixed statement logical structure. The device variables in the statement can be blank. In the embodiment of the present disclosure, the device variables corresponding to the device icons of the same device function type can be arranged according to the arrangement order of the device variables in the single device program block template. For example, if the order of the device variables in the device program block template corresponding to a single feedback valve is: valve status, valve open position, valve closed position; then the device variables of several valves in the single feedback valve are also arranged in the above order to achieve batch import.

[0083] In the embodiment of the present disclosure, since it is possible to automatically import device variable identifiers into device program block templates in batches, it is also possible to automatically generate device program blocks in batches, thereby improving the efficiency and accuracy of generating device program blocks.

[0084] In one possible implementation, the method includes: establishing at least one device group program block, a single device group program block corresponding to at least one functional interface identifier for connecting the functional program block, and corresponding to at least one device interface identifier for connecting the device program block; establishing at least one functional program block, a single functional program block corresponding to at least one device group interface identifier for connecting the device group program block.

[0085] For each function, a function block corresponding to the individual function can be established. A function block can contain multiple function variables. Within a function block, at least one device group interface can be set. A device group interface can be a type of function variable. The device group interface can be displayed within the function block as a device group interface identifier. The value of the device group interface identifier can be a function interface identifier within the device group block that the function block calls to complete a specific function.

[0086] For each sub-function, a device group program block corresponding to the single sub-function can be established. The device group program block can contain multiple device group variables. In the device group program block, at least one function interface can be set, and the function interface can be a type of device group variable. The function interface can be displayed in the device group program block in the form of a function interface identifier. In addition, in the device group program block, at least one device interface can be set, and the device interface can be another type of device group variable. The device interface can be displayed in the device group program block in the form of a device interface identifier. The value of the device interface identifier can be the identifier of the device program block called by the device group program block to complete a certain sub-function.

[0087] In the disclosed embodiments, during the establishment of device group blocks and function blocks, interfaces between function blocks and device group blocks, as well as interfaces between device group blocks and device group blocks, can be defined using variables and values. This allows for greater scalability of the function blocks and device group blocks. Furthermore, the rules for establishing these interfaces are simple and easy to implement, improving the efficiency of interconnecting function blocks and device group blocks, as well as device group blocks and device blocks.

[0088] In one possible implementation, the establishment of at least one device group program block includes: importing the device group variable identifier and the value of the device group variable corresponding to the first device group of the same sub-function type into the device group program block template corresponding to the same sub-function type, and batch generating device group program blocks corresponding to each of the first device groups.

[0089] The device group program block can implement sub-functions. Each sub-function is classified according to the sub-function type. For ease of expression, the device group program block of the same sub-function type can be named the first device group. Each device group program block in a single first device group corresponds to the same device group program template. In the embodiment of the present disclosure, the device group variable identifier of each device group program block in a certain first device group, as well as the value of the device group variable of each device group program block when completing its respective sub-function, can be imported into the same device group program block template. Similar operations can be performed for other first device groups and will not be repeated here. Then, the device group program blocks in each first device group can be generated in batches.

[0090] A single device group block template can contain fixed program statements that implement a specific sub-function, along with a fixed statement logical structure. Device variables within the statements can be left blank. In the disclosed embodiment, the device group variables corresponding to device group blocks of the same sub-function type can be arranged in the same order as the device group variables in the single device group block template to facilitate batch import.

[0091] For example, the device group program blocks used to implement each sub-function, the device group variable identifiers within the device group program blocks, and the values ​​of the device group variables used to implement the sub-functions can be pre-determined. This information is stored in spreadsheet A, by sub-function or device program group. In spreadsheet A, the device group program blocks are categorized by sub-function type. The device group variable identifiers within the device group program blocks of the same sub-function type, as well as the values ​​of the device group variables used to implement the sub-functions, are imported into the programming software to batch-create the device group program blocks.

[0092] In the disclosed embodiment, since the device group variable identifiers and device group variable values ​​can be automatically imported into the device program block template in batches, the device program blocks can also be automatically generated in batches, thereby improving the efficiency and accuracy of generating device group program blocks.

[0093] In one possible implementation, a single functional program block corresponds to an identifier of a functional program block, and a single device group program block corresponds to an identifier of a device group program block. The second mapping relationship is displayed in the first table. According to the second mapping relationship between each functional program block and each device group program block, each functional program block is connected to the corresponding device group program block, including: importing the identifier of the functional program block and the device group interface identifier in each functional program block into the first table; importing the identifier of the device group program block and the function interface identifier in each device group program block into the second table; determining the identifier of the target device group program block corresponding to the identifier of each functional program block in the first table according to the second mapping relationship; in the second table, querying the target function interface identifier corresponding to the identifier of each target device group program, and updating each target function interface identifier to the first table; using the identifier of the functional program block and the device group interface identifier of each row of the updated first table as the first index, each target function interface identifier in the updated first table is imported into the corresponding functional program block.

[0094] The first table and the second table here can be electronic tables. The mapping relationship between the identifiers of each functional program block and the identifiers of each device group program block is pre-stored in the first table, that is, the second mapping relationship.

[0095] After establishing at least one functional program block and at least one device group program block, the functional program block identifiers and device group interface identifiers of each functional program block can be imported into the first table. In this case, the first table contains at least the identifiers of each functional program block, each device group program block, and each device group interface identifier (the interface in the functional program block that connects to the device group program block).

[0096] After establishing at least one functional program block and at least one device group program block, the device group program block identifier and the functional interface identifier in each device group program block can be imported into the second table. Therefore, the second table can be used to display the third mapping relationship between the device group program block identifier and the functional interface identifier.

[0097] In an embodiment of the present disclosure, the identifiers of one or more device group program blocks corresponding to the identifier of a single function program block can be determined in the first table according to the second mapping relationship. For the convenience of description, the identifiers of the one or more device group program blocks determined are named as the identifiers of the target device group program blocks. Then, the function interface identifiers corresponding to the identifiers of each target device group program can be determined in the second table according to the third mapping relationship. For the convenience of expression, the determined function interface identifiers are named as the target function interface identifiers. And the target function interface identifiers are updated to the first table. After the update, the first table includes at least: the identifiers of each function program block, the identifiers of each device group program block, the identifiers of each device group interface, and the target function interface identifier. The identifiers of the function program blocks and the device group interface identifiers of each row of the updated first table can be used as the first index to import each target function interface identifier into the corresponding function program block.

[0098] In the embodiment of the present disclosure, the identifier of the functional program block and the device group interface identifier in each functional program block can be imported into the first table. The identifier of the device group program block and the functional interface identifier in each device group program block can be imported into the second table. Based on the second mapping relationship, the first table and the second table are jointly queried to determine the target functional interface identifier corresponding to each device group interface identifier in the first table to update the first table. The target interface identifier in the updated first table is then imported into the corresponding functional program block to realize automatic interconnection between each functional program block and each device group program block. There is no need to switch back and forth between multiple pages and connect lines, which reduces the probability of errors and improves the probability and efficiency of accurate interconnection between functional program blocks and backup group program blocks.

[0099] In one possible implementation, a single device program block corresponds to the identifier of a device program block, and a single device group program block corresponds to the identifier of a device group program block. The first mapping relationship is displayed in a third table. The first mapping relationship includes: a mapping relationship between the identifier of each device group program block and the identifier of each device program block. According to the first mapping relationship between each device group program block and each device program block, the corresponding device program block is connected to each device group program block, including: importing the identifier of the device group program block and the device interface identifier in each device group program block into the third table; generating the identifier of the device program block corresponding to each device interface identifier according to the preset device program block naming rule, and updating it to the third table; using the identifier of the device group program block in the updated third table as the second index, importing the identifier of each device program block in the third table into the corresponding device group program block.

[0100] The third table here may be a spreadsheet.

[0101] In one example, a fifth table can be pre-set, and the fifth table can show the fourth mapping relationship between each device interface identifier and each device bit number. The identifier of each device group program block and the device interface identifier in each device group program block can be imported into the third table. In the fifth table, the device bit number corresponding to each device interface identifier in the third table is determined. According to the device program block naming rule, according to each device bit number, the identifier of the device program block corresponding to each device interface in the third table is generated and updated to the third table. Exemplarily, the device program block naming rule can be a suffix after the device bit number, and the device bit number and the suffix are connected with "\".

[0102] The updated third table contains at least the device group program block identifier, the device interface identifier, and the device program block identifier. Therefore, the third table can contain a mapping relationship between each device group program block and each device program block, i.e., a first mapping relationship. The device group program block identifier in the updated third table can be used as a second index to import the device program block identifier in the third table into the corresponding device group program block.

[0103] In the embodiment of the present disclosure, the identifier of each device group program block and the device interface identifier in each device group program block can be imported into the third table. Then, according to the preset device program block naming rules, the identifier of the device program block corresponding to each device interface identifier is generated to obtain an updated third table. In this way, the third table contains the first mapping relationship, and based on the first mapping relationship, the identifier of each device program block in the updated third table is imported into the corresponding device group program block to realize automatic interconnection between each device group program block and each device program block. There is no need to switch back and forth between multiple pages and connect lines, which reduces the probability of errors and improves the probability and efficiency of accurate interconnection between functional program blocks and standby group program blocks.

[0104] In one possible implementation, generating at least one device variable identifier corresponding to each device icon based on the device bit number corresponding to each device icon includes: importing the variable identifier and device bit number to be modified corresponding to each device icon into a fourth table; using the device bit number to batch replace the bit number part of the variable to be modified to obtain an updated variable identifier; using each device bit number in the fourth table as a third index, importing each updated variable identifier into the corresponding device icon.

[0105] As previously mentioned, a single device icon can correspond to a device bit number; a single device icon can correspond to at least one device variable, that is, a group of device variables. In the disclosed embodiment, the device variable identifier and device bit number of each device icon to be modified can be imported into a fourth table. The fourth table can be a spreadsheet.

[0106] In the fourth table, a single row can record the device tag corresponding to a device icon and a set of device variable identifiers to be modified. The device tag in a single row can be used to replace the device tag portion of the device variable identifier in the same row to obtain the device variable identifier corresponding to the device icon. The same method can be used for other rows, allowing for batch acquisition of device variable identifiers. Then, using each device tag in the fourth table as the third index, the acquired device variable identifiers are imported into the corresponding device icon.

[0107] In the disclosed embodiment, a spreadsheet and human-computer interaction interface software may be used in conjunction to automatically and batch-generate device variable identifiers corresponding to each device icon, thereby improving the efficiency and accuracy of creating corresponding device variable identifiers for each device icon.

[0108] Figure 2 Another flowchart of the automated programming method according to an embodiment of the present disclosure is provided.

[0109] like Figure 2As shown, taking the realization of automated industrial control of a project as an example, the automated programming method involved in the present disclosure is introduced. This method requires the use of programming software and a spreadsheet classification and summary platform. Templates can be pre-stored in the programming software or imported from the outside. Templates can include: device icon templates, function program block templates, device group program block templates, and device program block templates. Among them, the device icon template is used to generate each device icon in the project; the function program block template is used to generate each function program block in the project; the device group program block template is used to generate each device group program block in the project, and the device program block template is used to generate each device program block in the project.

[0110] The standard forms may include: a first form, a second form, a third form, a fourth form, a fifth form, and an electronic form A. The above text describes each form in detail in conjunction with the embodiment, and will not be repeated here. The standard forms can be pre-stored in the electronic form classification summary platform or imported from outside.

[0111] In the disclosed embodiment, each device icon template can be used to establish the device icons in the human-computer interaction interface. A single device icon can correspond to an attribute list, which can include a device variable identifier and a device bit number. The variable identifier and device bit number to be modified can be imported into the fourth table. In the disclosed embodiment, if the device icon is generated directly using the template, the device bit number can be automatically created; if a new device icon is generated for the same type of device by copying an existing device icon, the device bit number corresponding to the new device icon needs to be manually entered.

[0112] For each row in the fourth table, use the device number in each row to replace the device number portion of the device variable identifier in the same row to be modified. Then, using each device number in the fourth table as the third index, import the obtained device variable identifier into the corresponding device icon. This creates the device icons in the human-computer interaction interface.

[0113] The device variable identifier can include an icon type. In the fourth table, the device function type of each device icon can be determined based on the icon type, and the device icons can be categorized according to the device function type. The device variable identifiers corresponding to the device icons (groups of device icons with the same function) of the same device function type in the fourth table can then be imported into the device program block template corresponding to the same device function type to batch create device program blocks.

[0114] In the embodiment of the present disclosure, each device group program block template and each function program block template can be used to create each device group program block and each function program block respectively. A single device group program block can include multiple device group variables. The device group variables can include at least one function interface identifier and at least one device interface identifier. A single function program block can include multiple function program variables. The function program variables can include at least one device group interface identifier. The above has introduced the use of spreadsheet A to automatically create device group program blocks, which will not be repeated here. The embodiment of the present disclosure does not limit the method for creating device group program blocks and function program blocks.

[0115] In the embodiment of the present disclosure, the mapping relationship between the identifier of each functional program block and the identifier of each device group program block, that is, the second mapping relationship, can be pre-stored in the first table. In addition, the identifier of the functional program block and the device group interface identifier in each functional program block can be imported into the first table; the identifier of the device group program block and the functional interface identifier in each device group program block can be imported into the second table. Then, the first table and the second table are used to determine the target functional interface identifier corresponding to each device group interface identifier in the first table, and each target functional interface identifier is updated to the first table. Using the identifier and device group interface identifier of each row of the updated first table as the first index, each target functional interface identifier is imported into the corresponding functional program block to complete the interconnection between the functional program block and the device group program block.

[0116] In addition, a fifth table can be pre-set, and the fifth table can show the fourth mapping relationship between each device interface identifier and each device bit number. The identifier of the device group program block and the device interface identifier in each of the device group program blocks can be imported into the third table. A fifth table can be pre-set, and the fifth table can show the fourth mapping relationship between each device interface identifier and each device bit number. According to the preset device program block naming rules, the identifier of the device program block corresponding to each device interface identifier is generated and updated to the third table. Using the identifier of the device group program block in the updated third table as the second index, the identifier of the device program block in the third table is imported into the corresponding device group program block to complete the interconnection between the device group program block and the device program block.

[0117] Figure 3 A schematic diagram of the structure of an automated programming device according to an embodiment of the present disclosure is provided. The device 30 includes:

[0118] The device variable identifier generating unit 31 is configured to generate at least one device variable identifier corresponding to each device icon according to the device bit number corresponding to each device icon;

[0119] The device program block creating unit 32 is used to create a device program block corresponding to each of the device icons according to each of the device variable identifiers;

[0120] A first connecting unit 33 is configured to connect each device group program block to a corresponding device program block according to a first mapping relationship between each device group program block and each device program block, wherein each device group program block is configured to implement at least one sub-function;

[0121] The second connecting unit 34 is used to connect each functional program block to the corresponding device group program block according to the second mapping relationship between each functional program block and each device group program block. A single functional program block is used to implement at least one function.

[0122] In a possible implementation, the device variable identifier includes an icon type, and the device program block creation unit 32 includes:

[0123] a device function type determining unit, configured to determine a device function type according to each of the icon types, wherein each of the device function types corresponds to a device program block template;

[0124] The device program block creation sub-unit is used to import the device variable identifiers corresponding to the same-function device icon groups belonging to the same device function type into the device program block template corresponding to the same device function type, and batch generate device program blocks corresponding to each of the same-function device icon groups.

[0125] In a possible implementation, the device 30 includes:

[0126] a device group program block creating unit, configured to establish at least one device group program block, wherein each device group program block corresponds to at least one function interface identifier for connecting to the function program block, and corresponds to at least one device interface identifier for connecting to the device program block;

[0127] The function program block creation unit is used to create at least one function program block, and each function program block corresponds to at least one device group interface identifier for connecting to the device group program block.

[0128] In a possible implementation, the device group program block creation unit includes:

[0129] The device group program block creation sub-unit is used to import the device group variable identifier and the value of the device group variable corresponding to the first device group of the same sub-function type into the device group program block template corresponding to the same sub-function type, and batch generate device group program blocks corresponding to each of the first device groups.

[0130] In a possible implementation, a single functional program block corresponds to an identifier of a functional program block, and a single device group program block corresponds to an identifier of a device group program block. The second mapping relationship includes a mapping relationship between the identifiers of each functional program block and the identifiers of each device group program block. The second mapping relationship is displayed in the first table.

[0131] The second connecting unit 34 includes:

[0132] a first importing unit, configured to import the functional program block identifier and the device group interface identifier in each functional program block into the first table;

[0133] a second importing unit, configured to import the identifiers of the device group program blocks and the functional interface identifiers in each of the device group program blocks into a second table;

[0134] a target device group program block determining unit, configured to determine, based on the second mapping relationship, an identifier of a target device group program block corresponding to an identifier of each function program block in the first table;

[0135] a target function interface identifier determining unit, configured to search the second table for a target function interface identifier corresponding to an identifier of each target device group program, and update each target function interface identifier into the first table;

[0136] The third importing unit is configured to import each target function interface identifier in the updated first table into the corresponding function program block using the identifier of the function program block and the device group interface identifier of each row of the updated first table as a first index.

[0137] In a possible implementation, a single device program block corresponds to an identifier of a device program block, and a single device group program block corresponds to an identifier of a device group program block. The first mapping relationship is presented in a third table, and the first mapping relationship includes: a mapping relationship between the identifiers of each device group program block and the identifiers of each device program block,

[0138] The first connection unit 33 includes:

[0139] a fourth importing unit, configured to import the identifier of the device group program block and the device interface identifier in each of the device group program blocks into the third table;

[0140] a device interface identifier generating unit, configured to generate identifiers of device program blocks corresponding to the device interface identifiers according to a preset device program block naming rule, and update the identifiers to the third table;

[0141] The fifth importing unit is configured to import the identifier of each device program block in the third table into the corresponding device group program block using the identifier of the updated device group program block in the third table as the second index.

[0142] In a possible implementation, the device variable identifier generating unit 31 includes:

[0143] a sixth importing unit, configured to import the variable identifier to be modified and the device bit number corresponding to each of the device icons into the fourth table;

[0144] A replacement unit, configured to replace the bit number portion of the variables to be modified in batches with the device bit number to obtain updated variable identifiers;

[0145] The seventh importing unit is configured to import each of the updated variable identifiers into a corresponding device icon using each device bit number in the fourth table as a third index.

[0146] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0147] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

[0148] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0149] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0150] Figure 4 A schematic diagram of the structure of an electronic device for automated programming according to an embodiment of the present disclosure is provided. For example, the electronic device 1900 can be provided as a server or a terminal device. Figure 4The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the above-described method.

[0151] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.

[0152] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.

[0153] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0154] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.

[0155] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0156] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0157] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0158] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0159] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0160] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0161] While various embodiments of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. An automated programming method, characterized in that: include: Generate at least one device variable identifier corresponding to each device icon according to the device bit number corresponding to each device icon; According to each of the device variable identifiers, a device program block corresponding to each of the device icons is established; According to the first mapping relationship between each device group program block and each device program block, connecting each device group program block with a corresponding device program block, wherein a single device group program block is used to implement at least one sub-function; A single device program block corresponds to an identifier of a device program block, and a single device group program block corresponds to an identifier of a device group program block. The first mapping relationship is presented in a third table, and the first mapping relationship includes: a mapping relationship between the identifiers of each device group program block and the identifiers of each device program block; Importing the identifiers of the device group program blocks and the device interface identifiers in each of the device group program blocks into the third table; According to the preset device program block naming rule, generate the device program block identifier corresponding to each device interface identifier, and update it to the third table; Using the updated identifier of the device group program block in the third table as the second index, the identifier of each device program block in the third table is imported into the corresponding device group program block; According to the second mapping relationship between each functional program block and each device group program block, each functional program block is connected to a corresponding device group program block, and a single functional program block is used to implement at least one function; A single functional program block corresponds to an identifier of a functional program block, and a single device group program block corresponds to an identifier of a device group program block, and the second mapping relationship includes: a mapping relationship between the identifiers of each functional program block and the identifiers of each device group program block, and the second mapping relationship is displayed in the first table; Importing the functional program block identifier and the device group interface identifier in each of the functional program blocks into the first table; Importing the identifiers of the device group program blocks and the functional interface identifiers in each of the device group program blocks into a second table; According to the second mapping relationship, determining the identifier of the target device group program block corresponding to the identifier of each function program block in the first table; In the second table, the target function interface identifier corresponding to the identifier of each target device group program is searched, and each target function interface identifier is updated into the first table; Using the identifiers of the function program blocks and the device group interface identifiers of each row of the updated first table as the first index, each target function interface identifier in the updated first table is imported into the corresponding function program block.

2. The method according to claim 1, characterized in that The device variable identifier includes: icon type, and the device program block corresponding to each device icon is established according to each device variable identifier, including: Determine the device function type according to each of the icon types, wherein each of the device function types corresponds to a device program block template; The device variable identifiers corresponding to the device icon groups with the same function belonging to the same device function type are imported into the device program block template corresponding to the same device function type, and the device program blocks corresponding to each of the device icon groups with the same function are generated in batches.

3. The method according to claim 1 or 2, characterized in that: The method comprises: Establishing at least one of the device group program blocks, wherein a single device group program block corresponds to at least one function interface identifier for connecting to the function program block, and corresponds to at least one device interface identifier for connecting to the device program block; At least one of the functional program blocks is established, and each of the functional program blocks corresponds to at least one device group interface identifier for connecting to the device group program block.

4. The method according to claim 3, characterized in that: The step of establishing at least one of the device group program blocks comprises: The device group variable identifier and the value of the device group variable corresponding to the first device group of the same sub-function type are imported into the device group program block template corresponding to the same sub-function type, and the device group program blocks corresponding to each of the first device groups are generated in batches.

5. The method according to claim 1 or 2, characterized in that: The step of generating at least one device variable identifier corresponding to each device icon according to the device bit number corresponding to each device icon includes: Import the variable identifier to be modified and the device bit number corresponding to each of the device icons into the fourth table; Using the device bit number to batch replace the bit number part of the variable to be modified to obtain an updated variable identifier; Using each device bit number in the fourth table as the third index, each updated variable identifier is imported into the corresponding device icon.

6. The method according to claim 1, characterized in that The second table shows a third mapping relationship between the identifier of the device group program block and the identifier of the functional interface, In the second table, the target function interface identifier corresponding to the identifier of each target device group program is queried, and each target function interface identifier is updated to the first table, including: in the second table, according to the third mapping relationship, the target function interface identifier is determined.

7. The method according to claim 1, characterized in that The device icon, the function program block, the device group program block, and the device program block are established on a PCS7 platform.

8. An automated programming device, characterized in that: include: A device variable identifier generating unit, configured to generate at least one device variable identifier corresponding to each device icon according to the device bit number corresponding to each device icon; A device program block creation unit, used to create a device program block corresponding to each of the device icons according to each of the device variable identifiers; A first connecting unit, configured to connect each device group program block to a corresponding device program block according to a first mapping relationship between each device group program block and each device program block, wherein a single device group program block is configured to implement at least one sub-function; A second connection unit is used to connect each of the functional program blocks to a corresponding device group program block according to a second mapping relationship between each functional program block and each of the device group program blocks, wherein a single functional program block is used to implement at least one function; A single functional program block corresponds to an identifier of a functional program block, a single device group program block corresponds to an identifier of a device group program block, the second mapping relationship includes: a mapping relationship between the identifiers of each functional program block and the identifiers of each device group program block, the second mapping relationship is displayed in the first table, The second connecting unit comprises: A first importing unit, used for importing the identifier of the functional program block and the device group interface identifier in each of the functional program blocks into the first table; A second importing unit, used for importing the identifiers of the device group program blocks and the functional interface identifiers in each of the device group program blocks into a second table; a target device group program block determining unit, configured to determine, according to the second mapping relationship, an identifier of a target device group program block corresponding to an identifier of each function program block in the first table; a target function interface identifier determining unit, configured to search the second table for the target function interface identifier corresponding to the identifier of each target device group program, and update each target function interface identifier into the first table; A third importing unit, used to import each target function interface identifier in the updated first table into a corresponding function program block by using the identifier of the function program block and the device group interface identifier of each row of the updated first table as a first index; A single device program block corresponds to an identifier of a device program block, and a single device group program block corresponds to an identifier of a device group program block. The first mapping relationship is presented in a third table. The first mapping relationship includes: a mapping relationship between the identifiers of each device group program block and the identifiers of each device program block. The first connecting unit includes: A fourth importing unit, used for importing the identifier of the device group program block and the device interface identifier in each of the device group program blocks into the third table; A device interface identifier generating unit, configured to generate identifiers of device program blocks corresponding to the device interface identifiers according to a preset device program block naming rule, and update the identifiers to the third table; The fifth importing unit is used to import the identifier of each device program block in the third table into the corresponding device group program block by using the identifier of the device group program block in the updated third table as the second index.