Disclosure of Invention
In order to solve the above-mentioned deficiencies of the prior art, the present invention provides a control instruction classification routing method and a video matrix, from which a remote device can be controlled.
The technical problem to be solved by the invention is realized by the following technical scheme:
a control instruction classified routing method of a video matrix is provided, the video matrix is connected with at least one remote device in a communication mode, 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 object of the control instructions is the video matrix, classifying the control instructions into a first class of instructions, and if the control object of the control instructions is the remote equipment, classifying the control instructions into a second class of instructions;
and step 3: and reserving and executing the first class of instructions locally, and routing the second class of instructions to corresponding remote equipment.
Further, in step 2, the control target of the control command is determined by identifying the encoding format of the control command.
Further, the control instruction for controlling the remote device is coded in a specified format, if the coding format of the control instruction is a non-specified format, the control instruction is classified into a first type of instruction, and if the coding format of the control instruction is the 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 end character, wherein the command header is used for being identified by the video matrix to start the control instruction and comprises an identifier, and when the identifier is identified by the video matrix, a control object of the control instruction can be judged to be a remote device; the parameter part is used for identifying the video matrix so as to acquire a format adopted when the control instruction is forwarded and a sending module corresponding to the controlled remote equipment; the instruction part is used for the controlled remote equipment to recognize so as to execute specific instruction actions; the end symbol indicates the end of the control instruction.
A video matrix, comprising:
at least one receiving module, which is used for receiving at least one path of video signal;
at least one instruction module for receiving control instructions;
the identification and classification module is used for identifying the control object of the control instruction, classifying the control instruction into a first class of instruction and forwarding the first class of 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 class of instruction and forwarding the second class of 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 class of instructions forwarded by the identification and classification module;
and the sending module is used for being in communication connection with at least one remote device so as to send a certain path of video signal to the remote device connected with the sending module for playing, and send the second type of instruction forwarded by the identification classification module to the remote device connected with the sending module for execution.
Further, the identification and classification module identifies the coding format of the control command to judge the control object of the control command.
Further, the control instruction for controlling the remote device is coded in a specified format, if the coding format of the control instruction is a non-specified format, the control instruction is classified into a first type of instruction, and if the coding format of the control instruction is the 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 end character, wherein the command header is used for being identified by the video matrix to start the control instruction and comprises an identifier, and when the identifier is identified by the video matrix, a control object of the control instruction can be judged to be a remote device; the parameter part is used for identifying the video matrix so as to acquire a format adopted when the control instruction is forwarded and a sending module corresponding to the controlled remote equipment; the instruction part is used for the controlled remote equipment to recognize so as to execute specific instruction actions; the end symbol indicates the end of the control instruction.
Furthermore, the identification processing module is an FPGA chip.
Furthermore, 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 remote equipment is controlled from the video matrix.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and examples.
Example one
As shown in fig. 1, a method for controlling instruction classification routing of a video matrix, where the video matrix is communicatively connected to at least one remote device, includes the following steps:
step 1: and receiving a control instruction.
In step 1, the video matrix includes at least one receiving module and at least one sending module, and the receiving module is in communication connection with at least one source device to receive at least one video signal from the source device, and is in communication connection with at least one remote device to send a certain received video signal to at least one remote device for playing. The video matrix can control the video signals sent by the receiving modules to be switched among the video signals received by the sending modules.
The video matrix includes at least one instruction module for receiving the control instruction by at least one manner, for example, the instruction module may include, but is not limited to, at least one of an RS232 module, an infrared module, a WIFI module, and a LAN module, so as to receive the control instruction by at least one manner of an RS232 signal, an infrared signal, a WIFI signal, a local area network signal, and the like.
Step 2: classifying the received control instructions according to different control objects, if the control object of the control instructions is the video matrix, classifying the control instructions into a first class of instructions, and if the control object of the control instructions is the remote equipment, classifying the control instructions into a second class of instructions.
In step 2, the video matrix identifies the control object of the control command, classifies the control command into a first type of command if the control object of the control command is identified as the video matrix itself, and classifies the control command into a second type of command if the control object of the control command is identified as the remote device.
Specifically, in 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 of instruction) for controlling the remote device is encoded in a specific format, and if the encoding format of the control instruction is a non-specific format, the control instruction is classified into the first type of instruction, and if the encoding format of the control instruction is a specific format, the control instruction is classified into the second type of instruction.
The control instruction encoded by adopting the specified format comprises a command header, at least one parameter part, an information part and an end character, wherein the command header is used for being identified by the video matrix to start the control instruction and comprises an identifier, and when the identifier is identified by the video matrix, a control object of the control instruction can be judged to be a remote device; the parameter part is used for identifying the video matrix so as to acquire a format adopted when the control instruction is forwarded and a sending module corresponding to the controlled remote equipment; the instruction part is used for the controlled remote equipment to recognize so as to execute specific instruction actions; the end symbol indicates the end of the control instruction.
If the control instruction coded by adopting the specified format is 'Header + Parameter0+ Parameter1+ Parameter2+ Parameter3+ DATA + Tail', wherein 'Header' is a command head of the control instruction and is used for starting the control instruction and simultaneously used for identifying and judging that a control object of the control instruction is a remote device by the video matrix; "Parameter 0, Parameter1, Parameter2, and Parameter 3" are four Parameter parts of the control command, which are used for the video matrix to identify to know the format in which the control command needs to be forwarded to which sending module; "DATA" is a specific instruction of the control instruction, and is used for a remote device controlled by the control instruction to execute a specific instruction action; "Tail" is the terminator of the control instruction and is used to indicate the end 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 the encoding format of the second type of instruction.
And step 3: and reserving and executing the first class of instructions locally, and sending the second class of instructions to corresponding remote equipment.
In 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, and switching video signals transmitted by each receiving module, 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, and setting display parameters of the remote device.
Example two
As shown in fig. 2, a video matrix for switching a received video signal to a corresponding remote device for playing, includes:
at least one receiving module, which is used for receiving at least one path of video signal;
at least one instruction module for receiving control instructions;
the identification and classification module is used for identifying the control object of the control instruction, classifying the control instruction into a first class of instruction and forwarding the first class of 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 class of instruction and forwarding the second class of 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 class of instructions forwarded by the identification and classification module;
and the sending module is used for being in communication connection with at least one remote device so as to send a certain path of video signal to the remote device connected with the sending module for playing, and send the second type of instruction forwarded by the identification classification module to the remote device connected with the sending module for execution.
In a specific implementation, the remote device is connected with a receiving device to receive the video signal and the second type of instruction sent by the corresponding sending module through the receiving device, and after receiving the video signal and the second type of instruction, the remote device plays the video signal and executes the second type of instruction.
The instruction module may include, but is not limited to, at least one of an RS232 module, an infrared module, a WIFI module, and a LAN module, so as to receive the control instruction through at least one of an RS232 signal, an infrared signal, a WIFI signal, a local area network signal, and the like. The instruction module is connected to the identification and classification module through an instruction conversion module, and the instruction conversion module is configured to convert the control instructions received by each instruction module into a specified format, such as an RS232 format.
Specifically, the identification and classification module 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 of instruction) for controlling the remote device is encoded in a specific format, and if the encoding format of the control instruction is a non-specific format, the control instruction is classified into the first type of instruction, and if the encoding format of the control instruction is a specific format, the control instruction is classified into the second type of instruction.
The control instruction encoded by adopting the specified format comprises a command header, at least one parameter part, an information part and an end character, wherein the command header is used for being identified by the video matrix to start the control instruction and comprises an identifier, and when the identifier is identified by the video matrix, a control object of the control instruction can be judged to be a remote device; the parameter part is used for identifying the video matrix so as to acquire a format adopted when the control instruction is forwarded and a sending module corresponding to the controlled remote equipment; the instruction part is used for the controlled remote equipment to recognize so as to execute specific instruction actions; the end symbol indicates the end of the control instruction.
If the control instruction coded by adopting the specified format is 'Header + Parameter0+ Parameter1+ Parameter2+ Parameter3+ DATA + Tail', wherein 'Header' is a command head of the control instruction and is used for starting the control instruction and simultaneously used for identifying and judging that a control object of the control instruction is a remote device by the video matrix; "Parameter 0, Parameter1, Parameter2, and Parameter 3" are three Parameter parts of the control command, which are used for the video matrix to identify to know the format in which the control command needs to be forwarded to which sending module; "DATA" is a specific instruction of the control instruction, and is used for a remote device controlled by the control instruction to execute a specific instruction action; "Tail" is the terminator of the control instruction and is used to indicate the end of the control instruction.
The control executed 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, and switching video signals transmitted by the receiving modules, and the control executed 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 the encoding format 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-mentioned embodiments only express the embodiments of the present invention, and the description is more specific and detailed, but not understood as the limitation of the patent scope of the present invention, but all the technical solutions obtained by using the equivalent substitution or the equivalent transformation should fall within the protection scope of the present invention.