Wine testing equipment with automatic network switching function and network switching method thereof
By disconnecting the network connection and USB communication function of the wine test equipment, or setting it to slave device mode, the 'one machine and two network' problem when the wine test equipment communicates with the railway system equipment is solved, and safe data transmission and network security are achieved. Protect.
Patent Information
- Application Number
- CN202311024199.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-02-21
AI Technical Summary
Existing wine testing equipment is likely to lead to "one machine and two networks" when communicating with railway system equipment, causing information leakage, virus infection and network security threats.
After detecting the USB connection, disconnect the network connection of the wine test device, disconnect the USB communication function of the network module, or set to slave device mode through the USB protocol, only allow railway system equipment to actively read information from the wine test device to prevent information leakage.
It effectively prevents the occurrence of "one machine and two networks", ensures the security of data transmission when communicating with railway system equipment, avoids the risk of information leakage, and protects the network security of railway system.
Smart Images

Figure CN119497175A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of information security, and in particular relates to a wine testing device with automatic network switching and a network switching method thereof. Background Art
[0002] The alcohol tester is a device used to detect whether locomotive crew members have been drinking before going to work. If the crew members have been drinking, they will not be allowed to work.
[0003] Breathalyzers are also used for rental locomotives, returned locomotives, track inspection vehicles, and for spot checks on the work status of employees at each station. The breathalyzer needs to be connected to the railway system to upload the measured data. Since the railway system is connected to a highly secure local area network, and the breathalyzer also has a network module and can access the Internet to achieve time calibration, firmware upgrades and other functions, when the breathalyzer data is uploaded to the railway equipment through the breathalyzer, when the breathalyzer is connected to the railway system equipment via a data cable, there will be a "one machine, two networks" situation, that is, one end of the breathalyzer is connected to the network of the railway system equipment through the USB serial port, and the other end is connected to the Internet through the network module.
[0004] "One machine, two networks" can cause confidential information leaks, virus infections, illegal intrusions by lawbreakers and other network hazards, seriously affecting the safe operation of important railway information systems and even threatening railway transportation safety. In serious cases, the leakage of state secrets caused by "one machine, two networks" may even violate the law. Summary of the invention
[0005] The present invention provides a wine testing device with automatic network switching and a network switching method thereof, which are used to solve the problem of "one machine with two networks" which is difficult to avoid from a technical level.
[0006] In order to solve the above technical problems, the technical solutions included in the present invention and the beneficial effects corresponding to the technical solutions are as follows:
[0007] The present invention provides a solution for a network switching method of a wine testing device with automatic network switching. When it is detected that the wine testing device is connected to a railway system device via a USB, the wine testing device performs one or more of the following steps: disconnecting its own network connection, disconnecting the USB communication of its own network module, and setting the USB connection to a master-slave mode in which its own device is a slave device, so as to avoid the problem of security risks to railway system data caused by the wine testing device being connected to an external network when communicating with the railway system device.
[0008] The beneficial effects of the above technical scheme are: when the present invention is connected to the railway system equipment via a USB data cable, the network connection of the wine testing equipment is disconnected through a program, or the USB communication function of the network module of the wine testing equipment is disconnected, or through the master-slave mode in the USB protocol, only the railway system as the master device is allowed to actively read information from the wine testing equipment, and information is prohibited from flowing from the railway system to the wine testing equipment. From a technical level, the occurrence of "one machine with two networks" is prevented, data transmission is realized in a safe environment, the risk of information leakage is avoided, and the network security of the railway system is protected.
[0009] Furthermore, the alcohol testing device disconnects its own network connection in the following manner: the railway system equipment starts the ADB debugging bridge, and when the alcohol testing device determines that the ADB debugging bridge is turned on, it cuts off the networking and / or power supply of its own network module through a preset program.
[0010] The railway system equipment turns on the ADB debugging bridge of the wine testing device, thereby realizing the reading of data in the wine testing device. The present invention uses the startup of the debugging bridge as a sign, and actively disconnects from the network or cuts off the power to the network module when the ADB debugging bridge is started, thereby facilitating and accurately identifying that the wine testing device is connected to the railway system. The solution does not affect the networking of the wine testing device when it is connected to other devices via USB in other situations, and at the same time realizes automatic disconnection when connected to the railway system.
[0011] Furthermore, the power supply of the network module is cut off by changing the level of the enable pin of the power chip of the network module power supply.
[0012] Furthermore, the network module is disconnected from the network by changing the level of the radio frequency control pin of the network module.
[0013] Furthermore, the USB communication of the network module is disconnected in the following manner: the data port of the network module is connected to the network module data line through a USB multiplexing switch, the data port is connected to the selection pin of the USB multiplexing switch, and the normally-on pin of the USB multiplexing switch is connected to the network module data line; by changing the USB multiplexing switch control pin level, the normally-on pin is connected to the selection pin not connected to the data port, thereby realizing the disconnection of the USB communication of the network module.
[0014] A USB multiplexing switch, for example, a two-choice USB multiplexing switch, is set on the USB data line of the network module. The USB communication port of the network module is connected to one of the enabling ports of the multiplexing switch, and the other enabling port of the multiplexing switch is left vacant. When the wine testing equipment is connected to the railway system equipment, the USB communication of the network module can be disconnected by adjusting the normally-on port of the multiplexing switch to connect to the vacant enabling port.
[0015] Furthermore, the USB_ID pin used to identify the master and slave devices is connected to the USB multiplex switch control pin. When the wine testing device is connected to the railway system device via USB, the USB_ID pin level is pulled high, the railway system device is set as the master device, and the level of the USB multiplex switch control pin is changed at the same time.
[0016] The USB_ID pin used to identify the master and slave devices is connected to the USB multiplexing switch control pin. When the wine testing device is connected to the railway system equipment, since the railway system equipment is set as the master device, the USB_ID pin is at a high level at this time, and the level signal is transmitted to the multiplexing switch control pin. At the same time, the switching of the multiplexing switch is realized, the port connected to the network module is cut out, and the vacant port is connected, completing the master-slave setting while realizing the cutting off of the USB communication of the network module.
[0017] The present invention also provides a solution for a wine testing device with automatic network switching, comprising a wine testing module for realizing alcohol detection, a network module for connecting to the Internet, and a USB interface for connecting to railway system equipment to upload wine testing data; when it is detected that the wine testing device is connected to the railway system equipment via USB, the wine testing device does one or more of the following: disconnecting its own network connection, disconnecting the USB communication of its own network module, and setting the USB connection to a master-slave mode in which its own device is a slave device, so as to avoid the problem of security risks to railway system data caused by the wine testing device being connected to an external network when communicating with the railway system equipment.
[0018] Furthermore, the alcohol testing device disconnects its own network connection in the following manner: the railway system equipment starts the ADB debugging bridge, and when the alcohol testing device determines that the ADB debugging bridge is turned on, it cuts off the networking and / or power supply of its own network module through a preset program.
[0019] Furthermore, the power supply of the network module is cut off by changing the level of the enable pin of the power chip of the network module power supply.
[0020] Furthermore, the network module is disconnected from the network by changing the level of the radio frequency control pin of the network module.
[0021] Furthermore, the data port of the network module is connected to the network module data line through a USB multiplexing switch, the data port is connected to the selection pin of the USB multiplexing switch, and the normally-on pin of the USB multiplexing switch is connected to the network module data line; by changing the USB multiplexing switch control pin level, the normally-on pin is connected to the selection pin not connected to the data port, thereby realizing the USB communication disconnection of the network module.
[0022] Furthermore, the USB_ID pin used to identify the master and slave devices is connected to the USB multiplex switch control pin. When the wine testing device is connected to the railway system device via USB, the USB_ID pin level is pulled high, the railway system device is set as the master device, and the level of the USB multiplex switch control pin is changed at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a diagram of a network switching method of a wine testing device with automatic network switching in the present invention;
[0024] Figure 2 This is a schematic diagram of a 4G module disconnection control circuit in an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of a 4G module power supply circuit in an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of a data communication circuit of a 4G module in an embodiment of the present invention;
[0027] Figure 5 It is a circuit diagram of the best embodiment of the present invention. DETAILED DESCRIPTION
[0028] The specific implementation of the present invention will be further described below in conjunction with the accompanying drawings.
[0029] Method Example:
[0030] The network switching method of the present invention is applicable to the alcohol testing device with automatic network switching of the present invention. The alcohol testing device with automatic network switching of the present invention comprises an alcohol testing module for realizing alcohol detection, a network module for connecting to the Internet, and a USB interface for connecting to railway system equipment to upload alcohol testing data. When the alcohol testing device is connected to the railway system via a USB data cable, the network module connection of the alcohol testing device itself will be disconnected by combining the following three methods to prevent the occurrence of "one machine with two networks" and avoid the risk of information leakage, so as to realize safe information transportation that transmits data only to railway system equipment.
[0031] like Figure 1 As shown, among the three methods, one is to judge through the program. When the ADB debugging bridge is opened, the power supply of the network module of the wine testing device is directly cut off, making the network module unable to work, or the network module is disconnected from the network through the RF pin; the second is to cut off the USB signal of the network module through the level signal to ensure that the device cannot form "one machine with two networks" and protect the security of the railway system network; the third is to switch the wine testing device to slave mode through the USB protocol. Only the railway system device as the master device can read the information of the wine testing device as the slave device. The wine testing device cannot read the information of the railway system equipment, thereby preventing information from leaking from the wine testing device.
[0032] In this embodiment, the network module of the wine testing device that can achieve external communication adopts a 4G module in a MINIPCIE slot, and a TPS54325PWP power chip is used to power the 4G module. Taking this as an example, the network switching method of the wine testing device is described in detail, specifically:
[0033] The 4G module is disconnected from the network and the power supply is turned off through program judgment:
[0034] The alcohol testing device is a smart terminal running the Android operating system. After connecting to the alcohol testing device, the railway system equipment uses the ADB debugging bridge (ADB stands for Android Debug Bridge) to operate the Android and Linux systems of the alcohol testing device to transfer files, such as the duty status of crew members sampled by the alcohol testing device. When the alcohol testing device is connected to the railway system equipment via USB, the railway system equipment starts the ADB debugging bridge of the alcohol testing device and prepares for data transmission. When the program of the alcohol testing device determines that the ADB debugging bridge is turned on, it determines that the physical connection between itself and the railway system equipment is completed, and it needs to interrupt other communications between itself and the external network.
[0035] The network disconnection control circuit (RF control circuit) of the 4G module is as follows Figure 2 As shown, the 4G module's pin 20 is a radio frequency control pin, which obtains a high level through a voltage divider circuit including resistors R3 and R9. At the same time, the pin is also grounded through the collector and emitter of transistor Q1 to achieve low-level control. The base of transistor Q1 is connected to the 4G module radio frequency on-off control pin of the wine test device processor through resistor R2, and the emitter junction of transistor Q1 is connected in parallel with a conduction resistor R5. When the 20th radio frequency control pin is at a high level, the 4G module is disconnected from the network, and when it is at a low level, it is connected to the network. When the wine test device is not connected to the railway system equipment, the 4G module radio frequency on-off control pin is at a high level, the transistor Q1 is turned on, the ground level of the radio frequency control pin is pulled down, and the wine test device can be connected to the network through the 4G module. After the wine test device (processor) determines that the ADB debug bridge is turned on through a preset program, it gives a low level to the 4G module radio frequency on-off control pin, controls the transistor Q1 to be cut off, and the radio frequency control pin obtains a high level through the voltage divider circuit, and the wine test device disconnects the 4G network.
[0036] The power supply circuit of the 4G module is as follows Figure 3As shown, the power supply uses the TPS54325PWP power chip U1, which converts the 7.4V battery voltage into a 3.3V voltage for the 4G module. Pin 7 of the power chip is the enable pin of the chip, and a voltage divider circuit including resistors R7 and R8 is provided at the pin, and the 4G module power enable pin of the wine testing device processor is connected at the same time. After the wine testing device (processor) determines that the ADB debug bridge is turned on through a preset program, it pulls down the level of the 4G module power enable pin through a preset program, turns off the power chip U1 that powers the 4G module, cuts off the power supply to the 4G module, and the wine testing device disconnects from the 4G network. When the wine testing device is not connected to the railway system equipment, the 4G module power enable pin is at a high level, and the 4G module power chip U1 normally powers the 4G module.
[0037] Through the above two methods of disconnecting the 4G module and cutting off the power, when the alcohol test equipment and the railway system equipment transmit information, only the railway system equipment has a network, and the alcohol test equipment cannot connect to any external network, thereby completing the safe transmission of information. Disconnecting the network and cutting off the power can be used separately or at the same time to prevent the failure of a certain link from causing the failure of disconnection, and further ensure the information security of the railway system.
[0038] The purpose of disconnecting the 4G network is to cut off the data communication of the 4G module through the USB level signal:
[0039] like Figure 4 As shown, the present invention uses a USB multiplexing chip TS3USB221A in the data port of the 4G module. The data port of the 4G module is Figure 4 The 36th and 38th pins (USB_D-, USB_D+) of the 4G module are connected to the first selection pin of the USB multiplexing chip. Figure 4 The 1st and 2nd pins (1D+, 1D-) of the USB multiplexing chip U2; the second selection pin of the USB multiplexing chip, that is, Figure 4 The 3rd and 4th pins (2D+, 2D-) of the USB multiplexing chip U2 are vacant; the normally connected pins of the USB multiplexing chip, i.e. Figure 4 The 8th and 7th pins (D+, D-) of the USB multiplexing chip U2 are connected to the CPU of the wine testing device through the subsequent network module data line.
[0040] Under normal circumstances, the control pin of the USB multiplexing chip U2, i.e., pin 9 (S), is at a low level. At this time, the first selection pin is connected to the normally-on pin, and the 4G module and the CPU complete data interaction through the USB multiplexing chip U2, thereby realizing the external network communication function of the wine testing device. When the wine testing device is connected to the railway system equipment, a high level is given to the control pin of the USB multiplexing chip U2, and the USB multiplexing chip U2 is switched to the second selection pin and the normally-on pin. Since the second selection pin is vacant, the interaction between the 4G module and the internal data of the wine testing device is cut off. This also realizes the independence of data interaction between the wine testing device and the railway system equipment, avoids dual networks on one machine, and ensures the security of railway system data.
[0041] Furthermore, the control pin of the USB multiplexing chip U2 is connected to the USB_ID pin of the USB interface used to connect the railway system equipment. According to the USB protocol, when the alcohol test device is connected to the railway system equipment through USB, the railway system equipment as the master device will pull up the level of the USB_ID pin, and the alcohol test device will detect the level of the USB_ID pin. If a high level is detected, the alcohol test device will switch to the slave device mode; in this process, since the control pin of the USB multiplexing chip U2 is connected to the USB_ID pin, in the process of completing the master-slave device setting, the high level of the USB_ID pin is used to switch the multiplexing chip U2 to the second selection pin and the normally open pin, cutting off the data interaction between the alcohol test device and its own 4G module, completing the disconnection of the 4G module data port, and ensuring the safe transmission of information.
[0042] Switch the wine tester to slave mode via USB protocol:
[0043] When the wine testing device and the railway system device are connected via USB, as described above about the USB protocol, the railway system device pulls the USB_ID pin to a high level, the railway system device is set as the master device, and the wine testing device is set as a slave device. According to the USB communication protocol, the master device can control the slave device and read and write files, while the slave device cannot read and write the master device, thereby completing secure information transmission.
[0044] As the best implementation method, the above three network disconnection methods are implemented simultaneously after connecting to the railway system equipment to avoid data security risks in the railway system due to failure of any link. When the wine testing device is connected to the railway system equipment via USB, the USB level signal and USB master-slave mode will react first, disconnecting the USB signal of the 4G module and completing the master-slave setting, and then the program judges to complete the network disconnection and power shutdown of the 4G module. The three methods are applied simultaneously to further ensure the safe information transmission between the wine testing device and the railway system equipment.
[0045] Device Example:
[0046] The hardware structure and working principle of the wine testing device with automatic network switching of the present invention have been clearly introduced in the embodiment of the network switching method of the wine testing device with automatic network switching, and will not be repeated here. The complete circuit diagram corresponding to the best embodiment of the present invention is shown in FIG. Figure 5 shown.
[0047] The specific implementation methods of the present invention are given above, but the present invention is not limited to the described implementation methods. Under the idea given by the present invention, the technical means in the above-mentioned embodiments are transformed, replaced, and modified in a way that is easy for a person skilled in the art to think of, and the effect is basically the same as the corresponding technical means in the present invention, and the purpose of the invention is basically the same. The technical solution formed in this way is formed by fine-tuning the above-mentioned embodiments, and this technical solution still falls within the protection scope of the present invention.
Claims
1. A network switching method for a wine testing device with automatic network switching, characterized in that: When it is detected that the alcohol testing device is connected to the railway system equipment via USB, the alcohol testing device does one or more of the following: disconnecting its own network connection, disconnecting the USB communication of its own network module, setting the USB connection to a master-slave mode with its own device as a slave, to avoid security risks to the railway system data caused by the alcohol testing device being connected to the external network while communicating with the railway system equipment.
2. The network switching method of the wine testing device with automatic network switching according to claim 1, characterized in that: The alcohol testing device disconnects its own network connection in the following way: the railway system equipment starts the ADB debugging bridge. When the alcohol testing device determines that the ADB debugging bridge is turned on, it cuts off the networking and / or power supply of its own network module through a preset program.
3. The network switching method of the wine testing device with automatic network switching according to claim 2, characterized in that: The power supply of the network module is cut off by changing the level of the enable pin of the power chip of the network module power supply; the network module is disconnected from the network by changing the level of the RF control pin of the network module.
4. The network switching method of the wine testing device with automatic network switching according to claim 1, characterized in that: The USB communication of the network module is disconnected in the following manner: the data port of the network module is connected to the network module data line through a USB multiplexing switch, the data port is connected to the selection pin of the USB multiplexing switch, and the normally-on pin of the USB multiplexing switch is connected to the network module data line; by changing the USB multiplexing switch control pin level, the normally-on pin is connected to the selection pin not connected to the data port, thereby realizing the disconnection of the USB communication of the network module.
5. The network switching method of the wine testing device with automatic network switching according to claim 4, characterized in that: The USB_ID pin used to identify the master and slave devices is connected to the USB multiplex switch control pin. When the wine testing device is connected to the railway system device via USB, the USB_ID pin level is pulled high, the railway system device is set as the master device, and the level of the USB multiplex switch control pin is changed at the same time.
6. A wine testing device with automatic network switching, characterized in that: The invention comprises a wine testing module for realizing alcohol detection, a network module for connecting to the Internet and a USB interface for connecting to railway system equipment to upload wine testing data; when it is detected that the wine testing device is connected to the railway system equipment via USB, the wine testing device performs one or more of the following steps: disconnecting its own network connection, disconnecting the USB communication of its own network module, and setting the USB connection to a master-slave mode in which the own device is a slave device, so as to avoid the problem of security risk of railway system data caused by the wine testing device being connected to the external network when communicating with the railway system equipment.
7. The wine testing device with automatic network switching according to claim 6, characterized in that: The alcohol testing device disconnects its own network connection in the following way: the railway system equipment starts the ADB debugging bridge. When the alcohol testing device determines that the ADB debugging bridge is turned on, it cuts off the networking and / or power supply of its own network module through a preset program.
8. The wine testing device with automatic network switching according to claim 7, characterized in that: The power supply of the network module is cut off by changing the level of the enable pin of the power chip of the network module power supply; the network module is disconnected from the network by changing the level of the RF control pin of the network module.
9. The wine testing device with automatic network switching according to claim 6, characterized in that: The data port of the network module is connected to the network module data line through a USB multiplexing switch, the data port is connected to the selection pin of the USB multiplexing switch, and the normally-on pin of the USB multiplexing switch is connected to the network module data line; by changing the USB multiplexing switch control pin level, the normally-on pin is connected to the selection pin not connected to the data port, thereby realizing the USB communication disconnection of the network module.
10. The wine testing device with automatic network switching according to claim 9, characterized in that: The USB_ID pin used to identify the master and slave devices is connected to the USB multiplex switch control pin. When the wine testing device is connected to the railway system device via USB, the USB_ID pin level is pulled high, the railway system device is set as the master device, and the level of the USB multiplex switch control pin is changed at the same time.