CN113766009B - Lamp panel control method, system, device and storage medium - Google Patents

Lamp panel control method, system, device and storage medium Download PDF

Info

Publication number
CN113766009B
CN113766009B CN202110904963.4A CN202110904963A CN113766009B CN 113766009 B CN113766009 B CN 113766009B CN 202110904963 A CN202110904963 A CN 202110904963A CN 113766009 B CN113766009 B CN 113766009B
Authority
CN
China
Prior art keywords
data
instruction information
serial port
protocol
data packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110904963.4A
Other languages
Chinese (zh)
Other versions
CN113766009A (en
Inventor
董晓勇
唐波
黄冬青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Inteltron Intelligent Science & Technology Co ltd
Original Assignee
Shenzhen Inteltron Intelligent Science & Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Inteltron Intelligent Science & Technology Co ltd filed Critical Shenzhen Inteltron Intelligent Science & Technology Co ltd
Priority to CN202110904963.4A priority Critical patent/CN113766009B/en
Publication of CN113766009A publication Critical patent/CN113766009A/en
Application granted granted Critical
Publication of CN113766009B publication Critical patent/CN113766009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09FDISPLAYING; ADVERTISING; SIGNS; LABELS OR NAME-PLATES; SEALS
    • G09F9/00Indicating arrangements for variable information in which the information is built-up on a support by selection or combination of individual elements
    • G09F9/30Indicating arrangements for variable information in which the information is built-up on a support by selection or combination of individual elements in which the desired character or characters are formed by combining individual elements
    • G09F9/33Indicating arrangements for variable information in which the information is built-up on a support by selection or combination of individual elements in which the desired character or characters are formed by combining individual elements being semiconductor devices, e.g. diodes
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/22Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
    • G09G3/30Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
    • G09G3/32Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0057Block codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B45/00Circuit arrangements for operating light-emitting diodes [LED]
    • H05B45/30Driver circuits
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/165Controlling the light source following a pre-assigned programmed sequence; Logic control [LC]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Abstract

The application relates to the field of lighting control, in particular to a lamp panel control method, a system, a device and a storage medium, wherein the method comprises the steps of obtaining an initial control instruction, and encoding the initial control instruction according to a first preset serial port protocol to obtain encoded instruction information, wherein the encoded instruction information comprises header data, middle data and tail data; packaging the coded instruction information according to a second preset serial port protocol to obtain an instruction information data packet, and outputting the instruction information data packet; acquiring an instruction information data packet, decompressing the instruction information data packet according to a second preset serial port protocol, if the instruction information data packet is decompressed to the header data, starting to store the intermediate data, and if the instruction information data packet is decompressed to the tail data, ending to store the intermediate data; intermediate data are acquired, the intermediate data are analyzed according to a third preset serial port protocol, a control signal is obtained, and the lamp panel is controlled according to the control signal. The application has the effect of improving the use experience of lamp plate control.

Description

Lamp panel control method, system, device and storage medium
Technical Field
The present disclosure relates to the field of lighting control, and in particular, to a method, a system, a device, and a storage medium for controlling a lamp panel.
Background
Currently, in an LED (Light Emitting Diode ) display control system, an LED display is typically formed by splicing a plurality of LED boxes, and each LED box includes a receiving card (or called LED display control board) and a plurality of LED lamp boards electrically connected to the receiving card, and some LED boxes of the LED display are further configured with an adapter board (or called Hub card) to connect the plurality of LED lamp boards to the adapter card.
The lamp panel control in the related art is mostly controlled by adopting a mechanical switch, namely, the lamp panel is controlled to be turned on or off by manually pressing the switch, and although the control mode is simpler to use, the control mode is slightly single, and the use experience is poor.
For the above related art, the inventors consider that the control method of the related art is relatively single, and the use experience is poor for the user.
Disclosure of Invention
In order to improve the use experience of lamp panel control, the application provides a lamp panel control method, a lamp panel control system, a lamp panel control device and a storage medium.
In a first aspect, the present application provides a method for controlling a lamp panel, which adopts the following technical scheme:
a lamp panel control method comprising:
acquiring an initial control instruction, and encoding the initial control instruction according to a first preset serial port protocol to obtain encoded instruction information, wherein the encoded instruction information comprises header data, intermediate data and tail data;
packaging the coded instruction information according to a second preset serial port protocol to obtain an instruction information data packet, and outputting the instruction information data packet;
acquiring the instruction information data packet, decompressing the instruction information data packet according to the second preset serial port protocol, if the instruction information data packet is decompressed to the header data, starting to store the intermediate data, and if the instruction information data packet is decompressed to the tail data, ending to store the intermediate data;
and acquiring the intermediate data, analyzing the intermediate data according to a third preset serial port protocol to obtain a control signal, and controlling the lamp panel according to the control signal.
By adopting the technical scheme, an initial control instruction is acquired, the initial control instruction is encoded to obtain encoded instruction information, the encoded instruction information comprises header data, intermediate data and tail data, the encoded instruction information is packaged to obtain an instruction information data packet and output, the instruction information data packet is decompressed, when the header data is decompressed, the intermediate data is stored, when the tail data is decompressed, the intermediate data is stored, the intermediate data is analyzed to obtain a control signal, and the lamp panel is controlled by the control signal; compared with the mechanical control of the related art, the use experience of lamp panel control can be improved.
Optionally, the outputting the instruction information data packet specifically includes:
presetting an output time interval threshold, and judging whether the time interval between the output time of the previous instruction information data packet and the output time of the current instruction information data packet is within the preset output time interval threshold;
if yes, outputting the instruction information data packet;
if not, the instruction information data packet is not output.
By adopting the technical scheme, when the instruction information data packet is transmitted, the output time interval threshold is preset, whether the interval between the previous transmission time and the current transmission time is within the preset output time interval threshold is judged, if yes, the instruction information data packet is output, otherwise, the instruction information data packet is not output, and the purpose of influencing the response speed of the signal can be achieved.
Optionally, the preset output time interval threshold is set to 0.1ms-0.3ms.
By adopting the technical scheme, the aim of influencing the reaction speed of the signal can be further realized by setting the preset output time interval threshold to be 0.1ms-0.3ms.
Optionally, the header data represents transmission data information, and the table tail data represents reception data information.
By adopting the technical scheme, the header data is set to be the sending data information, and the table tail data is set to be the receiving data information, so that the receiving and sending of the instruction information data packet can be clarified, and the monitoring is facilitated.
Optionally, the encoding the initial control instruction according to the first preset serial port protocol to obtain encoded instruction information specifically includes:
acquiring a coding request instruction, verifying and analyzing the coding request instruction, if the verification is successful, continuing to execute, and if the verification is wrong, returning error information;
screening and calling coding rules from a coding rule database according to a first preset serial port protocol;
and encoding the initial control instruction according to the encoding rule, and outputting the obtained encoded instruction information.
By adopting the technical scheme, the coding request instruction is verified and analyzed, if the verification is successful, the coding rule is screened and called from the coding rule database, the called coding rule is output, and if the verification is unsuccessful, error information is returned, so that the coding success rate of the initial control instruction can be improved.
In a second aspect, the present application provides a lamp panel control system, which adopts the following technical scheme:
a light panel control system, comprising:
the acquisition module is used for acquiring an initial control instruction, and encoding the initial control instruction according to a first preset serial port protocol to obtain encoded instruction information, wherein the encoded instruction information comprises header data, middle data and tail data;
the packaging module is used for packaging the coded instruction information according to a second preset serial port protocol to obtain an instruction information data packet and outputting the instruction information data packet;
the decompression module is used for decompressing the instruction information data packet according to the second preset serial port protocol, if the data is decompressed to the header data, the intermediate data is stored, and if the data is decompressed to the tail data, the intermediate data is stored;
the analysis module is used for analyzing the intermediate data according to a third preset serial port protocol to obtain a control signal and controlling the lamp panel according to the control signal.
By adopting the technical scheme, an initial control instruction is acquired, the initial control instruction is encoded to obtain encoded instruction information, the encoded instruction information comprises header data, intermediate data and tail data, the encoded instruction information is packaged to obtain an instruction information data packet and output, the instruction information data packet is decompressed, when the header data is decompressed, the intermediate data is stored, when the tail data is decompressed, the intermediate data is stored, the intermediate data is analyzed to obtain a control signal, and the lamp panel is controlled by the control signal; compared with the mechanical control of the related art, the use experience of lamp panel control can be improved.
In a third aspect, the present application provides a computer apparatus, which adopts the following technical scheme:
a computer apparatus comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, the processor executing the method of the first aspect when the computer program is loaded into the processor.
By adopting the technical scheme, the computer program is generated by the method of the first aspect and is stored in the memory to be loaded and executed by the processor, so that the computer device is manufactured according to the memory and the processor, and the computer device is convenient for a user to use.
In a fourth aspect, the present application provides a computer readable storage medium, which adopts the following technical scheme:
a computer readable storage medium having stored therein a computer program which, when loaded by a processor, performs the method of the first aspect.
By adopting the technical scheme, the method of the first aspect generates a computer program, and stores the computer program in a computer readable storage medium to be loaded and executed by a processor, and the computer program is convenient to read and store through the computer readable storage medium.
In summary, the present application includes at least one of the following beneficial technical effects:
1. compared with the mechanical switch control lamp panel in the related art, the lamp panel control method and device can improve the use experience of lamp panel control;
2. and judging whether the interval between the previous transmission time and the current transmission time is within the range of the preset output time interval threshold value or not through the preset output time interval threshold value, and further, the purpose of influencing the response speed of the signal can be achieved.
Drawings
Fig. 1 is a schematic overall method flow diagram of a lamp panel control method of the present application.
Fig. 2 is a flow chart of a coding method of an initial control instruction in the present application.
Fig. 3 is a flow chart of a method for outputting instruction information data packets according to the present application.
Fig. 4 is a flow chart of a method of intermediate data parsing of the present application.
Fig. 5 is a schematic diagram of an overall system frame of the lamp panel control system of the present application.
Reference numerals illustrate: 1. an acquisition module; 2. a packaging module; 3. a decompression module; 4. and an analysis module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to fig. 1 to 5 and the embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
When the lamp panel is used, the lamp panel is controlled to be on or off through the control device, the control device is provided with a transmitting end for transmitting control signals, and the lamp panel is provided with a receiving end for receiving the control signals transmitted by the transmitting end.
The embodiment of the application discloses a lamp panel control method. Referring to fig. 1, the method includes:
s1: the method comprises the steps of obtaining an initial control instruction, and encoding the initial control instruction according to a first preset serial port protocol to obtain encoded instruction information, wherein the encoded instruction information comprises header data, intermediate data and tail data.
Specifically, in this embodiment, the control device may use an APP installed on the remote controller or the terminal, and further obtain an initial control instruction, for example, a switch instruction, through the remote controller or the APP, and encode the obtained switch instruction according to a first preset serial protocol, where the first preset serial protocol may use a TCP/IP protocol to obtain encoded instruction information, where the encoded instruction information may include header data, intermediate data and tail data, and in this embodiment, the header data may be represented as transmission data information, the intermediate data may be represented as an initial control instruction, and the tail data may be represented as reception information.
More specifically, referring to fig. 2, in the present embodiment, a method for encoding a switching instruction using a TCP/IP protocol includes:
s11: and acquiring the coding request instruction, verifying and analyzing the coding request instruction, if the verification is successful, continuing to execute, and if the verification is wrong, returning error information.
Specifically, in this embodiment, when the encoding request instruction is acquired, the encoding request instruction is recorded according to a preset recording unit, and a log file is generated according to a preset log generating unit.
S12: screening and calling the coding rule from the coding rule database according to the first preset serial port protocol.
Specifically, in this embodiment, the encoding rule may include a single encoding rule, a multi-body encoding rule, and a special class encoding rule.
When the monomer coding rule is utilized to code the initial control instruction, the method specifically comprises the following steps:
selecting a monomer coding rule, analyzing the monomer coding rule and judging the number of code segments;
acquiring a code segment, judging whether the code segment exists, if so, continuing to execute, and if not, outputting a code;
judging whether the code segment is a reference code, if so, splicing the reference code, and returning to the step of acquiring the code segment after the reference code is successfully spliced, otherwise, acquiring a reference code splicing result and acquiring a maximum sequence code;
and assembling the reference code splicing result with the maximum sequence code to obtain a coding result, and outputting the coding result.
When the initial control instruction is encoded by utilizing the multi-body encoding rule, the method specifically comprises the following steps:
selecting a multi-body coding rule, analyzing the multi-body coding rule and judging the number of code segments;
acquiring a code segment, judging whether the code segment exists, if so, continuing to execute, and if not, outputting a code;
judging whether the code segment is a reference code, if so, splicing the reference code, and returning to the step of acquiring the code segment after the reference code is successfully spliced, otherwise, continuing to execute;
judging whether the code segment number is empty, if so, acquiring a reference code splicing result, acquiring a maximum sequence code, and continuing to execute, and if not, acquiring the reference code splicing result, and continuing to execute;
splice the reference code and the sequence code and return to the step of acquiring the code segment.
When the special class coding rule is used for coding the initial control instruction, the method specifically comprises the following steps:
selecting a special class coding rule, analyzing the special class coding rule and judging the number of code segments;
acquiring a code segment, judging whether the code segment exists, if so, continuing to execute, and if not, outputting a code;
judging whether the code segment is a reference code, if so, splicing the reference code, and returning to the step of acquiring the code segment after the reference code is successfully spliced, otherwise, continuing to execute;
judging whether the code segment is empty, if so, continuing to execute, if not, acquiring a reference code splicing result, splicing with the first bit of the current code, and continuing to execute;
acquiring a reference code splicing result, acquiring a maximum sequence code, and continuing to execute;
and (3) code splicing, judging whether a batch of items is performed, if so, adding a batch of special symbols after the current code, and then returning to the step of acquiring the splicing result of the reference code, otherwise, directly outputting the coding result.
S13: and encoding the initial control instruction according to the encoding rule, and outputting the obtained encoded instruction information.
In this embodiment, the obtained initial control command may be encoded by a knob encoder.
S2: and packaging the coded instruction information according to a second preset serial port protocol to obtain an instruction information data packet, and outputting the instruction information data packet.
Specifically, the second preset serial port protocol is used to perform encapsulation and packaging processing on the encoded instruction information, and in this embodiment, the second preset serial port protocol may use a communication control protocol, where the communication control protocol may use a PPP/HDLC protocol, and further, an instruction information data packet is obtained.
In this embodiment, a transmitting end is disposed on the control device or the APP, and then the transmitting end outputs the obtained instruction information data packet.
Specifically, referring to fig. 3, in the present embodiment, when outputting the instruction information packet, the method specifically includes:
s21: presetting an output time interval threshold, and judging whether the time interval between the output time of the previous instruction information data packet and the output time of the current instruction confidence data packet is within the preset output time interval threshold.
In this embodiment, the preset output time interval threshold may be set to 0.1ms-0.3ms, specifically, according to the content size and the interference level of the signal, and this embodiment is set to 0.1ms as an example.
S22: if yes, outputting the instruction information data packet.
S23: if not, the instruction information data packet is not output.
Furthermore, by presetting the output time interval threshold, the effect of influencing the signal reaction speed can be achieved.
S3: and acquiring the instruction information data packet, decompressing the instruction information data packet according to the second preset serial port protocol, if the instruction information data packet is decompressed to the header data, starting to store the intermediate data, and if the instruction information data packet is decompressed to the tail data, ending to store the intermediate data.
Specifically, in this embodiment, the receiving end of the lamp panel obtains the instruction information data packet, and decompresses the instruction information data packet according to the PPP/HDLC protocol.
In this embodiment, the rule for decompressing the instruction information packet by using the PPP/HDLC protocol includes:
if the header data is decompressed, starting to store the intermediate data;
if the data is decompressed to the table tail data, the storage of the intermediate data is finished.
S4: and acquiring the intermediate data, analyzing the intermediate data according to a third preset serial port protocol to obtain a control signal, and controlling the lamp panel according to the control signal.
Specifically, in this embodiment, the information retrieving unit is used to retrieve the stored intermediate data, and parse the obtained intermediate data according to a third preset serial port protocol, where the third preset serial port protocol may use a Modbus protocol, and further obtain a control signal, and control the lamp panel according to the obtained control signal.
Referring to fig. 4, in this embodiment, when the intermediate data is analyzed by the Modbus protocol, a plurality of threads, for example, a main thread, a serial thread, a protocol thread, and a data thread, are involved, and when the intermediate data is specifically analyzed by the Modbus protocol, the method includes:
s41: the main thread is used for starting a serial port thread, a protocol thread and a data thread, analyzing serial port configuration data and reading multi-serial port information;
s42: the serial port thread is used for starting according to the command of the main thread and entering the event message circulation;
s43: the protocol thread is used for starting according to the command of the main thread, determining a serial port number according to the configuration serial port information, and storing Modbus commands stored in a Modbus list of the serial port thread into a QMODBUS ComList list of the protocol thread;
s44: the data thread is used for analyzing the intermediate data according to the starting of the command of the main thread, detecting whether the QComDataList list stores data or not in real time, analyzing a control signal if the QComDataList list stores data, processing the analyzed control signal, and if the QComDataList list does not store data, not processing the control signal.
The implementation principle of the lamp panel control method in the embodiment of the application is as follows: the method comprises the steps of obtaining a lamp panel switch instruction by using a remote controller or an APP, encoding the switch instruction according to a TCP/IP protocol to obtain encoded instruction information, then packaging the encoded instruction information according to a PPP/HDLC protocol to obtain an instruction information data packet, outputting the obtained instruction information data packet through a transmitting end of the remote controller or the APP, receiving the instruction information data packet through a receiving end of the lamp panel, decompressing the instruction information data packet according to the PPP/HDLC protocol, starting to store intermediate data when header data is decompressed, ending the storage of the intermediate data when footer data is decompressed, retrieving the stored intermediate data, and analyzing the intermediate data according to a Modbus protocol to obtain a control signal, thereby controlling the lamp panel according to the obtained control signal.
The embodiment of the application discloses a lamp panel control system, refer to fig. 5, it includes acquisition module 1, packing module 2, decompression module 3 and analysis module 4, wherein, packing module 2 communicates with acquisition module 1 and decompression module 3 respectively, and analysis module 4 communicates with decompression module 3.
Specifically, in this embodiment, the acquiring module 1 is configured to acquire an initial control instruction, and encode the initial control instruction according to a first preset serial port to obtain encoded instruction information, where the encoded instruction information includes header data, intermediate data, and tail data; the packaging module 2 is used for packaging the coded instruction information according to a second preset serial port protocol to obtain an instruction information data packet and outputting the instruction information data packet; the decompression module 3 is used for decompressing the instruction information data packet according to a second preset serial port protocol, if the data is decompressed to the header data, the intermediate data is stored, and if the data is decompressed to the tail data, the intermediate data is stored; the analysis module 4 is configured to analyze the intermediate data according to a third preset serial port protocol, so as to obtain a control signal, and control the lamp panel according to the control signal.
When the lamp panel control system of the embodiment is used, the lamp panel control method of the embodiment is applied.
The embodiment of the application discloses a computer device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the lamp panel control method of the embodiment is executed when the processor loads the computer program.
The computer apparatus may be a desktop computer, a notebook computer, or a cloud server, etc., and includes, but is not limited to, a processor and a memory, for example, the computer apparatus may further include an input/output device, a network access device, a bus, etc.
The processor may be a Central Processing Unit (CPU), or of course, according to actual use, other general purpose processors, digital Signal Processors (DSP), application Specific Integrated Circuits (ASIC), ready-made programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., and the general purpose processor may be a microprocessor or any conventional processor, etc., which is not limited in this application.
The memory may be an internal storage unit of the computer apparatus, for example, a hard disk or a memory of the computer apparatus, or an external storage device of the computer apparatus, for example, a plug-in hard disk, a Smart Memory Card (SMC), a secure digital card (SD), or a flash memory card (FC) provided on the computer apparatus, or the like, and may be a combination of an internal storage unit of the computer apparatus and an external storage device, and the memory may be used to store a computer program and other programs and data required by the computer apparatus, and the memory may be used to temporarily store data that has been output or is to be output, which is not limited in the present application.
The lamp panel control method of the embodiment is stored in the memory of the computer device through the computer device, and is loaded and executed on the processor of the computer device, so that the lamp panel control method is convenient for a user to use.
The embodiment of the application discloses a computer readable storage medium, and a computer program is stored in the computer readable storage medium, wherein the lamp panel control method of the embodiment is executed when the computer program is loaded by a processor.
The computer program may be stored in a computer readable medium, where the computer program includes computer program code, where the computer program code may be in a source code form, an object code form, an executable file form, or some middleware form, etc., and the computer readable medium includes any entity or device capable of carrying the computer program code, a recording medium, a usb disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunication signal, a software distribution medium, etc., where the computer readable medium includes, but is not limited to, the above components.
The lamp panel control method of the above embodiment is stored in the computer readable storage medium through the computer readable storage medium, and is loaded and executed on the processor, so as to facilitate the storage and application of the lamp panel control method.
The foregoing description of the preferred embodiments of the present application is not intended to limit the scope of the application, in which any feature disclosed in this specification (including abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. That is, each feature is one example only of a generic series of equivalent or similar features, unless expressly stated otherwise.

Claims (7)

1. A lamp panel control method, comprising:
acquiring an initial control instruction, and encoding the initial control instruction according to a first preset serial port protocol to obtain encoded instruction information, wherein the encoded instruction information comprises header data, intermediate data and tail data;
packaging the coded instruction information according to a second preset serial port protocol to obtain an instruction information data packet, and outputting the instruction information data packet;
acquiring the instruction information data packet, decompressing the instruction information data packet according to the second preset serial port protocol, if the instruction information data packet is decompressed to the header data, starting to store the intermediate data, and if the instruction information data packet is decompressed to the tail data, ending to store the intermediate data;
acquiring the intermediate data, analyzing the intermediate data according to a third preset serial port protocol to obtain a control signal, and controlling the lamp panel according to the control signal;
the outputting the instruction information data packet specifically includes:
presetting an output time interval threshold, and judging whether the time interval between the output time of the previous instruction information data packet and the output time of the current instruction information data packet is within the preset output time interval threshold;
if yes, outputting the instruction information data packet;
if not, not outputting the instruction information data packet;
the third preset serial port protocol analyzes the intermediate data by adopting a Modbus protocol, and the specific analysis by using the Modbus protocol comprises the following steps:
the main thread is used for starting a serial port thread, a protocol thread and a data thread, analyzing serial port configuration data and reading multi-serial port information;
the serial port thread is used for starting according to the command of the main thread and entering the event message circulation;
the protocol thread is used for starting according to the command of the main thread, determining a serial port number according to the configuration serial port information, and storing Modbus commands stored in a Modbus list of the serial port thread into a QMODBUS ComList list of the protocol thread;
the data thread is used for analyzing the intermediate data according to the command start of the main thread, detecting whether the QMODBUS ComList stores data or not in real time, analyzing a control signal if the QMODBUS ComList stores data, processing the analyzed control signal, and if the QMODBUS ComList does not store data, not processing the control signal.
2. The lamp panel control method according to claim 1, wherein the preset output time interval threshold is set to 0.1ms-0.3ms.
3. The lamp panel control method of claim 1, wherein the header data represents transmission data information and the footer data represents reception data information.
4. The method of claim 1, wherein the encoding the initial control command according to the first preset serial protocol to obtain encoded command information specifically includes:
acquiring a coding request instruction, verifying and analyzing the coding request instruction, if the verification is successful, continuing to execute, and if the verification is wrong, returning error information;
screening and calling coding rules from a coding rule database according to a first preset serial port protocol;
and encoding the initial control instruction according to the encoding rule, and outputting the obtained encoded instruction information.
5. A lamp panel control system, comprising:
the acquisition module (1) is used for acquiring an initial control instruction, and encoding the initial control instruction according to a first preset serial port protocol to obtain encoded instruction information, wherein the encoded instruction information comprises header data, intermediate data and tail data;
the packaging module (2) is used for packaging the coded instruction information according to a second preset serial port protocol to obtain an instruction information data packet and outputting the instruction information data packet;
the decompression module (3) is used for decompressing the instruction information data packet according to the second preset serial port protocol, if the data is decompressed to the header data, the intermediate data is stored, and if the data is decompressed to the tail data, the intermediate data is stored;
the analysis module (4) is used for analyzing the intermediate data according to a third preset serial port protocol to obtain a control signal and controlling the lamp panel according to the control signal;
the outputting the instruction information data packet specifically includes:
presetting an output time interval threshold, and judging whether the time interval between the output time of the previous instruction information data packet and the output time of the current instruction information data packet is within the preset output time interval threshold;
if yes, outputting the instruction information data packet;
if not, not outputting the instruction information data packet;
the third preset serial port protocol analyzes the intermediate data by adopting a Modbus protocol, and the specific analysis by using the Modbus protocol comprises the following steps:
the main thread is used for starting a serial port thread, a protocol thread and a data thread, analyzing serial port configuration data and reading multi-serial port information;
the serial port thread is used for starting according to the command of the main thread and entering the event message circulation;
the protocol thread is used for starting according to the command of the main thread, determining a serial port number according to the configuration serial port information, and storing Modbus commands stored in a Modbus list of the serial port thread into a QMODBUS ComList list of the protocol thread;
the data thread is used for analyzing the intermediate data according to the command start of the main thread, detecting whether the QMODBUS ComList stores data or not in real time, analyzing a control signal if the QMODBUS ComList stores data, processing the analyzed control signal, and if the QMODBUS ComList does not store data, not processing the control signal.
6. A computer device comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, characterized in that the processor performs the method of any of claims 1-4 when the computer program is loaded.
7. A computer readable storage medium having a computer program stored therein, characterized in that the computer program, when loaded by a processor, performs the method of any of claims 1-4.
CN202110904963.4A 2021-08-07 2021-08-07 Lamp panel control method, system, device and storage medium Active CN113766009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110904963.4A CN113766009B (en) 2021-08-07 2021-08-07 Lamp panel control method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110904963.4A CN113766009B (en) 2021-08-07 2021-08-07 Lamp panel control method, system, device and storage medium

Publications (2)

Publication Number Publication Date
CN113766009A CN113766009A (en) 2021-12-07
CN113766009B true CN113766009B (en) 2024-01-30

Family

ID=78788686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110904963.4A Active CN113766009B (en) 2021-08-07 2021-08-07 Lamp panel control method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN113766009B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297725A (en) * 2012-02-28 2013-09-11 联想(北京)有限公司 Method and device for controlling electronic equipment and remote control
CN207184872U (en) * 2017-07-28 2018-04-03 松下电气机器(北京)有限公司 Cultivate Lighting Control Assembly
CN110113323A (en) * 2019-04-20 2019-08-09 深圳瀚星翔科技有限公司 A kind of communication means, electronic equipment and computer readable storage medium
CN210323869U (en) * 2019-10-29 2020-04-14 深圳市晶锐铭科技有限公司 Intelligent control device and system for UVLED
EP3734935A1 (en) * 2018-01-29 2020-11-04 BMC Medical Co., Ltd. Method and device for sending medical device data, and method and device for receiving medical device data
WO2021008412A1 (en) * 2019-07-17 2021-01-21 深圳市智物联网络有限公司 Control method and system for internet of things device
CN112671770A (en) * 2020-12-23 2021-04-16 波达通信设备(广州)有限公司 Outdoor unit serial port protocol analysis method and device, computer equipment and storage medium
CN112700677A (en) * 2020-11-30 2021-04-23 诠航科技有限公司 Traffic signal control method and device and traffic control system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297725A (en) * 2012-02-28 2013-09-11 联想(北京)有限公司 Method and device for controlling electronic equipment and remote control
CN207184872U (en) * 2017-07-28 2018-04-03 松下电气机器(北京)有限公司 Cultivate Lighting Control Assembly
EP3734935A1 (en) * 2018-01-29 2020-11-04 BMC Medical Co., Ltd. Method and device for sending medical device data, and method and device for receiving medical device data
CN110113323A (en) * 2019-04-20 2019-08-09 深圳瀚星翔科技有限公司 A kind of communication means, electronic equipment and computer readable storage medium
WO2021008412A1 (en) * 2019-07-17 2021-01-21 深圳市智物联网络有限公司 Control method and system for internet of things device
CN210323869U (en) * 2019-10-29 2020-04-14 深圳市晶锐铭科技有限公司 Intelligent control device and system for UVLED
CN112700677A (en) * 2020-11-30 2021-04-23 诠航科技有限公司 Traffic signal control method and device and traffic control system
CN112671770A (en) * 2020-12-23 2021-04-16 波达通信设备(广州)有限公司 Outdoor unit serial port protocol analysis method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Z. Li ; S. Peng ; X. Geng ; Huawei Technologies ; M. Negi ; RtBrick India ; .PCEP Procedures and Protocol Extensions for Using PCE as a CentralController (PCECC) for SRv6 draft-dhody-pce-pcep-extension-pce-controller-srv6-04.IETF .2020,全文. *
基于图像识别的PLC智能控制系统设计;张俊民;计算机与数字工程;全文 *

Also Published As

Publication number Publication date
CN113766009A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
CN110457143B (en) Micro-service calling method and device
CN113259155B (en) Access method, device, gateway, medium and electronic equipment of Internet of things equipment
CN108363588B (en) Method for realizing interaction between web and native function, electronic device and readable storage medium
CN108620727B (en) Laser working method, quasi-continuous laser, and laser cutting and welding system
CN110297944B (en) Distributed XML data processing method and system
CN112822199B (en) OTA (over the air) upgrading method and system based on protocol conversion
CN109064733A (en) Adaptive infrared signal coding/decoding method, computer installation and its control device
CN113766009B (en) Lamp panel control method, system, device and storage medium
CN115237435A (en) Method for deploying PyFlink task to horn cluster
CN111641528A (en) Device management method, device, storage medium and computer readable medium
CN111327951A (en) Multimedia data playing method, device, system and storage medium
US10228986B2 (en) Interface-adaptive data exchange
CN111856999B (en) Multi-terminal equipment management method and system based on intelligent optical network equipment
CN114172978A (en) Multi-protocol equipment access method and related device
CN111046933B (en) Image classification method, device, storage medium and electronic equipment
CN114374745A (en) Protocol format processing method and system
CN104077216A (en) Software test method and test device
CN114449026A (en) Method for recording online learning duration and related equipment
CN108418698B (en) Router management method and device
CN114745368B (en) File downloading method, device, computer equipment and computer readable storage medium
CN112702303A (en) Train real-time data analysis method, device, equipment and storage medium
CN114490574A (en) Heterogeneous algorithm migration method, device and equipment
CN110971461B (en) Sensor node configuration method and system based on Internet of things
CN111597389B (en) Data processing method, device, equipment and storage medium
CN116437067A (en) Testing method based on multi-terminal equipment, storage medium and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant