CN114594714B - Equipment control method, device, equipment and storage medium - Google Patents

Equipment control method, device, equipment and storage medium Download PDF

Info

Publication number
CN114594714B
CN114594714B CN202210293897.6A CN202210293897A CN114594714B CN 114594714 B CN114594714 B CN 114594714B CN 202210293897 A CN202210293897 A CN 202210293897A CN 114594714 B CN114594714 B CN 114594714B
Authority
CN
China
Prior art keywords
information
target
control
equipment
target control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210293897.6A
Other languages
Chinese (zh)
Other versions
CN114594714A (en
Inventor
胡勇
陶志专
陈利平
段永超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Jiaqishi Technology Co ltd
Original Assignee
Suzhou Jiaqishi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Jiaqishi Technology Co ltd filed Critical Suzhou Jiaqishi Technology Co ltd
Priority to CN202210293897.6A priority Critical patent/CN114594714B/en
Publication of CN114594714A publication Critical patent/CN114594714A/en
Application granted granted Critical
Publication of CN114594714B publication Critical patent/CN114594714B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23051Remote control, enter program remote, detachable programmer
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application relates to a device control method, a device, equipment and a storage medium, wherein a first target control instruction is obtained based on target control information by obtaining the target control information and target protocol address information of target equipment, so that the rapid and automatic generation of a control instruction corresponding to the target control can be realized, the target interface information corresponding to the target protocol address information and the target controller communication protocol information are determined from a preset protocol information base, and the communication information of the target equipment can be accurately obtained; and carrying out communication protocol encapsulation processing on the first target control instruction based on the target controller communication protocol information to obtain a second target control instruction, and sending the second target control instruction to target equipment for corresponding control according to the target interface information, so that equipment using different communication protocols can be conveniently controlled, the degree of automation in equipment control design is improved, and errors caused by manual editing are reduced.

Description

Equipment control method, device, equipment and storage medium
Technical Field
The present invention relates to the field of automation, and in particular, to a device control method, apparatus, device, and storage medium.
Background
With the development of automation technology, various devices manufactured in a target device manufacturer have more complicated control and production flow management requirements. In the related art, because the communication protocols of the controllers used by various devices are different, in the design of the control interface of the upper computer, a designer is required to write corresponding programs for different controllers, and the communication protocol libraries of the different controllers are numerous, which results in consumption of a large amount of design time and possibly error occurrence.
Disclosure of Invention
In order to solve the technical problems, the present disclosure provides an apparatus control method, which can quickly and conveniently obtain effective control instructions for different target apparatus controllers, and reduce the occurrence probability of control errors. The technical scheme of the present disclosure is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided a device control method, which may include:
acquiring target control information and target protocol address information of target equipment; the target control information is control information for controlling the target equipment;
obtaining a first target control instruction based on the target control information;
determining target interface information corresponding to the target protocol address information and target controller communication protocol information;
Performing communication protocol encapsulation processing on the first target control instruction based on the target controller communication protocol information to obtain a second target control instruction;
and sending the second target control instruction to the target equipment for corresponding control according to the target interface information.
In one possible implementation, the method may further include:
acquiring first interface information and first controller communication protocol information of a plurality of devices;
respectively configuring corresponding first protocol address information for the plurality of devices;
and constructing the preset protocol information base according to the first interface information, the first controller communication protocol information and the first protocol address information.
In one possible implementation manner, the generating the first target control instruction based on the target control information may include:
generating a third target control instruction based on the target control information;
performing format conversion processing on the third target control instruction to obtain the first target control instruction; the first target control instruction is in a control data format for the target device.
In one possible implementation, the method may further include:
Acquiring equipment identification information and control task information of a plurality of equipment;
generating corresponding control information according to the equipment identification information and the control task information;
and constructing a control information base based on the corresponding control information.
In one possible implementation manner, before the obtaining the target control information and the target protocol address information of the target device, the method further includes:
responding to a first preset operation of the target control, and generating target control information corresponding to the target control;
and responding to a second preset operation of the associated address parameters corresponding to the target control, and generating target protocol address information of the target equipment.
In one possible implementation, the method may further include:
and when receiving second interface information and second controller communication protocol information of the equipment to be updated, updating the preset protocol information base based on the second interface information and the second controller communication protocol information.
In one possible implementation, the method may further include:
receiving control information obtained by corresponding control of the target equipment based on the second target control instruction;
obtaining an execution result of the target equipment according to the control information;
And displaying a corresponding execution result.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus control device, including:
the information acquisition module is used for acquiring target control information and target protocol address information of target equipment; the target control information is control information for controlling the target equipment according to the target control;
the first instruction generation module is used for obtaining a first target control instruction based on the target control information;
the information determining module is used for determining target interface information and target controller communication protocol information corresponding to the target protocol address information from a preset protocol information base;
the packaging module is used for carrying out communication protocol packaging processing on the first target control instruction based on the target controller communication protocol information to obtain a second target control instruction;
and the instruction sending module is used for sending the second target control instruction to the target equipment for corresponding control according to the target interface information.
In one possible implementation, the apparatus may further include:
the first information acquisition module is used for acquiring first interface information and first controller communication protocol information of a plurality of devices;
The configuration module is used for respectively configuring corresponding first protocol address information for the plurality of devices;
the preset protocol information base construction module is used for constructing the preset protocol information base according to the first interface information, the first controller communication protocol information and the first protocol address information.
In one possible implementation manner, the first instruction generating module includes:
the third instruction generation module is used for generating a third target control instruction based on the target control information;
the format processing unit is used for performing format conversion processing on the third target control instruction to obtain the first target control instruction; the first target control instruction is in a control data format for the target device.
In one possible implementation, the apparatus may further include:
the second information acquisition module is used for acquiring equipment identification information and control task information of a plurality of equipment;
the control information generation module is used for generating corresponding control information according to the equipment identification information and the control task information;
and the control information base construction module is used for constructing a control information base based on the corresponding control information.
In one possible implementation, the apparatus further includes:
the target control information generation module is used for responding to a first preset operation on a target control and generating target control information corresponding to the target control;
and the target protocol address information generating module is used for responding to a second preset operation of the associated address parameters corresponding to the target control and generating the target protocol address information of the target equipment.
In one possible implementation, the apparatus may further include:
and the preset protocol information base updating module is used for updating the preset protocol information base based on the second interface information and the second controller communication protocol information when receiving the second interface information and the second controller communication protocol information of the equipment to be updated.
In one possible implementation, the apparatus may further include:
the control information receiving module is used for receiving control information obtained by corresponding control of the target equipment based on the second target control instruction;
the execution result generation module is used for obtaining an execution result of the target equipment according to the control information;
and the display module is used for displaying the corresponding execution result.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any of the first aspects above.
According to a fourth aspect of the disclosed embodiments, there is provided a computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the method of any of the first aspects of the disclosed embodiments.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor, cause the computer to perform the method of any one of the first aspects of embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
according to the embodiment, the first target control instruction is obtained by obtaining the target control information and the target protocol address information of the target equipment based on the target control information, so that the control instruction corresponding to the target control can be quickly and automatically generated, the target interface information corresponding to the target protocol address information and the target controller communication protocol information are determined from the preset protocol information base, and the communication information of the target equipment can be accurately obtained; and carrying out communication protocol encapsulation processing on the first target control instruction based on the target controller communication protocol information to obtain a second target control instruction, and sending the second target control instruction to target equipment for corresponding control according to the target interface information, so that equipment using different communication protocols can be conveniently controlled, the degree of automation in equipment control design is improved, and errors caused by manual editing are reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of an implementation environment provided in an embodiment of the present application.
Fig. 2 is a flow chart illustrating a device control method according to an exemplary embodiment.
Fig. 3 is a flow chart illustrating a device control method according to an exemplary embodiment.
FIG. 4 is a flowchart illustrating generating a first target control instruction based on target control information, according to an example embodiment.
Fig. 5 is a flowchart illustrating a device control method according to an exemplary embodiment.
Fig. 6 is a flowchart illustrating a device control method according to an exemplary embodiment.
Fig. 7 is a flowchart illustrating a device control method according to an exemplary embodiment.
Fig. 8 is a schematic diagram illustrating a device control apparatus according to an exemplary embodiment.
Fig. 9 is a block diagram of an electronic device for a device control method according to an exemplary embodiment.
Detailed Description
In order to better understand the technical solutions in the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In order to implement the technical solution of the present application, more engineering technicians can easily understand and apply the present application, and the working principle of the present application will be further explained with reference to specific embodiments.
The method and the device can be applied to the field of automatic control. Referring to fig. 1, fig. 1 is a schematic diagram of an implementation environment provided in an embodiment of the present application, as shown in fig. 1, where the implementation environment may include:
at least one device 01 and at least one terminal 02. The at least one device 01 and the at least one terminal 02 may communicate data over a network.
In an alternative embodiment, device 01 may be a device controlled by terminal 02. In the embodiment of the present specification, the apparatus 01 may refer to an industrial product used in a production and management process, and may specifically include general-purpose apparatuses, special-purpose apparatuses, and the like. In practical applications, the device 01 may be a mechanical device, an electrical device, a special device, an office device, an instrument, a network device, etc.
In an alternative embodiment, the terminal 02 may be a host computer controlling the device 01. The terminal 02 may include, but is not limited to, a smart phone, a desktop computer, a tablet computer, a notebook computer, a smart speaker, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, a smart wearable device, and the like. The operating system running on terminal 02 may include, but is not limited to, an android system, an IOS system, linux, windows, unix, and the like.
In an alternative embodiment, the terminal 02 may be replaced by a server controlling the device 01. The server can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), basic cloud computing services such as big data and artificial intelligent platforms and the like.
It should be noted that, a possible sequence of steps is shown in the following figures, and is not limited to the strict order of the sequence. Some steps may be performed in parallel without mutual dependence. User information (including but not limited to user device information, user personal information, user behavior information, etc.) and data (including but not limited to presented data, etc.) referred to by this disclosure are both information and data that are authorized by the user or are sufficiently authorized by the parties.
Fig. 2 is a flow chart illustrating a device control method according to an exemplary embodiment. The device control method may be applied to the terminal 02, and as shown in fig. 2, the device control method may include the steps of:
In step S21, target control information and target protocol address information of the target device are acquired.
In the embodiment of the present disclosure, the target control information may be information of a control for controlling the target device. A control may refer to the encapsulation of data and methods. The information of the control may include control function information and control access information. The control function information may represent a function that can be implemented by using the control, and the control access information may represent a specific access object in the target device, for example, a mechanical arm, a signal lamp, and the like.
The target device is one of a plurality of devices associated with the host computer. Specifically, the plurality of devices associated with the upper computer may refer to devices that perform data communication with the upper computer through a network, and the plurality of devices may perform a servo operation based on control of the upper computer.
In this embodiment of the present disclosure, the target protocol address information of the target device may represent a communication location of the target device, specifically, an ADS (Automation Device Specification ) communication address may be used to provide a route for communication between the host computer and the device, for example, the target protocol address information of the target device may be "192.168.2.2".
In the embodiment of the present disclosure, a control may implement a function corresponding to the control with respect to a plurality of devices using different communication protocols. Specifically, the control function can be realized for devices with different communication protocols through control access information.
In actual use, the control can be dragged in the interface of the upper computer, and the ADS communication address is configured in the preset address parameter of the control, so that the target control information and the target protocol address information of the target equipment can be generated.
In step S22, a first target control instruction is obtained based on the target control information.
In the embodiment of the specification, data extraction processing can be performed on the target control information to obtain to-be-converted data including the target control function information and the control access information. And performing language conversion on the band conversion data to obtain a first target control instruction which can be identified and used by the equipment. In some exemplary embodiments, the target control information may be in a computer programming language, such as C language, c++ language, java language, etc., and the target device may employ modern large-scale integrated circuit technology, such as PLC (Programmable Logic Controller ) to control the internal circuitry of the device. After the data extraction processing and the language conversion are carried out on the target control information, the control instruction written in the ladder diagram language can be obtained.
In step S23, the target interface information and the target controller communication protocol information corresponding to the target protocol address information are determined from the preset protocol information base.
In the embodiment of the present disclosure, different devices may use different communication protocols, for example, communication protocols such as BSAP, CC-Link, and CAN may be used in the device controlled by the automation program; communication protocols such as 1-Wire, BACnet, C-Bus and the like can be adopted in the automatic building equipment; the industrial control system can adopt communication protocols such as OPC DA, OPC HDA, OPC UA and the like. The preset protocol information base can store different protocol address information, interface information of corresponding equipment and controller communication protocol information of the corresponding equipment. After the target protocol address information is obtained, the target protocol address information can be matched with the protocol address information in a preset protocol information base, so that the target interface information and the target controller communication protocol information corresponding to the target protocol address information are obtained. The target interface information may be interface information of network connection between the target device and the upper computer.
In step S24, the first target control command is subjected to a communication protocol encapsulation process based on the target controller communication protocol information, so as to obtain a second target control command.
In this embodiment of the present disclosure, the encapsulating processing of the first target control instruction based on the target controller communication protocol information may be content filling of each field of the encapsulation format. The content filling of each field of the encapsulation format can be determined according to whether the connected target device and the upper computer are in a communication state or not, and the type of the communication protocol used by the target device. The fields for filling the encapsulation format content can include fields of a communication protocol packet corresponding to the target device, a serial number of the target device, a processing request, a connection, and the like. The resulting second target control instruction may be an integration of the encapsulation field with the first target control instruction.
In step S25, according to the target interface information, a second target control instruction is sent to the target device for corresponding control.
In the embodiment of the present disclosure, a sending interface of the second target control instruction is determined according to the target interface information, and the second target control instruction is sent to the target device through the sending interface. After receiving the second target control instruction, the target device can perform corresponding control based on the device language which can be identified for use.
According to the embodiment, the first target control instruction is obtained by obtaining the target control information and the target protocol address information of the target equipment based on the target control information, so that the control instruction corresponding to the target control can be quickly and automatically generated, the target interface information corresponding to the target protocol address information and the target controller communication protocol information are determined from the preset protocol information base, and the communication information of the target equipment can be accurately obtained; and carrying out communication protocol encapsulation processing on the first target control instruction based on the target controller communication protocol information to obtain a second target control instruction, and sending the second target control instruction to target equipment for corresponding control according to the target interface information, so that equipment using different communication protocols can be conveniently controlled, the degree of automation in equipment control design is improved, and errors caused by manual editing are reduced.
Fig. 3 is a flow chart illustrating a device control method according to an exemplary embodiment. As shown in fig. 3, the method may further include:
in step S31, first interface information and first controller communication protocol information of a plurality of devices are acquired.
In this embodiment of the present disclosure, the first interface information of the plurality of devices may refer to interface information of all devices that may be debugged by the host computer. And the first interface information of the plurality of devices is acquired, so that the communication with the interface matched with the target device in the subsequent use is facilitated. The first controller communication protocol information may refer to controller communication protocol information of all devices that can be debugged by the upper computer, for example, may be communication protocol information such as OPC DA, OPC HDA, OPC UA, and the like.
In step S32, corresponding first protocol address information is configured for each of the plurality of devices.
In this embodiment of the present disclosure, the available first protocol address information may be configured in advance for each device that may be debugged by the upper computer. Alternatively, the upper computer may be used to configure the first protocol address information of the device.
In step S33, a preset protocol information base is constructed according to the first interface information, the first controller communication protocol information and the first protocol address information.
In the embodiment of the present disclosure, protocol information of all devices that can be debugged by an upper computer may be constructed according to the matching relationship between the first interface information, the first controller communication protocol information, and the first protocol address information, so as to obtain a preset protocol information library.
Debugging object of the above computer: for example, the device 1, the device 2 and the device 3 use an OPC DA communication protocol and an interface corresponding to OPC DA, the device 2 uses an OPC HADA communication protocol and an interface corresponding to OPC HADA, and the device 3 uses an OPC UA communication protocol and an interface corresponding to OPC HADA, where the communication protocol and the corresponding interface used by each device are the properties of the device itself. The device 1, the device 2 and the device 3 may be assigned corresponding first protocol address information, for example, address 1, address 2 and address 3, respectively. Then a preset protocol information base can be constructed according to the relation between each device and the first interface information, the first controller communication protocol information and the first protocol address information in the following table:
TABLE 1
Apparatus and method for controlling the operation of a device First controller communication protocol information First interface information First protocol address information
Apparatus 1 OPCDA communication protocol OPCDA corresponding interface Address 1
Device 2 OPCHADA communication protocol Interface corresponding to OPCHADA Address 2
Device 3 OPCUA communication protocol Interface corresponding to OPCHADA Address 3
According to the embodiment, the first interface information, the first controller communication protocol information and the first protocol address information corresponding to the target protocol address information are obtained, corresponding first protocol address information is configured for the plurality of devices respectively, and the preset protocol information base is constructed according to the first interface information, the first controller communication protocol information and the first protocol address information, so that the first interface information, the first controller communication protocol information and the first protocol address information corresponding to each device can be obtained, and the target interface information and the target controller communication protocol information corresponding to the target protocol address information can be directly determined from the preset protocol information base in actual use, and the processing efficiency in actual use is improved.
FIG. 4 is a flowchart illustrating generating a first target control instruction based on target control information, according to an example embodiment. Specifically, generating the first target control instruction based on the target control information may include:
in step S41, a third target control instruction is generated based on the target control information.
In this embodiment of the present disclosure, the target control information may refer to target control function information and control access information corresponding to a target control in an upper computer. In some examples, the third target control instruction may be a control instruction that encodes target control functionality information and control access information using a computer programming language format.
In step S42, format conversion processing is performed on the third target control instruction, so as to obtain a first target control instruction.
In the embodiment of the present disclosure, the first target control instruction may be in a control data format used by the target device. Specifically, in practical use, a conversion matrix from a computer programming language format to a control data format may be established in advance, wherein when the computer programming language format and the control data format are at least one, the conversion matrix from each computer programming language format to each control data format is established. After determining the computer programming language format used by the third target control instruction and the control data format to be converted, the corresponding conversion matrix can be matched based on the computer programming language format and the control data format, and format conversion processing is performed on the third target control instruction by using the corresponding conversion matrix, so that the first target control instruction is obtained.
According to the embodiment, the third target control instruction is generated based on the target control information, and format conversion processing is carried out on the third target control instruction to obtain the first target control instruction, so that the first target control instruction in a control data format required by the equipment can be obtained conveniently, and convenience in operating the target control is improved.
Fig. 5 is a flowchart illustrating a device control method according to an exemplary embodiment. As shown in fig. 5, the method may further include:
in step S51, device identification information and control task information of a plurality of devices are acquired.
In the embodiment of the present specification, the device identification information of the plurality of devices may be serial numbers of the devices, and the device identification information may characterize types and specific identities of the devices. Because the tasks performed by different types of equipment are different, the generation of the follow-up control information can be set by acquiring the equipment identification information representing the equipment type. And the upper computer can control and set different equipment of different types or the same type, and can also set the generation of subsequent control information by acquiring equipment identification information representing the identity of the equipment.
In the embodiment of the present specification, the control task information may refer to controlling the whole device or a part of elements in the device. Specifically, the control task information of the device or the element may be determined in advance for different types of devices and elements in the device.
In step S52, corresponding control information is generated according to the device identification information and the control task information.
In the embodiment of the present disclosure, the control information corresponding to the device identification information and the control task information may include button information, task object information, and execution action information. It should be noted that the target protocol address information in the control information is available for editing by the user.
In step S53, a control information base is constructed based on the corresponding control information.
In the embodiment of the present disclosure, the control information base is constructed based on the corresponding control information, which may be that the control information corresponding to each control is stored in the control information base, so as to be called when actually used.
According to the embodiment, the device identification information and the control task information of the plurality of devices are acquired, the corresponding control information is generated according to the device identification information and the control task information, and the control information base is constructed based on the corresponding control information, so that the control information base formed by the control information corresponding to each control can be constructed in advance before actual use, and convenience is brought to the calling of the target control information in actual use.
Fig. 6 is a flowchart illustrating a device control method according to an exemplary embodiment, and as shown in fig. 6, before acquiring the target control information and the target protocol address information of the target device in step S21, the method may further include:
In step S61, in response to a first preset operation on the target control, target control information corresponding to the target control is generated.
In this embodiment of the present disclosure, the first preset operation on the target control may be obtained based on an operation on the target control in the host computer. Specifically, the first preset operation may be, for example: and dragging the target control to a proper position, clicking the target control, and the like. In some examples, in response to a first preset operation on the target control, corresponding control information can be matched in a control information base according to identification information of the target control, wherein the control information obtained by matching in the control information base does not contain target protocol address information.
In step S62, target protocol address information of the target device is generated in response to a second preset operation on the associated address parameter corresponding to the target control.
In this embodiment of the present disclosure, the second preset operation of the associated address parameter corresponding to the target control may be setting of the associated address parameter in the upper computer. Based on the setting of the associated address parameter, target protocol address information for the target device may be generated.
According to the embodiment, the target control information corresponding to the target control is generated in response to the first preset operation on the target control, the target protocol address information of the target equipment is generated in response to the second preset operation on the associated address parameter corresponding to the target control, and therefore the target control information and the target protocol address information of the target equipment are automatically generated, so that the upper computer generates a second target control instruction based on the target control information and the target protocol address information and sends the second target control instruction to the target equipment for corresponding control.
In some exemplary embodiments, the method may further include updating the preset protocol information base based on the second interface information and the second controller communication protocol information when the second interface information and the second controller communication protocol information of the device to be updated are received. Specifically, the preset protocol information base is updated, which may be adding new equipment or updating corresponding information of equipment in the preset protocol information base. When the device to be updated is the added new device, the second interface information and the second controller communication protocol information of the device to be updated can be received first, and the second interface information and the second controller communication protocol information of the device to be updated are added into a preset protocol information base. When the equipment to be updated is equipment existing in the preset protocol information base, the second interface information and the second controller communication protocol information of the equipment to be updated can be received, the first interface information and the first controller communication protocol information of the equipment to be updated are determined in the preset protocol information base, the first interface information of the equipment to be updated is changed into the second interface information, and the first controller communication protocol information is changed into the second controller communication protocol information, so that the timely and accurate updating of the preset protocol information base is realized, and the efficiency and the accuracy of equipment control by the upper computer are improved.
Fig. 7 is a flowchart illustrating a device control method according to an exemplary embodiment, and as shown in fig. 7, the method may further include:
in step S71, control information obtained by the target device performing corresponding control based on the second target control instruction is received.
In this embodiment of the present disclosure, after the host computer sends the second target control instruction to the target device, the target device may perform servo processing according to the second target control instruction, and at the same time, the target device may generate control information corresponding to the servo processing, for example, control response information, log information, and so on. The upper computer may send a control information acquisition instruction to the target device, so that after the target device generates control information corresponding to the servo processing, the control information is received.
Alternatively, the control information acquisition instruction may be added to the second target control instruction. When the target device receives the second target control instruction, the target device may generate corresponding control information, such as control response information, based on the control information acquisition instruction in the second target control instruction. By receiving control response information obtained by corresponding control of the target device based on the second target control instruction, accurate demand information can be obtained.
Alternatively, the control information acquisition instruction may be separately transmitted in addition to the second target control instruction. Specifically, the control information acquired by the control information acquisition instruction may be control information generated by performing servo processing on the target device, for example, log information. By receiving the control information generated by the servo processing of the target device, the processing amount of the target device can be reduced, and the processing efficiency of receiving the control information can be improved.
In step S72, the execution result of the target device is obtained from the control information.
In step S73, the corresponding execution result is displayed.
In the embodiment of the specification, the corresponding execution result can be rendered, so that the control result of the target device is displayed on the upper computer in an image manner.
According to the embodiment, the control information obtained by corresponding control of the target equipment based on the second target control instruction is received, the execution result of the target equipment is obtained according to the control information, and the corresponding execution result is displayed, so that the control result of the target equipment can be intuitively displayed, and the user experience is improved.
Fig. 8 is a schematic diagram of a device control apparatus according to an exemplary embodiment, as shown in fig. 8, the apparatus may include:
An information obtaining module 801, configured to obtain target control information and target protocol address information of a target device; the target control information is control information for controlling the target equipment according to the target control.
The first instruction generating module 802 is configured to obtain a first target control instruction based on the target control information.
The information determining module 803 is configured to determine, from a preset protocol information base, target interface information and target controller communication protocol information corresponding to the target protocol address information.
And the encapsulation module 804 is configured to perform a communication protocol encapsulation process on the first target control instruction based on the target controller communication protocol information, so as to obtain a second target control instruction.
And the instruction sending module 805 is configured to send the second target control instruction to the target device for corresponding control according to the target interface information.
According to the embodiment, the first target control instruction is obtained by obtaining the target control information and the target protocol address information of the target equipment based on the target control information, so that the control instruction corresponding to the target control can be quickly and automatically generated, the target interface information corresponding to the target protocol address information and the target controller communication protocol information are determined from the preset protocol information base, and the communication information of the target equipment can be accurately obtained; and carrying out communication protocol encapsulation processing on the first target control instruction based on the target controller communication protocol information to obtain a second target control instruction, and sending the second target control instruction to target equipment for corresponding control according to the target interface information, so that equipment using different communication protocols can be conveniently controlled, the degree of automation in equipment control design is improved, and errors caused by manual editing are reduced.
In one possible implementation, the apparatus may further include:
the first information acquisition module is used for acquiring first interface information and first controller communication protocol information of a plurality of devices;
the configuration module is used for respectively configuring corresponding first protocol address information for the plurality of devices;
the preset protocol information base construction module is used for constructing the preset protocol information base according to the first interface information, the first controller communication protocol information and the first protocol address information.
In one possible implementation manner, the first instruction generating module includes:
the third instruction generation module is used for generating a third target control instruction based on the target control information;
the format processing unit is used for performing format conversion processing on the third target control instruction to obtain the first target control instruction; the first target control instruction is in a control data format for the target device.
In one possible implementation, the apparatus may further include:
the second information acquisition module is used for acquiring equipment identification information and control task information of a plurality of equipment;
the control information generation module is used for generating corresponding control information according to the equipment identification information and the control task information;
And the control information base construction module is used for constructing a control information base based on the corresponding control information.
In one possible implementation, the apparatus further includes:
the target control information generation module is used for responding to a first preset operation on a target control and generating target control information corresponding to the target control;
and the target protocol address information generating module is used for responding to a second preset operation of the associated address parameters corresponding to the target control and generating the target protocol address information of the target equipment.
In one possible implementation, the apparatus may further include:
and the preset protocol information base updating module is used for updating the preset protocol information base based on the second interface information and the second controller communication protocol information when receiving the second interface information and the second controller communication protocol information of the equipment to be updated.
In one possible implementation, the apparatus may further include:
the control information receiving module is used for receiving control information obtained by corresponding control of the target equipment based on the second target control instruction;
the execution result generation module is used for obtaining an execution result of the target equipment according to the control information;
And the display module is used for displaying the corresponding execution result.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 9 is a block diagram of an electronic device, which may be a host computer (terminal), for a device control method according to an exemplary embodiment, and an internal structure diagram thereof may be as shown in fig. 9. The electronic device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the electronic device is used for communicating with an external device through a network connection. The computer program is executed by a processor to implement a device control method.
It will be appreciated by those skilled in the art that the structure shown in fig. 9 is merely a block diagram of a portion of the structure associated with the disclosed aspects and is not limiting of the electronic device to which the disclosed aspects apply, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an exemplary embodiment, there is also provided an electronic device including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the device control method as in the embodiments of the present disclosure.
In an exemplary embodiment, a computer-readable storage medium is also provided, which when executed by a processor of an electronic device, enables the electronic device to perform the device control method in the embodiments of the present disclosure. The computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, a computer program product containing instructions is also provided, which when run on a computer, cause the computer to perform the device control method in the embodiments of the present disclosure.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while the embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims of the present invention, any of the claimed embodiments may be used in any combination.
The present invention may also be embodied as a device or system program (e.g., a computer program and a computer program product) for performing a portion or all of the methods described herein. Such a program embodying the present invention may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order, and the words may be interpreted as names.

Claims (9)

1. A method of controlling a device, the method comprising:
responding to a first preset operation of a target control, and generating target control information corresponding to the target control;
responding to a second preset operation of the associated address parameter corresponding to the target control, and generating target protocol address information of target equipment;
acquiring the target control information and the target protocol address information of the target equipment; the target control information is control information for controlling the target equipment according to the target control;
obtaining a first target control instruction based on the target control information;
determining target interface information and target controller communication protocol information corresponding to the target protocol address information from a preset protocol information base; the preset protocol information library stores different protocol address information, interface information of corresponding equipment and controller communication protocol information of the corresponding equipment; the different protocol address information comprises the target protocol address information;
performing communication protocol encapsulation processing on the first target control instruction based on the target controller communication protocol information to obtain a second target control instruction;
And sending the second target control instruction to the target equipment for corresponding control according to the target interface information.
2. The method according to claim 1, wherein the method further comprises:
acquiring first interface information and first controller communication protocol information of a plurality of devices;
respectively configuring corresponding first protocol address information for the plurality of devices;
and constructing the preset protocol information base according to the first interface information, the first controller communication protocol information and the first protocol address information.
3. The method of claim 1, wherein generating a first target control instruction based on the target control information comprises:
generating a third target control instruction based on the target control information;
performing format conversion processing on the third target control instruction to obtain the first target control instruction; the first target control instruction is in a control data format for the target device.
4. The method according to claim 1, wherein the method further comprises:
acquiring equipment identification information and control task information of a plurality of equipment;
generating corresponding control information according to the equipment identification information and the control task information;
And constructing a control information base based on the corresponding control information.
5. The method according to claim 2, wherein the method further comprises:
and when receiving second interface information and second controller communication protocol information of the equipment to be updated, updating the preset protocol information base based on the second interface information and the second controller communication protocol information.
6. The method according to claim 1, wherein the method further comprises:
receiving control information obtained by corresponding control of the target equipment based on the second target control instruction;
obtaining an execution result of the target equipment according to the control information;
and displaying a corresponding execution result.
7. A device control apparatus, characterized in that the apparatus comprises:
the information generation module is used for responding to a first preset operation on the target control and generating target control information corresponding to the target control; responding to a second preset operation of the associated address parameter corresponding to the target control, and generating target protocol address information of target equipment;
the information acquisition module is used for acquiring the target control information and the target protocol address information of the target equipment; the target control information is control information for controlling the target equipment according to the target control;
The first instruction generation module is used for obtaining a first target control instruction based on the target control information;
the information determining module is used for determining target interface information and target controller communication protocol information corresponding to the target protocol address information from a preset protocol information base; the preset protocol information library stores different protocol address information, interface information of corresponding equipment and controller communication protocol information of the corresponding equipment; the different protocol address information comprises the target protocol address information;
the packaging module is used for carrying out communication protocol packaging processing on the first target control instruction based on the target controller communication protocol information to obtain a second target control instruction;
and the instruction sending module is used for sending the second target control instruction to the target equipment for corresponding control according to the target interface information.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the device control method of any one of claims 1 to 6.
9. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the device control method of any one of claims 1 to 6.
CN202210293897.6A 2022-03-23 2022-03-23 Equipment control method, device, equipment and storage medium Active CN114594714B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210293897.6A CN114594714B (en) 2022-03-23 2022-03-23 Equipment control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210293897.6A CN114594714B (en) 2022-03-23 2022-03-23 Equipment control method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114594714A CN114594714A (en) 2022-06-07
CN114594714B true CN114594714B (en) 2024-04-12

Family

ID=81819153

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210293897.6A Active CN114594714B (en) 2022-03-23 2022-03-23 Equipment control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114594714B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115835051B (en) * 2022-10-31 2023-09-29 武汉慧联无限科技有限公司 Method, apparatus, processing device and storage medium for performing predetermined operation
CN115933578B (en) * 2023-03-10 2023-11-03 宁德时代新能源科技股份有限公司 Device management method, device, system, electronic device and readable storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302528A (en) * 2017-06-12 2017-10-27 深圳市诺龙技术股份有限公司 A kind of transmission method of multi-protocol data and a kind of gateway apparatus
CN109296284A (en) * 2018-09-25 2019-02-01 深圳市元征科技股份有限公司 A kind of vehicle window control method, system, device and computer readable storage medium
CN109857569A (en) * 2018-11-08 2019-06-07 深圳壹账通智能科技有限公司 Interface calling processing method and device, storage medium, computer equipment
CN110022307A (en) * 2019-03-08 2019-07-16 视联动力信息技术股份有限公司 A kind of control method of monitoring device and monitoring access server
CN110049137A (en) * 2019-04-25 2019-07-23 广东工业大学 A kind of instruction transmission method, collecting method and relevant apparatus
CN110891057A (en) * 2019-11-22 2020-03-17 北京启迪区块链科技发展有限公司 Protocol conversion method, device, equipment and storage medium
CN111835793A (en) * 2020-08-05 2020-10-27 天津美腾科技股份有限公司 Communication method and device for Internet of things access, electronic equipment and storage medium
CN112152885A (en) * 2019-06-27 2020-12-29 广东美的制冷设备有限公司 Equipment control method and device, household appliance and remote control equipment
CN112585927A (en) * 2020-04-30 2021-03-30 深圳市大疆创新科技有限公司 Communication link detection method, device and system and movable platform
CN112583797A (en) * 2020-11-30 2021-03-30 深圳力维智联技术有限公司 Multi-protocol data processing method, device, equipment and computer readable storage medium
CN112987627A (en) * 2021-05-10 2021-06-18 天津飞旋科技股份有限公司 Multi-protocol embedded blower controller and control system thereof
CN113810374A (en) * 2021-08-11 2021-12-17 交控科技股份有限公司 Station equipment linkage method suitable for rail transit under multi-operation scene condition

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10484512B2 (en) * 2015-08-31 2019-11-19 Ayla Networks, Inc. Management of multi-radio gateway device using virtual gateway device
US20200410794A1 (en) * 2019-06-25 2020-12-31 Microchip Technology Incorporated Configurable access controller, and related systems, methods, and devices

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302528A (en) * 2017-06-12 2017-10-27 深圳市诺龙技术股份有限公司 A kind of transmission method of multi-protocol data and a kind of gateway apparatus
CN109296284A (en) * 2018-09-25 2019-02-01 深圳市元征科技股份有限公司 A kind of vehicle window control method, system, device and computer readable storage medium
CN109857569A (en) * 2018-11-08 2019-06-07 深圳壹账通智能科技有限公司 Interface calling processing method and device, storage medium, computer equipment
CN110022307A (en) * 2019-03-08 2019-07-16 视联动力信息技术股份有限公司 A kind of control method of monitoring device and monitoring access server
CN110049137A (en) * 2019-04-25 2019-07-23 广东工业大学 A kind of instruction transmission method, collecting method and relevant apparatus
CN112152885A (en) * 2019-06-27 2020-12-29 广东美的制冷设备有限公司 Equipment control method and device, household appliance and remote control equipment
CN110891057A (en) * 2019-11-22 2020-03-17 北京启迪区块链科技发展有限公司 Protocol conversion method, device, equipment and storage medium
CN112585927A (en) * 2020-04-30 2021-03-30 深圳市大疆创新科技有限公司 Communication link detection method, device and system and movable platform
CN111835793A (en) * 2020-08-05 2020-10-27 天津美腾科技股份有限公司 Communication method and device for Internet of things access, electronic equipment and storage medium
CN112583797A (en) * 2020-11-30 2021-03-30 深圳力维智联技术有限公司 Multi-protocol data processing method, device, equipment and computer readable storage medium
CN112987627A (en) * 2021-05-10 2021-06-18 天津飞旋科技股份有限公司 Multi-protocol embedded blower controller and control system thereof
CN113810374A (en) * 2021-08-11 2021-12-17 交控科技股份有限公司 Station equipment linkage method suitable for rail transit under multi-operation scene condition

Also Published As

Publication number Publication date
CN114594714A (en) 2022-06-07

Similar Documents

Publication Publication Date Title
CN114594714B (en) Equipment control method, device, equipment and storage medium
CN106874174B (en) Method and device for realizing interface test and function test
CN109542529B (en) Function name-based point burying method and device, computer equipment and storage medium
US10754869B2 (en) Managing data format of data received from devices in an internet of things network
CN109446570B (en) Business process display method, device, computer equipment and storage medium
CN110765001B (en) Modularized automatic test method and device for application system
CN108776587B (en) Data acquisition method and device, computer equipment and storage medium
CN109905292B (en) Terminal equipment identification method, system and storage medium
CN104423961A (en) Method and system for generating testing script
CN110716878A (en) Automatic interface testing method, device and system
WO2021196674A1 (en) System code testing method and apparatus, and computer device and storage medium
CN115794641A (en) Method, device and equipment for making number based on business process and storage medium
CN112187713A (en) Message conversion method, device, computer equipment and storage medium
CN111414369A (en) Data processing method, device and equipment
CN106990974B (en) APP updating method and device and electronic equipment
CN108880884A (en) O&M alarm reporting method, device, computer equipment and storage medium
CN115712422A (en) Form page generation method and device, computer equipment and storage medium
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN111079392B (en) Automatic filling method and device for web form, storage medium and electronic equipment
CN112231377A (en) Data mapping method, system, device, server and storage medium
CN114327941A (en) Service providing method and device
CN109063044B (en) Parameter insertion method and device for database table, terminal equipment and storage medium
CN115687310A (en) Data cleaning method and device
CN112858876A (en) Self-adaptive chip automatic testing method
CN112714148A (en) Interface configuration method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 215011 No. 2, Kunlunshan Road, high tech Zone, Suzhou, Jiangsu

Applicant after: Suzhou Jiaqishi Technology Co.,Ltd.

Address before: 215011 No. 2, Kunlunshan Road, high tech Zone, Suzhou, Jiangsu

Applicant before: SUZHOU JIAQISHI INFORMATION SCIENCE & TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant