Downloading method and device, electronic equipment and storage medium

By using plug -in framework management equipment in the control system, the problem of changes in communication protocols between equipment and software requires simultaneous updating adaptation, and the efficient download process is available, which is suitable for different fields and different demand equipment.

CN119363589APending Publication Date: 2025-01-24SUPCON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411491916.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

During the download process of traditional control systems, the equipment and software need to be updated synchronously to cope with changes in communication protocols, resulting in low download efficiency.

Method used

By modifying the configuration file of the plug-in corresponding to the device in the device access platform, and using the dynamic plug-in loading method, the compiled file containing the modified content of the communication protocol field is converted into download content and downloaded to the device.

Benefits of technology

There is no need to re -modify the software. You only need to update the plug -in configuration file to deal with the communication protocol change to improve the download efficiency, and it is suitable for downloads of different fields and different demand devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363589A_ABST
    Figure CN119363589A_ABST
Patent Text Reader

Abstract

The invention discloses a downloading method and device, electronic equipment and a storage medium, and the method comprises the steps: modifying a corresponding communication protocol field in a configuration file of the equipment to obtain a target configuration file when a communication protocol change instruction is received; updating a plug-in corresponding to the equipment in the equipment access platform according to the target configuration file to obtain a target plug-in, and incrementally compiling a compiling file of the equipment according to the configuration data of the equipment and the communication protocol field modification content in the target configuration file, and determining that the equipment needs to execute downloading operation according to an equipment identifier carried in the downloading instruction and loading a target plug-in, and converting the compiled file into downloading content by utilizing the target plug-in and downloading the downloading content into the equipment. When the communication protocol between the equipment and the software is changed, the software does not need to be modified again, and only the configuration file of the plug-in corresponding to the equipment in the equipment access platform needs to be modified, so that the problem that the communication protocol between the equipment and the software needs to be synchronously updated and adapted is solved, and the downloading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of downloading technology, and more specifically, to a downloading method, device, electronic equipment and storage medium. Background Art

[0002] In the process of device downloading in traditional control systems, devices (such as controllers, communication modules, power switches, etc.) and software need to follow the pre-agreed communication protocol for downloading. When the communication protocol changes (such as the communication protocol is modified or a new field is added), both the device and the software need to be updated and adapted synchronously, which takes a long time and affects the download efficiency. Summary of the invention

[0003] In view of this, the present invention discloses a download method, apparatus, electronic device and storage medium, so that when the communication protocol between the device and the software is changed, there is no need to modify the software again, but only need to modify the configuration file of the plug-in corresponding to the device in the device access platform, adopt the dynamic loading plug-in method, and use the plug-in to convert the compiled file containing the modified content of the communication protocol field into download content and download it to the device, thereby improving the download efficiency.

[0004] A downloading method, comprising:

[0005] When a communication protocol change instruction is received, the corresponding communication protocol field in the configuration file of the device is modified accordingly to obtain the target configuration file;

[0006] Access the device to the platform and update the plug-in corresponding to the device according to the target configuration file to obtain the target plug-in;

[0007] Incrementally compile a compiled file of the device according to the configuration data of the device and the modified content of the communication protocol field in the target configuration file, wherein the compiled file corresponds to the target plug-in;

[0008] When receiving a download instruction, determining that the device needs to perform a download operation according to the device identifier carried in the download instruction, and loading the target plug-in;

[0009] The target plug-in is used to convert the compiled file into download content and download it to the device.

[0010] Optionally, it also includes:

[0011] When a new device is added to the device access platform, determining whether the device access platform has a plug-in corresponding to the type of the new device, wherein one plug-in corresponds to a group of devices of the same type;

[0012] If not, a new plug-in corresponding to the new device is added to the device access platform, and a new configuration file is provided for the new plug-in to describe the new device information, wherein the new plug-in complies with the plug-in specification format defined by the device access platform.

[0013] Optionally, it also includes:

[0014] In the compilation stage, the new device information is processed using the new plug-in to generate a target compilation file corresponding to the new device;

[0015] In the downloading stage, when a target download instruction is received, it is determined that the new device needs to perform a download operation according to the device identifier carried in the target download instruction, and the new plug-in is loaded;

[0016] The target compiled file is converted into download content by using the new plug-in and downloaded to the new device.

[0017] Optionally, it also includes:

[0018] If not, add new device description information to the configuration file of the plug-in corresponding to the new device.

[0019] Optionally, incrementally compiling a compilation file of the device according to the configuration data of the device and the modified content of the communication protocol field in the target configuration file includes:

[0020] According to the configuration item name of the modified content of the communication protocol field in the target configuration file, the corresponding target data is obtained from the configuration data;

[0021] According to the offset size of the modified content of the communication protocol field in the target configuration file, the target data is written to the corresponding offset position to obtain the binary compiled file.

[0022] Optionally, the device access platform provides a plug-in framework service for the device, provides a plug-in for each type of device under the plug-in framework service, and provides a configuration file that meets the plug-in framework standard specification for each plug-in to describe device information.

[0023] Optionally, the configuration file includes: a configuration part and a compilation part;

[0024] The configuration part is used to describe the device information displayed on the configuration interface;

[0025] The compilation part is used to describe the communication protocol information, wherein the compilation part has compilation part configuration items, and the compilation part configuration items support multiple grouping modes for generating different compilation files.

[0026] A downloading device, comprising:

[0027] The configuration file modification unit is used to modify the corresponding communication protocol field in the configuration file of the device to obtain the target configuration file when receiving the communication protocol change instruction;

[0028] A plug-in updating unit, configured to update a plug-in corresponding to the device in the device access platform according to the target configuration file to obtain a target plug-in;

[0029] an incremental compilation unit, configured to incrementally compile a compilation file of the device according to configuration data of the device and a modification content of a communication protocol field in the target configuration file, wherein the compilation file corresponds to the target plug-in;

[0030] A plug-in loading unit, configured to, when receiving a download instruction, determine that the device needs to perform a download operation according to a device identifier carried in the download instruction, and load the target plug-in;

[0031] The download unit is used to use the target plug-in to convert the compiled file into download content and download it to the device.

[0032] A computer storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the above-mentioned downloading method is implemented.

[0033] An electronic device, comprising: a memory and a processor;

[0034] The memory is used to store at least one instruction;

[0035] The processor is used to execute the at least one instruction to implement the above-mentioned method for downloading passenger identity information.

[0036] From the above technical scheme, it can be known that the present invention discloses a download method, device, electronic device and storage medium. When a communication protocol change instruction is received, the corresponding communication protocol field in the configuration file of the device is modified accordingly to obtain a target configuration file, the plug-in corresponding to the device in the device access platform is updated according to the target configuration file to obtain the target plug-in, and the compiled file of the device is incrementally compiled according to the configuration data of the device and the communication protocol field modification content in the target configuration file. When a download instruction is received, it is determined that the device needs to perform a download operation and load the target plug-in according to the device identifier carried in the download instruction, and the compiled file is converted into download content and downloaded to the device using the target plug-in. The present invention uses a plug-in framework to manage the device. When the communication protocol between the device and the software is changed, there is no need to modify the software again. It is only necessary to modify the configuration file of the plug-in corresponding to the device in the device access platform. The dynamic loading plug-in method is adopted, and the plug-in is used to convert the compiled file containing the modified content of the communication protocol field into download content and download it to the device. It is suitable for downloading devices in different fields and with different needs, and solves the problem that the communication protocol change between the device and the software needs to be updated and adapted synchronously, thereby improving the download efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without paying creative work.

[0038] Figure 1 A flow chart of a downloading method disclosed in an embodiment of the present invention;

[0039] Figure 2 A schematic diagram of the structure of a downloading device disclosed in an embodiment of the present invention;

[0040] Figure 3 The present invention is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] The embodiment of the present invention discloses a download method, device, electronic device and storage medium. When a communication protocol change instruction is received, the corresponding communication protocol field in the configuration file of the device is modified accordingly to obtain a target configuration file, the plug-in corresponding to the device in the device access platform is updated according to the target configuration file to obtain the target plug-in, and the compiled file of the device is incrementally compiled according to the configuration data of the device and the communication protocol field modification content in the target configuration file. When a download instruction is received, it is determined that the device needs to perform a download operation and load the target plug-in according to the device identifier carried in the download instruction, and the compiled file is converted into download content and downloaded to the device using the target plug-in. The present invention adopts a plug-in framework to manage the device. When the communication protocol between the device and the software is changed, there is no need to modify the software again. It is only necessary to modify the configuration file of the plug-in corresponding to the device in the device access platform. The dynamic loading plug-in method is adopted, and the compiled file containing the modified content of the communication protocol field is converted into download content and downloaded to the device using the plug-in. It is suitable for downloading devices in different fields and with different needs, and solves the problem that the communication protocol change between the device and the software needs to be updated and adapted synchronously, thereby improving the download efficiency.

[0043] See also Figure 1 , a flow chart of a download method disclosed in an embodiment of the present invention, the method is applied to a device entering a platform, the download method comprising:

[0044] Step S101: When a communication protocol change instruction is received, the corresponding communication protocol field in the configuration file of the device is modified accordingly to obtain a target configuration file.

[0045] The communication protocol change instruction carries a modified field or a newly added field of the communication protocol followed between the device and the software.

[0046] The device in this application is a general term for all hardware devices to be downloaded, such as controllers, communication modules, IO modules, power switches, etc.

[0047] The configuration file of the device includes: configuration part and compilation part.

[0048] The configuration part is used to describe the device information displayed on the configuration interface, such as device ID, device type, device version, and all configuration items included in the device. Configuration items are mainly used to describe the information displayed on the configuration software interface, such as the configuration item name, display name, control mode, whether it is editable, whether it is associated, and the value range of the configuration item.

[0049] The compilation part is used to describe the communication protocol information, including each field name of the protocol, field offset, data type, data length, compilation method, etc.

[0050] Considering the complexity of some communication protocols, multiple files may be generated during the compilation process.

[0051] The compilation part has compilation part configuration items, and the compilation part configuration items support multiple grouping modes for generating different compilation files.

[0052] At the same time, some fields in the communication protocol may require secondary calculation. Therefore, the compilation of some configuration items also supports corresponding processing by obtaining different data source calculation methods. For details, refer to the compilation fields of the communication protocol configuration items shown below.

[0053]

[0054] Step S102: Access the device to the platform and update the plug-in corresponding to the device according to the target configuration file to obtain the target plug-in.

[0055] It should be noted that this application proposes a universal download method for the control system to access different devices and provides a device access platform. The device access platform refers to a platform for accessing a variety of different types of devices, which can manage and download devices and provide a unified device management, maintenance and download process, thereby improving the compatibility and flexibility of the device, so that different types of devices can be integrated into the controller system.

[0056] In this application, the device access platform provides a plug-in framework service for the device. Under the plug-in framework service, a plug-in is provided for each type of device, and a configuration file that meets the plug-in framework standard specification is provided for each plug-in to describe the device information. The configuration file includes two parts, namely: a configuration part and a compilation part.

[0057] It should be noted that the device access puzzle provided in this application can connect to multiple devices for management and downloading, thereby greatly improving the compatibility and flexibility of the device, and at the same time making the management and maintenance of the device more convenient, and can solve the problem of unified download operations when the control system is connected to different types of devices.

[0058] In actual applications, after the communication protocol field corresponding to the device configuration file is modified accordingly to obtain the target configuration file, the device access platform will automatically scan the target configuration file, load and update the original configuration file, and update the plug-in according to the target configuration file to obtain the target plug-in.

[0059] Step S103: incrementally compile the compilation file of the device according to the configuration data of the device and the modified content of the communication protocol field in the target configuration file.

[0060] The compiled file corresponds to the target plug-in.

[0061] The configuration data of equipment involves multiple fields such as industrial control, automation systems and the Internet of Things. It refers to the data generated after the equipment is configured and set through configuration software.

[0062] The configuration data of the equipment includes but is not limited to equipment parameters, network configuration, monitoring and control equipment, etc.

[0063] Equipment parameters include: equipment model, specifications, working conditions, performance indicators and other basic information, which are the basis for the normal operation of the equipment.

[0064] Network configuration involves the device's network connection method, IP address, port number and other network parameters to ensure that the device can communicate with other systems or devices.

[0065] Monitoring and control settings include: equipment monitoring range, monitoring accuracy, alarm conditions, control logic, etc., which are used to achieve real-time monitoring and remote control of equipment.

[0066] Incremental compilation refers to the process of recompiling only the changed parts of the source program and its related parts during the software compilation process, rather than fully compiling the entire program.

[0067] Step S104: When a download instruction is received, it is determined that the device needs to perform a download operation according to the device identifier carried in the download instruction, and the target plug-in is loaded.

[0068] The device identifier in this application is a unique identifier for identifying a device. Since the device identifiers of different devices are different, the download instructions generated for different devices are different.

[0069] When the device access platform receives the download instruction, it parses the device identifier from the download instruction, determines the device on which the download operation needs to be performed, and loads the target plug-in corresponding to the device through the plug-in manager.

[0070] Step S105: Use the target plug-in to convert the compiled file into download content and download it to the device.

[0071] In the present application, the target plug-in and the compiled file correspond to each other, and the compiled file is converted into download content by using the target plug-in and downloaded to the device corresponding to the device identifier.

[0072] In summary, the present invention discloses a download method. When a communication protocol change instruction is received, the corresponding communication protocol field in the configuration file of the device is modified accordingly to obtain a target configuration file, the plug-in corresponding to the device in the device access platform is updated according to the target configuration file to obtain the target plug-in, and the compiled file of the device is incrementally compiled according to the configuration data of the device and the communication protocol field modification content in the target configuration file. When a download instruction is received, it is determined that the device needs to perform a download operation and load the target plug-in according to the device identifier carried in the download instruction, and the compiled file is converted into download content and downloaded to the device using the target plug-in. The present invention uses a plug-in framework to manage the device. When the communication protocol between the device and the software is changed, there is no need to modify the software again. It is only necessary to modify the configuration file of the plug-in corresponding to the device in the device access platform. The dynamic loading plug-in method is adopted, and the plug-in is used to convert the compiled file containing the modified content of the communication protocol field into download content and download it to the device. It is suitable for downloading devices in different fields and with different needs, and solves the problem that the communication protocol change between the device and the software needs to be updated and adapted synchronously, thereby improving the download efficiency.

[0073] In traditional control systems, when a new external device is added, the control system may not support it and additional work is required to achieve matching. At this time, it is often necessary to stop the application, modify and compile the code. At the same time, the newly added external device and program need to be adapted, which cannot meet the compatibility and flexibility of connecting to external devices, thus causing great inconvenience.

[0074] Based on this, in one embodiment, the downloading method may further include:

[0075] When a new device is added to the device access platform, it is determined whether the device access platform has a plug-in corresponding to the type of the new device, wherein one plug-in corresponds to a group of devices of the same type.

[0076] If not, a new plug-in corresponding to the new device is added to the device access platform, and a new configuration file is provided for the new plug-in to describe the new device information, wherein the new plug-in complies with the plug-in specification format defined by the device access platform.

[0077] The configuration phase mainly involves designing and implementing plug-ins. A group of devices of the same type corresponds to one plug-in, and a configuration file is required to describe the new device information.

[0078] When a new device needs to be added to the device access platform, the application first determines whether the device access platform has a plug-in corresponding to the type of the new device, specifically: first determine the device type to which the new device belongs, and then determine whether the device type has a corresponding plug-in. When it is determined that there is no plug-in corresponding to the type of the new device in the device access platform, directly add a new plug-in corresponding to the new device in the device access platform, and provide a new configuration file for the new plug-in to describe the new device information.

[0079] The configuration file in this application is based on the plug-in specification format defined by the device access platform, and mainly implements the configuration item part and the communication protocol field.

[0080] At the same time, the data type lengths in the protocol fields of different manufacturers may be inconsistent. For better compatibility and adaptation, the plug-in framework in the device access platform provides a unified data type length conversion standard.

[0081] In one embodiment, the downloading method may further include:

[0082] If the device access platform has a plug-in corresponding to the type of the new device, the plug-in is used as a new plug-in corresponding to the new device, and the new device description information is added to the configuration file of the plug-in.

[0083] When a new device needs to be added to the device access platform, the present application first determines whether the device access platform has a plug-in corresponding to the type of the new device. When it is determined that there is a plug-in corresponding to the type of the new device on the device access platform, there is no need to create a new plug-in. The new device description information can be directly added to the configuration file of the plug-in corresponding to the new device.

[0084] In one embodiment, the downloading method may further include:

[0085] In the compilation stage, the new device information is processed using the new plug-in to generate a target compilation file corresponding to the new device;

[0086] In the downloading stage, when a target download instruction is received, it is determined that the new device needs to perform a download operation according to the device identifier carried in the target download instruction, and the new plug-in is loaded;

[0087] The target compiled file is converted into download content by using the new plug-in and downloaded to the new device.

[0088] When a new external device is added, during the compilation phase, the new device information is processed using the determined new plug-in to generate a target compilation file corresponding to the new device for use in the download phase.

[0089] During the download phase, the device access platform parses the device identifier from the target download instruction passed in by the configuration software to determine the new device that needs to perform the download operation, loads the new plug-in corresponding to the new device through the plug-in manager, and uses the new plug-in to convert the target compiled file into download content and download it to the new device.

[0090] Different devices have different device identifiers, so different devices will generate corresponding target download instructions.

[0091] In summary, in this application, when it is necessary to add a new external device to the control system, the device is managed through the plug-in framework adopted by the device access platform, realizing hot plugging and plug-and-play hotspots. It is possible to add a new external device without stopping the application, and it has the characteristics of easy expansion and small impact range.

[0092] In one embodiment, step S103 may specifically include:

[0093] According to the configuration item name of the modified content of the communication protocol field in the target configuration file, the corresponding target data is obtained from the configuration data;

[0094] According to the offset size of the modified content of the communication protocol field in the target configuration file, the target data is written to the corresponding offset position to obtain the binary compiled file.

[0095] It should be noted that the device access platform in this application is set in the downloader, and the device access platform supports multiple communication protocols, and the communication protocols can be flexibly expanded. These features make the downloader more compatible, flexible and efficient, making the management and maintenance of the device more convenient and faster.

[0096] The downloader supports plug-in management, which enables downloads of different types of devices through plug-ins, and the plug-ins themselves can be modified and adjusted as needed to resolve protocol differences between different devices and different controllers. At the same time, the plug-in only needs to meet the interface specifications proposed by the downloader to be integrated into the control system.

[0097] The downloader that performs download operations during the download phase of this application supports multiple download protocols to support download operations on different device types, and the download process is unified. This can avoid download failures or download errors caused by different communication protocols, facilitate device maintenance and management, and enhance device compatibility.

[0098] In addition, the communication protocol of the downloader in the present application can be flexibly expanded, so that the communication protocol can be flexibly modified and customized to meet different needs. This scalability makes the downloader more suitable for device management and downloading in different fields and with different needs.

[0099] Corresponding to the above method embodiment, the present invention also discloses a downloading device.

[0100] See also Figure 2 , a schematic diagram of a structure of a downloading device disclosed in an embodiment of the present invention, the downloading device is applied to a device to enter a platform, and the downloading device may include:

[0101] The configuration file modification unit 201 is used to modify the corresponding communication protocol field in the configuration file of the device to obtain a target configuration file when receiving a communication protocol change instruction.

[0102] The communication protocol change instruction carries a modified field or a newly added field of the communication protocol followed between the device and the software.

[0103] The device in this application is a general term for all hardware devices to be downloaded, such as controllers, communication modules, IO modules, power switches, etc.

[0104] The configuration file of the device includes: configuration part and compilation part.

[0105] The configuration part is used to describe the device information displayed on the configuration interface, such as device ID, device type, device version, and all configuration items included in the device. Configuration items are mainly used to describe the information displayed on the configuration software interface, such as the configuration item name, display name, control mode, whether it is editable, whether it is associated, and the value range of the configuration item.

[0106] The compilation part is used to describe the communication protocol information, including each field name of the protocol, field offset, data type, data length, compilation method, etc.

[0107] Considering the complexity of some communication protocols, multiple files may be generated during the compilation process.

[0108] The compilation part has compilation part configuration items, and the compilation part configuration items support multiple grouping modes for generating different compilation files.

[0109] At the same time, some fields in the communication protocol may require secondary calculations. Therefore, some compilation configuration items also support corresponding processing by obtaining different data source calculation methods.

[0110] The plug-in updating unit 202 is used to update the plug-in corresponding to the device in the device access platform according to the target configuration file to obtain a target plug-in.

[0111] It should be noted that this application proposes a universal download method for the control system to access different devices and provides a device access platform. The device access platform refers to a platform for accessing a variety of different types of devices, which can manage and download devices and provide a unified device management, maintenance and download process, thereby improving the compatibility and flexibility of the device, so that different types of devices can be integrated into the controller system.

[0112] In this application, the device access platform provides a plug-in framework service for the device. Under the plug-in framework service, a plug-in is provided for each type of device, and a configuration file that meets the plug-in framework standard specification is provided for each plug-in to describe the device information. The configuration file includes two parts, namely: a configuration part and a compilation part.

[0113] It should be noted that the device access puzzle provided in this application can connect to multiple devices for management and downloading, thereby greatly improving the compatibility and flexibility of the device, and at the same time making the management and maintenance of the device more convenient, and can solve the problem of unified download operations when the control system is connected to different types of devices.

[0114] In actual applications, after the communication protocol field corresponding to the device configuration file is modified accordingly to obtain the target configuration file, the device access platform will automatically scan the target configuration file, load and update the original configuration file, and update the plug-in according to the target configuration file to obtain the target plug-in.

[0115] The incremental compiling unit 203 is used to incrementally compile the compilation file of the device according to the configuration data of the device and the modified content of the communication protocol field in the target configuration file.

[0116] The compiled file corresponds to the target plug-in.

[0117] The configuration data of equipment involves multiple fields such as industrial control, automation systems and the Internet of Things. It refers to the data generated after the equipment is configured and set through configuration software.

[0118] The configuration data of the equipment includes but is not limited to equipment parameters, network configuration, monitoring and control equipment, etc.

[0119] Equipment parameters include: equipment model, specifications, working conditions, performance indicators and other basic information, which are the basis for the normal operation of the equipment.

[0120] Network configuration involves the device's network connection method, IP address, port number and other network parameters to ensure that the device can communicate with other systems or devices.

[0121] Monitoring and control settings include: equipment monitoring range, monitoring accuracy, alarm conditions, control logic, etc., which are used to achieve real-time monitoring and remote control of equipment.

[0122] Incremental compilation refers to the process of recompiling only the changed parts of the source program and its related parts during the software compilation process, rather than fully compiling the entire program.

[0123] The plug-in loading unit 204 is used to determine that the device needs to perform a download operation according to the device identifier carried in the download instruction when receiving the download instruction, and load the target plug-in.

[0124] The device identifier in this application is a unique identifier for identifying a device. Since the device identifiers of different devices are different, the download instructions generated for different devices are different.

[0125] When the device access platform receives the download instruction, it parses the device identifier from the download instruction, determines the device on which the download operation needs to be performed, and loads the target plug-in corresponding to the device through the plug-in manager.

[0126] The download unit 205 is used to use the target plug-in to convert the compiled file into download content and download it to the device.

[0127] In the present application, the target plug-in and the compiled file correspond to each other, and the compiled file is converted into download content by using the target plug-in and downloaded to the device corresponding to the device identifier.

[0128] In summary, the present invention discloses a download device. When a communication protocol change instruction is received, the corresponding communication protocol field in the configuration file of the device is modified accordingly to obtain a target configuration file, the plug-in corresponding to the device in the device access platform is updated according to the target configuration file to obtain a target plug-in, and the compiled file of the device is incrementally compiled according to the configuration data of the device and the communication protocol field modification content in the target configuration file. When a download instruction is received, it is determined that the device needs to perform a download operation and load the target plug-in according to the device identifier carried in the download instruction, and the compiled file is converted into download content and downloaded to the device using the target plug-in. The present invention uses a plug-in framework to manage the device. When the communication protocol between the device and the software is changed, there is no need to modify the software again. It is only necessary to modify the configuration file of the plug-in corresponding to the device in the device access platform. The dynamic loading plug-in method is adopted, and the compiled file containing the modified content of the communication protocol field is converted into download content and downloaded to the device using the plug-in. It is suitable for downloading devices in different fields and with different needs, and solves the problem that the communication protocol change between the device and the software needs to be updated and adapted synchronously, thereby improving the download efficiency.

[0129] In traditional control systems, when a new external device is added, the control system may not support it and additional work is required to achieve matching. At this time, it is often necessary to stop the application, modify and compile the code. At the same time, the newly added external device and program need to be adapted, which cannot meet the compatibility and flexibility of connecting to external devices, thus causing great inconvenience.

[0130] Based on this, in one embodiment, the downloading device may further include:

[0131] A judging unit, configured to judge whether the device access platform has a plug-in corresponding to the type of the new device when a new device is added to the device access platform, wherein one plug-in corresponds to a group of devices of the same type;

[0132] A new plug-in adding unit is used to add a new plug-in corresponding to the new device in the device access platform when the judgment unit judges that the new device is not present, and provide a new configuration file for the new plug-in to describe the new device information, wherein the new plug-in complies with the plug-in specification format defined by the device access platform.

[0133] Based on this, in one embodiment, the downloading device may further include:

[0134] The device information adding unit is used to add new device description information to the configuration file of the plug-in corresponding to the new device when the judging unit judges that the new device is true.

[0135] When a new device needs to be added to the device access platform, the present application first determines whether the device access platform has a plug-in corresponding to the type of the new device. When it is determined that there is a plug-in corresponding to the type of the new device on the device access platform, there is no need to create a new plug-in. The new device description information can be directly added to the configuration file of the plug-in corresponding to the new device.

[0136] In one embodiment, the downloading device may further include:

[0137] In the compilation stage, the new device information is processed using the new plug-in to generate a target compilation file corresponding to the new device;

[0138] In the downloading stage, when a target download instruction is received, it is determined that the new device needs to perform a download operation according to the device identifier carried in the target download instruction, and the new plug-in is loaded;

[0139] The target compiled file is converted into download content by using the new plug-in and downloaded to the new device.

[0140] When a new external device is added, during the compilation phase, the new device information is processed using the determined new plug-in to generate a target compilation file corresponding to the new device for use in the download phase.

[0141] During the download phase, the device access platform parses the device identifier from the target download instruction passed in by the configuration software to determine the new device that needs to perform the download operation, loads the new plug-in corresponding to the new device through the plug-in manager, and uses the new plug-in to convert the target compiled file into download content and download it to the new device.

[0142] Different devices have different device identifiers, so different devices will generate corresponding target download instructions.

[0143] In summary, in this application, when it is necessary to add a new external device to the control system, the device is managed through the plug-in framework adopted by the device access platform, realizing hot plugging and plug-and-play hotspots. It is possible to add a new external device without stopping the application, and it has the characteristics of easy expansion and small impact range.

[0144] In one embodiment, the incremental compilation unit 203 is specifically used for:

[0145] According to the configuration item name of the modified content of the communication protocol field in the target configuration file, the corresponding target data is obtained from the configuration data;

[0146] According to the offset size of the modified content of the communication protocol field in the target configuration file, the target data is written to the corresponding offset position to obtain the binary compiled file.

[0147] It should be noted that the device access platform in this application is set in the downloader, and the device access platform supports multiple communication protocols, and the communication protocols can be flexibly expanded. These features make the downloader more compatible, flexible and efficient, making the management and maintenance of the device more convenient and faster.

[0148] Corresponding to the above embodiment, the present invention further discloses a computer storage medium, which stores at least one instruction. When the at least one instruction is executed by a processor, the steps shown in the download method embodiment are implemented.

[0149] Computer storage media may be tangible media that may contain or store programs for use by or in conjunction with an instruction execution system, device, or apparatus. Computer storage media may be machine-readable signal media or machine-readable storage media. Computer storage media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0150] Corresponding to the above embodiment, Figure 3 As shown, the present invention also provides an electronic device, which may include: a processor 1 and a memory 2;

[0151] The processor 1 and the memory 2 communicate with each other via a communication bus 3;

[0152] Processor 1, configured to execute at least one instruction;

[0153] Memory 2, used to store at least one instruction;

[0154] The processor 1 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.

[0155] The memory 2 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0156] Among them, the processor executes at least one instruction to implement the steps shown in the download method embodiment.

[0157] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0158] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0159] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A downloading method, characterized in that: include: When a communication protocol change instruction is received, the corresponding communication protocol field in the configuration file of the device is modified accordingly to obtain the target configuration file; Access the device to the platform and update the plug-in corresponding to the device according to the target configuration file to obtain the target plug-in; Incrementally compile a compiled file of the device according to the configuration data of the device and the modified content of the communication protocol field in the target configuration file, wherein the compiled file corresponds to the target plug-in; When receiving a download instruction, determining that the device needs to perform a download operation according to the device identifier carried in the download instruction, and loading the target plug-in; The target plug-in is used to convert the compiled file into download content and download it to the device.

2. The downloading method according to claim 1, characterized in that: Also includes: When a new device is added to the device access platform, determining whether the device access platform has a plug-in corresponding to the type of the new device, wherein one plug-in corresponds to a group of devices of the same type; If not, a new plug-in corresponding to the new device is added to the device access platform, and a new configuration file is provided for the new plug-in to describe the new device information, wherein the new plug-in complies with the plug-in specification format defined by the device access platform.

3. The downloading method according to claim 2, characterized in that: Also includes: In the compilation stage, the new device information is processed using the new plug-in to generate a target compilation file corresponding to the new device; In the downloading stage, when a target download instruction is received, it is determined that the new device needs to perform a download operation according to the device identifier carried in the target download instruction, and the new plug-in is loaded; The target compiled file is converted into download content by using the new plug-in and downloaded to the new device.

4. The downloading method according to claim 2, characterized in that: Also includes: If not, add new device description information to the configuration file of the plug-in corresponding to the new device.

5. The downloading method according to claim 1, characterized in that: The incrementally compiling the compiled file of the device according to the configuration data of the device and the modified content of the communication protocol field in the target configuration file comprises: According to the configuration item name of the modified content of the communication protocol field in the target configuration file, the corresponding target data is obtained from the configuration data; According to the offset size of the modified content of the communication protocol field in the target configuration file, the target data is written to the corresponding offset position to obtain the binary compiled file.

6. The downloading method according to any one of claims 1 to 5, characterized in that: The device access platform provides a plug-in framework service for the device, under which a plug-in is provided for each type of device, and a configuration file that meets the plug-in framework standard specification is provided for each plug-in to describe device information.

7. The downloading method according to claim 1, characterized in that: The configuration file includes: a configuration part and a compilation part; The configuration part is used to describe the device information displayed on the configuration interface; The compilation part is used to describe the communication protocol information, wherein the compilation part has compilation part configuration items, and the compilation part configuration items support multiple grouping modes for generating different compilation files.

8. A downloading device, characterized in that: include: The configuration file modification unit is used to modify the corresponding communication protocol field in the configuration file of the device to obtain the target configuration file when receiving the communication protocol change instruction; A plug-in updating unit, configured to update a plug-in corresponding to the device in the device access platform according to the target configuration file to obtain a target plug-in; an incremental compilation unit, configured to incrementally compile a compilation file of the device according to configuration data of the device and a modification content of a communication protocol field in the target configuration file, wherein the compilation file corresponds to the target plug-in; A plug-in loading unit, configured to, when receiving a download instruction, determine that the device needs to perform a download operation according to a device identifier carried in the download instruction, and load the target plug-in; The download unit is used to use the target plug-in to convert the compiled file into download content and download it to the device.

9. A computer storage medium, characterized in that: The computer storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, the download method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The electronic device comprises: a memory and a processor; The memory is used to store at least one instruction; The processor is used to execute the at least one instruction to implement the method for downloading passenger identity information as described in any one of claims 1 to 7.