Instruction issuing method, device, equipment, system, storage medium and program product
By automatically generating instructions that comply with the target device protocol, the management efficiency problem caused by the differences in the format of the IoT gas meter protocol of different manufacturers is solved, and automatic and remote monitoring and unified control of multi-protocol-type devices are realized.
Patent Information
- Application Number
- CN202110032571.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-11
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-01-11
AI Technical Summary
IoT gas meters produced by different manufacturers adopt different application layer protocol formats, which makes the back-end system unable to be remotely controlled and the management efficiency is inefficient.
By obtaining the device identification and instruction protocol of the target device, the instructions to be issued in compliance with its protocol are automatically generated to achieve automatic and remote monitoring of devices of various protocol types.
Improve equipment management efficiency, realize unified control of multi-protocol type equipment, and solve the problem of inefficient management.
Smart Images

Figure CN114765632B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data interaction technology, and in particular to an instruction issuing method, device, equipment, system, storage medium and program product. Background Art
[0002] With the rapid development of mobile Internet of Things technology, gas meters based on the Internet of Things are gradually replacing traditional gas meters based on IC (Integrated Circuit) cards with their excellent management efficiency.
[0003] However, IoT gas meters produced by different manufacturers often use different application layer protocol formats, which makes it impossible for the back-end system to remotely control IoT gas meters that integrate different manufacturers and different protocols, resulting in low management efficiency of IoT gas meters. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device, system, storage medium and program product for issuing instructions, which can automatically generate instructions that comply with the protocols of each device according to the protocols of the devices, thereby improving the efficiency of device management.
[0005] In a first aspect, an embodiment of the present application provides a method for issuing an instruction, the method comprising:
[0006] Acquire a target instruction and at least one target device corresponding to the target instruction; determine a target instruction protocol corresponding to the target instruction based on the at least one target device; generate a to-be-issued instruction of the target instruction based on the target instruction protocol and the target instruction; and send the to-be-issued instruction so that at least one target device executes the to-be-issued instruction.
[0007] Optionally, determining, according to the at least one target device, a target instruction protocol corresponding to the target instruction includes:
[0008] The target instruction protocol corresponding to the target instruction is determined according to the first mapping relationship and the device identification of at least one target device, wherein the first mapping relationship is used to describe the association relationship between each device identification and its corresponding instruction protocol.
[0009] Optionally, determining, according to the at least one target device, a target instruction protocol corresponding to the target instruction includes:
[0010] The target instruction protocol corresponding to the target instruction of each target device is determined according to the device identification of the at least one target device and the instruction identification of the target instruction.
[0011] Optionally, generating an instruction to be issued of the target instruction according to the target instruction protocol and the target instruction includes:
[0012] According to the instruction identifier of the target instruction, the instruction format corresponding to the target instruction is searched from the target instruction protocol; according to the instruction parameters of the target instruction and the instruction format, the instruction to be issued of the target instruction is generated.
[0013] Optionally, acquiring a target instruction and at least one target device corresponding to the target instruction includes:
[0014] Acquire a control range and a target instruction input by a target user; and determine at least one target device corresponding to the target instruction according to the target user and the control range.
[0015] Optionally, acquiring a target instruction and at least one target device corresponding to the target instruction includes:
[0016] Obtain each operable instruction of the target user; and determine the target instruction and at least one target device corresponding to the target instruction from each operable instruction according to the user operation of the target user.
[0017] Optionally, determining the target instruction and at least one target device corresponding to the target instruction from each operable instruction according to the user operation of the target user includes:
[0018] According to the selection operation of the target user, each of the target devices is determined and the user-selected instruction is determined from each operable instruction; according to the parameter setting operation of the target user, the parameter value of the instruction parameter of the user-selected instruction is determined; according to the user-selected instruction and the parameter value of its instruction parameter, the target instruction of each of the target devices is generated.
[0019] Optionally, the method further comprises:
[0020] An instruction protocol set is determined according to the user identifier of the target user.
[0021] Accordingly, determining the target instruction protocol corresponding to the target instruction according to the at least one target device includes:
[0022] According to the device identification of each of the target devices and the instruction identification of the target instruction, the target instruction protocol corresponding to the target instruction of each of the target devices is determined from the instruction protocol set.
[0023] Optionally, when the target user inputs a control range, determining an instruction protocol set according to the user identifier of the target user includes:
[0024] Determine a set of alternative instruction protocols for the target user according to the user identifier of the target user; determine the instruction protocol set from the set of alternative instruction protocols according to the control scope; when the target user inputs a selected operation, determine the instruction protocol set according to the user identifier of the target user, including: determine a set of alternative instruction protocols for the target user according to the user identifier of the target user; determine the instruction protocol set from the set of alternative instruction protocols according to the device scope corresponding to the selected operation.
[0025] Optionally, when a plurality of the instructions to be issued are included, sending the instructions to be issued so that at least one target device executes the instructions to be issued includes:
[0026] Determine a delivery channel for each of the instructions to be delivered; for each instruction to be delivered, deliver the instruction to be delivered according to the delivery channel corresponding to the instruction to be delivered, so that at least one target device executes the instruction to be delivered.
[0027] Optionally, determining a channel for issuing each of the instructions to be issued includes:
[0028] The number of delivery channels and the delivery instructions corresponding to each delivery channel are determined according to at least one of the type of the instruction to be delivered, the number of instruction protocols corresponding to each instruction to be delivered, and the number of target devices.
[0029] In a second aspect, the present application further provides an instruction issuing device, the device comprising:
[0030] A target instruction acquisition module is used to acquire a target instruction and at least one target device corresponding to the target instruction; an instruction protocol determination module is used to determine the instruction protocol corresponding to the target instruction based on the target instruction and at least one target device; a to-be-issued instruction generation module is used to generate to-be-issued instructions of the target instruction based on the instruction protocol; and an instruction issuing module is used to send the to-be-issued instructions so that at least one target device executes the to-be-issued instructions.
[0031] Optionally, the instruction protocol determination module is specifically used to:
[0032] The target instruction protocol corresponding to the target instruction is determined according to the first mapping relationship and the device identification of at least one target device, wherein the first mapping relationship is used to describe the association relationship between each device identification and its corresponding instruction protocol.
[0033] Optionally, the instruction protocol determination module is specifically used to:
[0034] The target instruction protocol corresponding to the target instruction of each target device is determined according to the device identification of the at least one target device and the instruction identification of the target instruction.
[0035] Optionally, the module for generating instructions to be issued is specifically used for:
[0036] According to the instruction identifier of the target instruction, the instruction format corresponding to the target instruction is searched from the target instruction protocol; according to the instruction parameters of the target instruction and the instruction format, the instruction to be issued of the target instruction is generated.
[0037] Optionally, the target instruction acquisition module includes:
[0038] The control range acquisition unit is used to acquire the control range and target instruction input by the target user; the target instruction and device determination unit is used to determine at least one target device corresponding to the target instruction according to the target user and the control range.
[0039] Optionally, the target instruction acquisition module includes:
[0040] The operable instruction acquisition unit is used to acquire various operable instructions of the target user; the target instruction determination unit is used to determine the target instruction and at least one target device corresponding to the target instruction from various operable instructions according to the user operation of the target user.
[0041] Optionally, the target instruction determination unit is specifically configured to:
[0042] According to the selection operation of the target user, each of the target devices is determined and the user-selected instruction is determined from each operable instruction; according to the parameter setting operation of the target user, the parameter value of the instruction parameter of the user-selected instruction is determined; according to the user-selected instruction and the parameter value of its instruction parameter, the target instruction of each of the target devices is generated.
[0043] Optionally, the device further comprises:
[0044] The protocol set determination module is used to determine the instruction protocol set according to the user identification of the target user.
[0045] Accordingly, the instruction protocol determination module is specifically used for:
[0046] According to the device identification of each of the target devices and the instruction identification of the target instruction, the target instruction protocol corresponding to the target instruction of each of the target devices is determined from the instruction protocol set.
[0047] Optionally, when the target user inputs a control range, the protocol set determination module is specifically configured to:
[0048] According to the user identification of the target user, a candidate instruction protocol set of the target user is determined; according to the control scope, the instruction protocol set is determined from the candidate instruction protocol set.
[0049] When the target user inputs a selection operation, the protocol set determination module is specifically used to:
[0050] Determine a candidate instruction protocol set for the target user according to the user identifier of the target user; and determine the instruction protocol set from the candidate instruction protocol set according to the device range corresponding to the selected operation.
[0051] Optionally, when a plurality of instructions to be issued are included, the instruction issuing module includes:
[0052] The lower channel determination unit is used to determine the issuing channel of each of the instructions to be issued; the instruction issuing unit is used to send the instruction to be issued according to the issuing channel corresponding to each instruction to be issued, so that at least one target device executes the instruction to be issued.
[0053] Optionally, the lower channel determination unit is specifically configured to:
[0054] The number of delivery channels and the delivery instructions corresponding to each delivery channel are determined according to at least one of the type of the instruction to be delivered, the number of instruction protocols corresponding to each instruction to be delivered, and the number of target devices.
[0055] In a third aspect, the present application further provides an instruction issuing device, comprising: a memory and at least one processor;
[0056] The memory stores computer-executable instructions;
[0057] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the instruction issuing method provided in any embodiment corresponding to the first aspect of the present application.
[0058] In a fourth aspect, the present application also provides an instruction issuing system, comprising a front-end device and an instruction issuing device provided in an embodiment corresponding to the third aspect of the present application; wherein the front-end device is used to obtain user instructions, and determine at least one target instruction of the instruction issuing device and at least one target device corresponding to the target instruction based on the user instructions.
[0059] In a fifth aspect, the present application also provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, an instruction issuing method provided in any embodiment corresponding to the first aspect of the present application is implemented.
[0060] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the instruction issuing method provided in any embodiment corresponding to the first aspect of the present application.
[0061] The instruction issuing method, apparatus, equipment, system, storage medium and program product provided in the embodiments of the present application are aimed at an interactive system integrating devices of multiple different protocol formats. Through each target device, a target instruction protocol applicable to the target instruction of each target device is determined, and corresponding instructions to be issued are automatically generated according to the target instruction protocol and the target instruction, and each instruction to be issued is issued so that the target device automatically executes the instruction to be issued, thereby realizing automatic issuance of instructions to devices containing various protocols, realizing automatic and remote monitoring of devices of multiple protocol types, and improving equipment management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0063] Figure 1 An application scenario diagram provided for an embodiment of the present application;
[0064] Figure 2 A flowchart of a method for issuing instructions provided in one embodiment of the present application;
[0065] Figure 3 A flowchart of a method for issuing instructions provided in another embodiment of the present application;
[0066] Figure 4 For this application Figure 3 The flowchart of step S302 in the illustrated embodiment;
[0067] Figure 5 A schematic diagram of a system front-end page provided for an embodiment of the present application;
[0068] Figure 6 A flowchart of a method for issuing instructions provided in another embodiment of the present application;
[0069] Figure 7 A schematic diagram of the structure of an instruction issuing device provided in one embodiment of the present application;
[0070] Figure 8 A schematic diagram of the structure of an instruction issuing system provided for one embodiment of the present application;
[0071] Fig. 9 A schematic diagram of the structure of an instruction issuing system provided for one embodiment of the present application.
[0072] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0073] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0074] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0075] The application scenarios of the embodiments of the present application are explained below:
[0076] Figure 1 An application scenario diagram provided for an embodiment of the present application, such as Figure 1 As shown, the smart gas meter based on the Internet of Things, also known as the Internet of Things gas meter 110, can cooperate with the management system 120, based on a pre-agreed application layer protocol, and use corresponding instructions to interact to achieve functions such as cardless prepayment, remote valve control, tiered gas prices, and price adjustment. Specifically, data communication and terminal control with the management system 120 can be achieved through a dedicated mobile communication module 111 and an electronic controller 112 set on the Internet of Things gas meter 110.
[0077] However, the application layer protocol formats of the IoT gas meters 110 produced by different manufacturers are different, so that the management system 120 cannot monitor the IoT gas meters 110 using different application layer protocol formats at the same time, and often needs to use manual intervention to manually determine the protocol used by the gas meter, and then generate corresponding instructions based on the protocol to monitor the IoT gas meter. The management efficiency of the above interaction method is low and cannot meet user needs.
[0078] In response to the above problems, the instruction issuing method provided in the embodiment of the present application targets target devices including multiple different instruction protocols. By automatically determining the corresponding instruction protocol for each target device, and then generating an executable instruction to be issued for each target device, so that each target device executes the instruction, unified control of device terminals of multiple protocol types is achieved, and the management efficiency of the equipment is improved.
[0079] Figure 2 This is a flowchart of a method for issuing instructions according to an embodiment of the present application. The method provided in this embodiment can be executed by an instruction issuing device, such as a computer, a server, etc. Figure 2 As shown, the instruction issuing method includes the following steps:
[0080] Step S201: Acquire a target instruction and at least one target device corresponding to the target instruction.
[0081] The target instruction may be an instruction for monitoring and controlling one or more target devices. The target device is an intelligent meter based on the Internet of Things, which may be a gas meter, a water meter, an electric meter or other measuring instruments. The target instruction may be a valve control instruction, a data acquisition instruction, an alarm instruction or the like.
[0082] Specifically, the target instruction may be only one instruction or multiple instructions. One target instruction may correspond to one or more target devices.
[0083] Specifically, the target instruction can be generated by the user through a user terminal or a system terminal, or can be generated autonomously by the system or the system terminal, such as generating monitoring instructions according to a certain period, or automatically generating corresponding target instructions when the data returned by the target device meets the preset conditions.
[0084] Exemplarily, the user may enter or select a target instruction through a display interface provided by the system, so that the system receives the target instruction input by the user.
[0085] Furthermore, the user's authority authentication may be performed first, and after the authentication is passed, the target instruction input by the user is obtained through the display interface of the system.
[0086] Specifically, each target instruction can be pre-stored in the system database and initialized to determine the instruction identifier, parameter format and instruction protocol of each target instruction. Then, when the user inputs the target instruction, it is automatically initialized according to the identifier of the target instruction.
[0087] In some embodiments, the target device is a target IoT gas meter, and obtaining a target instruction includes:
[0088] Get the target instruction corresponding to the target IoT gas meter.
[0089] The target IoT gas meter is one or more of the IoT gas meters integrated in the system. The target instruction corresponding to the target IoT gas meter may be one or more of the following: gas usage monitoring instruction, remaining gas monitoring instruction, temperature monitoring instruction, pressure monitoring instruction, valve opening instruction, valve closing instruction, temperature alarm instruction, pressure alarm instruction, gas leakage alarm instruction, etc. Of course, it may also be other instructions, which is not limited in this application.
[0090] Optionally, acquiring a target instruction and at least one target device corresponding to the target instruction includes:
[0091] Acquire a control range and a target instruction input by a target user; and determine at least one target device corresponding to the target instruction according to the target user and the control range.
[0092] The target user may correspond to one or more target devices. The control range may be a region range, such as a geographic coordinate range, or a region name, such as X Community, Beijing, North China, etc. The control range may be a target device number range, such as device 1-100, etc.
[0093] Specifically, each target device under the target user's name within the control range may be determined according to the control range input by the target user.
[0094] Step S202: determining a target instruction protocol corresponding to the target instruction according to the at least one target device.
[0095] Specifically, the target instruction protocol applicable to the target instruction of each target device may be determined according to the device identification of each target device.
[0096] Optionally, determining, according to the at least one target device, a target instruction protocol corresponding to the target instruction includes:
[0097] A target instruction protocol corresponding to the target instruction is determined according to the first mapping relationship and a device identification of at least one target device.
[0098] Among them, the first mapping relationship is used to describe the association relationship between each device identification and its corresponding instruction protocol. One target device can correspond to one instruction protocol. The first mapping relationship stores the instruction protocol corresponding to the device identification of each target device, and then according to the first mapping relationship, the target instruction can be converted into the instruction to be issued corresponding to its target instruction protocol. The target instruction protocol is the communication protocol between the target device corresponding to the target instruction and its upstream device, which is used to define the format of the instructions or data used when the two interact. The target instruction protocol can be HTTP (HyperText Transfer Protocol), FTP (File Transfer Protocol) or other protocols, and can also be a user-defined application layer protocol.
[0099] Specifically, after obtaining each target instruction, the instruction protocol of each target instruction may be determined according to the first mapping relationship and the instruction identifier of each target instruction.
[0100] In some embodiments, before acquiring the target instruction, the method further includes:
[0101] The device representation of each target device and its applicable target instruction protocol are counted to establish a first mapping relationship.
[0102] Optionally, determining, according to the at least one target device, a target instruction protocol corresponding to the target instruction includes:
[0103] The target instruction protocol corresponding to the target instruction of each target device is determined according to the device identification of the at least one target device and the instruction identification of the target instruction.
[0104] Specifically, when a target device corresponds to multiple command protocols, there may be a situation where different target commands of the same target device correspond to different target command protocols. Therefore, it is necessary to determine the target command protocol corresponding to each target command of each target device based on both the device identifier and the command identifier.
[0105] Furthermore, for each target instruction, each target instruction protocol required for each target device to execute the target instruction may be determined based on the second mapping relationship, the instruction identifier of the target instruction and the device identifier of each target device.
[0106] The second mapping relationship is used to describe the correspondence between the device identifier of each target device, the instruction identifier of each target instruction, and the target instruction protocol.
[0107] In some embodiments, before acquiring the target instruction, the method further includes:
[0108] Obtain the device identification of each target device, the instruction identification of each target instruction, and the instruction protocol applicable to each target device executing each target instruction; generate the second mapping relationship according to the device identification of each target device, the instruction identification of each target instruction, and the instruction protocol.
[0109] The instruction identifier is the identification information used to distinguish different target instructions and is unique. The instruction identifier can be encoded, such as 0001, 0100, or a combination of characters and numbers, such as A001, B218. Of course, other methods can also be used for naming.
[0110] Specifically, the second mapping relationship is the correspondence relationship among the target instruction, the target device and the instruction protocol. Further, the second mapping relationship can be the correspondence relationship among each target instruction of all devices corresponding to the system and the instruction protocol.
[0111] Exemplarily, Table 1 is a second mapping relationship table provided by an embodiment of the present application. The second mapping relationship table takes three target devices as examples, namely device 001, device 0007 and device 0011, as well as the instruction protocols adopted by the three target devices to execute each target instruction. The specific contents are shown in Table 1.
[0112] Table 1 Second mapping relationship table
[0113]
[0114] Specifically, the instruction protocols used by each target device under each user name and each target instruction of each target device can be counted in advance to obtain the second mapping relationship, and save it to a preset storage location of the system for subsequent calling.
[0115] Step S203: Generate an instruction to be issued of the target instruction according to the target instruction protocol and the target instruction.
[0116] The instructions to be sent are instructions that can be directly executed or run by the target device.
[0117] Specifically, after determining the target device, or the target device executing the target instruction, and the applicable target instruction protocol, the target instruction of each target device is converted into an instruction to be issued that can be directly executed or run by the target device based on the target instruction protocol.
[0118] Optionally, generating an instruction to be issued of the target instruction according to the target instruction protocol and the target instruction includes:
[0119] According to the instruction identifier of the target instruction, the instruction format corresponding to the target instruction is searched from the target instruction protocol; according to the instruction parameters of the target instruction and the instruction format, the instruction to be issued of the target instruction is generated.
[0120] Specifically, after determining the target instruction protocol corresponding to the target instruction of each target device, the instruction format of the target instruction is found from the target instruction protocol. The instruction format is the format of the instruction to be issued. The content of the instruction to be issued is determined by the instruction parameters of the target instruction.
[0121] Step S204: sending the instruction to be sent, so that at least one target device executes the instruction to be sent.
[0122] Specifically, each instruction to be issued can be directly sent to each corresponding target device, so that each target device executes the instruction to be issued to complete the control of each target device. Alternatively, each instruction to be issued can be sent to one or more instruction issuing platforms, and then each instruction issuing platform sends each instruction to be issued to each target device corresponding to its area.
[0123] Among them, one instruction issuing platform corresponds to one or more target devices and is responsible for forwarding the instructions to be issued, so as to send the instructions to be issued to each target device it is responsible for.
[0124] For example, the target devices that the instruction issuing platform is responsible for can be divided according to region, geographical location, or based on other factors, which is not limited in this application.
[0125] Specifically, after the executable instructions to be issued are generated, the instructions to be issued are sent to each target device or each instruction issuing platform through a preset communication method. The preset communication method can be based on Zigbee, WIFI (Wireless Fidelity, wireless local area network), Ethernet, 3G (third generation mobile communication technology), 4G (fourth generation mobile communication technology), 5G (fifth generation mobile communication technology) or other Internet of Things communication.
[0126] The instruction issuing method provided in the embodiment of the present application is aimed at an interactive system integrating devices of multiple different protocol formats. Through each target device, a target instruction protocol applicable to the target instruction of each target device is determined, and corresponding instructions to be issued are automatically generated according to the target instruction protocol and the target instruction, and each instruction to be issued is issued so that the target device automatically executes the instruction to be issued, thereby realizing automatic issuance of instructions to devices containing various protocols, realizing automatic and remote monitoring of devices of multiple protocol types, and improving equipment management efficiency.
[0127] Figure 3 A flowchart of a method for issuing instructions provided in another embodiment of the present application. Figure 2 Based on the embodiment shown, step S201 and step S202 are further refined as follows: Figure 3 As shown, the instruction issuing method includes the following steps:
[0128] Step S301, obtaining various operable instructions of the target user.
[0129] The target user is a user authenticated by the system and having the authority to issue commands. The number of target users can be one or more, and the target users can specifically be various gas companies. The operable commands refer to the various target commands that the target users can operate.
[0130] Specifically, after the target user logs in, all devices under the target user's name and the device type of each device can be determined according to the target user's user ID, and then the operable instructions can be determined according to the device type of each device. The device type can include the model of the device and the application layer protocol used (i.e., the above-mentioned instruction protocol).
[0131] Furthermore, after determining each operable instruction of the target user, the operable instruction can be dynamically displayed on the front page of the system, such as scrolling display, and the specific display content can include the target device involved in each operable instruction and its operable instruction parameters. This makes it convenient for the target user to operate the display content of the front page according to his own needs to determine the target instruction.
[0132] In some embodiments, obtaining various operable instructions of the target user includes:
[0133] Each operable instruction of the target user and an instruction parameter corresponding to each operable instruction are determined according to the user identifier of the target user and the third mapping relationship.
[0134] The third mapping relationship is used to describe the corresponding relationship between each user identification, operable instruction and instruction parameter. The user identification is used to distinguish each target user, and can be any one or more of the target user's nickname, ID, company name, company number, etc.
[0135] In some embodiments, the first mapping relationship, the second mapping relationship, and the third mapping relationship may be the same.
[0136] Exemplarily, Table 2 is a third mapping relationship table provided by an embodiment of the present application. The third mapping relationship table takes three target users as an example. The table includes the target device, instruction protocol, operable instructions and instruction parameters of each operable instruction corresponding to each target user. The specific content is shown in Table 2.
[0137] Table 2 The third mapping relationship table
[0138]
[0139] Step S302: determining the target instruction and at least one target device corresponding to the target instruction from various operable instructions according to the user operation of the target user.
[0140] The target instruction may be one or more of the operable instructions. The user operation may be one or more of the user selection operation, parameter setting operation, drag operation, deletion operation, and the like.
[0141] Specifically, the target user can check each displayed operation instruction on the front page of the system to determine the target instruction, and can also set parameters for each checked operation instruction. Finally, the target instruction is determined according to the user operation. The user can also determine one or more target devices corresponding to each target instruction through corresponding user operations.
[0142] Exemplarily, the operable instructions for the target device E1 of the target user include instructions C1, instructions C2 and instructions C3. The target user selects instruction C2 and sets parameter 1 of instruction C2 to 20 and parameter 2 to 1. The generated target instruction can be "E1:C2(20,1)", indicating that instruction C2 is issued to the target device E1, wherein the parameter values of the parameters corresponding to instruction C2 are 20 and 1 respectively.
[0143] Optionally, Figure 4 For this application Figure 3 The flowchart of step S302 in the embodiment shown is as follows: Figure 4 As shown, step S302 includes the following steps:
[0144] Step S3021: According to the selection operation of the target user, each of the target devices is determined and a user selection instruction is determined from each operable instruction.
[0145] The selection operation may be a double-click operation, a single-machine operation, a check operation, or other operations.
[0146] Specifically, the target user can perform corresponding operations in the front-end page of the system, such as selecting an operation, so as to determine the user-selected instruction, and each target device corresponding to each user-selected instruction can be specified.
[0147] Specifically, each operable instruction may correspond to a default device range, and the device range is used to describe each target device to which the operable instruction is applicable. The user may modify the default device range according to his / her own needs.
[0148] For example, Figure 5 A schematic diagram of a system front-end page provided for an embodiment of the present application, such as Figure 5 As shown, the front-end page displays various operable instructions, instructions 501-instruction 505, and each operable instruction corresponds to an optional device range, wherein the device range corresponding to instruction 501 is device 1-device 10, the device range corresponding to instruction 502 is device 1-device 10, the device range corresponding to instruction 503 is device 2-device 9, the device range corresponding to instruction 504 is device 2, device 8 and device 10, and the device range corresponding to instruction 505 is device 1-device 9. The target user selects instruction 502 and instruction 503, and adopts the default device range, that is, the user selects instruction 502 and instruction 503, the target devices corresponding to instruction 502 are device 1-device 10, and the target devices corresponding to instruction 503 are device 2-device 9.
[0149] Step S3022: Determine the parameter value of the instruction parameter of the instruction selected by the user according to the parameter setting operation of the target user.
[0150] The parameter setting operation may be an operation entered by the target user through a keyboard, a virtual keyboard, a touch screen, a mouse, or other devices, and the parameter setting operation is used to adjust the parameter value of the instruction parameter of the instruction selected by each user.
[0151] Specifically, after determining that the user has selected an instruction, the target user may determine a parameter value of an instruction parameter corresponding to the instruction selected by the user.
[0152] Furthermore, after the operation is completed, the user can click a save button to save the above parameter values and the user-selected command.
[0153] Step S3023: Generate a target instruction for the target device according to the instruction selected by the user and the parameter values of its instruction parameters.
[0154] Specifically, after the target user completes the operation, the system generates each target instruction for each target device according to the instructions selected by each user and the parameter value of the instruction parameter corresponding to each user selected instruction.
[0155] Furthermore, after receiving the instruction sending trigger instruction, each target instruction of each target device may be generated according to the instruction selected by the user and the parameter values of the instruction parameters thereof.
[0156] Specifically, after the target user completes the selection operation and parameter setting operation, he can trigger the corresponding instruction to send the trigger instruction on the system front-end page or other locations of the system to instruct the system to generate various target instructions.
[0157] For example, after the target user has set the parameter values of all user-selected instructions, he can click a setting button on the front page of the system, such as a "Finish" button, a "Start" button, or a "Trigger Instruction" button, to trigger the step of generating the target instruction.
[0158] Step S303: determining a command protocol set according to the user identification of the target user.
[0159] The command protocol set is a set of all command protocols that may be applied under the target user name.
[0160] Specifically, after the target user logs in, the command protocol set consisting of the command protocols corresponding to the target devices under the target user's name can be determined according to the target user's user identification.
[0161] It should be understood that this step may occur before step S301 or step S302, and may also be performed in parallel with step S301 or step S302.
[0162] Optionally, when the target user inputs a control range, determining an instruction protocol set according to the user identifier of the target user includes:
[0163] According to the user identification of the target user, a candidate instruction protocol set of the target user is determined; according to the control scope, the instruction protocol set is determined from the candidate instruction protocol set.
[0164] When the target user inputs a selection operation, a command protocol set is determined according to the user identifier of the target user, including:
[0165] Determine a candidate instruction protocol set for the target user according to the user identifier of the target user; and determine the instruction protocol set from the candidate instruction protocol set according to the device range corresponding to the selected operation.
[0166] The candidate command protocol set is a set of command protocols of all target devices under the target user name.
[0167] Specifically, the candidate instruction protocol set may be screened according to the control range input by the target user, such as determining the device range according to the control range, thereby obtaining the instruction protocol set corresponding to the device range.
[0168] Exemplarily, assuming that the target user includes devices 1-device 100, the alternative instruction protocol set is: protocol A (device 1-device 10), protocol B (device 11-device 50), protocol C (device 51-device 100), the control range input by the target user or the device range corresponding to the selected operation is device 8 to device 37, then the instruction protocol set is determined to be protocol A and protocol B.
[0169] Step S304: determining the target instruction protocol corresponding to the target instruction of each target device from the instruction protocol set according to the device identification of each target device and the instruction identification of the target instruction.
[0170] Specifically, after obtaining the target user's instruction protocol set and determining each target device and target instruction, the target instruction protocol applicable to each target device executing each target instruction can be determined from the instruction protocol set based on the device identifier and the instruction identifier.
[0171] Furthermore, when each target device includes only one instruction protocol, the target instruction protocol required for each target device to execute the target instruction can also be determined from the instruction protocol set corresponding to the target user according to the device identification of each target device.
[0172] Step S305: Generate an instruction to be issued of the target instruction according to the target instruction protocol and the target instruction.
[0173] Specifically, one or more target instructions of the corresponding one or more target devices may be converted according to the target instruction protocol to obtain instructions to be issued to each target device.
[0174] For each target instruction, a to-be-issued instruction may be generated according to its corresponding target instruction protocol. The to-be-issued instruction is an instruction that needs to be executed by the target device corresponding to the target instruction.
[0175] Specifically, the target user obtains one or more target instructions for each target device through relevant operations on the front-end page of the system, and then the system generates various instructions to be issued that can be directly executed by each target device according to the target instruction protocol corresponding to each target instruction.
[0176] Step S306: Send the instruction to be sent, so that at least one target device executes the instruction to be sent.
[0177] Specifically, each instruction to be issued may be sent to a corresponding target device according to the correspondence between each instruction to be issued and the target device, so that each target device executes the corresponding instruction to be issued.
[0178] Optionally, when a plurality of the instructions to be issued are included, sending the instructions to be issued so that at least one target device executes the instructions to be issued includes:
[0179] Determine a delivery channel for each of the instructions to be delivered; for each instruction to be delivered, deliver the instruction to be delivered according to the delivery channel corresponding to the instruction to be delivered, so that at least one target device executes the instruction to be delivered.
[0180] One issuing channel may correspond to one or more instructions to be issued. The number of issuing channels may be determined according to system performance and the number of instructions to be issued, or may be a default value.
[0181] Specifically, when the system needs to issue multiple instructions to be issued, which may be multiple instructions to be issued to a target device or multiple instructions to be issued to multiple target devices, the system may set up multiple issuing channels and use multiple issuing channels to send multiple instructions to be issued in parallel to improve the efficiency of issuing instructions.
[0182] Specifically, the issuing sequence of the instructions to be issued corresponding to each issuing channel can be implemented based on the thread pool technology.
[0183] Optionally, determining a channel for issuing each of the instructions to be issued includes:
[0184] The number of delivery channels and the delivery instructions corresponding to each delivery channel are determined according to at least one of the type of the instruction to be delivered, the number of instruction protocols corresponding to each instruction to be delivered, and the number of target devices.
[0185] Specifically, a delivery channel may be established for each instruction to be delivered, so that the instruction to be delivered is sent to each target device through the delivery channel.
[0186] Furthermore, a sending channel may be established for each instruction protocol of each instruction to be sent, that is, for each target instruction protocol, so as to send the instruction to be sent corresponding to the target instruction protocol to each target device through the channel.
[0187] Furthermore, the issuing channel may be determined directly according to the target devices. For example, ten target devices may be divided into a group, and each group corresponds to a issuing channel to issue the instructions to be issued to the target devices in the group.
[0188] Exemplarily, assuming that the system includes 5 sending channels, and it is necessary to send instruction A to be sent to device 101 to device 105, and send instruction B to be sent to device 102 to device 109, then the system needs to send a total of 13 instructions to be sent, and then the 5 sending channels are started at the same time, and the processing of the above 13 instructions to be sent is carried out in parallel, such as the first sending channel sends instruction A to be sent from device 101 to device 103, the second sending channel sends instruction A to be sent from device 104 to device 105, the third sending channel sends instruction B to be sent from device 102 to device 104, the fourth sending channel sends instruction B to be sent from device 105 to device 107, and the fifth sending channel sends instruction B to be sent from device 108 to device 109.
[0189] By issuing instructions in a parallel running manner, the efficiency of issuing instructions can be further improved.
[0190] In this embodiment, for the remote control of terminal devices including multiple different command protocols, it is implemented to determine each target device and one or more target commands of each target device according to the relevant operations of the user, and then automatically determine the required each target command protocol based on the device identification of the target device and the command identification of the target command, so as to generate one or more instructions to be issued that can be executed by the target device based on the target command protocol, and send each instruction to be issued to each target device in a parallel operation and multi-threaded manner, thereby realizing the integration and unified control of target devices of multiple protocol types and improving the management efficiency of the equipment and the efficiency of command issuance.
[0191] For example, Figure 6 A flowchart of a method for issuing instructions provided in another embodiment of the present application is shown in FIG. Figure 6 As shown, the specific steps of the instruction issuing method are: the first step is to determine the scope of the target user's operable instructions, and the scope of the operable instructions includes each operable instruction and the IoT gas meter corresponding to each operable instruction; the second step is for the target user to check each operable instruction and fill in the parameters, so that the system automatically generates each instruction to be issued according to the instruction protocol; the third step is to start the asynchronous task processing mode; the fourth step is to query the device type and number of the IoT gas meters involved; the fifth step is to enable the thread pool to process the instructions to be issued corresponding to each device type respectively, and allocate a issuing channel for each instruction to be issued, such as channel one, channel two, channel three, etc., so as to send each instruction to be issued to the IoT gas meter.
[0192] Figure 7 A schematic diagram of a structure of an instruction issuing device provided in one embodiment of the present application is shown in FIG. Figure 7As shown, the instruction issuing device includes: a target instruction acquisition module 710, an instruction protocol determination module 720, a to-be-issued instruction generation module 730 and an instruction issuing module 740.
[0193] Among them, the target instruction acquisition module 710 is used to acquire the target instruction and at least one target device corresponding to the target instruction; the instruction protocol determination module 720 determines the instruction protocol corresponding to the target instruction based on the target instruction and at least one target device; the to-be-issued instruction generation module 730 is used to generate the to-be-issued instruction of the target instruction according to the instruction protocol; the instruction issuing module 740 is used to send the to-be-issued instruction so that at least one target device executes the to-be-issued instruction.
[0194] Optionally, the instruction protocol determination module 720 is specifically configured to:
[0195] The target instruction protocol corresponding to the target instruction is determined according to the first mapping relationship and the device identification of at least one target device, wherein the first mapping relationship is used to describe the association relationship between each device identification and its corresponding instruction protocol.
[0196] Optionally, the instruction protocol determination module 720 is specifically configured to:
[0197] The target instruction protocol corresponding to the target instruction of each target device is determined according to the device identification of the at least one target device and the instruction identification of the target instruction.
[0198] Optionally, the to-be-issued instruction generating module 730 is specifically configured to:
[0199] According to the instruction identifier of the target instruction, the instruction format corresponding to the target instruction is searched from the target instruction protocol; according to the instruction parameters of the target instruction and the instruction format, the instruction to be issued of the target instruction is generated.
[0200] Optionally, the target instruction acquisition module 710 includes:
[0201] The control range acquisition unit is used to acquire the control range and target instruction input by the target user; the target instruction and device determination unit is used to determine at least one target device corresponding to the target instruction according to the target user and the control range.
[0202] Optionally, the target instruction acquisition module 710 includes:
[0203] The operable instruction acquisition unit is used to acquire various operable instructions of the target user; the target instruction determination unit is used to determine the target instruction and at least one target device corresponding to the target instruction from various operable instructions according to the user operation of the target user.
[0204] Optionally, the target instruction determination unit is specifically configured to:
[0205] According to the selection operation of the target user, each of the target devices is determined and the user-selected instruction is determined from each operable instruction; according to the parameter setting operation of the target user, the parameter value of the instruction parameter of the user-selected instruction is determined; according to the user-selected instruction and the parameter value of its instruction parameter, the target instruction of each of the target devices is generated.
[0206] Optionally, the device further comprises:
[0207] The protocol set determination module is used to determine the instruction protocol set according to the user identification of the target user.
[0208] Accordingly, the instruction protocol determination module 720 is specifically configured to:
[0209] According to the device identification of each of the target devices and the instruction identification of the target instruction, the target instruction protocol corresponding to the target instruction of each of the target devices is determined from the instruction protocol set.
[0210] Optionally, when the target user inputs a control range, the protocol set determination module is specifically configured to:
[0211] According to the user identification of the target user, a candidate instruction protocol set of the target user is determined; according to the control scope, the instruction protocol set is determined from the candidate instruction protocol set.
[0212] When the target user inputs a selection operation, the protocol set determination module is specifically used to:
[0213] Determine a candidate instruction protocol set for the target user according to the user identifier of the target user; and determine the instruction protocol set from the candidate instruction protocol set according to the device range corresponding to the selected operation.
[0214] Optionally, when there are multiple instructions to be issued, the instruction issuing module 740 includes:
[0215] The lower channel determination unit is used to determine the issuing channel of each of the instructions to be issued; the instruction issuing unit is used to send the instruction to be issued according to the issuing channel corresponding to each instruction to be issued, so that at least one target device executes the instruction to be issued.
[0216] Optionally, the lower channel determination unit is specifically configured to:
[0217] The number of delivery channels and the delivery instructions corresponding to each delivery channel are determined according to at least one of the type of the instruction to be delivered, the number of instruction protocols corresponding to each instruction to be delivered, and the number of target devices.
[0218] The instruction issuing device provided in the embodiments of the present application can execute the instruction issuing method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
[0219] Figure 8 A schematic diagram of a structure of a command issuing device provided in one embodiment of the present application, such as Figure 8 As shown, the instruction issuing device includes: a memory 810, a processor 820 and a computer program.
[0220] The computer program is stored in the memory 810 and is configured to be executed by the processor 820 to implement the present application. Figure 2-Figure 6 The instruction issuing method provided by any embodiment in the corresponding embodiment.
[0221] The memory 810 and the processor 820 are connected via a bus 830 .
[0222] For related instructions, please refer to Figure 2-Figure 6 The relevant descriptions and effects corresponding to the steps are understood, and no further elaboration is given here.
[0223] Fig. 9 A schematic diagram of a structure of an instruction issuing system provided in one embodiment of the present application is shown in FIG. Fig. 9 As shown, the instruction issuing system includes: a front-end device 910 and one or more instruction issuing devices 920.
[0224] The front-end device 910 is used to obtain a user instruction and determine, according to the user instruction, a target instruction of at least one instruction issuing device and at least one target device corresponding to the target instruction; the instruction issuing device 920 is a device of the present application. Figure 8 The corresponding embodiment provides an instruction issuing device.
[0225] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the present application. Figure 2-Figure 6 The instruction issuing method provided by any embodiment in the corresponding embodiment.
[0226] Among them, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0227] One embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the present application Figure 2-Figure 6 The instruction issuing method provided by any embodiment in the corresponding embodiment.
[0228] In the several embodiments provided in the present application, it should be understood that the disclosed device can also be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0229] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the disclosure disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0230] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for issuing instructions, characterized in that: include: Acquire a target instruction and at least one target device corresponding to the target instruction; According to the first mapping relationship, obtaining the instruction protocol corresponding to the device identification of the target device; The first mapping relationship is used to describe the association between each device identifier and its corresponding instruction protocol; When a target device corresponds to multiple command protocols, the command protocol set is determined according to the user ID of the target user; The command protocol set is a set of all possible applicable command protocols under the target user name; Determining, according to the device identification of the at least one target device and the instruction identification of the target instruction, a target instruction protocol corresponding to the target instruction of each of the target devices; Generate a to-be-issued instruction of the target instruction according to the target instruction protocol and the target instruction; The instruction to be issued is sent so that at least one target device executes the instruction to be issued.
2. The method according to claim 1, characterized in that Generating an instruction to be issued of the target instruction according to the target instruction protocol and the target instruction, including: According to the instruction identifier of the target instruction, searching the instruction format corresponding to the target instruction from the target instruction protocol; Generate an instruction to be issued of the target instruction according to the instruction parameter of the target instruction and the instruction format.
3. The method according to claim 1, characterized in that Acquiring a target instruction and at least one target device corresponding to the target instruction includes: Get the control scope and target instructions input by the target user; At least one target device corresponding to the target instruction is determined according to the target user and the control range.
4. The method according to claim 1, characterized in that Acquiring a target instruction and at least one target device corresponding to the target instruction includes: Obtain each actionable instruction of the target user; According to the user operation of the target user, the target instruction and at least one target device corresponding to the target instruction are determined from various operable instructions.
5. The method according to claim 4, characterized in that According to the user operation of the target user, determining the target instruction and at least one target device corresponding to the target instruction from each operable instruction includes: According to the selection operation of the target user, determining each of the target devices and determining the user selected instruction from each operable instruction; Determining, according to the parameter setting operation of the target user, a parameter value of the instruction parameter of the instruction selected by the user; According to the instruction selected by the user and the parameter values of its instruction parameters, a target instruction for each of the target devices is generated.
6. The method according to claim 1, characterized in that When the target user inputs a control range, a command protocol set is determined according to the user identifier of the target user, including: Determining a set of candidate instruction protocols for the target user according to the user identifier of the target user; Determining the instruction protocol set from the candidate instruction protocol set according to the control scope; When the target user inputs a selection operation, a command protocol set is determined according to the user identifier of the target user, including: Determining a set of candidate instruction protocols for the target user according to the user identifier of the target user; The instruction protocol set is determined from the candidate instruction protocol sets according to the device range corresponding to the selected operation.
7. The method according to any one of claims 1 to 5, characterized in that: When a plurality of the instructions to be issued are included, sending the instructions to be issued so that at least one target device executes the instructions to be issued includes: Determining a channel for issuing each of the instructions to be issued; For each instruction to be issued, the instruction to be issued is sent according to the issuing channel corresponding to the instruction to be issued, so that at least one target device executes the instruction to be issued.
8. The method according to claim 7, characterized in that Determining the issuing channel of each of the instructions to be issued, including: The number of delivery channels and the delivery instructions corresponding to each delivery channel are determined according to at least one of the type of the instruction to be delivered, the number of instruction protocols corresponding to each instruction to be delivered, and the number of target devices.
9. A command issuing device, characterized in that: include: A target instruction acquisition module, used to acquire a target instruction and at least one target device corresponding to the target instruction; An instruction protocol determination module, which determines an instruction protocol corresponding to the target instruction according to the target instruction and at least one target device; A to-be-issued instruction generation module, used to generate the to-be-issued instruction of the target instruction according to the instruction protocol; An instruction issuing module, used for sending the instruction to be issued so that at least one target device executes the instruction to be issued; The instruction protocol determination module is specifically used to obtain the instruction protocol corresponding to the device identification of the target device according to the first mapping relationship, wherein the first mapping relationship is used to describe the association relationship between each device identification and its corresponding instruction protocol; When a target device corresponds to multiple command protocols, determining the command protocol set according to the user identification of the target user; The command protocol set is a set of all possible applicable command protocols under the target user name; The target instruction protocol corresponding to the target instruction of each of the target devices is determined according to the device identification of the at least one target device and the instruction identification of the target instruction.
10. A device for issuing instructions, characterized in that: include: memory and at least one processor; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the instruction issuing method according to any one of claims 1 to 8.
11. A command issuing system, characterized in that: include: A front-end device and at least one instruction issuing device as claimed in claim 10; The front-end device is used to obtain a user instruction, and determine a target instruction of at least one instruction issuing device and at least one target device corresponding to the target instruction according to the user instruction.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the instruction issuing method according to any one of claims 1 to 8 is implemented.
13. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the instruction issuing method according to any one of claims 1 to 8.
