Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a control instruction classification routing method and a video matrix, which can control remote equipment from the video matrix.
The technical problems to be solved by the invention are realized by the following technical scheme:
a control instruction classified routing method of a video matrix, wherein the video matrix is in communication connection with at least one far-end device, and the classified routing method comprises the following steps:
step 1: receiving a control instruction;
step 2: classifying the received control instructions according to different control objects, if the control objects of the control instructions are the video matrix, classifying the control instructions into first type instructions, and if the control objects of the control instructions are the remote equipment, classifying the control instructions into second type instructions;
step 3: and the first type of instructions are kept local and executed, and the second type of instructions are routed to corresponding remote equipment.
Further, in the step 2, the encoding format of the control command is identified to determine the control object of the control command.
Further, the control instruction for controlling the remote device is encoded in a specified format, if the encoding format of the control instruction is a non-specified format, the control instruction is classified into a first type of instruction, and if the encoding format of the control instruction is a specified format, the control instruction is classified into a second type of instruction.
Further, the control instruction encoded by adopting the specified format comprises a command header, at least one parameter part, an information part and an ending symbol, wherein the command header is used for the identification of the video matrix to start the control instruction and comprises an identifier, and when the identifier is identified by the video matrix, the control object of the control instruction can be judged to be a remote device; the parameter part is used for the video matrix to recognize so as to acquire the format adopted when the control instruction is forwarded and a sending module corresponding to the controlled remote equipment; the instruction part is used for being identified by the controlled remote equipment to execute specific instruction actions; the terminator represents the end of the control instruction.
A video matrix, comprising:
the at least one receiving module is used for receiving at least one path of video signal;
the at least one instruction module is used for receiving the control instruction;
the identification classification module is used for identifying the control object of the control instruction, classifying the control instruction into a first type instruction and forwarding the first type instruction to the local control module if the control object of the control instruction is identified as the video matrix, and classifying the control instruction into a second type instruction and forwarding the second type instruction to the corresponding sending module if the control object of the control instruction is identified as the remote equipment;
the local control module is used for executing the first type of instructions forwarded by the identification and classification module;
and the at least one sending module is used for being in communication connection with at least one far-end device so as to send a certain path of video signal to the far-end device connected with the far-end device for playing, and sending the second type of instruction forwarded by the identification and classification module to the far-end device connected with the identification and classification module for execution.
Further, the identification classification module identifies the coding format of the control instruction to judge the control object of the control instruction.
Further, the control instruction for controlling the remote device is encoded in a specified format, if the encoding format of the control instruction is a non-specified format, the control instruction is classified into a first type of instruction, and if the encoding format of the control instruction is a specified format, the control instruction is classified into a second type of instruction.
Further, the control instruction encoded by adopting the specified format comprises a command header, at least one parameter part, an information part and an ending symbol, wherein the command header is used for the identification of the video matrix to start the control instruction and comprises an identifier, and when the identifier is identified by the video matrix, the control object of the control instruction can be judged to be a remote device; the parameter part is used for the video matrix to recognize so as to acquire the format adopted when the control instruction is forwarded and a sending module corresponding to the controlled remote equipment; the instruction part is used for being identified by the controlled remote equipment to execute specific instruction actions; the terminator represents the end of the control instruction.
Further, the identification processing module is an FPGA chip.
Further, the local control module is an MCU chip.
The invention has the following beneficial effects: the control instruction classification routing method and the video matrix classify the received control instructions according to different control objects, then the control instructions for controlling the video matrix are stored locally and executed, the control instructions for controlling the remote equipment are sent to the corresponding remote equipment and executed by the corresponding remote equipment, and the control of the remote equipment from the video matrix is realized.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings and examples.
Example 1
As shown in fig. 1, a control instruction classification routing method of a video matrix, where at least one remote device is connected in communication with the video matrix, includes the following steps:
step 1: and receiving a control instruction.
In the step 1, the video matrix includes at least one receiving module and at least one transmitting module, which are communicatively connected with at least one source device through the receiving module, so as to receive at least one path of video signal from the source device, and communicatively connected with at least one remote device through the receiving module, so as to transmit a certain path of received video signal to the at least one remote device for playing. The video matrix may control switching of video signals transmitted by the respective receiving modules between video signals received by the respective transmitting modules.
The video matrix includes at least one instruction module for receiving the control instruction in at least one manner, for example, the instruction module may include at least one of an RS232 module, an infrared module, a WIFI module, and a LAN module, etc., to receive the control instruction in at least one of an RS232 signal, an infrared signal, a WIFI signal, a LAN signal, etc.
Step 2: classifying the received control instructions according to different control objects, if the control objects of the control instructions are the video matrix, classifying the control instructions into first type instructions, and if the control objects of the control instructions are the remote equipment, classifying the control instructions into second type instructions.
In the step 2, the video matrix identifies the control object of the control instruction, if the control object of the control instruction is identified as the control object, the control instruction is classified into a first type of instruction, and if the control object of the control instruction is identified as the remote device, the control instruction is classified into a second type of instruction.
Specifically, in the step 2, the video matrix identifies the coding format of the control command to determine the control object of the control command.
In this embodiment, a control instruction (i.e., a second type instruction) for controlling the remote device is encoded in a specified format, if the encoding format of the control instruction is a non-specified format, the control instruction is classified into the first type instruction, and if the encoding format of the control instruction is a specified format, the control instruction is classified into the second type instruction.
The control instruction coded by adopting the appointed format comprises a command head, at least one parameter part, an information part and an ending symbol, wherein the command head is used for the video matrix to identify so as to start the control instruction and comprises an identifier, and when the video matrix identifies the identifier, the control object of the control instruction can be judged to be remote equipment; the parameter part is used for the video matrix to recognize so as to acquire the format adopted when the control instruction is forwarded and a sending module corresponding to the controlled remote equipment; the instruction part is used for being identified by the controlled remote equipment to execute specific instruction actions; the terminator represents the end of the control instruction.
If the control instruction encoded by adopting the specified format is "Header+Paramete0+Paramete1+Paramete2+Paramete3+DATA+Tail", wherein "Header" is the command Header of the control instruction and is used for starting the control instruction, and the video matrix is also used for identifying and judging that the control object of the control instruction is a remote device; "Parameter0, parameter1, parameter2, parameter3" are four Parameter parts of the control instruction, used for the said video matrix to discern in order to know what kind of format the control instruction needs to be forwarded to which send module; "DATA" is a specific instruction of the control instruction, and is used for the remote device controlled by the control instruction to execute a specific instruction action; "Tail" is an ending symbol of the control instruction and is used for indicating ending of the control instruction.
In this case, the encoding format of the first type of instruction is not limited, as long as the encoding format is different from that of the second type of instruction.
Step 3: and the first type of instructions are reserved locally and executed, and the second type of instructions are sent to corresponding remote equipment.
In the step 3, after the video matrix sends the second type of instruction to the corresponding remote device through the corresponding sending module, the corresponding remote device receives and executes the second type of instruction.
The first type of instruction for controlling the video matrix may include, but is not limited to, turning on the video matrix, turning off the video matrix, switching video signals sent by each receiving module, and the like, and the second type of instruction for controlling the remote device may include, but is not limited to, turning on the remote device, turning off the remote device, setting display parameters of the remote device, and the like.
Example two
As shown in fig. 2, a video matrix for switching received video signals to corresponding remote devices for playing, includes:
the at least one receiving module is used for receiving at least one path of video signal;
the at least one instruction module is used for receiving the control instruction;
the identification classification module is used for identifying the control object of the control instruction, classifying the control instruction into a first type instruction and forwarding the first type instruction to the local control module if the control object of the control instruction is identified as the video matrix, and classifying the control instruction into a second type instruction and forwarding the second type instruction to the corresponding sending module if the control object of the control instruction is identified as the remote equipment;
the local control module is used for executing the first type of instructions forwarded by the identification and classification module;
and the at least one sending module is used for being in communication connection with at least one far-end device so as to send a certain path of video signal to the far-end device connected with the far-end device for playing, and sending the second type of instruction forwarded by the identification and classification module to the far-end device connected with the identification and classification module for execution.
In particular, the remote device is connected with a receiving device, so as to receive the video signal and the second type instruction sent by the corresponding sending module through the receiving device, and after receiving the video signal and the second type instruction, the remote device plays the video signal and executes the second type instruction.
The instruction module may include, but is not limited to, at least one of an RS232 module, an infrared module, a WIFI module, a LAN module, etc. to receive the control instruction by at least one of an RS232 signal, an infrared signal, a WIFI signal, a LAN signal, etc. The instruction module is connected with the identification classification module through an instruction conversion module, and the instruction conversion module is used for converting control instructions received by each instruction module into a specified format, such as an RS232 format, and in this embodiment, the instruction conversion module is an ARM chip.
Specifically, the identification classification module identifies the coding format of the control instruction to judge the control object of the control instruction.
In this embodiment, a control instruction (i.e., a second type instruction) for controlling the remote device is encoded in a specified format, if the encoding format of the control instruction is a non-specified format, the control instruction is classified into the first type instruction, and if the encoding format of the control instruction is a specified format, the control instruction is classified into the second type instruction.
The control instruction coded by adopting the appointed format comprises a command head, at least one parameter part, an information part and an ending symbol, wherein the command head is used for the video matrix to identify so as to start the control instruction and comprises an identifier, and when the video matrix identifies the identifier, the control object of the control instruction can be judged to be remote equipment; the parameter part is used for the video matrix to recognize so as to acquire the format adopted when the control instruction is forwarded and a sending module corresponding to the controlled remote equipment; the instruction part is used for being identified by the controlled remote equipment to execute specific instruction actions; the terminator represents the end of the control instruction.
If the control instruction encoded by adopting the specified format is "Header+Paramete0+Paramete1+Paramete2+Paramete3+DATA+Tail", wherein "Header" is the command Header of the control instruction and is used for starting the control instruction, and the video matrix is also used for identifying and judging that the control object of the control instruction is a remote device; "Parameter0, parameter1, parameter2, parameter3" are three Parameter parts of the control instruction, used for the said video matrix to discern in order to know what kind of format the control instruction needs to be forwarded to which send module; "DATA" is a specific instruction of the control instruction, and is used for the remote device controlled by the control instruction to execute a specific instruction action; "Tail" is an ending symbol of the control instruction and is used for indicating ending of the control instruction.
The control performed by the local control module according to the first type of instruction may include, but is not limited to, turning on a video matrix, turning off the video matrix, switching video signals sent by each receiving module, and the like, and the control performed by the remote device according to the second type of instruction may include, but is not limited to, turning on the remote device, turning off the remote device, setting display parameters of the remote device, and the like.
In this case, the encoding format of the first type of instruction is not limited, as long as the encoding format is different from that of the second type of instruction.
In this embodiment, the identification processing module is an FPGA chip, and the local control module is an MCU chip.
The above examples only show embodiments of the present invention, and the description thereof is more specific and detailed, but should not be construed as limiting the scope of the invention, but all technical solutions obtained by equivalent substitution or equivalent transformation shall fall within the scope of the invention.