Abstract:
It divides the network communication protocol for the communication between automobile into a software protocol layer (L1), a signal protocol layer and a physical protocol layer wherein the software protocol layer is used for checking coding and decoding the data required to be sent and received by a system, and the signal protocol layer is used for performing combined coding of data package signals and basic light signal on data packages produced by the software protocol layer according to the protocol agreement, and the physical protocol layer is used for converting digital signals and light signals mutually. A device comprises a light receiving apparatus arranged at the head of the automobile and a light emitting device, which collects the operating status information of automobile, performs information exchange with surrounding automobiles through digital information, arranged at the tail of the automobile.

Description:
[0001]    This application is the U.S. national phase of International Application No. PCT/CN2013/089775 Filed on on 18 Dec. 2013 which designated the U.S. and claims priority to Chinese Application Nos. CN201310533122.2 filed on 30 Oct. 2013, the entire contents of each of which are hereby incorporated by reference. 
       FIELD OF THE INVENTION 
       [0002]    This invention involves intelligent transportation and intelligent automobile research field, to be specific, it involves an automobile lamp device and a method for emitting signals through light thereof. 
       BACKGROUND OF THE INVENTION 
       [0003]    With the continuous development of economy and transportation, automobiles have become people&#39;s indispensable means of transportation. But with the constant improvement of automobile usage rate, traffic accidents also present a rising trend year by year. According to statistics, in all motor automobile accidents, the traffic accidents caused by lane departure account for twenty percent of all traffic accidents, therefore, in recent years, many research institutions at home and abroad have begun the study on automotive active safety technology. 
         [0004]    The automotive active safety systems provided by the existing technology adopt radar and camera sensors, these systems judge the driving states of surrounding automobile through signal processing method; when finding there is a potential danger, they can judge in advance and avoid the occurrence of accident by means of warning and auxiliary brake. 
         [0005]    But these studies have focused on passive receiving sensors like camera and radar, through the ways of signal processing and computer vision algorithm, they are able to judge the occurrence of dangerous situation; their essence is an estimation and approximation to the driving mode of surrounding automobile. The accuracy of this kind of estimation and approximation depends not only on the design of signal processing and algorithm, but also on the external environmental factors. For example, the active safety system based on camera sensor will generate false alarm and inspection omission when working at night; the active safety system based on radar sensor will present large deviation in the automobile lateral motion component. 
         [0006]    Therefore, the defects of existing systems are mainly summed up into two points: 1. The algorithm dependence is high; 2. There are more conditions limited by the inherent characteristics of sensor. These defects will make the systems lose their functions and significances. 
       SUMMARY OF THE INVENTION 
       [0007]    The purpose of this invention is to provide automobile lamp device and the method for it to transfer signals through lamplight, realize the signal emitting between the front automobile and rear automobile, effectively judge the potential dangerous situation and improve the driving safety of automobile so as to solve the problem of poor reliability of automotive active safety systems which prevent traffic accidents due to collision of automobile in the existing technology. 
         [0008]    To achieve the above purpose, the scheme of this invention is as follows: 
         [0009]    A kind of automobile lamp device, including the head lamp arranged at the head of the automobile and tail lamp arranged at the tail of the automobile. Inside the head lamp, there is a lamp light receiving apparatus; inside the tail light, there is a lamp light emitting apparatus. the aforesaid lamp light emitting apparatus is composed of bus data receiver, emitting end microcontroller, lamp driver and lamps, The input end of aforesaid bus data receiver connects with the automobile&#39;s CAN bus, it&#39;s used to collect the operating data of the automobile. The input end of aforesaid emitting end microcontroller connects with the output end of bus data receiver, it&#39;s used to acquire the operating data of the automobile and check the code. The output end of emitting end microcontroller connects with the input end of lamp driver, it&#39;s used to generate data after checking coding. The output end of aforesaid lamp driver drives and connects with the tail lamps described, it&#39;s used to drive the luminance of tail lamps; the aforesaid tail lamps are used to generate the light signals including the operating data of the automobile and send them out. 
         [0010]    The aforesaid lamp light receiving apparatus is composed of lens, photosensitive module and receiving end microcontroller, the aforesaid lens is used to conduct focusing processing for the light signal received and send the light signal processed to photosensitive module. The aforesaid photosensitive module connects with AD port of receiving end microcontroller, it&#39;s used to send the voltage signal converted from light signal to receiving end microcontroller. The output end of aforesaid receiving end microcontroller connects with the input end of automobile controller, it&#39;s used to conduct analog-digital conversion and filtering processing for the voltage signal it receives, and output control signal to automobile controller. 
         [0011]    The aforesaid lamp light receiving apparatus and lamp light emitting apparatus include the software protocol layer, signal protocol layer and physical protocol layer. The emitting end microcontroller and the receiving end microcontroller constitute software protocol layer and signal protocol layer. The lamp driver, lamp, lens and photosensitive module constitute physical protocol layer, and the software protocol layer is used for checking coding and decoding the data required to be sent and received, generating data package signal. The signal protocol layer is used for combined coding for the key light signal and data package signals produced by the software protocol layer, and the physical protocol layer is used for converting digital signals and light signals mutually. 
         [0012]    The aforesaid photosensitive module receives the ray of light focused by the lens and samples the ray of light with the predetermined frequency, converts the optical signal after sampling into voltage signal, then conducts operational amplification for the above-mentioned voltage signal; then it sends the amplified voltage signal to AD acquisition port of receiving end microcontroller, then processes the acquired signal and obtains the final digital signal, thus completing the receiving of digital signal. 
         [0013]    The check code of data is obtained from the automobile&#39;s operational data through code check, add the aforesaid check code to the tail of automobile&#39;s operational data, then the data after code check is obtained. 
         [0014]    The photosensitive module is photosensitive sensor. 
         [0015]    This invention also provides a method of signal transmission through ray of light by using above device, it includes the following steps: 
         [0016]    (1) Lamp light receiving apparatus is set in the head lamps of front and rear automobile respectively, and lamp light emitting apparatus is set in the tail lamps; the aforesaid lamp light receiving apparatus and lamp light emitting apparatus both include software protocol layer, signal protocol layer and physical protocol layer. The software protocol layer of lamp light emitting apparatus includes check encoder and the software protocol layer in lamp light receiving apparatus includes check decoder. The signal protocol layer in lamp light emitting apparatus includes data package signal transmitter, basic light generator and data signal generator, the signal protocol layer in lamp light receiving apparatus includes data package signal receiver, the physical protocol layer in lamp light emitting apparatus includes signal modulator and lamplight generator and the physical protocol layer in lamp light receiving apparatus includes light signal receiver and signal demodulator. 
         [0017]    (2) The lamp light emitting apparatus in the front automobile collects its own operational data via bus and the check encoder of software protocol layer conducts check coding for the aforesaid operational data, thus obtaining the check code of operational data, then it transmits the data after code check to data package signal transmitter; check code is used to check the data sent and received in signal protocol layer. 
         [0018]    (3) The data signal generator in the signal protocol layer of lamp light emitting apparatus of the front automobile waits for the rising edge of key light signal generated by key light generator, when receiving the rising edge signal, it will, according to the data package generated by data package signal generator, generate data signal waveform. The data signal waveform combines with the key light signal waveform, after signal modulation, analog-modulated luminance signal is generated, and the modulated PWM signal which corresponds to analog-modulated luminance signal will drive the tail lamps through voltage driver and generate optical signal, through the luminance difference of optical signal, the data that needs to be sent will be contained in the ray of tail light, sent to air medium in the form of luminance and received by the rear automobile, thus completing data transmission. 
         [0019]    (4) The photosensitive module in the light signal receiver in the physical protocol layer of lamp light receiving apparatus in the rear automobile receives the optical signal sent by the front automobile, after filtering and deburring for the analog signal received by photosensitive module by the filter module, the filtrated signal is obtained, then analog-digital converter will obtain the signal through analog-digital conversion for the filtrated signal. Through sampling average for the electrical level of reference voltage calibration start cycle, reference signal is obtained; input the signal obtained by analog-digital converter and the reference signal to signal comparator for signal comparison, digital signal is obtained, thus completing data receiving. 
         [0020]    The lamp light receiving apparatus of rear automobile will compare the digital signal it gets with its own position and speed data, obtaining the relative position relationship between the front automobile and the rear automobile; if there is a risk of collision, the rear automobile will immediately take the corresponding braking measure. 
         [0021]    The rear automobile receives the speed and position information sent by the front automobile and compares the information with its own speed and position information, obtaining the time of collision that is about to happen to the automobile, namely: 
         [0000]    
       
         
           
             T 
             = 
             
               
                 
                   
                     
                       ( 
                       
                         
                           x 
                           B 
                         
                         - 
                         
                           x 
                           A 
                         
                       
                       ) 
                     
                     2 
                   
                   + 
                   
                     
                       ( 
                       
                         
                           y 
                           B 
                         
                         - 
                         
                           y 
                           A 
                         
                       
                       ) 
                     
                     2 
                   
                 
               
               
                 
                   V 
                   A 
                 
                 - 
                 
                   V 
                   B 
                 
               
             
           
         
       
     
         [0022]    Of which, T is the time of collision that is about to happen to the two automobile, when T is less than 2s, indicating there is a potential risk of collision, the automobile controller of rear automobile will control the braking system to fill oil; when T is less than 1s, the automobile controller of rear automobile will control brake pedal to take braking measure; 
         [0023]    Of which: V B  represents the speed of front automobile; 
         [0024]    (x B , y B ) represents GPS positioning coordinates of front automobile; 
         [0025]    V A  represents the speed of rear automobile; 
         [0026]    (x A , y A ) represents the GPS positioning coordinates of rear automobile. 
         [0027]    The analog signal received by aforesaid photosensitive module is: 
         [0000]        S   rec   =f ( S   send )+ N   air    
         [0000]    Of which, S rec  is the analog signal received, S send  is original optical signal, f( ) is attenuation function in the process of optical propagation, N air  is outside noise signal. 
         [0028]    The check coding method for the operational data of automobile in Step (2) is: 
         [0000]    
       
         
           
             v 
             = 
             
               
                 256 
                 × 
                 
                   ( 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         0 
                       
                       N 
                     
                      
                     
                       
                         f 
                         1 
                       
                        
                       
                         ( 
                         
                           d 
                           i 
                         
                         ) 
                       
                     
                   
                   ) 
                 
               
               + 
               
                 ( 
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       0 
                     
                     N 
                   
                    
                   
                     
                       f 
                       2 
                     
                      
                     
                       ( 
                       
                         d 
                         i 
                       
                       ) 
                     
                   
                 
                 ) 
               
             
           
         
       
       
         
           
             
               
                 
                   f 
                   1 
                 
                  
                 
                   ( 
                   
                     d 
                     i 
                   
                   ) 
                 
               
               = 
               
                 
                   ∑ 
                   
                     j 
                     = 
                     0 
                   
                   7 
                 
                  
                 
                   ( 
                   
                     
                       ( 
                       
                         
                           
                             d 
                             i 
                           
                           &amp; 
                         
                          
                         
                           ( 
                           
                             1 
                              
                             
                               &lt;&lt; 
                               j 
                             
                           
                           ) 
                         
                       
                       ) 
                     
                     &gt;&gt; 
                     j 
                   
                   ) 
                 
               
             
             , 
             
               i 
               = 
               0 
             
             , 
             1 
             , 
             2 
             , 
             
               … 
                
               
                   
               
                
               N 
             
           
         
       
       
         
           
             
               
                 
                   f 
                   2 
                 
                  
                 
                   ( 
                   
                     d 
                     i 
                   
                   ) 
                 
               
               = 
               
                 
                   ∑ 
                   
                     j 
                     = 
                     0 
                   
                   7 
                 
                  
                 
                   
                     ( 
                     
                       
                         ( 
                         
                           
                             
                               d 
                               i 
                             
                             &amp; 
                           
                            
                           
                             ( 
                             
                               1 
                                
                               
                                 &lt;&lt; 
                                 j 
                               
                             
                             ) 
                           
                         
                         ) 
                       
                       &gt;&gt; 
                       j 
                     
                     ) 
                   
                   _ 
                 
               
             
             , 
             
               i 
               = 
               0 
             
             , 
             1 
             , 
             2 
             , 
             
               … 
                
               
                   
               
                
               N 
             
           
         
       
     
         [0000]    Of which, N is the length of signal level, v is the final check code, the value range of d i  is integers from 0 to 255, f 1 (d i ) represents the number of binary digits whose value is 1 in d 1 , f 2 (d i ) represents the number of binary digits whose value is 0 in d i . 
         [0029]    The signal protocol layer stipulates the reference luminance calibration start cycle as follows: set valid period of lamplight in the signal protocol layer; after the rising edge of valid period of lamplight is generated, the carrier luminance whose duration is the first predetermined cycle will be generated, and this first predetermined cycle is the reference luminance calibration start cycle. 
         [0030]    The check code of data is obtained through check coding of automobile&#39;s operational data, after the aforesaid check code is added to the tail of automobile&#39;s operational data, the data after code check is obtained. 
         [0031]    This method is used to check the data received in the physical protocol layer in lamp light receiving apparatus: within reference luminance calibration start cycle and reference luminance calibration stop cycle, sample the optical signal received by rear automobile respectively and obtain two reference luminance voltage averages, if their voltage difference is greater than 5%, the signal received shall be deemed invalid, the data received this time shall be discarded; the aforesaid reference luminance calibration stop cycle means that the carrier luminance whose duration is the second predetermined cycle is sent after the data signal is sent, the duration of the second predetermined cycle is the reference luminance calibration stop cycle. 
         [0032]    The method is used to check the data sent and received in signal protocol layer: when the data received in physical protocol layer is valid, in the signal protocol layer of lamp light receiving apparatus, when the data received by the rear automobile is inconsistent with the data sent from the front automobile in check code, the data received this time shall be discarded. 
         [0033]    The beneficial effects achieved by this invention: (1) This invention conducts protocol coding processing for the automobile&#39;s operational data collected by bus data receiver in accordance with software protocol layer and signal protocol layer, and sends the encoded data to lamp driver, the latter will drive the luminance of automobile tail lamps; through the difference of tail light luminance, the data that needs to be sent is contained in the ray of tail lamps, so as to effectively realize the communication between automobile, lamps and automobile and lamps; it&#39;s helpful to realize intelligent transportation and intelligent automobile, thus improving the driving safety and effectively reducing the potential accidents. 
         [0034]    (2) This invention enables the drivers and automobile to realize information interaction in the form of quantifiable information—digit, it can make the computer more accurately judge the status of automobile around the driving environment, precisely judge the potential danger and improve driving safety; at the same time, this invention is also helpful to realize car networking and provide effective equipment support for intelligent transportation and network transportation. 
         [0035]    (3) The method of this invention is to check the data received after the luminance information is received; judgment is made through the voltage difference of average values of reference luminance voltage before and after the reference luminance calibration cycle; if the voltage different is greater than 5%, it will be deemed that the signal received is greatly affected by environment in the emitting process and the data received is invalid and shall be discarded. 
         [0036]    (4) This invention further checks the data received and sent in signal protocol layer; when finding the check codes for the data sent and received are inconsistent after check, the data sent this time shall be deemed invalid and shall be discarded; through twin check, the accuracy to judge the potential danger of car crash will be further improved and the automobile driving safety will be improved. 
         [0037]    (5) This invention makes the lamp light receiving apparatus and lamp light emitting apparatus installed inside the automotive lamps, which can not only make the lamps have the function of lighting, but also realize the optical communication between automobile. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0038]      FIG. 1  is the structural diagram for the installation of automotive lamp device in this invention; 
           [0039]      FIG. 2  is the structural schematic diagram of lamp device in this invention; 
           [0040]      FIG. 3  is the structural schematic diagram of signal amplifier in this invention; 
           [0041]      FIG. 4  is the contrast diagrams of actual sending signal and the actual sampling signal in this invention; 
           [0042]      FIG. 5  is the structural schematic diagram of protocol layers in this invention method; 
           [0043]      FIG. 6  is the light signal luminance and timing sequence agreement in this invention; 
           [0044]      FIG. 7  is the flow diagram of this invention method; 
           [0045]      FIG. 8  is the process to encode the automobile data signal collected into optical signal; 
           [0046]      FIG. 9  is the process to decode the optical signal into digital signal; 
           [0047]      FIG. 10  is the luminosity diagram of voltage value on the lamplight; 
           [0048]      FIG. 11  is the schematic diagram of signal receiving process in this invention. 
       
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
       [0049]    Next, this invention will be further explained in detail by combining with the figures. Example of device implementation for this invention: 
         [0050]    As shown in  FIG. 1 , the lamp device in this invention includes the head lamps installed at the head of the automobile and the tail lamps installed at the tail of the automobile; inside the head lamp, there is lamp light emitting apparatus E 1  and inside the tail light, there is lamp light receiving apparatus E 2 . 
         [0051]    In this implementation example, the lamp light emitting apparatus is mounted on the CAN bus of automobile, collect the data that the automobile itself needs to send, such as speed data, brake pedal data and accelerator data, etc; when automobile A travels to the rear of automobile B, because the lamp light receiving apparatus in head lamp of automobile A aligns with the lamp light emitting apparatus in tail light of automobile B, automobile A can receive the data sent by automobile B, such as speed data, brake pedal data and accelerator data, etc. 
         [0052]    As shown in  FIG. 2 , the lamp light emitting apparatus E 1  in this implementation example consists of bus data receiver E 1 A, emitting end microcontroller E 1 B, lamp driver E 1 C and tail light HD; lamp light receiving apparatus E 2  consists of lens E 2 C, photosensitive module E 2 B and receiving end microcontroller E 2 A; among them, the photosensitive module is a photosensitive sensor. 
         [0053]    The input end of bus data receiver E 1 A connects with CAN bus of automobile, responsible for collecting the automobile state information on the CAN bus of automobile, receiving and sending the automobile state information to emitting end microcontroller E 1 B, the latter will send the state information in the form of packet. 
         [0054]    The input end of emitting end microcontroller E 1 B connects with the output end of bus data receiver, receiving the automobile state information sent from bus data receiver E 1 A; it conducts coding processing for the automobile state information and sends the encoded data to lamp driver E 1 C, the latter will drive the luminance of tail lamps. 
         [0055]    The input end of lamp driver E 1 C connects with the output end of emitting end microcontroller, receiving the data sent by emitting end microcontroller E 1 B; the output end driver of lamp driver connects with tail light E 1 D, realizing the drive to tail light E 1 D. 
         [0056]    Tail light E 1 D, on the basis of the traditional lamp lighting effect, realizes containing the data that needs to be sent in the ray of lamplight through the luminance difference of lamp and sending it in the form of light. 
         [0057]    The role of lens E 2 C is to conduct focusing processing for the light received and control the focus on photosensitive sensor E 2 B. 
         [0058]    Photosensitive sensor E 2 B receives the ray of light focused by lens E 2 C, samples the light with certain frequency and converts the optical signal after sampling into the corresponding voltage signal, conducts operational amplification to voltage signal and sends the amplified voltage signal to AD acquisition port of receiving end microcontroller E 2 A; the schematic circuit of operational amplification is shown in  FIG. 3 . 
         [0059]    AD acquisition port of receiving end microcontroller E 2 A connects with photosensitive sensor E 2 B, the receiving end microcontroller E 2 A collects the voltage signal from photosensitive sensor E 2 B through AD acquisition port, the voltage collected is as shown in  FIG. 4 ; the receiving end microcontroller E 2 A conducts analog-digital conversion and filtering processing for the signal collected, thus getting the final digital signal. 
         [0060]    As shown in  FIG. 5 , the lamp light emitting apparatus and lamp light receiving apparatus in this implementation example are divided into software protocol layer L1, signal protocol layer L2 and physical protocol layer L3. Software protocol layer L1 is responsible for check encoding and decoding for the data that the device needs to send and receive, including check encoder L 1 A and check decoder L 1 B. Check encoder L 1 A will obtain the check code through calculating the signal data that the device needs to send and add the check code to the tail of numeric string. 
         [0061]    The check encoding method for data is: 
         [0000]    
       
         
           
             v 
             = 
             
               
                 256 
                 × 
                 
                   ( 
                   
                     
                       ∑ 
                       
                         i 
                         = 
                         0 
                       
                       N 
                     
                      
                     
                       
                         f 
                         1 
                       
                        
                       
                         ( 
                         
                           d 
                           i 
                         
                         ) 
                       
                     
                   
                   ) 
                 
               
               + 
               
                 ( 
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       0 
                     
                     N 
                   
                    
                   
                     
                       f 
                       2 
                     
                      
                     
                       ( 
                       
                         d 
                         i 
                       
                       ) 
                     
                   
                 
                 ) 
               
             
           
         
       
       
         
           
             
               
                 
                   f 
                   1 
                 
                  
                 
                   ( 
                   
                     d 
                     i 
                   
                   ) 
                 
               
               = 
               
                 
                   ∑ 
                   
                     j 
                     = 
                     0 
                   
                   7 
                 
                  
                 
                   ( 
                   
                     
                       ( 
                       
                         
                           
                             d 
                             i 
                           
                           &amp; 
                         
                          
                         
                           ( 
                           
                             1 
                              
                             
                               &lt;&lt; 
                               j 
                             
                           
                           ) 
                         
                       
                       ) 
                     
                     &gt;&gt; 
                     j 
                   
                   ) 
                 
               
             
             , 
             
               i 
               = 
               0 
             
             , 
             1 
             , 
             2 
             , 
             
               … 
                
               
                   
               
                
               N 
             
           
         
       
       
         
           
             
               
                 
                   f 
                   2 
                 
                  
                 
                   ( 
                   
                     d 
                     i 
                   
                   ) 
                 
               
               = 
               
                 
                   ∑ 
                   
                     j 
                     = 
                     0 
                   
                   7 
                 
                  
                 
                   
                     ( 
                     
                       
                         ( 
                         
                           
                             
                               d 
                               i 
                             
                             &amp; 
                           
                            
                           
                             ( 
                             
                               1 
                                
                               
                                 &lt;&lt; 
                                 j 
                               
                             
                             ) 
                           
                         
                         ) 
                       
                       &gt;&gt; 
                       j 
                     
                     ) 
                   
                   _ 
                 
               
             
             , 
             
               i 
               = 
               0 
             
             , 
             1 
             , 
             2 
             , 
             
               … 
                
               
                   
               
                
               N 
             
           
         
       
     
         [0000]    Of which, N is the length of signal level, v is the final check code, the value range of d i  is integers from 0 to 255, f 1 (d i ) represents the number of binary digits whose value is 1 in d i , f 2 (d i ) represents the number of binary digits whose value is 0 in d i . 
         [0062]    The signal protocol layer L2 is responsible for the realization of combined coding of data package signal and key light signal for the data package generated by software protocol layer L1 in accordance with the provisions of the protocol; it&#39;s composed of data package signal transmitter L 2 A, key light generator L 2 B, data signal generator L 2 C and signal receiver L 2 D; among them, the data package signal transmitter L 2 A, key light generator L 2 B and data signal generator L 2 C are used to complete signal transmission and data package signal receiver L 2 D is used to complete signal receiving. 
         [0063]    Physical protocol layer L3 is used for the mutual conversion of digital signal and optical signal in this invention; it&#39;s composed of emitting end signal modulator L 3 A, lamplight generator L 3 B, receiving end light signal receiver L 3 D and signal demodulator L 3 C. 
         [0064]    In this implementation example, the emitting end microcontroller and the receiving end microcontroller constitute software protocol layer and signal protocol layer; lamp driver, lamp, lens, and photosensitive module constitute physical protocol layer. 
         [0065]    This invention stipulates voltage and timing specifications for the optical signal generated by the signal protocol layer L2, including low level signal voltage S 1 , reference luminance calibration start cycle S 2 , signal transmission cycle S 3 , reference luminance calibration stop cycle S 4 , carrier voltage S 5 , high level signal voltage S 6  and lamplight valid period S 7 ; the working relationships between voltage and timing specifications stipulated are as follows: 
         [0066]    As shown in  FIG. 6 , after the rising edge of light valid period S 7  is generated, carrier luminance S 5  whose duration is reference luminance calibration start cycle S 2  will be generated, then, the system will, according to the binary data signal generated by data signal generator L 2 C, of which, the luminance of data signal 1 is high level signal luminance S 6 , PWM waveform S 11  corresponds with it; the luminance of data signal 0 is low level signal luminance S 1 , PWM waveform S 12  corresponds with it, after experiencing the time duration of signal transmission cycle S 3 , the data signal transmission is completed, the system will begin to transmit the carrier luminance S 5  whose duration is reference luminance calibration stop cycle S 4 . 
         [0067]    According to the above protocols, the specific process for the lamp light receiving apparatus in this implementation example to receive the digital signal is as follows: 
         [0068]    According to the voltage and timing specifications for light signal defined in  FIG. 6 , the receiving end microcontroller E 2 A compares the detected rising edge signal with threshold value; when signal value is greater than the threshold, it will judge the valid period S 7  of light has begun; according to reference luminance calibration start cycle S 2  stipulated in the protocol, the average value of acquisition voltage in this period of time will be calculated to serve as carrier voltage S 5 ; compare the sampling value with carrier voltage S 5 , if the sampling value is greater than the predetermined threshold value, signal high level will be judged; otherwise, signal low level will be judged. 
         [0069]    The total time for sampling of digital signal is the signal transmission period S 3  stipulated in the protocol; after the sampling time reaches the duration of signal transmission period S 3 , collect the voltage average within the duration of reference luminance calibration cycle S 4 , compare the value with carrier voltage S 5 ; if they are equal, the sampling physical layer this time is valid; otherwise, the sampling physical layer this time is invalid. If the sampling physical layer this time is valid, for signal data S 9  and check data S 10  which are obtained through sampling within signal transmission period S 3 , the receiving end microcontroller E 2 A will judge through calculation, if the computed result of signal data S 9  is equal to check data S 10 , the sampling signal layer this time is valid; otherwise, the sampling signal layer this time is invalid; for the data obtained through sampling by receiving end microcontroller E 2 A within one light valid period, if the physical layer and signal layer are both valid, the sampling this time is successful, then the data receiving and transmission this time is successful. 
         [0070]    The following will specifically describe an application example of lamp device in this invention in anti-collision of automobile. 
         [0071]    As shown in  FIG. 1 , when automobile A drives to the rear of automobile B, the lamp light emitting apparatus in tail light of automobile B will collect the data that automobile B needs to send, namely: automobile speed V B  and automobile GPS positioning coordinates (x B , y B ) , which will be sent by lamp light emitting apparatus in automobile B; after automobile A receives the automobile speed V B  and automobile GPS positioning coordinates (x B , y B ) sent by automobile B, through comparison with automobile A&#39;s own speed V A  and its own GPS positioning coordinates (x A  , y A ) , the time of collision that is about to happen to the two automobile will be obtained, namely: 
         [0000]    
       
         
           
             T 
             = 
             
               
                 
                   
                     
                       ( 
                       
                         
                           x 
                           B 
                         
                         - 
                         
                           x 
                           A 
                         
                       
                       ) 
                     
                     2 
                   
                   + 
                   
                     
                       ( 
                       
                         
                           y 
                           B 
                         
                         - 
                         
                           y 
                           A 
                         
                       
                       ) 
                     
                     2 
                   
                 
               
               
                 
                   V 
                   A 
                 
                 - 
                 
                   V 
                   B 
                 
               
             
           
         
       
     
         [0072]    T is the time of collision obtained through calculation, when T is less than 2s, it indicates there is a potential risk of collision, automobile A will begin fill oil to braking system; when T is less than 1s, it indicates the risk of collision is further improved, collision will happen if braking measure is not adopted, so braking measure shall be adopted by controlling brake pedal. 
         [0073]    The method implementation example of this invention: 
         [0074]    As shown in  FIG. 7 , the method of this invention includes the following steps: 
         [0075]    (1) A lamp light receiving apparatus is set inside the head lamps of front automobile and rear automobile and a lamp light emitting apparatus is set inside the tail lamps respectively; the aforesaid lamp light receiving apparatus and lamp light emitting apparatus both include a software protocol layer, a signal protocol layer and a physical protocol layer; the software protocol layer in lamp light emitting apparatus includes check encoder; the software protocol layer in lamp light receiving apparatus includes check decoder; the signal protocol layer in lamp light emitting apparatus includes data package signal transmitter, key light generator and data signal generator; the signal protocol layer in lamp light receiving apparatus includes data package signal receiver; the physical protocol layer in lamp light emitting apparatus includes signal modulator and lamplight generator; the physical protocol layer in lamp light receiving apparatus includes light signal receiver and signal demodulator; 
         [0076]    (2) The lamp light emitting apparatus of front automobile collects its own operational data via bus and the check encoder in software protocol layer conducts code check for the aforesaid operational data, gets the check code of operational data and sends the data after code check to data package signal transmitter; the check code is used for checking the data sent and received in signal protocol layer . (3) The data signal generator in signal protocol layer of lamp light emitting apparatus in the front automobile waits for the rising edge of key light signal generated by key light generator, when it receives the rising edge signal, it will, according to the data package generated by data package signal transmitter, generate data signal waveform and combine the data signal waveform with the key light signal waveform, after signal modulation, it will generate analog-modulated luminance signal, which will drive the tail lamps through voltage driver together with modulated PWM signal which corresponds to analog-modulated luminance signal and generate optical signal; through the luminance difference of optical signal, the data package that needs to be sent is contained in the tail lamps and sent to air medium in the form of luminance, and it&#39;s received by rear automobile, thus data transmission is completed; 
         [0077]    (4) The photosensitive module in light signal receiver in physical protocol layer of lamp light receiving apparatus in the rear automobile receives the optical signal sent by the front automobile, after filtering and deburring by filter module for analog signal received by photosensitive module, the filtrated signal is obtained, then through analog-digital conversion for the filtrated signal, the analog-digital converter gets the signal, through sampling average for the electric level of reference voltage calibration start cycle, reference signal is obtained; input the signal obtained by analog-digital converter and reference signal to the signal comparator for signal comparison, digital signal is obtained, thus data receiving is completed. 
         [0078]    As shown in  FIG. 8 , the signal transmission process of this invention is as follows: 
         [0079]    A data signal generator L 2 C in signal protocol layer L2 will wait for the rising edge signal generated by key light generator L 2 B; when receiving the rising edge signal, it will, according to the data package generated by data package signal transmitter L 2 A, generate data signal waveform D 1 ; combine D 1  with key light signal waveform D 2 , through signal modulator L 3 A), according to the signal luminance and timing specifications defined in  FIG. 2 , analog-modulated luminance signal D 3  will be generated, then analog-modulated luminance signal D 3  will be converted into modulated PWM signal D 4 , the latter will drive LED through LED voltage driver and generate light signal D 6 , which will be sent to air medium in the form of luminance. 
         [0080]    When lamp light emitting apparatus collects the following digital signal strings that need to be sent: 1, 2, 3, 4, 5, 6, 7, 8 and 9, the binary system modes of such data are 00000001, 00000010, 00000011, 00000100, 00000101, 00000110, 00000111, 00001000 and 00001001; according to the calculation formula of check code, the check code of these digital signal strings is 3897, their binary system is 0000111100111001, through signal modulator, digital signal strings and their check code are packed into the following data package : 00000001000000100000001100000100000001010000011000000111000010000000100100001111001 11001; then transform these signals to PWM values that need to be sent within each data bit cycle through signal modulator; since the data package is too long, here, PWM duty ratio of carrier luminance and the PWM duty ratios of the first eight digits of data package are listed, they are as follows respectively: 
         [0081]    carrier voltage is 50%; voltage values of the first eight digits of data package are 30%, 30%, 30%, 30%, 30%, 30% and 70%. The luminosity of these duty ratios reflected on the light is as shown in  FIG. 9 . 
         [0082]    As shown in  FIG. 9 , the signal receiving process of this invention is as follows: 
         [0083]    Light signal D 6  which is sent by transmitter is received by photosensitive sensor in light signal receiver L 3 D, due to light attenuation in the air medium and the limitation of the sensitivity of the sensor itself, the received analog signal can be expressed as: 
         [0000]        S   rec   =f ( S   send )+ N   air    
         [0084]    Of which, S send  is the original signal light at the light emitting end, f( ) is attenuation function in the process of light propagation, N air  is external noise signal.  FIG. 4  is the schematic diagram for the S rec  signal received. After the signal filtering by filter module, signal deburring will be conducted for photosensitive sensor analog signal R 2 , the filtrated signal R 3  will be obtained, after analog-digital conversion for filtrated signal R 3 , the analog-digital converter obtains signal R 4 , through sampling average for the electric level within the duration of reference luminance calibration start cycle S 2 , reference signal R 5  is obtained; input the signal R 4  obtained by analog-digital converter and reference signal R 5  to signal comparator R 6  for signal comparison, digital signal R 7  is obtained. 
         [0085]    As shown in  FIG. 10 , when the lens of receiving device aligns with lamp light emitting apparatus of lamps, it can convert the luminance change it senses through photosensitive module into voltage value. We can see from  FIG. 11  that, there are more interference signals and burrs for the actual voltage value measured by the photosensitive module, through the calculation of receiving end microcontroller, the calculated reference luminance voltage value is 1.5 mv, through the comparison of filtrated digital signal voltage value and reference voltage value 1.5 mv, the voltage difference obtained is respectively: 
         [0086]    v1=−0.21mv,v2=−0.20mv,v3=−0.19mv,v4=−0.19mv,v5=−0.20mv,v6=−0.21mv,v7=−0.22mv,v8=0.20mv,then the digital signal after comparison is 0,0,0,0,0,0,0,1. 
         [0087]    For the propagation of light signal in the air can be easily affected by weather and surrounding environment, in this implementation case, twin check mechanism including a physical protocol layer and a signal protocol layer is designed to ensure the accuracy of data received: 
         [0088]    (1) Check of physical protocol layer 
         [0089]    In the physical protocol layer, sampling is made respectively within the two cycles including reference luminance calibration start cycle S 2  and reference luminance calibration stop cycle S 4  by receiving end microcontroller, the average values Vs and Ve for reference luminance voltage are obtained; if the voltage difference of these two reference voltages is greater than five percent, it will be judged that this section of signal is greatly affected by environmental light within the sending cycle, the receiving end microcontroller will discard the data received this time in the physical layer. 
       (2) Check of Signal Protocol Layer 
       [0090]    After the data checked in physical layer is valid, further check will be done for the data received in signal protocol layer: assuming that the data that needs to be sent by lamp light emitting apparatus is: 
         [0091]    00000001, 00000010, 00000011, 00000100, 00000101, 00000110, 00000111, 00001000, 00001001 
         [0092]    While the data which is actually received by lamp light receiving apparatus of lamp is 
         [0093]    00000011, 00000010, 00000011, 00000110, 00000101, 00000110, 00000111, 00001000, 00001001 
         [0094]    We can discover from the data of implementation example that the receiving of the first digit and the fourth digit is wrong; through the check code calculation formula for the data, the check code of data sent is 3897, while the check code of received data which is calculated by receiving end microcontroller is 4407, we can find through comparison that the two check codes are inconsistent, so the signaling layer check fails, the receiving end microcontroller will automatically discard the data it receives. 
         [0095]    An application example of this invention method in anti-collision of automobile: 
         [0096]    Data sending and receiving are conducted according to the method in above implementation example, the lamp light receiving apparatus of rear automobile compares the speed V B  and GPS position coordinates (x B , y B ) of front automobile with its own speed V A  and its own GPS positioning coordinates (x A  , y A ) , then obtaining the time of collision that is about to happen to the two automobile, namely: 
         [0000]    
       
         
           
             T 
             = 
             
               
                 
                   
                     
                       ( 
                       
                         
                           x 
                           B 
                         
                         - 
                         
                           x 
                           A 
                         
                       
                       ) 
                     
                     2 
                   
                   + 
                   
                     
                       ( 
                       
                         
                           y 
                           B 
                         
                         - 
                         
                           y 
                           A 
                         
                       
                       ) 
                     
                     2 
                   
                 
               
               
                 
                   V 
                   A 
                 
                 - 
                 
                   V 
                   B 
                 
               
             
           
         
       
     
         [0097]    T is the time of collision obtained through calculation, when T is less than 2s, it indicates there is a potential risk of collision, automobile A will begin fill oil to braking system; when T is less than 1s, it indicates the risk of collision is further improved, collision will happen if braking measure is not adopted, so braking measure shall be adopted by controlling brake pedal. 
         [0098]    In this implementation example, the layering of network communication protocol and the interrelation of various protocol layers are the same as those in the implementation example of above device; the specific process for twin check of data in physical protocol layer and signal protocol layer is the same as that in the implementation example of above device, it will not be repeated here.