WO2017140220A1 - Data sending method and device, receiving method and device, and transmission method and system - Google Patents

Data sending method and device, receiving method and device, and transmission method and system Download PDF

Info

Publication number
WO2017140220A1
WO2017140220A1 PCT/CN2017/072981 CN2017072981W WO2017140220A1 WO 2017140220 A1 WO2017140220 A1 WO 2017140220A1 CN 2017072981 W CN2017072981 W CN 2017072981W WO 2017140220 A1 WO2017140220 A1 WO 2017140220A1
Authority
WO
WIPO (PCT)
Prior art keywords
led
data
binary information
camera
state
Prior art date
Application number
PCT/CN2017/072981
Other languages
French (fr)
Chinese (zh)
Inventor
严勇文
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017140220A1 publication Critical patent/WO2017140220A1/en

Links

Images

Classifications

    • 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
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/11Arrangements specific to free-space transmission, i.e. transmission through air or vacuum
    • H04B10/114Indoor or close-range type systems
    • H04B10/116Visible light communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/50Transmitters
    • H04B10/501Structural aspects
    • H04B10/502LED transmitters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B10/00Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
    • H04B10/60Receivers

Definitions

  • the present disclosure relates to the field of data transmission, for example, to a data transmission method and apparatus, a reception method and apparatus, a transmission method, and a system.
  • Communication devices tend to gradually reduce hardware devices for human-computer interaction, such as liquid crystal displays or digital tubes. Therefore, some communication devices have only one northbound communication interface to communicate with the superior device.
  • Such a communication device can be directly connected to a personal computer (Personal Computer, PC) into a debugging interface (such as an Internet (Web) page), but the online device should not be offline for maintenance reasons, therefore, the communication device should There is a channel for debugging output.
  • PC Personal Computer
  • debugging interface such as an Internet (Web) page
  • DB9 serial port RJ (Registered Jack) 45 network port or Universal Serial Bus (USB) port
  • RJ Registered Jack
  • USB Universal Serial Bus
  • the above debugging interface still needs to occupy a part of the printed circuit board (PCB) and the panel, and the debugging interface and its auxiliary resistors, capacitors and integrated circuits (ICs) still need a certain cost.
  • IP Internet Protocol
  • Some communication devices only need to know their Internet Protocol (IP) address, and can access the Web debugging interface of the communication device through the browser, thereby achieving the purpose of debugging and maintaining the device, and debugging and maintenance.
  • the process does not affect the online communication of the communication device with other devices. Commissioning and maintenance personnel can only perform debugging and maintenance work by knowing the IP address information of the device at the site.
  • the methods for obtaining the IP address include: obtaining from the NMS and obtaining from the debugging interface. However, taking into account the actual process, communication cost, and correctness of information transmission, it is not convenient to obtain the IP address of the device from the NMS. Obtaining from the on-site debugging interface has become a more common method. If a debug interface such as DB9 or RJ45 is added to obtain simple information such as an IP address, the cost competitiveness of the product will decrease.
  • the present disclosure provides a data transmitting method and apparatus, a receiving method and apparatus, a transmitting method and a system, and transmitting debug data without adding a debugging interface.
  • the present disclosure provides a data sending method, including:
  • the binary information is transmitted through the LEDs.
  • sending the binary information through the LED comprises: transmitting 0 and 1 in the binary information by the LED being off.
  • the sending the binary information by using the LED includes: transmitting the binary information by using a dedicated debugging LED that is set; controlling the power LED in the debugging state by the multiplex power LED to send the binary information; and operating the debugging state by using the multiplexed operation LED
  • the LED transmits the binary information; the binary LED is sent by the multiplexed alarm LED to control the alarm LED in the debug state.
  • compiling the data to be sent into binary information includes: compiling the data to be sent into binary information by using a frame structure of the device code, the field 1, the field 2, the ..., the field n, and the check code, and the device code includes At least one of a device internet protocol IP address and a device access password, the field i includes a value i corresponding to the identifier i and the identifier i, 1 ⁇ i ⁇ n, and i and n are integers.
  • sending the binary information through the LED comprises: determining the number of LEDs according to a physical transmission protocol, and transmitting the binary information by using a corresponding number of LEDs.
  • the present disclosure provides a data receiving method, including:
  • parsing the LED state to obtain binary information includes: determining 0 and 1 in the binary information by using an off state of the LED.
  • the use of the camera to capture the LED status of the data transmitting terminal comprises: using a brightness recognition method of the color model to identify the off state of the LED, and if the brightness is greater than a preset threshold, the LED The status is bright. If the brightness is not greater than the preset threshold, the LED status is off.
  • the method further includes: setting a purifying device around the LED of the data transmitting terminal, and capturing the LED state of the data transmitting terminal by using the camera through the purifying device.
  • the method further includes: setting an identification area, placing an LED of the data transmitting terminal according to the identification area, and capturing an LED state in the identification area of the data transmitting terminal by using the camera.
  • using the camera to capture the LED status of the data transmitting terminal includes: using an image processing algorithm of corrosion and expansion to remove noise from the captured image of the camera, and calculating an area of the LED in the image, when the area of the area and the area of the identified area When the percentage is greater than the percentage threshold, the LED status is on, and when the percentage is not greater than the percentage threshold, the LED status is off.
  • the use of the camera to capture the LED status of the data transmitting terminal comprises: continuously collecting images through the camera framing mode to identify the continuous image; or recording the video through the recording mode of the camera, and decomposing the video into multiple frames, respectively The multi-frame image is identified.
  • the present disclosure provides a data transmission method, including:
  • the present disclosure provides a data transmitting apparatus, including:
  • Compiling the module set to compile the data to be sent into binary information
  • the transmitting module is configured to send binary information through the LEDs.
  • the sending module is configured to send 0 and 1 in the binary information by the LED being off.
  • the sending module is configured to send binary information through the set dedicated debugging LED; the binary LED is sent by the power LED that controls the debugging state through the multiplexed power LED; and the running LED transmitting station in the debugging state is controlled by the multiplexed running LED Said binary information; or by means of a multiplexed alarm LED to control the alarm LED in the debug state to send binary information.
  • the compiling module is configured to use the frame structure of the device code, the field 1, the field 2, the ..., the field n, and the check code combination to compile the data to be sent into binary information
  • the device code includes the device Internet Protocol IP address and At least one of the device access passwords
  • the field i includes the identifier i and the identifier i corresponding to the value i, 1 ⁇ i ⁇ n, and i and n are integers.
  • the sending module is configured to determine the number of LEDs according to a physical transmission protocol, and send binary information through a corresponding number of LEDs.
  • the present disclosure provides a data receiving apparatus, including:
  • the acquisition module is configured to capture the LED status of the data transmitting terminal by using the camera;
  • Parsing module set to parse the LED state to obtain binary information
  • the interpretation module is configured to interpret the binary information as data to be received.
  • the parsing module is configured to determine 0 and 1 in the binary information by the LED being off.
  • the collection module is configured to adopt a brightness recognition method of the color model to identify the off state of the LED. If the brightness is greater than a preset threshold, the LED status is bright, and if the brightness is not greater than a preset threshold, the LED status is For the end.
  • the collecting module is further configured to set a purifying device around the LED of the data sending terminal, and use the camera to capture the LED status of the data sending terminal through the purifying device.
  • the collecting module is further configured to set an identification area, and the LED of the data transmitting terminal is placed according to the identifying area, and the LED state of the data transmitting terminal in the identification area is captured by using the camera.
  • the acquisition module is configured to adopt an image processing algorithm of corrosion and expansion to remove noise from the captured image of the camera, and calculate a maximum area of the LED in the image.
  • a percentage threshold When the percentage of the area of the largest area and the area of the identification area is greater than a percentage threshold, The LED state is bright, and when the percentage is not greater than the percentage threshold, the LED state is off.
  • the collection module is configured to continuously collect images by using the camera to take a photographing mode, and identify the continuous image; or, by using the camera to record the video in the recording mode, the video is decomposed into multiple frames, and the multiple frames are respectively The image is identified.
  • the present disclosure provides a data transmission system including any of the data transmitting apparatus provided by the present disclosure and the data receiving apparatus provided by any one of the present disclosure;
  • the data transmitting device is configured to acquire data to be transmitted, compile the data to be transmitted into binary information, and transmit binary information through the LEDs;
  • the data receiving device is configured to capture the LED status of the data transmitting terminal using the camera, parse the LED status to obtain binary information, and interpret the binary information as data to be received.
  • the present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the above method.
  • the disclosure also provides a data sending terminal, including:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the following method:
  • the binary information is transmitted by a light emitting diode LED.
  • the present disclosure also provides a data receiving terminal, including:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the following method:
  • the binary information is interpreted as data to be received.
  • the present disclosure provides a data transmission method, based on the LED transmission debugging data of the device, and the LED can be used as a power indication and a running instruction when the data is not transmitted, without adding an additional debugging interface to transmit the debugging data.
  • FIG. 1 is a schematic structural diagram of a data transmission system according to a first embodiment of the present disclosure
  • FIG. 2 is a flowchart of a data transmission method according to a second embodiment of the present disclosure
  • FIG. 3 is a diagram showing an unpurified effect of an LED lamp in a third embodiment of the present disclosure.
  • FIG. 5 is a flowchart of an image recognition algorithm in a third embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a data frame in a third embodiment of the present disclosure.
  • FIG. 7 is a flowchart of a data transmission method in a third embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of hardware of a data transmitting terminal according to a fifth embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram showing the hardware structure of a data receiving terminal in a fifth embodiment of the present disclosure.
  • the data transmission system provided by the present disclosure includes a data transmitting apparatus 1 and a data receiving apparatus 2.
  • the data transmitting device 1 is configured to acquire data to be transmitted, compile the data to be transmitted into binary information, and transmit binary information through a Light Emitting Diode (LED).
  • LED Light Emitting Diode
  • the data receiving device 2 is arranged to capture the LED status of the data transmission terminal using the camera, parse the LED status to acquire binary information, and interpret the binary information as data to be received.
  • the data transmitting apparatus 1 may include: an obtaining module 11 , a compiling module 12 , and a sending module 13 .
  • the obtaining module 11 is configured to acquire data to be transmitted.
  • the compilation module 12 is arranged to compile the data to be transmitted into binary information.
  • the transmitting module 13 is arranged to transmit binary information via the LEDs.
  • the sending module 13 in the above embodiment may also be configured to transmit 0 and 1 in the binary information by the LED being off.
  • the sending module 13 in the above embodiment may further be configured to send binary information through a set dedicated debug LED; the power LED in the debug state is controlled by the multiplex power LED to transmit the binary information; The operation LED of the LED control in the debug state transmits the binary information; or the binary LED is sent by the multiplexed alarm LED to control the alarm LED in the debug state.
  • the compiling module 12 in the above embodiment is configured to compile the data to be sent into binary information by using a frame structure of device code, field 1, field 2, ..., field n, and check code combination.
  • the code includes at least one of a device IP address and a device access password
  • the field i includes the identifier i and the identifier i corresponding to the value i, 1 ⁇ i ⁇ n, and i and n are integers.
  • the transmitting module 13 in the above embodiment is configured to determine the number of LEDs according to a physical transmission protocol, and to transmit binary information through a corresponding number of LEDs.
  • the data receiving apparatus 2 may include an acquisition module 21 , a parsing module 22 , and an interpreting module 23 .
  • the acquisition module 21 is arranged to capture the LED status of the data transmitting terminal using the camera.
  • the parsing module 22 is configured to parse the LED status to obtain binary information.
  • the interpretation module 23 is arranged to interpret the binary information as data to be received.
  • the parsing module 22 in the above embodiment may also be configured to determine 0 and 1 in the binary information by the off state of the LED.
  • the acquisition module 21 in the above embodiment may further be configured to use a brightness recognition method of a color model to identify an off state of the LED. If the brightness is greater than a preset threshold, the LED state is bright. If the brightness is not greater than the preset threshold, the LED status is off.
  • the acquisition module 21 in the above embodiment may further be configured to set a purification device around the LED of the data transmission terminal before capturing the LED state of the data transmission terminal by using the camera, and use the camera to capture the data transmission terminal through the purification device. LED status.
  • the acquisition module 21 in the above embodiment may further be configured to set an identification area before the LED light state of the data transmission terminal is captured by using the camera, and place the LED of the data transmission terminal according to the identification area, and use the camera to capture data transmission. The status of the LEDs in the identification area of the terminal.
  • the acquisition module 21 in the above embodiment may also be configured to adopt an image processing algorithm of corrosion and expansion to remove noise from the captured image of the camera, and calculate the maximum area of the LED in the image, when the maximum area and the area are identified.
  • the percentage of the area of the area is greater than the percentage threshold, the LED status is on, and when the percentage is not greater than the percentage threshold, the LED status is off.
  • the area of the identification area is the area of the frame image.
  • the acquisition module 21 in the above embodiment may further be configured to continuously capture images in a photographing and framing mode using a camera to identify continuous images; or, use a camera to record video in a recording mode, and decompose the video into A multi-frame image is separately identified for the multi-frame image.
  • FIG. 2 is a flowchart of a data transmission method according to a second embodiment of the present disclosure.
  • step 210 data to be transmitted is acquired, data to be transmitted is compiled into binary information, and binary information is transmitted through the LED.
  • step 220 the camera is used to capture the LED status of the data transmitting terminal, parsing the LED status to obtain binary information, and interpreting the binary information to be received.
  • the present disclosure provides a data sending method, including:
  • transmitting the binary information by the LED in the above embodiment may include transmitting 0 and 1 in the binary information by the off state of the LED light.
  • the transmitting the binary information by the LED in the above embodiment may include: transmitting the binary information through the set dedicated debug LED; and controlling the power LED in the debug state to transmit the binary information by multiplexing the power LED; The operation LED that runs the LED control in the debug state sends the binary information; or by multiplexing the alarm LED, the alarm LED that is in the debug state is sent to send binary information.
  • the power LED is used to indicate the power status
  • the running LED is used to indicate the running state of the communication device
  • the alarm LED is used to indicate whether there is a warning.
  • the compiling the data to be sent into the binary information in the foregoing embodiment may include: adopting a frame structure of the device code, the field 1, the field 2, the ..., the field n, and the check code combination, and the data to be sent Compiled into binary information, the device code includes at least one of a device IP address and a device access password, and the field i includes a value i corresponding to the identifier i and the identifier i, 1 ⁇ i ⁇ n, and i and n are integers.
  • transmitting the binary information by the LED in the above embodiment may include determining the number of LEDs according to a physical transmission protocol, and transmitting the binary information by a corresponding number of LEDs.
  • the physical transmission protocol may be a user-defined transmission protocol.
  • the physical protocol of the two LEDs may include: a first LED analog clock signal, a second LED analog data signal, and a clock bus high level (such as an LED) When it is lit, if the state of the data bus does not change, the level of the data bus represents data information.
  • the present disclosure provides a data receiving method, including:
  • the parsing the LED state in the above embodiment to obtain the binary information may include determining 0 and 1 in the binary information by the off state of the LED.
  • the use of the camera to capture the LED status of the data transmitting terminal in the above embodiment includes: using a brightness recognition method of the color model to identify the off state of the LED, and if the brightness is greater than a preset threshold, the LED status If it is bright, if the brightness is not greater than the preset threshold, the LED status is off.
  • the data receiving method in the foregoing embodiment before using the camera to capture the LED status of the data transmitting terminal, further includes: setting a purifying device around the LED of the data transmitting terminal, and capturing the data transmitting terminal by using the camera through the purifying device LED status.
  • the data receiving method in the foregoing embodiment before using the camera to capture the LED status of the data transmitting terminal, further includes: setting an identification area, placing an LED of the data transmitting terminal according to the identification area, and capturing the image in the identification area by using the camera The data transmitting terminal is in the state of the LED in the identification area.
  • the use of the camera in the above embodiment captures the LED shape of the data transmitting terminal
  • the state includes: an image processing algorithm using corrosion and expansion, removing noise from the captured image of the camera, and calculating a maximum area of the LED in the image.
  • the percentage of the area of the largest area and the area of the identification area is greater than a percentage threshold, the LED state is bright.
  • the percentage is not greater than the percentage threshold, the LED state is off.
  • the LED in the image is identified, and the identified LED area may include some small areas, and the identified at least one LED area is sorted according to the area, and the LED area with the largest area is used as the LED.
  • the largest area, the area of the largest area is taken as the maximum area area.
  • the area of the identification area is the area of the frame image.
  • using the camera to capture the LED status of the data transmitting terminal in the above embodiment may include: continuously acquiring an image in the photographing framing mode using the camera to identify the continuous image; or recording the video in the recording mode using the camera. , the video is decomposed into multi-frame images, and the multi-frame images are respectively identified.
  • the transmitting terminal recognizes the image after acquiring one frame of image.
  • a data transmission system is provided, and the devices in the system pass the LEDs in both the on and off states, and simulate 1 With the output of 0, the information output of the wire is replaced by the propagation of light to achieve the same effect as the binary information transmitted by the bus.
  • the state of the LED is captured by the camera of the smart device, and the corresponding relationship between the on and off of the LED and the 1 and 0 is resolved according to the algorithm, and the same effect as the sampled digital electrical signal is achieved.
  • the device and system adopt device LED and intelligent device image recognition algorithm to simulate the process of transmitting electrical information of the device through serial port (or communication interface such as network port) and transmitting and analyzing information by the receiving device.
  • the sampling rate of the smart device is low (the number of frames taken by the camera is low), and the LED state transition cannot be too fast, which affects the transmission rate. Therefore, the system is not suitable for systems that process many debug data.
  • the system in the implementation of the present disclosure has low cost, small space and small occupied area, and can be applied to devices and systems that can be debugged and maintained only by IP or wireless password.
  • the present disclosure is also applicable to scenarios other than LEDs for providing human identifiable signals.
  • the binary signal is transmitted by accelerating the LED state transition, and the LED signal is captured and decoded by the image recognition of the smart device, and the LED can be applied to a new scene application that outputs more information.
  • the methods of the present disclosure may be extended but not limited to the following devices and systems.
  • the alarm LED can flash at a faster rate, and the information such as an identification (ID) and an alarm level are transmitted according to the coding requirement, and the maintenance personnel recognizes and analyzes the LED information through the smart device, and the device The alarm ID and alarm level are displayed on the smart device, so that the maintenance personnel can know the status of the device and system being maintained.
  • the maintenance personnel cannot judge the detailed information represented by the LED flashing through the human eye, it is possible to know whether the LED is blinking or not, and determine whether there is an alarm information.
  • the device's alarm LED function is still retained.
  • the data transmitting terminal can set a dedicated debugging LED cycle output debugging information.
  • the data transmitting terminal can also output debugging information by means of multiplexing LEDs.
  • the debugging button When the debugging button is pressed, the LED is in the debugging state, and the LED outputs debugging information. After the debugging is completed, the debugging button is bounced, and the LED restores the original function.
  • the smart device has an image recognition function in which the LED is turned off, and the smart device includes a smart phone and a portable computer (notebook) having a camera.
  • the smart device can install the software for image recognition in the present disclosure. After the software is turned on, the software obtains image information directly or indirectly transmitted by the camera, and uses image processing algorithms to parse the image information.
  • LED-aware applications can have cross-platform capabilities.
  • a cross-platform Python object-oriented interpreted computer programming language can be used.
  • the program developed by PYTHON can be run on the Windows, Linux and Mac OS operating systems of the PC in addition to the Android operating system of the smart device and the iPhone Operating System (IOS).
  • This implementation can also be implemented in a programming language other than Python.
  • the application of the existing image recognition library can reduce the development cost.
  • the OPENCV image recognition library can be used for development, which reduces the workload of the basic image recognition and improves the development speed of the smart device.
  • the flow of the LED recognition algorithm is shown in Figure 5.
  • the LEDs have different colors and different shapes, the LEDs cannot be identified according to the color and shape.
  • the brightness of the HSV (Hue, Saturation, Value) color model can be used to identify the LEDs on and off. When the brightness is greater than the preset threshold of the experiment, the LED is determined to be bright, and when the brightness is not greater than the preset threshold, the LED is off.
  • the present disclosure can adopt the following method to improve the purity of the environment, using a black card, forming a circular hole in the middle, and placing the LED in the device.
  • the camera area of the smart device should be completely inside the black card, so that the environment of the camera has a good purity, LED lighting and LED extinction can produce significant brightness contrast.
  • a card other than black may be used.
  • the material of the card, the position of the punching hole, and the number of punching holes are not limited. For example, a 2-hole dark tape or the like may be used.
  • the determination success rate of LED illumination can be improved by limiting the LED position.
  • the position of the LED in the image is uncertain, for example, the LED is not fixed in the image due to the unfixed distance between the camera and the LED, which may result in LED Light up and misjudge.
  • a circular display of a suitable size can be added to prompt the user to completely cover the circular area in the middle of the image of the LED.
  • the image recognition software can determine the LED light on and off based only on the HSV value in the circular area. Under the camera, due to halo and angle, the circular LED may not appear circular after HSV conversion or grayscale processing and filtering.
  • the shape of the LED of the present embodiment is not limited to a circular shape.
  • the restricted area of the image recognition software can be adapted to change to the corresponding shape.
  • LED identification can use corrosion and expansion image processing algorithms to remove noise. Due to the diversity of the shape of the LED, the maximum area of the image is calculated. When the percentage of the area of the largest area and the area of the identification area is greater than the threshold of the set restriction area (eg, 85%), it can be determined that the LED is bright, when the percentage is not When it is greater than the percentage threshold, the LED is off.
  • the threshold of the set restriction area eg, 85%
  • noise filtering algorithms such as two-way filtering and Gaussian filtering can also be used.
  • the LED information is continuously output, and the camera can be converted into multi-picture continuous processing in the following two ways: the camera adopts the photographing and framing mode, and copies the same picture from the driver to the image recognition application. (Application, APP), realizes dynamic recognition; and the camera adopts the recording mode. After recording for a period of time (also can be detected by the human eye, the start and end LED states indicate the end of the recording), the image recognition APP decomposes each frame of the video. Re-identify the image for a separate image.
  • the state transition rate of the LED can be set to be no greater than the frame rate of the camera.
  • the frame rate is greater than 25 FPS (Frames Per Second)
  • the sampling frequency of the camera can be greater than that of the LED.
  • the frequency of the LED is doubled, so the LED's on-off frequency can be less than 12FPS. If the smart device used by the maintenance personnel has a higher camera frame rate, such as 60FPS or 120FPS, the LED can be turned on and off at a rate greater than 12FPS.
  • Each LED is equivalent to an electrical conductor, and different numbers of LEDs can be transmitted using different protocols.
  • a 2LED method in which the cost and the engineering application are relatively balanced can be adopted.
  • the first LED can emulate the clock bus and the second LED can emulate the data bus.
  • the level of the data bus represents data information; when the clock bus is high, if the data bus is high
  • the conversion of the flat (such as LED is bright) to low level (such as LED is off) represents the beginning of data transmission; when the clock bus is high, if the data bus has a low to high transition, it represents data. The transfer ends.
  • the data bus sampling time when the clock bus is high level may be greater than or equal to 3 times, and the first and last sampling are discarded, and only the middle is used. Sampling data.
  • Embodiments of the present disclosure do not limit the definition of other numbers of LEDs and corresponding physical transport protocols.
  • the frame structure adopted in this embodiment may include: device code (Device_code), field 1 identifier (ID1), field 1 data (Value1), field 2 identifier (ID2), field 1 data (Value2), ..., field n identification (IDn), field n data (Value n), and check code (CRC). Since the LED information is output, there is no phenomenon of determining the separated frame when the multi-frame continuous output is performed. Therefore, the frame header and the frame tail may not be added in the frame structure to save transmission time.
  • the device code can take 1 byte.
  • ID is the unique identification of the variable (the same variable of different data structure can be defined by different IDs, for example, the integer IP address and the string IP address belong to different IDs, which can simplify the data structure), and the ID can take 1 byte. .
  • Value is an integer or a floating point number, it can be output according to the number of bytes defined by the ID.
  • Value is a string, the ending identifier is ' ⁇ 0'.
  • the data can be verified by adding an 8-bit Cyclic Redundancy Check (CRC). When the CRC does not pass, the smart device can prompt the maintenance personnel to restart. Conduct the identification process.
  • CRC Cyclic Redundancy Check
  • the IP information acquisition process is shown in FIG. 7, wherein the A device has an operation light, an alarm light, and an LED debugging button.
  • the two-hole black soft glue is attached to the communication device, so that the running light and the warning light pass through the two holes to open the light; the image recognition APP corresponding to the smart device is opened, the space template is selected, or the sampling circle is manually adjusted.
  • the vacancy template may be a rectangular or circular frame set in an image collection screen of the image recognition APP.
  • IP information when IP information is in an integer structure, IP information can have few transmission bytes.
  • the level of the initial identifier is opposite to the level of the end identifier. Therefore, the start identifier and the end marker can be set to 2 cycles each, so the frame structure of the binary information is a 2-bit (bit) identifier, 8-bit device.
  • a code device code
  • ID 8-bit field identifier
  • Value 8-bit field data
  • CRC 8-bit check code
  • end 2-bit end identifier
  • the image recognition APP of the smart device selects the low-resolution recording mode, the shooting frame rate can reach 60FPS, and the data sampling can adopt the 4-time mode (abandon the first data and the last data, take the middle two data), and the LED can be pressed 7.5.
  • HZ frequency output a total of 4.8 seconds to complete the information analysis, that is, the engineering staff can complete the acquisition of IP information within 5 seconds.
  • the present disclosure provides a data transmission method, based on the LED transmission debugging data of the device, and the LED can be used as a function of indicating an operating state and an alarm condition when the data is not transmitted, and does not occupy a dedicated device, and can be transmitted without adding a debugging interface. Debug data.
  • Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
  • the embodiment of the present disclosure further provides a hardware structure diagram of a data sending terminal.
  • the data transmitting terminal includes:
  • At least one processor 80 which is exemplified by a processor 80 in FIG. 8; and a memory 81, may further include a communication interface 82 and a bus 83.
  • the processor 80, the communication interface 82, and the memory 81 can complete communication with each other through the bus 83.
  • Communication interface 82 can be used for information transfer.
  • the processor 80 can call the logic instructions in the memory 81 to perform the following methods:
  • the binary information is transmitted by a light emitting diode LED.
  • logic instructions in the memory 81 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the memory 81 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, a program instruction or a module corresponding to the execution method of the data transmitting terminal in the embodiment of the present disclosure.
  • the processor 80 executes a function application and data processing by executing a software program, an instruction or a module stored in the memory 81, that is, a method of implementing the execution of the data transmitting terminal in the above method embodiment.
  • the memory 81 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the terminal device, and the like. Further, the memory 81 may include a high speed random access memory, and may also include a nonvolatile memory.
  • the embodiment of the present disclosure further provides a hardware structure diagram of a data receiving terminal.
  • the data receiving terminal includes:
  • At least one processor 90 which is exemplified by a processor 90 in FIG. 9; and a memory 91, may further include a communication interface 92 and a bus 93.
  • the processor 90, the communication interface 92, and the memory 91 can complete communication with each other through the bus 93.
  • Communication interface 92 can be used for information transfer.
  • the processor 90 can call the logic instructions in the memory 91 to perform the following methods:
  • the binary information is interpreted as data to be received.
  • logic instructions in the memory 91 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the memory 91 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, a program instruction or a module corresponding to the execution method of the data receiving terminal in the embodiment of the present disclosure.
  • the processor 90 executes a function application and data processing by executing a software program, an instruction or a module stored in the memory 91, that is, a method of implementing the execution of the data receiving terminal in the above method embodiment.
  • the memory 91 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 91 may include a high speed random access memory, and may also include a nonvolatile memory.
  • the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) Performing all or part of the steps of the method of the embodiments of the present disclosure.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random storage memory (RAM), a magnetic disk, or an optical disk.
  • the data transmitting method and device, the receiving method and device, the transmitting method and the system provided by the disclosure use the LED transmission debugging data of the device, and can transmit the debugging data without adding a debugging interface.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Optical Communication System (AREA)

Abstract

Disclosed are a data sending method and device, a receiving method and device, and a transmission method and system. The transmission method comprises: acquiring data to be sent; compiling the data to be sent into binary information; sending the binary information via a light-emitting diode (LED); using a camera to capture an LED state of a data-sending terminal, parsing the LED state to acquire the binary information; and interpreting the binary information into data to be received.

Description

数据发送方法及装置、接收方法及装置、传输方法及系统Data transmitting method and device, receiving method and device, transmission method and system 技术领域Technical field
本公开涉及数据传输领域,例如涉及一种数据发送方法及装置、接收方法及装置、传输方法及系统。The present disclosure relates to the field of data transmission, for example, to a data transmission method and apparatus, a reception method and apparatus, a transmission method, and a system.
背景技术Background technique
通信设备领域,竞争非常激烈,成本低,是一款设备成功与否的重要判定因素,因此,通信设备常会减少不必要的器件和功能、减少产品体积或控制面板尺寸等方式降低成本。通信设备趋向于逐渐减少人机交互的硬件器件,如液晶显示器或数码管等,因此,部分通信设备只有一个北向通信接口与上级设备通信。这种通信设备可以采用与个人计算机(Personal Computer,PC)直连的方式进入调试界面(如互联网(Web)页面),但是在线设备不应该因为维护原因而处于离线,因此,这种通信设备应该有一个调试输出的通道。In the field of communication equipment, competition is fierce and the cost is low. It is an important factor in determining the success of a device. Therefore, communication equipment often reduces unnecessary components and functions, reduces product size, or controls panel size to reduce costs. Communication devices tend to gradually reduce hardware devices for human-computer interaction, such as liquid crystal displays or digital tubes. Therefore, some communication devices have only one northbound communication interface to communicate with the superior device. Such a communication device can be directly connected to a personal computer (Personal Computer, PC) into a debugging interface (such as an Internet (Web) page), but the online device should not be offline for maintenance reasons, therefore, the communication device should There is a channel for debugging output.
为了解决如上问题,可以增加如DB9串口、RJ(Registered Jack)45网口或通用串行总线(Universal Serial Bus,USB)口作为调试接口,通过调试接口,智能设备或计算机与增加调试接口的通信设备通信。然而,以上调试接口仍然需要占用一部分印制电路板(Printed Circuit Board,PCB)与面板,且调试接口及其附属电阻、电容和配套集成电路(Integrated Circuit,IC)仍然需要一定成本。In order to solve the above problem, you can add a DB9 serial port, RJ (Registered Jack) 45 network port or Universal Serial Bus (USB) port as a debugging interface, through the debugging interface, communication between the smart device or computer and the added debugging interface. Device communication. However, the above debugging interface still needs to occupy a part of the printed circuit board (PCB) and the panel, and the debugging interface and its auxiliary resistors, capacitors and integrated circuits (ICs) still need a certain cost.
在实际应用中,部分通信设备,只需要知道其互联网协议(Internet Protocol,IP)地址,就可以通过浏览器访问该通信设备的Web调试界面,从而达到调试和维护设备的目的,并且调试和维护的过程,不影响该通信设备与其他设备的在线通信。调试和维护人员在现场只需要知道设备的IP地址信息,就可以进行调试和维护工作。获取IP地址的方式包括:从网管获取和从调试接口获取,但考虑到实际流程、沟通成本以及信息传递正确性等因素,从网管获取设备IP地址并不便捷。从现场调试接口获取,成了比较常用的方式。如果为了获取IP地址等简单信息而加上DB9或RJ45等调试接口,产品的成本竞争力则会下降。In practical applications, some communication devices only need to know their Internet Protocol (IP) address, and can access the Web debugging interface of the communication device through the browser, thereby achieving the purpose of debugging and maintaining the device, and debugging and maintenance. The process does not affect the online communication of the communication device with other devices. Commissioning and maintenance personnel can only perform debugging and maintenance work by knowing the IP address information of the device at the site. The methods for obtaining the IP address include: obtaining from the NMS and obtaining from the debugging interface. However, taking into account the actual process, communication cost, and correctness of information transmission, it is not convenient to obtain the IP address of the device from the NMS. Obtaining from the on-site debugging interface has become a more common method. If a debug interface such as DB9 or RJ45 is added to obtain simple information such as an IP address, the cost competitiveness of the product will decrease.
因此,如何提供一种可以解决需要增加调试接口来传输调试数据的数据传输方法,是本领域技术人员亟待解决的技术问题。 Therefore, how to provide a data transmission method that can solve the need to increase the debugging interface to transmit debug data is a technical problem to be solved by those skilled in the art.
发明内容Summary of the invention
本公开提供了一种数据发送方法及装置、接收方法及装置、传输方法及系统,在不增加调试接口的情况下传输调试数据。The present disclosure provides a data transmitting method and apparatus, a receiving method and apparatus, a transmitting method and a system, and transmitting debug data without adding a debugging interface.
本公开提供了一种数据发送方法,包括:The present disclosure provides a data sending method, including:
获取待发送数据;Obtain data to be sent;
将待发送数据编译为二进制信息;以及Compile the data to be sent into binary information;
通过发光二极管LED发送二进制信息。The binary information is transmitted through the LEDs.
可选的,通过LED发送二进制信息包括:通过LED的灭亮状态,发送二进制信息中的0及1。Optionally, sending the binary information through the LED comprises: transmitting 0 and 1 in the binary information by the LED being off.
可选的,通过LED发送二进制信息包括:通过设置的专用调试LED发送二进制信息;通过复用电源LED控制处于调试状态的电源LED发送所述二进制信息;通过复用运行LED控制处于调试状态的运行LED发送所述二进制信息;通过复用告警LED控制处于调试状态的告警LED发送二进制信息。Optionally, the sending the binary information by using the LED includes: transmitting the binary information by using a dedicated debugging LED that is set; controlling the power LED in the debugging state by the multiplex power LED to send the binary information; and operating the debugging state by using the multiplexed operation LED The LED transmits the binary information; the binary LED is sent by the multiplexed alarm LED to control the alarm LED in the debug state.
可选的,将待发送数据编译为二进制信息包括:采用设备代码、字段1、字段2、……、字段n以及校验码组合的帧结构,将待发送数据编译为二进制信息,设备代码包括设备互联网协议IP地址和设备访问密码中的至少一个,字段i包括标识i及标识i对应的数值i,1≤i≤n,i和n为整数。Optionally, compiling the data to be sent into binary information includes: compiling the data to be sent into binary information by using a frame structure of the device code, the field 1, the field 2, the ..., the field n, and the check code, and the device code includes At least one of a device internet protocol IP address and a device access password, the field i includes a value i corresponding to the identifier i and the identifier i, 1 ≤ i ≤ n, and i and n are integers.
可选的,通过LED发送二进制信息包括:根据物理发送协议确定LED数量,通过对应数量的LED发送二进制信息。Optionally, sending the binary information through the LED comprises: determining the number of LEDs according to a physical transmission protocol, and transmitting the binary information by using a corresponding number of LEDs.
本公开提供了一种数据接收方法,包括:The present disclosure provides a data receiving method, including:
使用摄像头捕捉数据发送终端的发光二极管LED状态;Using the camera to capture the LED status of the data transmitting terminal;
解析LED状态获取二进制信息;以及Parsing the LED status to obtain binary information;
将二进制信息解译为待接收数据。Interpret the binary information as data to be received.
可选的,解析LED状态获取二进制信息包括:通过LED的灭亮状态,确定二进制信息中的0及1。Optionally, parsing the LED state to obtain binary information includes: determining 0 and 1 in the binary information by using an off state of the LED.
可选的,使用摄像头捕捉数据发送终端的LED状态包括:采用颜色模型的明亮度识别方法,对LED的灭亮状态进行识别,若亮度大于预设阈值,则LED 状态为亮,若亮度不大于预设阈值,则LED状态为灭。Optionally, the use of the camera to capture the LED status of the data transmitting terminal comprises: using a brightness recognition method of the color model to identify the off state of the LED, and if the brightness is greater than a preset threshold, the LED The status is bright. If the brightness is not greater than the preset threshold, the LED status is off.
可选的,在使用摄像头捕捉数据发送终端的LED状态之前,所述方法还包括:在数据发送终端的LED周围设置提纯设备,使用摄像头通过提纯设备捕捉数据发送终端的LED状态。Optionally, before the LED state of the data transmitting terminal is captured by using the camera, the method further includes: setting a purifying device around the LED of the data transmitting terminal, and capturing the LED state of the data transmitting terminal by using the camera through the purifying device.
可选的,在使用摄像头捕捉数据发送终端的LED状态之前,所述方法还包括:设置识别区域,根据识别区域放置数据发送终端的LED,使用摄像头捕捉数据发送终端的识别区域内的LED状态。Optionally, before the LED state of the data transmitting terminal is captured by using the camera, the method further includes: setting an identification area, placing an LED of the data transmitting terminal according to the identification area, and capturing an LED state in the identification area of the data transmitting terminal by using the camera.
可选的,使用摄像头捕捉数据发送终端的LED状态包括:采用腐蚀与膨胀的图像处理算法,对摄像头的采集图像去除噪点,计算图像中LED的区域面积,当所述区域面积与识别区域的面积的百分比大于百分比阈值时,LED状态为亮,当所述百分比不大于所述百分比阈值时,LED状态为灭。Optionally, using the camera to capture the LED status of the data transmitting terminal includes: using an image processing algorithm of corrosion and expansion to remove noise from the captured image of the camera, and calculating an area of the LED in the image, when the area of the area and the area of the identified area When the percentage is greater than the percentage threshold, the LED status is on, and when the percentage is not greater than the percentage threshold, the LED status is off.
可选的,使用摄像头捕捉数据发送终端的LED状态包括:通过摄像头的拍照取景模式连续采集图像,对连续图像进行识别;或者,通过摄像头的录制模式录制视频,将视频分解为多帧图像,分别对所述多帧图像进行识别。Optionally, the use of the camera to capture the LED status of the data transmitting terminal comprises: continuously collecting images through the camera framing mode to identify the continuous image; or recording the video through the recording mode of the camera, and decomposing the video into multiple frames, respectively The multi-frame image is identified.
本公开提供了一种数据传输方法,包括:The present disclosure provides a data transmission method, including:
获取待发送数据;Obtain data to be sent;
将待发送数据编译为二进制信息;Compiling the data to be sent into binary information;
通过发光二极管LED发送二进制信息;Sending binary information through the LEDs;
使用摄像头捕捉数据发送终端的LED状态;Using the camera to capture the LED status of the data transmitting terminal;
解析LED状态获取二进制信息;以及Parsing the LED status to obtain binary information;
将二进制信息解译待接收数据。Interpret the binary information to receive the data.
本公开提供了一种数据发送装置,包括:The present disclosure provides a data transmitting apparatus, including:
获取模块,设置为获取待发送数据;Obtaining a module, configured to obtain data to be sent;
编译模块,设置为将待发送数据编译为二进制信息;以及Compiling the module, set to compile the data to be sent into binary information;
发送模块,设置为通过发光二极管LED发送二进制信息。The transmitting module is configured to send binary information through the LEDs.
可选的,发送模块设置为通过LED的灭亮状态,发送二进制信息中的0及1。 Optionally, the sending module is configured to send 0 and 1 in the binary information by the LED being off.
可选的,发送模块设置为通过设置的专用调试LED发送二进制信息;通过复用电源LED控制处于调试状态的电源LED发送所述二进制信息;通过复用运行LED控制处于调试状态的运行LED发送所述二进制信息;或者通过复用告警LED控制处于调试状态的告警LED发送二进制信息。Optionally, the sending module is configured to send binary information through the set dedicated debugging LED; the binary LED is sent by the power LED that controls the debugging state through the multiplexed power LED; and the running LED transmitting station in the debugging state is controlled by the multiplexed running LED Said binary information; or by means of a multiplexed alarm LED to control the alarm LED in the debug state to send binary information.
可选的,编译模块设置为采用设备代码、字段1、字段2、……、字段n以及校验码组合的帧结构,将待发送数据编译为二进制信息,设备代码包括设备互联网协议IP地址和设备访问密码中的至少一个,字段i包括标识i及标识i对应数值i,1≤i≤n,i和n为整数。Optionally, the compiling module is configured to use the frame structure of the device code, the field 1, the field 2, the ..., the field n, and the check code combination to compile the data to be sent into binary information, and the device code includes the device Internet Protocol IP address and At least one of the device access passwords, the field i includes the identifier i and the identifier i corresponding to the value i, 1 ≤ i ≤ n, and i and n are integers.
可选的,发送模块设置为根据物理发送协议确定LED数量,通过对应数量的LED发送二进制信息。Optionally, the sending module is configured to determine the number of LEDs according to a physical transmission protocol, and send binary information through a corresponding number of LEDs.
本公开提供了一种数据接收装置,包括:The present disclosure provides a data receiving apparatus, including:
采集模块,设置为使用摄像头捕捉数据发送终端的发光二极管LED状态;The acquisition module is configured to capture the LED status of the data transmitting terminal by using the camera;
解析模块,设置为解析LED状态获取二进制信息;以及Parsing module, set to parse the LED state to obtain binary information;
解译模块,设置为将二进制信息解译为待接收数据。The interpretation module is configured to interpret the binary information as data to be received.
可选的,解析模块设置为通过LED的灭亮状态,确定二进制信息中的0及1。Optionally, the parsing module is configured to determine 0 and 1 in the binary information by the LED being off.
可选的,采集模块设置为采用颜色模型的明亮度识别方法,对LED的灭亮状态进行识别,若亮度大于预设阈值,则LED状态为亮,若亮度不大于预设阈值,则LED状态为灭。Optionally, the collection module is configured to adopt a brightness recognition method of the color model to identify the off state of the LED. If the brightness is greater than a preset threshold, the LED status is bright, and if the brightness is not greater than a preset threshold, the LED status is For the end.
可选的,采集模块在使用摄像头捕捉数据发送终端的LED状态之前,还设置为在数据发送终端的LED周围设置提纯设备,使用摄像头通过提纯设备捕捉数据发送终端的LED状态。Optionally, before using the camera to capture the LED status of the data sending terminal, the collecting module is further configured to set a purifying device around the LED of the data sending terminal, and use the camera to capture the LED status of the data sending terminal through the purifying device.
可选的,采集模块在使用摄像头捕捉数据发送终端的LED状态之前,还设置为设置识别区域,根据识别区域放置数据发送终端的LED,使用摄像头捕捉数据发送终端的在识别区域内的LED状态。Optionally, before using the camera to capture the LED status of the data transmitting terminal, the collecting module is further configured to set an identification area, and the LED of the data transmitting terminal is placed according to the identifying area, and the LED state of the data transmitting terminal in the identification area is captured by using the camera.
可选的,采集模块设置为采用腐蚀与膨胀的图像处理算法,对摄像头的采集图像去除噪点,计算图像中LED的最大区域面积,当最大区域面积与识别区域的面积的百分比大于百分比阈值时,LED状态为亮,当所述百分比不大于所述百分比阈值时,LED状态为灭。 Optionally, the acquisition module is configured to adopt an image processing algorithm of corrosion and expansion to remove noise from the captured image of the camera, and calculate a maximum area of the LED in the image. When the percentage of the area of the largest area and the area of the identification area is greater than a percentage threshold, The LED state is bright, and when the percentage is not greater than the percentage threshold, the LED state is off.
可选的,采集模块设置为使用摄像头载拍照取景模式下连续采集图像,对连续图像进行识别;或者,使用摄像头载录制模式下录制视频,将视频分解为多帧图像,分别对所述多帧图像进行识别。Optionally, the collection module is configured to continuously collect images by using the camera to take a photographing mode, and identify the continuous image; or, by using the camera to record the video in the recording mode, the video is decomposed into multiple frames, and the multiple frames are respectively The image is identified.
本公开提供了一种数据传输系统,包括本公开提供的任一数据发送装置和本公开提供任一的数据接收装置;其中,The present disclosure provides a data transmission system including any of the data transmitting apparatus provided by the present disclosure and the data receiving apparatus provided by any one of the present disclosure;
数据发送装置设置为获取待发送数据,将待发送数据编译为二进制信息,以及通过发光二极管LED发送二进制信息;以及The data transmitting device is configured to acquire data to be transmitted, compile the data to be transmitted into binary information, and transmit binary information through the LEDs;
数据接收装置设置为使用摄像头捕捉数据发送终端的LED状态,解析LED状态获取二进制信息,以及将二进制信息解译为待接收数据。本公开还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述方法。The data receiving device is configured to capture the LED status of the data transmitting terminal using the camera, parse the LED status to obtain binary information, and interpret the binary information as data to be received. The present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the above method.
本公开还提供了一种数据发送终端,包括:The disclosure also provides a data sending terminal, including:
至少一个处理器;以及At least one processor;
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行以下方法:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the following method:
获取待发送数据;Obtain data to be sent;
将所述待发送数据编译为二进制信息;以及Compiling the data to be transmitted into binary information;
通过发光二极管LED发送所述二进制信息。The binary information is transmitted by a light emitting diode LED.
本公开还提供了一种数据接收终端,包括:The present disclosure also provides a data receiving terminal, including:
至少一个处理器;以及At least one processor;
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行以下方法:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the following method:
使用摄像头捕捉数据发送终端的发光二极管LED状态;Using the camera to capture the LED status of the data transmitting terminal;
解析LED状态获取二进制信息;以及Parsing the LED status to obtain binary information;
将所述二进制信息解译为待接收数据。 The binary information is interpreted as data to be received.
本公开提供了一种数据传输方法,基于设备的LED传输调试数据,而LED在不传输数据时,可以用作电源指示以及运行指示等功能,不增加额外的调试接口来传输调试数据。The present disclosure provides a data transmission method, based on the LED transmission debugging data of the device, and the LED can be used as a power indication and a running instruction when the data is not transmitted, without adding an additional debugging interface to transmit the debugging data.
附图说明DRAWINGS
图1为本公开第一实施例提供的数据传输系统的结构示意图;1 is a schematic structural diagram of a data transmission system according to a first embodiment of the present disclosure;
图2为本公开第二实施例提供的数据传输方法的流程图;2 is a flowchart of a data transmission method according to a second embodiment of the present disclosure;
图3为本公开第三实施例中LED灯未提纯效果图;3 is a diagram showing an unpurified effect of an LED lamp in a third embodiment of the present disclosure;
图4为本公开第三实施例中LED灯提纯后效果图;4 is a diagram showing the effect of purifying the LED lamp in the third embodiment of the present disclosure;
图5为本公开第三实施例中图像识别算法的流程图;FIG. 5 is a flowchart of an image recognition algorithm in a third embodiment of the present disclosure; FIG.
图6为本公开第三实施例中数据帧结构示意图;6 is a schematic structural diagram of a data frame in a third embodiment of the present disclosure;
图7为本公开第三实施例中数据传输方法的流程图;7 is a flowchart of a data transmission method in a third embodiment of the present disclosure;
图8为本公开第五实施例中数据发送终端的硬件结构示意图;以及FIG. 8 is a schematic structural diagram of hardware of a data transmitting terminal according to a fifth embodiment of the present disclosure;
图9为本公开第五实施例中数据接收终端的硬件结构示意图。FIG. 9 is a schematic diagram showing the hardware structure of a data receiving terminal in a fifth embodiment of the present disclosure.
具体实施方式detailed description
通过具体实施方式结合附图的方式对本公开做出诠释说明。The disclosure will be explained by way of specific embodiments in conjunction with the accompanying drawings.
第一实施例First embodiment
图1为本公开第一实施例提供的数据传输系统的结构示意图,由图1可知,在本实施例中,本公开提供的数据传输系统包括数据发送装置1及数据接收装置2。1 is a schematic structural diagram of a data transmission system according to a first embodiment of the present disclosure. As can be seen from FIG. 1, in the present embodiment, the data transmission system provided by the present disclosure includes a data transmitting apparatus 1 and a data receiving apparatus 2.
数据发送装置1设置为获取待发送数据,将待发送数据编译为二进制信息,以及通过发光二极管(Light Emitting Diode,LED)发送二进制信息。The data transmitting device 1 is configured to acquire data to be transmitted, compile the data to be transmitted into binary information, and transmit binary information through a Light Emitting Diode (LED).
数据接收装置2设置为使用摄像头捕捉数据传输终端的LED状态,解析LED状态获取二进制信息,以及将二进制信息解译为待接收数据。The data receiving device 2 is arranged to capture the LED status of the data transmission terminal using the camera, parse the LED status to acquire binary information, and interpret the binary information as data to be received.
在一些实施例中,如图1所示,本公开提供的数据发送装置1可以包括:获取模块11,编译模块12和发送模块13。In some embodiments, as shown in FIG. 1 , the data transmitting apparatus 1 provided by the present disclosure may include: an obtaining module 11 , a compiling module 12 , and a sending module 13 .
获取模块11设置为获取待发送数据。 The obtaining module 11 is configured to acquire data to be transmitted.
编译模块12设置为将待发送数据编译为二进制信息。The compilation module 12 is arranged to compile the data to be transmitted into binary information.
发送模块13设置为通过LED发送二进制信息。The transmitting module 13 is arranged to transmit binary information via the LEDs.
在一些实施例中,上述实施例中的发送模块13还可以设置为通过LED的灭亮状态,发送二进制信息中的0及1。In some embodiments, the sending module 13 in the above embodiment may also be configured to transmit 0 and 1 in the binary information by the LED being off.
在一些实施例中,上述实施例中的发送模块13还可以设置为通过设置的专用调试LED发送二进制信息;通过复用电源LED控制处于调试状态的电源LED发送所述二进制信息;通过复用运行LED控制处于调试状态的运行LED发送所述二进制信息;或者通过复用告警LED控制处于调试状态的告警LED发送二进制信息。In some embodiments, the sending module 13 in the above embodiment may further be configured to send binary information through a set dedicated debug LED; the power LED in the debug state is controlled by the multiplex power LED to transmit the binary information; The operation LED of the LED control in the debug state transmits the binary information; or the binary LED is sent by the multiplexed alarm LED to control the alarm LED in the debug state.
在一些实施例中,上述实施例中的编译模块12设置为采用设备代码、字段1、字段2、……、字段n以及校验码组合的帧结构,将待发送数据编译为二进制信息,设备代码包括设备IP地址和设备访问密码中的至少一个,字段i包括标识i及标识i对应数值i,1≤i≤n,i和n为整数。In some embodiments, the compiling module 12 in the above embodiment is configured to compile the data to be sent into binary information by using a frame structure of device code, field 1, field 2, ..., field n, and check code combination. The code includes at least one of a device IP address and a device access password, and the field i includes the identifier i and the identifier i corresponding to the value i, 1 ≤ i ≤ n, and i and n are integers.
在一些实施例中,上述实施例中的发送模块13设置为根据物理发送协议确定LED数量,通过对应数量的LED发送二进制信息。In some embodiments, the transmitting module 13 in the above embodiment is configured to determine the number of LEDs according to a physical transmission protocol, and to transmit binary information through a corresponding number of LEDs.
在一些实施例中,如图1所示,本公开提供的数据接收装置2可以包括:采集模块21、解析模块22以及解译模块23。In some embodiments, as shown in FIG. 1 , the data receiving apparatus 2 provided by the present disclosure may include an acquisition module 21 , a parsing module 22 , and an interpreting module 23 .
采集模块21设置为使用摄像头捕捉数据发送终端的LED状态。The acquisition module 21 is arranged to capture the LED status of the data transmitting terminal using the camera.
解析模块22设置为解析LED状态获取二进制信息。The parsing module 22 is configured to parse the LED status to obtain binary information.
解译模块23设置为将二进制信息解译为待接收数据。The interpretation module 23 is arranged to interpret the binary information as data to be received.
在一些实施例中,上述实施例中的解析模块22还可以设置为通过LED的灭亮状态,确定二进制信息中的0及1。In some embodiments, the parsing module 22 in the above embodiment may also be configured to determine 0 and 1 in the binary information by the off state of the LED.
在一些实施例中,上述实施例中的采集模块21还可以设置为采用颜色模型的明亮度识别方法,对LED的灭亮状态进行识别,若亮度大于预设阈值,则LED状态为亮,若亮度不大于预设阈值,则LED状态为灭。In some embodiments, the acquisition module 21 in the above embodiment may further be configured to use a brightness recognition method of a color model to identify an off state of the LED. If the brightness is greater than a preset threshold, the LED state is bright. If the brightness is not greater than the preset threshold, the LED status is off.
在一些实施例中,上述实施例中的采集模块21在使用摄像头捕捉数据发送终端的LED状态之前,还可以设置为在数据发送终端的LED周围设置提纯设备,使用摄像头通过提纯设备捕捉数据发送终端的LED状态。 In some embodiments, the acquisition module 21 in the above embodiment may further be configured to set a purification device around the LED of the data transmission terminal before capturing the LED state of the data transmission terminal by using the camera, and use the camera to capture the data transmission terminal through the purification device. LED status.
在一些实施例中,上述实施例中的采集模块21在使用摄像头捕捉数据传输终端的LED灯状态之前,还可以设置为设置识别区域,根据识别区域放置数据发送终端的LED,使用摄像头捕捉数据发送终端的在识别区域内的LED状态。In some embodiments, the acquisition module 21 in the above embodiment may further be configured to set an identification area before the LED light state of the data transmission terminal is captured by using the camera, and place the LED of the data transmission terminal according to the identification area, and use the camera to capture data transmission. The status of the LEDs in the identification area of the terminal.
在一些实施例中,上述实施例中的采集模块21还可以设置为采用腐蚀与膨胀的图像处理算法,对摄像头的采集图像去除噪点,计算图像中LED的最大区域面积,当最大区域面积与识别区域的面积的百分比大于百分比阈值时,LED状态为亮,当所述百分比不大于所述百分比阈值时,LED状态为灭。其中,识别区域的面积为该帧图像的面积。In some embodiments, the acquisition module 21 in the above embodiment may also be configured to adopt an image processing algorithm of corrosion and expansion to remove noise from the captured image of the camera, and calculate the maximum area of the LED in the image, when the maximum area and the area are identified. When the percentage of the area of the area is greater than the percentage threshold, the LED status is on, and when the percentage is not greater than the percentage threshold, the LED status is off. The area of the identification area is the area of the frame image.
在一些实施例中,上述实施例中的采集模块21还可以设置为使用摄像头在拍照取景模式下连续采集图像,对连续图像进行识别;或者,使用摄像头在录制模式下录制视频,将视频分解为多帧图像,分别对所述多帧图像进行识别。In some embodiments, the acquisition module 21 in the above embodiment may further be configured to continuously capture images in a photographing and framing mode using a camera to identify continuous images; or, use a camera to record video in a recording mode, and decompose the video into A multi-frame image is separately identified for the multi-frame image.
第二实施例Second embodiment
图2为本公开第二实施例提供的数据传输方法的流程图。FIG. 2 is a flowchart of a data transmission method according to a second embodiment of the present disclosure.
在步骤210中,获取待发送数据,将待发送数据编译为二进制信息,以及通过LED发送二进制信息。In step 210, data to be transmitted is acquired, data to be transmitted is compiled into binary information, and binary information is transmitted through the LED.
在步骤220中,使用摄像头捕捉数据发送终端的所述LED状态,解析所述LED状态获取二进制信息,以及将二进制信息解译待接收数据。In step 220, the camera is used to capture the LED status of the data transmitting terminal, parsing the LED status to obtain binary information, and interpreting the binary information to be received.
在一些实施例中,本公开提供了一种数据发送方法,包括:In some embodiments, the present disclosure provides a data sending method, including:
获取待发送数据;Obtain data to be sent;
将待发送数据编译为二进制信息;以及Compile the data to be sent into binary information;
通过LED发送二进制信息。Send binary information through the LED.
在一些实施例中,上述实施例中的通过LED发送二进制信息可以包括:通过LED灯的灭亮状态,发送二进制信息中的0及1。In some embodiments, transmitting the binary information by the LED in the above embodiment may include transmitting 0 and 1 in the binary information by the off state of the LED light.
在一些实施例中,上述实施例中的通过LED发送二进制信息可以包括:通过设置的专用调试LED发送二进制信息;通过复用电源LED控制处于调试状态的电源LED发送所述二进制信息;通过复用运行LED控制处于调试状态的运行LED发送所述二进制信息;或者通过复用告警LED,控制处于调试状态的告警LED灯发送二进制信息。 In some embodiments, the transmitting the binary information by the LED in the above embodiment may include: transmitting the binary information through the set dedicated debug LED; and controlling the power LED in the debug state to transmit the binary information by multiplexing the power LED; The operation LED that runs the LED control in the debug state sends the binary information; or by multiplexing the alarm LED, the alarm LED that is in the debug state is sent to send binary information.
其中,通信设备不处于调试状态时,电源LED用于指示电源状况,运行LED用于指示通信设备的运行状状态以及告警LED用于指示是否有警告。Wherein, when the communication device is not in the debugging state, the power LED is used to indicate the power status, the running LED is used to indicate the running state of the communication device, and the alarm LED is used to indicate whether there is a warning.
在一些实施例中,上述实施例中的将待发送数据编译为二进制信息可以包括:采用设备代码、字段1、字段2、……、字段n以及校验码组合的帧结构,将待发送数据编译为二进制信息,设备代码包括设备IP地址和设备访问密码中的至少一个,字段i包括标识i及标识i对应的数值i,1≤i≤n,i和n为整数。In some embodiments, the compiling the data to be sent into the binary information in the foregoing embodiment may include: adopting a frame structure of the device code, the field 1, the field 2, the ..., the field n, and the check code combination, and the data to be sent Compiled into binary information, the device code includes at least one of a device IP address and a device access password, and the field i includes a value i corresponding to the identifier i and the identifier i, 1≤i≤n, and i and n are integers.
在一些实施例中,上述实施例中的通过LED发送二进制信息可以包括:根据物理发送协议确定LED数量,通过对应数量的LED发送二进制信息。其中,物理发送协议可以是用户自定义的传输协议,如2个LED的物理协议中可以包括:第一个LED模拟时钟信号,第二个LED模拟数据信号,时钟总线为高电平(如LED为亮)时,如果数据总线的状态不变,则数据总线的电平代表数据信息。In some embodiments, transmitting the binary information by the LED in the above embodiment may include determining the number of LEDs according to a physical transmission protocol, and transmitting the binary information by a corresponding number of LEDs. The physical transmission protocol may be a user-defined transmission protocol. For example, the physical protocol of the two LEDs may include: a first LED analog clock signal, a second LED analog data signal, and a clock bus high level (such as an LED) When it is lit, if the state of the data bus does not change, the level of the data bus represents data information.
在一些实施例中,本公开提供了一种数据接收方法,包括:In some embodiments, the present disclosure provides a data receiving method, including:
使用摄像头捕捉数据发送终端的LED状态。Use the camera to capture the LED status of the data sending terminal.
解析LED状态获取二进制信息;以及Parsing the LED status to obtain binary information;
将二进制信息解译为待接收数据。Interpret the binary information as data to be received.
在一些实施例中,上述实施例中的解析LED状态获取二进制信息可以包括:通过LED的灭亮状态,确定二进制信息中的0及1。In some embodiments, the parsing the LED state in the above embodiment to obtain the binary information may include determining 0 and 1 in the binary information by the off state of the LED.
在一些实施例中,上述实施例中的使用摄像头捕捉数据发送终端的LED状态包括:采用颜色模型的明亮度识别方法,对LED的灭亮状态进行识别,若亮度大于预设阈值,则LED状态为亮,若亮度不大于预设阈值,则LED状态为灭。In some embodiments, the use of the camera to capture the LED status of the data transmitting terminal in the above embodiment includes: using a brightness recognition method of the color model to identify the off state of the LED, and if the brightness is greater than a preset threshold, the LED status If it is bright, if the brightness is not greater than the preset threshold, the LED status is off.
在一些实施例中,上述实施例中的数据接收方法在使用摄像头捕捉数据发送终端的LED状态之前,还包括:在数据发送终端的LED周围设置提纯设备,使用摄像头通过提纯设备捕捉数据发送终端的LED状态。In some embodiments, the data receiving method in the foregoing embodiment, before using the camera to capture the LED status of the data transmitting terminal, further includes: setting a purifying device around the LED of the data transmitting terminal, and capturing the data transmitting terminal by using the camera through the purifying device LED status.
在一些实施例中,上述实施例中的数据接收方法在使用摄像头捕捉数据发送终端的LED状态之前,还包括:设置识别区域,根据识别区域放置数据发送终端的LED,使用摄像头在识别区域内捕捉数据发送终端在识别区域内的LED状态。In some embodiments, the data receiving method in the foregoing embodiment, before using the camera to capture the LED status of the data transmitting terminal, further includes: setting an identification area, placing an LED of the data transmitting terminal according to the identification area, and capturing the image in the identification area by using the camera The data transmitting terminal is in the state of the LED in the identification area.
在一些实施例中,上述实施例中的使用摄像头捕捉数据发送终端的LED状 态包括:采用腐蚀与膨胀的图像处理算法,对摄像头的采集图像去除噪点,计算图像中LED的最大区域面积,当最大区域面积与识别区域的面积的百分比大于百分比阈值时,LED状态为亮,当所述百分比不大于所述百分比阈值时,LED状态为灭。In some embodiments, the use of the camera in the above embodiment captures the LED shape of the data transmitting terminal The state includes: an image processing algorithm using corrosion and expansion, removing noise from the captured image of the camera, and calculating a maximum area of the LED in the image. When the percentage of the area of the largest area and the area of the identification area is greater than a percentage threshold, the LED state is bright. When the percentage is not greater than the percentage threshold, the LED state is off.
对摄像头的采集图像去除噪点之后,对图像中的LED进行识别,识别的LED区域周围可能包括一些小的区域,对识别的至少一个LED区域按照面积进行排序,将区域面积最大的LED区域作为LED的最大区域,将该最大区域的面积作为最大区域面积。其中,识别区域的面积为该帧图像的面积。After removing the noise of the captured image of the camera, the LED in the image is identified, and the identified LED area may include some small areas, and the identified at least one LED area is sorted according to the area, and the LED area with the largest area is used as the LED. The largest area, the area of the largest area is taken as the maximum area area. The area of the identification area is the area of the frame image.
在一些实施例中,上述实施例中的使用摄像头捕捉数据发送终端的LED状态可以包括:使用摄像头在拍照取景模式下连续采集图像,对连续图像进行识别;或者,使用摄像头在录制模式下录制视频,将视频分解为多帧图像,分别对多帧图像进行识别。In some embodiments, using the camera to capture the LED status of the data transmitting terminal in the above embodiment may include: continuously acquiring an image in the photographing framing mode using the camera to identify the continuous image; or recording the video in the recording mode using the camera. , the video is decomposed into multi-frame images, and the multi-frame images are respectively identified.
其中,拍照取景模式下,发送终端每采集一帧图像后,对图像进行识别。Wherein, in the photographing and framing mode, the transmitting terminal recognizes the image after acquiring one frame of image.
第三实施例Third embodiment
对于成本压力大的产品,在该产品调试和维护中,需要输出少数的核心信息,针对这样的产品,提供一种数据传输系统,系统中的装置通过LED的亮和灭两种状态,模拟1与0的输出,通过光的传播取代导线的信息输出,达到与总线传递二进制信息相同的效果。通过智能设备的摄像头捕捉LED状态,并根据算法解析出LED的亮灭与1和0的对应关系,达到与采样数字电信号具有相同效果。装置和系统采用设备LED和智能设备图像识别算法,模拟了设备电信号通过串口(或网口等通信接口)传输信息以及传输信息被接收设备采样解析的过程。模拟过程中,智能设备的采样速率低(摄像头的拍摄帧数低),LED状态变换不能过快,影响了传输的速率,因此该系统不适用于处理很多调试数据的系统。本公开实施中的系统成本低、空间和占用面积小,可适用于只通过IP或无线密码即可进入调试维护的装置与系统。本公开还可适用于除LED用于提供人类可识别信号之外的场景。通过加快LED状态变换实现二进制信号的传输,通过智能设备的图像识别捕捉与解码LED信号,LED可适用于输出更多信息的新场景应用。在LED的新场景应用中,本公开的方法可以拓展但不限于如下装置与系统。当通信设备不处于调试状态时,具有一个告警LED的通信设备,通过告警LED的亮和灭,反映系统是否存在告警。 For products with high cost pressure, in the debugging and maintenance of the product, a small amount of core information needs to be output. For such products, a data transmission system is provided, and the devices in the system pass the LEDs in both the on and off states, and simulate 1 With the output of 0, the information output of the wire is replaced by the propagation of light to achieve the same effect as the binary information transmitted by the bus. The state of the LED is captured by the camera of the smart device, and the corresponding relationship between the on and off of the LED and the 1 and 0 is resolved according to the algorithm, and the same effect as the sampled digital electrical signal is achieved. The device and system adopt device LED and intelligent device image recognition algorithm to simulate the process of transmitting electrical information of the device through serial port (or communication interface such as network port) and transmitting and analyzing information by the receiving device. During the simulation, the sampling rate of the smart device is low (the number of frames taken by the camera is low), and the LED state transition cannot be too fast, which affects the transmission rate. Therefore, the system is not suitable for systems that process many debug data. The system in the implementation of the present disclosure has low cost, small space and small occupied area, and can be applied to devices and systems that can be debugged and maintained only by IP or wireless password. The present disclosure is also applicable to scenarios other than LEDs for providing human identifiable signals. The binary signal is transmitted by accelerating the LED state transition, and the LED signal is captured and decoded by the image recognition of the smart device, and the LED can be applied to a new scene application that outputs more information. In new scene applications of LEDs, the methods of the present disclosure may be extended but not limited to the following devices and systems. When the communication device is not in the debugging state, the communication device with an alarm LED reflects whether the system has an alarm by turning on and off the alarm LED.
应用本公开的方法改良以上装置,告警LED可以以更快的速率闪烁,按编码要求传递告警标识(Identification,ID)以及告警级别等信息,维护人员通过智能设备识别并解析LED信息,并将设备的告警ID与告警级别在智能设备上显示,从而让维护人员了解被维护的装置与系统的状态。维护人员虽然无法通过人眼判断LED闪烁代表的详细信息,但可以知道LED是否在闪烁,判断是否存在告警信息。设备的告警LED功能仍然保留。By using the method of the present disclosure to improve the above device, the alarm LED can flash at a faster rate, and the information such as an identification (ID) and an alarm level are transmitted according to the coding requirement, and the maintenance personnel recognizes and analyzes the LED information through the smart device, and the device The alarm ID and alarm level are displayed on the smart device, so that the maintenance personnel can know the status of the device and system being maintained. Although the maintenance personnel cannot judge the detailed information represented by the LED flashing through the human eye, it is possible to know whether the LED is blinking or not, and determine whether there is an alarm information. The device's alarm LED function is still retained.
在应用中,数据发送终端可以设置专用的调试LED周期输出调试信息。数据发送终端也可以采用复用LED的方式输出调试信息,当按下调试按钮时,LED处于调试状态,LED输出调试信息,调试完成后,弹起调试按钮,LED恢复原有功能。In the application, the data transmitting terminal can set a dedicated debugging LED cycle output debugging information. The data transmitting terminal can also output debugging information by means of multiplexing LEDs. When the debugging button is pressed, the LED is in the debugging state, and the LED outputs debugging information. After the debugging is completed, the debugging button is bounced, and the LED restores the original function.
在应用中,智能设备具有LED亮灭的图像识别功能,智能设备包括智能电话以及具有摄像头的便携式计算机(笔记本)。智能设备可以安装本公开中图像识别的软件,在开启软件后,软件获取摄像头直接或间接传递的图像信息,并采用图像处理算法对图像信息进行解析。In an application, the smart device has an image recognition function in which the LED is turned off, and the smart device includes a smart phone and a portable computer (notebook) having a camera. The smart device can install the software for image recognition in the present disclosure. After the software is turned on, the software obtains image information directly or indirectly transmitted by the camera, and uses image processing algorithms to parse the image information.
LED识别的应用程序可以具有跨平台功能,为了实现跨平台以及节省开发投入,可以采用跨平台的Python面向对象的解释型计算机程序设计语言。采用PYTHON开发的程序,除了可以运行在智能设备的安卓(Android)操作系统以及苹果的操作系统(iPhone Operation System,IOS)中,还可以运行在PC的Windows,Linux以及Mac OS操作系统中。本实施还可以采用除Python之外的程序设计语言实现。LED-aware applications can have cross-platform capabilities. For cross-platform and development-saving investments, a cross-platform Python object-oriented interpreted computer programming language can be used. The program developed by PYTHON can be run on the Windows, Linux and Mac OS operating systems of the PC in addition to the Android operating system of the smart device and the iPhone Operating System (IOS). This implementation can also be implemented in a programming language other than Python.
应用已有的图像识别库可以降低开发成本,本实施例中可以采用OPENCV图像识别库进行开发,减少了基础图像识别的工作量,提高了智能设备的开发速度。LED识别算法的流程如图5所示。The application of the existing image recognition library can reduce the development cost. In this embodiment, the OPENCV image recognition library can be used for development, which reduces the workload of the basic image recognition and improves the development speed of the smart device. The flow of the LED recognition algorithm is shown in Figure 5.
由于LED具有不同的颜色和不同的形状,因此,不能根据颜色与形状来识别LED,本实施中可以采用HSV(Hue,Saturation,Value)颜色模型的明亮度对LED的亮和灭进行识别,当亮度大于实验总结的预设阈值时,判定LED为亮,当亮度不大于预设阈值时,LED为灭。Since the LEDs have different colors and different shapes, the LEDs cannot be identified according to the color and shape. In this embodiment, the brightness of the HSV (Hue, Saturation, Value) color model can be used to identify the LEDs on and off. When the brightness is greater than the preset threshold of the experiment, the LED is determined to be bright, and when the brightness is not greater than the preset threshold, the LED is off.
通过改善环境纯净度,可以提高LED亮灭的判定成功率,由于LED周围环境的差异,容易产生一定的误识别。如图3及图4所示,本公开可以采用如下方法提高环境纯净度,采用黑色的卡片,中间形成一个圆孔,放置在设备的LED 处;智能设备的摄像头拍照区域,应完全落在黑色卡片内,这样,拍照的环境具有很好的纯净度,LED点亮与LED熄灭可以产生明显的亮度对比。本实施例中还可以采用除黑色之外的颜色的卡片,卡片的材质、打孔位置和打孔数量不作限定,如可以采用2孔的深色胶带等。By improving the purity of the environment, it is possible to improve the success rate of LED lighting, and it is easy to generate a certain misidentification due to the difference in the environment around the LED. As shown in FIG. 3 and FIG. 4, the present disclosure can adopt the following method to improve the purity of the environment, using a black card, forming a circular hole in the middle, and placing the LED in the device. The camera area of the smart device should be completely inside the black card, so that the environment of the camera has a good purity, LED lighting and LED extinction can produce significant brightness contrast. In this embodiment, a card other than black may be used. The material of the card, the position of the punching hole, and the number of punching holes are not limited. For example, a 2-hole dark tape or the like may be used.
可以通过限定LED位置,提高LED亮灭的判定成功率,当LED在图像中的位置不定,例如是由于摄像头与LED之间的距离不固定产生的LED在图像中的大小不固定,可能导致LED亮灭误判。在图像识别软件中,可以加入合适大小的圆形区域显示,提示使用者,将LED的图像能完全覆盖住中间的圆形区域。图像识别软件可以只根据圆形区域内的HSV值进行LED灯亮灭的判定。在摄像头下,由于光晕与角度等原因,圆形LED在HSV转换或灰度处理以及过滤后,可能不呈现为圆形。采用本实施的圆形限定,可以去除LED周边的不规则形状以及色差等不利于图像识别的因素,提高了LED亮灭的判定成功率,本实施的LED的形状不限于圆形。当LED为圆形或方形时,图像识别软件的限制区域可以适应更改为对应的形状。The determination success rate of LED illumination can be improved by limiting the LED position. When the position of the LED in the image is uncertain, for example, the LED is not fixed in the image due to the unfixed distance between the camera and the LED, which may result in LED Light up and misjudge. In the image recognition software, a circular display of a suitable size can be added to prompt the user to completely cover the circular area in the middle of the image of the LED. The image recognition software can determine the LED light on and off based only on the HSV value in the circular area. Under the camera, due to halo and angle, the circular LED may not appear circular after HSV conversion or grayscale processing and filtering. By adopting the circular limitation of the present embodiment, factors such as irregular shapes and chromatic aberrations around the LED, which are disadvantageous to image recognition, can be removed, and the success rate of determination of LED light-off is improved, and the shape of the LED of the present embodiment is not limited to a circular shape. When the LED is circular or square, the restricted area of the image recognition software can be adapted to change to the corresponding shape.
LED的识别可以采用腐蚀与膨胀的图像处理算法,去除噪点。由于LED的形状多样性,计算图像中的最大区域面积,当最大区域面积与识别区域的面积的百分比大于设定的限制区域的阈值(如85%)时,可以判定为LED亮,当百分比不大于百分比阈值时,LED为灭。本实施中除采用腐蚀与膨胀算法去除噪点外,还可以采用双向过滤以及高斯过滤等噪点过滤算法。LED identification can use corrosion and expansion image processing algorithms to remove noise. Due to the diversity of the shape of the LED, the maximum area of the image is calculated. When the percentage of the area of the largest area and the area of the identification area is greater than the threshold of the set restriction area (eg, 85%), it can be determined that the LED is bright, when the percentage is not When it is greater than the percentage threshold, the LED is off. In this implementation, in addition to the use of corrosion and expansion algorithms to remove noise, noise filtering algorithms such as two-way filtering and Gaussian filtering can also be used.
在LED亮灭的连续判定中,LED信息是连续输出,摄像头可以采用如下两种方式转换为多图片连续处理:摄像头采用拍照取景模式,从驱动中,复制一份相同的图片给图像识别应用程序(Application,APP),实现动态识别;以及摄像头采用录制模式,录制一段时间后(也可通过人眼可识别的起始、结束LED状态提示录制结束),图像识别APP将视频的每一帧分解为单独图片再对图片进行识别处理。In the continuous determination of the LED on and off, the LED information is continuously output, and the camera can be converted into multi-picture continuous processing in the following two ways: the camera adopts the photographing and framing mode, and copies the same picture from the driver to the image recognition application. (Application, APP), realizes dynamic recognition; and the camera adopts the recording mode. After recording for a period of time (also can be detected by the human eye, the start and end LED states indicate the end of the recording), the image recognition APP decomposes each frame of the video. Re-identify the image for a separate image.
为了能让摄像头的每一帧图像捕捉到LED的亮灭信息,可以设置LED的状态转换速率不大于摄像头的帧率,拍摄帧率大于25FPS(Frames Per Second)时,摄像机的采样频率可以大于LED亮灭频率的2倍,因此LED的亮灭频率可以小于12FPS。如果维护人员使用的智能设备摄像帧率更高,如60FPS或120FPS,则LED的亮灭变换速率可以大于12FPS。 In order to enable the LED image to be captured for each frame of the camera, the state transition rate of the LED can be set to be no greater than the frame rate of the camera. When the frame rate is greater than 25 FPS (Frames Per Second), the sampling frequency of the camera can be greater than that of the LED. The frequency of the LED is doubled, so the LED's on-off frequency can be less than 12FPS. If the smart device used by the maintenance personnel has a higher camera frame rate, such as 60FPS or 120FPS, the LED can be turned on and off at a rate greater than 12FPS.
每一个LED等价于一根电导线,不同数量的LED,可以采用不同的协议进行传输。本实施例,可以采用成本和工程应用相对平衡的2LED方式。物理传输协议中,第一个LED可以模拟时钟总线,第二个LED可以模拟数据总线。物理传输协议中,时钟总线为高电平(如LED为亮)时,如果数据总线的状态不变,则数据总线的电平代表数据信息;时钟总线为高电平时,如果数据总线出现高电平(如LED为亮)到低电平(如LED为灭)的转换,则代表数据传输开始;时钟总线为高电平时,如果数据总线出现低电平到高电平的转换,则代表数据传输结束。为了降低LED状态变换中出现的不稳定性,本实施例中,对时钟总线为高电平时的数据总线采样次数可以大于或等于3次,弃用第一次和最后一次的采样,仅采用中间的采样数据。本公开实施例对其他数量的LED与相应的物理传输协议的定义不作限定。Each LED is equivalent to an electrical conductor, and different numbers of LEDs can be transmitted using different protocols. In this embodiment, a 2LED method in which the cost and the engineering application are relatively balanced can be adopted. In the physical transport protocol, the first LED can emulate the clock bus and the second LED can emulate the data bus. In the physical transmission protocol, when the clock bus is high (if the LED is on), if the state of the data bus does not change, the level of the data bus represents data information; when the clock bus is high, if the data bus is high The conversion of the flat (such as LED is bright) to low level (such as LED is off) represents the beginning of data transmission; when the clock bus is high, if the data bus has a low to high transition, it represents data. The transfer ends. In order to reduce the instability occurring in the LED state transition, in this embodiment, the data bus sampling time when the clock bus is high level may be greater than or equal to 3 times, and the first and last sampling are discarded, and only the middle is used. Sampling data. Embodiments of the present disclosure do not limit the definition of other numbers of LEDs and corresponding physical transport protocols.
由于LED传输属于慢速通信,因此,帧结构越简单,工程应用中的信息获取速度越快。如图6所示,本实施例采用的帧结构可以包括:设备代码(Device_code)、字段1标识(ID1)、字段1数据(Value1)、字段2标识(ID2)、字段1数据(Value2)、…、字段n标识(IDn)、字段n数据(Value n)以及校验码(CRC)。由于LED信息输出,不存在多帧连续输出时判定分离帧的现象,因此,帧结构中可以不加入帧头和帧尾,以节省传输时间。设备代码可以采用1个字节。ID为变量的唯一识别(不同数据结构的相同变量可以采用不一样的ID定义,如,整形数IP地址与字符串IP地址属于不同的ID,可以简化数据结构),ID可以采用1个字节。当Value为整形数或浮点数时,可以根据ID定义的字节数输出,当Value为字符串时,结尾的标识为’\0’。考虑LED的图像识别误码率,本实施例中,可以加入8位循环冗余码校验(Cyclical Redundancy Check,CRC)对数据进行校验,当CRC不通过时,智能设备可以提示维护人员重新进行识别流程。Since LED transmission is slow communication, the simpler the frame structure, the faster the information acquisition speed in engineering applications. As shown in FIG. 6, the frame structure adopted in this embodiment may include: device code (Device_code), field 1 identifier (ID1), field 1 data (Value1), field 2 identifier (ID2), field 1 data (Value2), ..., field n identification (IDn), field n data (Value n), and check code (CRC). Since the LED information is output, there is no phenomenon of determining the separated frame when the multi-frame continuous output is performed. Therefore, the frame header and the frame tail may not be added in the frame structure to save transmission time. The device code can take 1 byte. ID is the unique identification of the variable (the same variable of different data structure can be defined by different IDs, for example, the integer IP address and the string IP address belong to different IDs, which can simplify the data structure), and the ID can take 1 byte. . When Value is an integer or a floating point number, it can be output according to the number of bytes defined by the ID. When Value is a string, the ending identifier is '\0'. Considering the image recognition error rate of the LED, in this embodiment, the data can be verified by adding an 8-bit Cyclic Redundancy Check (CRC). When the CRC does not pass, the smart device can prompt the maintenance personnel to restart. Conduct the identification process.
IP信息的获取流程如图7所示,其中,A设备具有运行灯、告警灯以及LED调试按钮。IP信息的获取流程中,将双孔黑色软胶贴在通信设备上,让运行灯与告警灯通过双孔透出光线;打开智能设备对应的图像识别APP,选择空位模板或手动调节采样圈的位置(让两个采样圈分别落在两个LED光晕的中间即可,无需对焦成功);按下设备的LED调试按钮,运行灯和告警灯临时变更为LED调试输出接口;APP检测到起始标识后,提示开始,检查到结束标识后,提示结束;如果采集的图像中的二进制信息中具有CRC校验码,CRC校验后,可以 提示采样是否成功。设备的调试信息输出流程结束后,运行灯恢复为指示设备的运行状况,以及告警灯恢复为指示告警状态。工程人员根据解析出来的IP信息登陆设备,可以修改参数等。其中,空位模板可以是图像识别APP的图像采集画面中设置的矩形或者圆形框。The IP information acquisition process is shown in FIG. 7, wherein the A device has an operation light, an alarm light, and an LED debugging button. In the process of obtaining the IP information, the two-hole black soft glue is attached to the communication device, so that the running light and the warning light pass through the two holes to open the light; the image recognition APP corresponding to the smart device is opened, the space template is selected, or the sampling circle is manually adjusted. Position (let the two sampling circles fall in the middle of the two LED halos, no need to focus successfully); press the LED debugging button of the device, the running light and the warning light are temporarily changed to the LED debugging output interface; the APP detects After the initial identification, the prompt starts, and after the end identification is detected, the prompt ends; if the binary information in the collected image has a CRC check code, after the CRC check, Prompt if the sampling was successful. After the debugging information output process of the device is finished, the running light is restored to indicate the running status of the device, and the alarm light returns to the indicated alarm state. The engineering personnel can log in to the device based on the parsed IP information, and the parameters can be modified. The vacancy template may be a rectangular or circular frame set in an image collection screen of the image recognition APP.
在应用中,IP信息采用整型数结构时,IP信息可以具有很少的传输字节。起始标识的电平和结束标识的电平相反,因此,起始标识和结束标识可以各自设置2个周期,故二进制信息的帧结构为2比特(Bit)的标识(start)、8比特的设备代码(device code)、8比特的字段标识(ID)、8比特的字段数据(Value)、8比特的校验码(CRC)和2比特的结束标识(end),即共36Bit数据。智能设备的图像识别APP选择低分辨率的录像模式,拍摄帧率可以达到60FPS,数据采样可以采用4次模式(放弃头次数据和尾次数据,取中间两次的数据),LED可以按7.5HZ频率输出,共4.8秒完成信息解析,也即工程人员可以在5秒内完成IP信息的获取。In an application, when IP information is in an integer structure, IP information can have few transmission bytes. The level of the initial identifier is opposite to the level of the end identifier. Therefore, the start identifier and the end marker can be set to 2 cycles each, so the frame structure of the binary information is a 2-bit (bit) identifier, 8-bit device. A code (device code), an 8-bit field identifier (ID), an 8-bit field data (Value), an 8-bit check code (CRC), and a 2-bit end identifier (end), that is, a total of 36 Bit data. The image recognition APP of the smart device selects the low-resolution recording mode, the shooting frame rate can reach 60FPS, and the data sampling can adopt the 4-time mode (abandon the first data and the last data, take the middle two data), and the LED can be pressed 7.5. HZ frequency output, a total of 4.8 seconds to complete the information analysis, that is, the engineering staff can complete the acquisition of IP information within 5 seconds.
本公开提供了一种数据传输方法,基于设备的LED传输调试数据,而LED在不传输数据时,可以用作指示运行状态以及告警状况等功能,不占用专用设备,不增加调试接口即可传输调试数据。The present disclosure provides a data transmission method, based on the LED transmission debugging data of the device, and the LED can be used as a function of indicating an operating state and an alarm condition when the data is not transmitted, and does not occupy a dedicated device, and can be transmitted without adding a debugging interface. Debug data.
第四实施例Fourth embodiment
本公开实施例还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的方法。Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
第五实施例Fifth embodiment
本公开实施例还提供了一种数据发送终端的硬件结构示意图。参见图8,该数据发送终端包括:The embodiment of the present disclosure further provides a hardware structure diagram of a data sending terminal. Referring to FIG. 8, the data transmitting terminal includes:
至少一个处理器(processor)80,图8中以一个处理器80为例;和存储器(memory)81,还可以包括通信接口(Communications Interface)82和总线83。其中,处理器80、通信接口82、存储器81可以通过总线83完成相互间的通信。通信接口82可以用于信息传输。处理器80可以调用存储器81中的逻辑指令,以执行以下方法:At least one processor 80, which is exemplified by a processor 80 in FIG. 8; and a memory 81, may further include a communication interface 82 and a bus 83. The processor 80, the communication interface 82, and the memory 81 can complete communication with each other through the bus 83. Communication interface 82 can be used for information transfer. The processor 80 can call the logic instructions in the memory 81 to perform the following methods:
获取待发送数据;Obtain data to be sent;
将所述待发送数据编译为二进制信息;以及 Compiling the data to be transmitted into binary information;
通过发光二极管LED灯发送所述二进制信息。The binary information is transmitted by a light emitting diode LED.
此外,上述的存储器81中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。In addition, the logic instructions in the memory 81 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
存储器81作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如本公开实施例中的数据发送终端的执行方法对应的程序指令或模块。处理器80通过运行存储在存储器81中的软件程序、指令或模块,从而执行功能应用以及数据处理,即实现上述方法实施例中数据发送终端的执行的方法。The memory 81 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, a program instruction or a module corresponding to the execution method of the data transmitting terminal in the embodiment of the present disclosure. The processor 80 executes a function application and data processing by executing a software program, an instruction or a module stored in the memory 81, that is, a method of implementing the execution of the data transmitting terminal in the above method embodiment.
存储器81可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器81可以包括高速随机存取存储器,还可以包括非易失性存储器。The memory 81 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the terminal device, and the like. Further, the memory 81 may include a high speed random access memory, and may also include a nonvolatile memory.
本公开实施例还提供了一种数据接收终端的硬件结构示意图。参见图9,该数据接收终端包括:The embodiment of the present disclosure further provides a hardware structure diagram of a data receiving terminal. Referring to FIG. 9, the data receiving terminal includes:
至少一个处理器(processor)90,图9中以一个处理器90为例;和存储器(memory)91,还可以包括通信接口(Communications Interface)92和总线93。其中,处理器90、通信接口92、存储器91可以通过总线93完成相互间的通信。通信接口92可以用于信息传输。处理器90可以调用存储器91中的逻辑指令,以执行以下方法:At least one processor 90, which is exemplified by a processor 90 in FIG. 9; and a memory 91, may further include a communication interface 92 and a bus 93. The processor 90, the communication interface 92, and the memory 91 can complete communication with each other through the bus 93. Communication interface 92 can be used for information transfer. The processor 90 can call the logic instructions in the memory 91 to perform the following methods:
使用摄像头捕捉数据发送终端的发光二极管LED灯状态;Using a camera to capture the status of the LED light of the data transmitting terminal;
解析LED灯状态获取二进制信息;以及Parsing the LED status to obtain binary information;
将所述二进制信息解译为待接收数据。The binary information is interpreted as data to be received.
此外,上述的存储器91中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。In addition, the logic instructions in the memory 91 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
存储器91作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如本公开实施例中的数据接收终端的执行方法对应的程序指令或模块。处理器90通过运行存储在存储器91中的软件程序、指令或模块,从而执行功能应用以及数据处理,即实现上述方法实施例中数据接收终端的执行的方法。 The memory 91 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, a program instruction or a module corresponding to the execution method of the data receiving terminal in the embodiment of the present disclosure. The processor 90 executes a function application and data processing by executing a software program, an instruction or a module stored in the memory 91, that is, a method of implementing the execution of the data receiving terminal in the above method embodiment.
存储器91可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器91可以包括高速随机存取存储器,还可以包括非易失性存储器。The memory 91 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 91 may include a high speed random access memory, and may also include a nonvolatile memory.
本公开的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-only Memory,ROM)、随机存储存储器(Random-Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。The technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) Performing all or part of the steps of the method of the embodiments of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random storage memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code, or a transitory storage medium.
工业实用性Industrial applicability
本公开提供的数据发送方法及装置、接收方法及装置、传输方法及系统,采用设备的LED传输调试数据,可以在不增加调试接口的情况下,传输调试数据。 The data transmitting method and device, the receiving method and device, the transmitting method and the system provided by the disclosure use the LED transmission debugging data of the device, and can transmit the debugging data without adding a debugging interface.

Claims (27)

  1. 一种数据发送方法,包括:A data transmission method includes:
    获取待发送数据;Obtain data to be sent;
    将所述待发送数据编译为二进制信息;以及Compiling the data to be transmitted into binary information;
    通过发光二极管LED发送所述二进制信息。The binary information is transmitted by a light emitting diode LED.
  2. 如权利要求1所述的方法,其中,所述通过LED发送所述二进制信息包括:通过所述LED的灭亮状态,发送所述二进制信息中的0及1。The method of claim 1 wherein said transmitting said binary information by said LED comprises transmitting 0 and 1 of said binary information by a blinking state of said LED.
  3. 如权利要求1所述的方法,其中,所述通过LED发送所述二进制信息包括:通过设置的专用调试LED发送所述二进制信息;通过复用电源LED控制处于调试状态的电源LED发送所述二进制信息;通过复用运行LED控制处于调试状态的运行LED发送所述二进制信息;或者通过复用告警LED控制处于调试状态的告警LED发送所述二进制信息。The method of claim 1, wherein the transmitting the binary information by the LED comprises: transmitting the binary information through a set dedicated debug LED; controlling the power LED in a debug state by the multiplex power LED to transmit the binary Information; transmitting the binary information by operating a LED that controls the debug state by multiplexing the operation LED; or transmitting the binary information by controlling the alarm LED in a debug state by multiplexing the alarm LED.
  4. 如权利要求1所述的方法,其中,所述将所述待发送数据编译为二进制信息包括:采用设备代码、字段1、字段2、……、字段n以及校验码组合的帧结构,将所述待发送数据编译为二进制信息,所述设备代码包括设备互联网协议IP地址和设备访问密码中的至少一个,字段i包括标识i及标识i对应的数值i,1≤i≤n,i和n为整数。The method of claim 1, wherein the compiling the data to be transmitted into binary information comprises: adopting a frame structure of a device code, a field 1, a field 2, ..., a field n, and a check code combination, The data to be transmitted is compiled into binary information, and the device code includes at least one of a device internet protocol IP address and a device access password, and the field i includes a value i corresponding to the identifier i and the identifier i, 1≤i≤n,i and n is an integer.
  5. 如权利要求1至4任一项所述的方法,其中,所述通过LED发送所述二进制信息包括:根据物理发送协议确定LED数量,通过对应数量的LED发送所述二进制信息。The method of any one of claims 1 to 4, wherein the transmitting the binary information by the LED comprises determining the number of LEDs according to a physical transmission protocol, and transmitting the binary information by a corresponding number of LEDs.
  6. 一种数据接收方法,包括:A data receiving method includes:
    使用摄像头捕捉数据发送终端的发光二极管LED状态;Using the camera to capture the LED status of the data transmitting terminal;
    解析LED状态获取二进制信息;以及Parsing the LED status to obtain binary information;
    将所述二进制信息解译为待接收数据。 The binary information is interpreted as data to be received.
  7. 如权利要求6所述的方法,其中,所述解析LED状态获取二进制信息包括:通过所述LED的灭亮状态,确定所述二进制信息中的0及1。The method of claim 6 wherein said parsing the LED state to obtain binary information comprises determining 0 and 1 of said binary information by a light-off state of said LED.
  8. 如权利要求6所述的方法,其中,所述使用摄像头捕捉数据发送终端的LED状态包括:采用颜色模型的明亮度识别方法,对所述LED的灭亮状态进行识别,若亮度大于预设阈值,则LED状态为亮,若亮度不大于预设阈值,则LED状态为灭。The method of claim 6, wherein the capturing the LED status of the data transmitting terminal by using the camera comprises: using a brightness recognition method of the color model to identify the off state of the LED, if the brightness is greater than a preset threshold , the LED status is bright, if the brightness is not greater than the preset threshold, the LED status is off.
  9. 如权利要求6所述的方法,在使用摄像头捕捉数据发送终端的LED状态之前,所述方法还包括:在所述数据发送终端的LED周围设置提纯设备,使用所述摄像头通过提纯设备捕捉数据发送终端的LED状态。The method of claim 6, before the camera captures the LED status of the data transmitting terminal, the method further comprising: setting a purifying device around the LED of the data transmitting terminal, and using the camera to capture data transmission through the purifying device The LED status of the terminal.
  10. 如权利要求6所述的方法,其中,在使用摄像头捕捉数据发送终端的LED状态之前,所述方法还包括:设置识别区域,根据所述识别区域放置所述数据发送终端的LED,使用摄像头捕捉数据发送终端的所述识别区域内的LED状态。The method of claim 6, wherein before the capturing the LED status of the data transmitting terminal using the camera, the method further comprises: setting an identification area, placing an LED of the data transmitting terminal according to the identifying area, capturing using a camera The state of the LED within the identified area of the data transmitting terminal.
  11. 如权利要求10所述的方法,其中,所述使用摄像头捕捉数据发送终端的LED状态包括:采用腐蚀与膨胀的图像处理算法,对所述摄像头的采集图像去除噪点,计算图像中LED的最大区域面积,当所述最大区域面积与所述识别区域的面积的百分比大于百分比阈值时,LED状态为亮,当所述百分比不大于所述百分比阈值时,LED状态为灭。The method of claim 10, wherein the capturing the LED status of the data transmitting terminal using the camera comprises: using an image processing algorithm of corrosion and expansion, removing noise from the captured image of the camera, and calculating a maximum area of the LED in the image The area, when the percentage of the area of the maximum area and the area of the identification area is greater than a percentage threshold, the LED status is bright, and when the percentage is not greater than the percentage threshold, the LED status is off.
  12. 如权利要求6至11任一项所述的方法,其中,所述使用摄像头捕捉数据发送终端的LED状态包括:使用摄像头在拍照取景模式下连续采集图像,对连续图像进行识别;或者,使用摄像头载录制模式下录制视频,将视频分解为多帧图像,分别对所述多帧图像进行识别。The method according to any one of claims 6 to 11, wherein the capturing the LED status of the data transmitting terminal by using the camera comprises: continuously acquiring an image in the photographing framing mode using the camera to identify the continuous image; or, using the camera The video is recorded in the recording mode, and the video is decomposed into multi-frame images, and the multi-frame images are respectively identified.
  13. 一种数据传输方法,包括: A data transmission method includes:
    获取待发送数据;Obtain data to be sent;
    将所述待发送数据编译为二进制信息;Compiling the to-be-sent data into binary information;
    通过发光二极管LED发送所述二进制信息;Transmitting the binary information through a light emitting diode LED;
    使用摄像头捕捉数据发送终端的所述LED状态;Using the camera to capture the LED status of the data transmitting terminal;
    解析所述LED状态获取所述二进制信息;以及Parsing the LED state to obtain the binary information;
    将所述二进制信息解译待接收数据。The binary information is interpreted to be received data.
  14. 一种数据发送装置,包括:A data transmitting device includes:
    获取模块,设置为获取待发送数据;Obtaining a module, configured to obtain data to be sent;
    编译模块,设置为将所述待发送数据编译为二进制信息;以及Compiling a module configured to compile the data to be transmitted into binary information;
    发送模块,设置为通过发光二极管LED发送所述二进制信息。The transmitting module is configured to transmit the binary information through the LED.
  15. 如权利要求14所述的装置,其中,所述发送模块设置为通过所述LED的灭亮状态,发送所述二进制信息中的0及1。The apparatus of claim 14, wherein the transmitting module is configured to transmit 0 and 1 of the binary information by a blinking state of the LED.
  16. 如权利要求14所述的装置,其中,所述发送模块设置为通过设置的专用调试LED发送所述二进制信息;通过复用电源LED控制处于调试状态的电源LED发送所述二进制信息;通过复用运行LED控制处于调试状态的运行LED发送所述二进制信息;或者通过复用告警LED控制处于调试状态的告警LED发送所述二进制信息。The apparatus of claim 14, wherein the transmitting module is configured to transmit the binary information through a set dedicated debug LED; to control the power LED in a debug state to transmit the binary information by multiplexing the power LED; The running LED that operates the LED control in the debug state sends the binary information; or the binary LED is sent by controlling the alarm LED in the debug state by multiplexing the alarm LED.
  17. 如权利要求14所述的装置,其中,所述编译模块设置为采用设备代码、字段1、字段2、……、字段n以及校验码组合的帧结构,将所述待发送数据编译为二进制信息,所述设备代码包括设备互联网协议IP地址和设备访问密码中的至少一种,字段i包括标识i及标识i对应的数值i,1≤i≤n,i和n为整数。The apparatus according to claim 14, wherein said compiling module is configured to compile said data to be transmitted into a binary using a frame structure of a device code, a field 1, a field 2, ..., a field n, and a check code combination. Information, the device code includes at least one of a device internet protocol IP address and a device access password, and the field i includes a value i corresponding to the identifier i and the identifier i, 1≤i≤n, and i and n are integers.
  18. 如权利要求14至17任一项所述的装置,其中,所述发送模块设置为根据物理发送协议确定LED数量,通过对应数量的LED发送所述二进制信息。 The apparatus of any of claims 14 to 17, wherein the transmitting module is arranged to determine the number of LEDs according to a physical transmission protocol, the binary information being transmitted by a corresponding number of LEDs.
  19. 一种数据接收装置,包括:A data receiving device includes:
    采集模块,设置为使用摄像头捕捉数据发送终端的发光二极管LED状态;The acquisition module is configured to capture the LED status of the data transmitting terminal by using the camera;
    解析模块,设置为解析LED状态获取二进制信息;以及Parsing module, set to parse the LED state to obtain binary information;
    解译模块,设置为将所述二进制信息解译为待接收数据。An interpreting module configured to interpret the binary information as data to be received.
  20. 如权利要求19所述的装置,其中,所述解析模块设置为通过所述LED的灭亮状态,确定所述二进制信息中的0及1。The apparatus of claim 19, wherein the parsing module is configured to determine 0 and 1 of the binary information by a light-off state of the LED.
  21. 如权利要求19所述的装置,其中,所述采集模块设置为采用颜色模型的明亮度识别方法,对所述LED的灭亮状态进行识别,若亮度大于预设阈值,则LED状态为亮,若亮度不大于预设阈值,则LED状态为灭。The device of claim 19, wherein the acquisition module is configured to identify a light-off state of the LED by using a brightness recognition method of a color model, and if the brightness is greater than a preset threshold, the LED state is bright. If the brightness is not greater than the preset threshold, the LED status is off.
  22. 如权利要求19所述的装置,其中,所述采集模块在使用摄像头捕捉数据发送终端的LED状态之前,还设置为在所述数据发送终端的LED周围设置提纯设备,使用所述摄像头通过提纯设备捕捉数据发送终端的LED状态。The device according to claim 19, wherein the acquisition module is further configured to set a purification device around the LED of the data transmission terminal before using the camera to capture an LED state of the data transmission terminal, and use the camera to pass the purification device Capture the LED status of the data transmitting terminal.
  23. 如权利要求19所述的装置,其中,所述采集模块在使用摄像头捕捉数据发送终端的LED状态之前,还设置为设置识别区域,根据所述识别区域放置所述数据发送终端的LED,使用摄像头捕捉数据发送终端的所述识别区域内的LED状态。The apparatus according to claim 19, wherein said acquisition module is further configured to set an identification area, and to place an LED of said data transmission terminal according to said identification area, using a camera, before capturing an LED state of the data transmission terminal using the camera The LED status in the identification area of the data transmitting terminal is captured.
  24. 如权利要求23所述的装置,其中,所述采集模块设置为采用腐蚀与膨胀的图像处理算法,对所述摄像头的采集图像去除噪点,计算图像中LED的最大区域面积,当所述最大区域面积与所述识别区域的面积的百分比大于百分比阈值时,LED状态为亮,当所述百分比不大于所述百分比阈值时,LED状态为灭。The apparatus according to claim 23, wherein said acquisition module is configured to adopt an image processing algorithm of corrosion and expansion, to remove noise from the captured image of said camera, and to calculate a maximum area of the LED in the image, when said maximum area When the percentage of the area to the area of the identification area is greater than a percentage threshold, the LED status is bright, and when the percentage is not greater than the percentage threshold, the LED status is off.
  25. 如权利要求19至27任一项所述的装置,其中,所述采集模块设置为使用摄像头在拍照取景模式下连续采集图像,对连续图像进行识别;或者,使 用摄像头在录制模式下录制视频,将视频分解为多帧图像,分别对所述多帧图像进行识别。The apparatus according to any one of claims 19 to 27, wherein the acquisition module is configured to continuously acquire an image in a photographing and framing mode using a camera to identify a continuous image; or The video is recorded in the recording mode by the camera, and the video is decomposed into multi-frame images, and the multi-frame images are respectively identified.
  26. 一种数据传输系统,包括:如权利要求14至18任一项所述的数据发送装置以及如权利要求19至25任一项所述的数据接收装置;其中,A data transmission system comprising: the data transmitting apparatus according to any one of claims 14 to 18; and the data receiving apparatus according to any one of claims 19 to 25;
    所述数据发送装置设置为获取待发送数据,将所述待发送数据编译为二进制信息,以及通过发光二极管LED发送所述二进制信息;以及The data transmitting apparatus is configured to acquire data to be transmitted, compile the data to be transmitted into binary information, and transmit the binary information through a light emitting diode LED;
    所述数据接收装置设置为使用摄像头捕捉数据发送终端的LED状态,解析LED状态获取二进制信息,以及将所述二进制信息解译为待接收数据。The data receiving device is configured to capture an LED status of the data transmitting terminal using the camera, parse the LED status to obtain binary information, and interpret the binary information as data to be received.
  27. 一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-13中任一项的方法。 A non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of claims 1-13.
PCT/CN2017/072981 2016-02-19 2017-02-06 Data sending method and device, receiving method and device, and transmission method and system WO2017140220A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610095097.8 2016-02-19
CN201610095097.8A CN107104729A (en) 2016-02-19 2016-02-19 Data transmission method for uplink and device, method of reseptance and device, transmission method and system

Publications (1)

Publication Number Publication Date
WO2017140220A1 true WO2017140220A1 (en) 2017-08-24

Family

ID=59625604

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/072981 WO2017140220A1 (en) 2016-02-19 2017-02-06 Data sending method and device, receiving method and device, and transmission method and system

Country Status (2)

Country Link
CN (1) CN107104729A (en)
WO (1) WO2017140220A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611717A (en) * 2020-05-27 2020-09-01 中国科学技术大学 Display device and method for simulating characteristics of multi-bit wide nixie tube
WO2022152808A1 (en) * 2021-01-18 2022-07-21 Signify Holding B.V. Communication using light emission and camera

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108132154B (en) * 2017-12-08 2021-08-06 佛吉亚歌乐电子(丰城)有限公司 Method for wirelessly collecting vehicle-mounted machine fault information by using screen brightness
CN111784997A (en) * 2020-07-10 2020-10-16 威海北洋电气集团股份有限公司北京分公司 Data transmission method and system based on lamplight
CN112069041B (en) * 2020-09-30 2024-05-17 中孚安全技术有限公司 Physical isolation data transmission teaching method and system based on hard disk indicator lamp

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070147843A1 (en) * 2005-12-27 2007-06-28 Ryuhei Fujiwara Apparatus, system, method, and program for visible light communication
CN103117802A (en) * 2013-02-05 2013-05-22 西安电子科技大学 Communication method on basis of rate adaptation in visible light communication system
CN103295518A (en) * 2012-02-29 2013-09-11 深圳光启创新技术有限公司 Method and system for introducing car information in car exhibition
CN103560831A (en) * 2013-10-31 2014-02-05 华北水利水电大学 Lighting device with information transmission function and lighting device information transmission method
CN104683028A (en) * 2013-11-30 2015-06-03 哈尔滨智木科技有限公司 Wireless communication device based on high power light emitting diode (LED)
CN104883448A (en) * 2015-06-05 2015-09-02 深圳市智诺微智能电子科技有限公司 Method and reception device for transmission data by using smartphone LED lamp

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105115973A (en) * 2015-08-28 2015-12-02 武汉邮电科学研究院 Equipment monitoring system and method based on visible light communication

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070147843A1 (en) * 2005-12-27 2007-06-28 Ryuhei Fujiwara Apparatus, system, method, and program for visible light communication
CN103295518A (en) * 2012-02-29 2013-09-11 深圳光启创新技术有限公司 Method and system for introducing car information in car exhibition
CN103117802A (en) * 2013-02-05 2013-05-22 西安电子科技大学 Communication method on basis of rate adaptation in visible light communication system
CN103560831A (en) * 2013-10-31 2014-02-05 华北水利水电大学 Lighting device with information transmission function and lighting device information transmission method
CN104683028A (en) * 2013-11-30 2015-06-03 哈尔滨智木科技有限公司 Wireless communication device based on high power light emitting diode (LED)
CN104883448A (en) * 2015-06-05 2015-09-02 深圳市智诺微智能电子科技有限公司 Method and reception device for transmission data by using smartphone LED lamp

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611717A (en) * 2020-05-27 2020-09-01 中国科学技术大学 Display device and method for simulating characteristics of multi-bit wide nixie tube
CN111611717B (en) * 2020-05-27 2023-04-07 中国科学技术大学 Display device and method for simulating characteristics of multi-bit wide nixie tube
WO2022152808A1 (en) * 2021-01-18 2022-07-21 Signify Holding B.V. Communication using light emission and camera

Also Published As

Publication number Publication date
CN107104729A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
WO2017140220A1 (en) Data sending method and device, receiving method and device, and transmission method and system
WO2016123947A1 (en) Method and device for transmitting and identifying data mapping mode
CN204335086U (en) A kind of intelligent desk lamp
CN105115973A (en) Equipment monitoring system and method based on visible light communication
CN110583100A (en) Group of devices formed by analyzing device control information
US11817900B2 (en) Visible light communication detecting and/or decoding
CN104702844A (en) Voice-based network camera configuration method
CN107231247A (en) The method and device of information is transmitted to other equipment with the LED of smart mobile phone
WO2016145592A1 (en) Communication establishing method, device and terminal, and router
CN104796807B (en) A kind of bluetooth headset, bluetooth headset connection system and connection method
CN112132079B (en) Method, device and system for monitoring students in online teaching
CN207637250U (en) A kind of device identifying failure by LED flashing modes
CN112232287A (en) Face recognition method and device
CN108551366B (en) Visible light communication method based on LED and mobile phone camera
CN110929051A (en) Integrated system and method for controlling music, vision and light through image recognition
WO2017000767A1 (en) Ambient light acquisition and analysis method and acquisition and analysis device thereof
CN108132154B (en) Method for wirelessly collecting vehicle-mounted machine fault information by using screen brightness
CN112069041B (en) Physical isolation data transmission teaching method and system based on hard disk indicator lamp
CN204129949U (en) Remote information transmitter and a kind of telepilot
CN210119872U (en) VR uses supervise device based on operation function
CN103871201A (en) Fatigue driving intelligent alarming system based on electroencephalogram control and method thereof
CN204180205U (en) A kind of network monitoring compatible platform
CN203108180U (en) Intelligent game system based on identification code
CN210038806U (en) Student classroom comprehensive evaluation system based on face recognition
CN111784997A (en) Data transmission method and system based on lamplight

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17752652

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17752652

Country of ref document: EP

Kind code of ref document: A1