Data transmission control methods, devices, and electronic equipment using Type-C interfaces
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2026-08-14
AI Technical Summary
然而,通过Type-C接口同时进行供电和数据传输,会存在数据遭受窃取或篡改的潜在风险,无法保证数据传输的安全性
[0017]通过本申请提供的技术方案,医疗数据采集终端中的中央处理器可在判断医疗数据采集终端经直流电源供电后,控制开启Type-C接口的供电功能;进一步获取Type-C接口在供电状态下,网络接口的电平周期变化信息以及复位按键的按键按压信息;之后通过识别电平周期变化信息和按键按压信息,确定是否满足Type-C接口的数据传输控制条件;若确定满足Type-C接口的数据传输控制条件,则控制开启Type-C接口的串口功能,以使Type-C接口作为数据交互接口进行数据传输。本公开中的技术方案,可在利用Type-C接口进行数据传输之前,进行Type-C接口的数据传输控制条件的判断,在判断符合Type-C接口的数据传输控制条件之后,才允许Type-C接口作为数据交互接口进行数据传输。此操作能够对Type-C接口供电和数据传输功能加以区分,避免Type-C接口接入充电时,自动进行数据传输,进而能够降低数据遭受窃取或篡改的风险,确保Type-C接口在数据传输场景下的安全性。
Smart Images

Figure CN117271407B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data transmission control method, apparatus, and electronic device with a Type-C interface. Background Technology
[0002] Existing devices with embedded Android systems are typically equipped with a Type-C interface, which can be used to power the device and also as a data transmission interface for data interaction with the device.
[0003] In existing technologies, the power supply and data transmission functions of the Type-C interface are not strictly distinguished, meaning users can perform both power supply and data transmission simultaneously through the Type-C interface. However, performing both power supply and data transmission simultaneously through the Type-C interface poses a potential risk of data theft or tampering, compromising data transmission security. Summary of the Invention
[0004] This application provides a data transmission control method, device, and electronic device for a Type-C interface, which can distinguish between the power supply and data transmission functions of the Type-C interface, ensuring the security of data transmission scenarios using the Type-C interface.
[0005] Firstly, a data transmission control method for a Type-C interface is provided. This method is applied to a central processing unit in a medical data acquisition terminal, which further includes a Type-C interface, a network interface, and a reset button. The data transmission control method for the Type-C interface includes:
[0006] After determining that the medical data acquisition terminal is powered by a DC power supply, the power supply function of the Type-C interface is enabled.
[0007] Obtain the level cycle change information of the network interface and the button press information of the reset button when the Type-C interface is powered on;
[0008] By identifying the level cycle change information and the button press information, it is determined whether the data transmission control conditions of the Type-C interface are met;
[0009] If so, then the serial port function of the Type-C interface is enabled so that the Type-C interface can be used as a data interaction interface for data transmission.
[0010] Secondly, a data transmission control device with a Type-C interface is provided. This device is applied to the central processing unit in a medical data acquisition terminal. The medical data acquisition terminal further includes a Type-C interface, a network interface, and a reset button. The device comprises:
[0011] The control module is used to control the power supply function of the Type-C interface to be turned on after determining that the medical data acquisition terminal is powered by DC power.
[0012] The acquisition module is used to acquire the level cycle change information of the network interface and the button press information of the reset button when the Type-C interface is powered on.
[0013] The determination module is used to determine whether the data transmission control conditions of the Type-C interface are met by recognizing the level cycle change information and the key press information;
[0014] The control module is also used to enable the serial port function of the Type-C interface if the data transmission control conditions of the Type-C interface are met, so that the Type-C interface can be used as a data interaction interface for data transmission.
[0015] Thirdly, an electronic device is provided, comprising: a processor and a memory for storing a computer program, the processor for calling and running the computer program stored in the memory, and performing the methods as described in the first aspect or its various implementations.
[0016] Fourthly, a computer-readable storage medium is provided for storing a computer program that causes a computer to perform the methods described in the first aspect or its various implementations.
[0017] The technical solution provided in this application allows the central processing unit (CPU) in a medical data acquisition terminal to control the power supply function of the Type-C interface after determining that the medical data acquisition terminal is powered by a DC power supply. It further acquires the voltage level cycle change information of the network interface and the button press information of the reset button while the Type-C interface is powered on. Then, by identifying the voltage level cycle change information and button press information, it determines whether the data transmission control conditions of the Type-C interface are met. If the data transmission control conditions of the Type-C interface are met, it controls the serial port function of the Type-C interface to be enabled, allowing the Type-C interface to be used as a data interaction interface for data transmission. This technical solution can determine the data transmission control conditions of the Type-C interface before using it for data transmission. Only after determining that the data transmission control conditions of the Type-C interface are met is the Type-C interface allowed to be used as a data interaction interface for data transmission. This operation can distinguish between the power supply and data transmission functions of the Type-C interface, preventing automatic data transmission when the Type-C interface is connected for charging, thereby reducing the risk of data theft or tampering and ensuring the security of the Type-C interface in data transmission scenarios.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Other features and advantages of this application will be described in detail in the subsequent detailed description section. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A schematic diagram of the interface of a medical data acquisition terminal provided in an embodiment of this application;
[0021] Figure 2 A flowchart illustrating a data transmission control method for a Type-C interface provided in an embodiment of this application;
[0022] Figure 3 A flowchart illustrating a data transmission control method for a Type-C interface provided in an embodiment of this application;
[0023] Figure 4 A schematic diagram illustrating the principle of data transmission control for a Type-C interface provided in this application embodiment;
[0024] Figure 5 A schematic diagram of a data transmission control device with a Type-C interface provided in an embodiment of this application;
[0025] Figure 6 A schematic diagram of a data transmission control device with a Type-C interface provided in an embodiment of this application;
[0026] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0029] Existing devices with embedded Android systems are typically equipped with a Type-C interface, which can be used to power the device and also as a data transmission interface for data interaction with the device.
[0030] In existing technologies, the power supply and data transmission functions of the Type-C interface are not strictly distinguished, meaning users can perform both power supply and data transmission simultaneously through the Type-C interface. However, performing both power supply and data transmission simultaneously through the Type-C interface poses a potential risk of data theft or tampering, compromising data transmission security.
[0031] Therefore, to solve the aforementioned technical problems, the inventive concept of this application is to convert the Type-C interface into a data transmission interface through a special operating method. This special operation ensures that the Type-C interface is in a secure mode during data transmission. Without this special operation, the Type-C interface can only be used for power supply and cannot be used as a data transmission interface. This operation effectively prevents unauthorized personnel from maliciously damaging data, implanting fake system images or viruses, or tampering with and stealing data through the Type-C interface, thus ensuring the security and reliability of data transmission.
[0032] It should be understood that the technical solution of this application can be applied to the central processing unit in a medical data acquisition terminal, but is not limited to:
[0033] In some possible ways, Figure 1 This application provides an embodiment of an interface diagram of a medical data acquisition terminal, as shown below. Figure 1 As shown, the medical data acquisition terminal may include the following interfaces: ①--USB interface, ②--HDMI multimedia interface, ③--SCSI*2 medical device interface, ④--Reset button, ⑤--SIM card slot, ⑥--Memory card slot, ⑦--Working status indicator, ⑧--12V DC power input port, ⑨--Network interface, ⑩--Type-C interface.
[0034] The special operation based on medical information security in this disclosure is as follows: First, power the terminal through port ⑧ (12V DC power input port). After waiting for the indicator light of port ⑨ (network interface) to "on-off" for two cycles, press port ④ (reset button) once. Two seconds later, port ⑩ (Type-C interface) will be converted into a data transmission interface. At this time, after inserting the Type-C connection cable, data interaction with the terminal can be performed through this interface. System image burning and file operations can be performed on the terminal through port ⑩ (Type-C interface). In addition, a central processing unit (CPU), counter, and timer can also be integrated into the medical data acquisition terminal. In the embodiments of this disclosure, the CPU can use the counter and timer to count whether this special operation has been completed to determine whether the data transmission control conditions of the Type-C interface are met. When it is determined that the data transmission control conditions of the Type-C interface are met, the serial port function of the Type-C interface is enabled so that the Type-C interface can be used as a data interaction interface for data transmission.
[0035] In other possible implementations, the technical solution of this application can also be executed by the aforementioned medical data acquisition terminal, or the technical solution of this application can also be executed by other terminal devices including a Type-C interface, a network interface, a reset button, and a central processing unit. This application does not impose any restrictions on this.
[0036] After introducing the application scenarios of the embodiments of this application, the technical solution of this application will be described in detail below:
[0037] Figure 2 This application provides a flowchart of a data transmission control method for a Type-C interface, which can be implemented by, for example... Figure 1 The central processing unit in the medical data acquisition terminal shown executes the data, but is not limited to this. For example... Figure 2 As shown, the method may include the following steps:
[0038] Step 110: After determining that the medical data acquisition terminal is powered by DC power, control the power supply function of the Type-C interface to be enabled.
[0039] For the medical data acquisition terminal, the DC power supply can be a 12V DC power supply, which can power the medical data acquisition terminal through port 8. The Type-C interface may include a Type-C power supply module and a Type-C serial port function module.
[0040] In this embodiment of the present disclosure, after the CPU determines that the medical data acquisition terminal is powered by a DC power supply, it can activate the Type-C power supply module. Specifically, it can send a level control signal to the Type-C power supply module to control the power supply function of the Type-C interface to be enabled, so that the Type-C interface is in a powered state.
[0041] Step 120: Obtain the network interface level cycle change information and reset button press information when the Type-C interface is powered on.
[0042] The network interface level change information includes the network interface level change cycle, i.e., the "on-off" cycle of the network interface indicator light; the reset button press information may include the number of button presses and the button press time.
[0043] In this embodiment of the present disclosure, when the CPU is powered by the Type-C interface, it can obtain the level cycle change information of the network interface and the key press information of the reset button. Based on the level cycle change information and key press information, it can determine whether the medical data acquisition terminal has completed a special operation of data transmission interface conversion. This special operation ensures that the Type-C interface is in a safe mode during data transmission. Without this special operation, the Type-C interface can only be used for power supply and cannot be used as a data transmission interface. This operation effectively prevents unauthorized personnel from maliciously damaging data, implanting fake system images or viruses, or tampering with and stealing data through the Type-C interface, thus ensuring the security and reliability of data transmission.
[0044] Step 130: By recognizing level cycle change information and key press information, determine whether the data transmission control conditions of the Type-C interface are met.
[0045] The data transmission control conditions are determined based on a special operation for data transmission interface conversion. For example, the special operation is as follows: First, power the terminal through port ⑧ (12V DC power input port). After the indicator light on port ⑨ (network interface) cycles "on-off" for two cycles, press port ④ (reset button) once. The time interval between the start of the timing module and pressing the reset button is less than 3000ms. Two seconds after the button is pressed, port ⑩ (Type-C interface) is converted to a data transmission interface. At this point, inserting a Type-C cable allows data interaction with the terminal via this interface. Correspondingly, the data transmission control conditions can be defined as: the number of periodic changes in the network interface indicator light reflected by the level cycle change information is 2, the number of times the reset button is pressed is 1, and the time interval between button presses is less than 3000ms.
[0046] In this embodiment, the CPU can determine whether the data transmission control conditions of the Type-C interface are met based on level cycle change information and key press information. As one possible implementation, when the CPU determines that the data transmission control conditions of the Type-C interface are met, it can further execute step 140 of the embodiment to enable the serial port function of the Type-C interface, so that the Type-C interface can be used as a data interaction interface for data transmission; that is, the Type-C interface can simultaneously provide power and transmit data. As another possible implementation, when the CPU determines that the data transmission control conditions of the Type-C interface are not met, it can refuse to enable the serial port function of the Type-C interface, disallowing data transmission, thereby reducing the risk of data theft or tampering. In this case, the Type-C interface is only used as a power supply interface.
[0047] Step 140: If it is determined that the data transmission control conditions of the Type-C interface are met, then the serial port function of the Type-C interface is enabled so that the Type-C interface can be used as a data interaction interface for data transmission.
[0048] The Type-C interface may include a Type-C power supply module and a Type-C serial port function module; data transmission may include system image burning and file operations on the medical data acquisition terminal, etc., without specific limitations.
[0049] In this embodiment of the disclosure, when the CPU determines that the data transmission control conditions of the Type-C interface are met, it indicates that the user has completed a special operation for the medical data acquisition terminal, namely, the authorization verification for switching data transmission corresponding to the Type-C interface. Enabling the serial port function of the Type-C interface at this time ensures the data transmission security of the medical data acquisition terminal. When enabling the serial port function of the Type-C interface, the CPU can activate the Type-C serial port function module. Specifically, it can send a level control signal to the Type-C serial port function module, enabling the Type-C interface to function as a data interaction interface with the terminal. At this time, the Type-C interface is simultaneously in power supply and data transmission states.
[0050] In summary, according to the data transmission control method for the Type-C interface provided in this application, the central processing unit in the medical data acquisition terminal can control the power supply function of the Type-C interface to be enabled after determining that the medical data acquisition terminal is powered by a DC power supply; further, it acquires the level cycle change information of the network interface and the key press information of the reset button when the Type-C interface is powered on; then, by identifying the level cycle change information and the key press information, it determines whether the data transmission control conditions of the Type-C interface are met; if it is determined that the data transmission control conditions of the Type-C interface are met, it controls the serial port function of the Type-C interface to be enabled, so that the Type-C interface can be used as a data interaction interface for data transmission. The technical solution in this disclosure can determine the data transmission control conditions of the Type-C interface before using the Type-C interface for data transmission. Only after determining that the data transmission control conditions of the Type-C interface are met is the Type-C interface allowed to be used as a data interaction interface for data transmission. This operation can distinguish between the power supply and data transmission functions of the Type-C interface, avoiding automatic data transmission when the Type-C interface is connected for charging, thereby reducing the risk of data theft or tampering and ensuring the security of data transmission through the Type-C interface.
[0051] based on Figure 2 The embodiments shown are refinements and extensions of the above embodiments. To fully illustrate the specific implementation process of the method in this embodiment, this embodiment provides the following: Figure 3 The specific method is shown. Figure 3 based on Figure 2 The illustrated embodiment further defines steps 120 and 130. Figure 2 In the illustrated embodiment, step 120 includes steps 220 and 230, and step 130 includes steps 240a and 240b. Figure 3 As shown, the method includes the following steps:
[0052] Step 210: After determining that the medical data acquisition terminal is powered by DC power, control the power supply function of the Type-C interface to be enabled.
[0053] For the specific implementation process of the embodiments disclosed herein, please refer to the relevant description in step 110 of the embodiment, which will not be repeated here.
[0054] Step 220: Send a first-level control signal to the network interface so that the network interface responds to the first-level control signal to perform periodic changes in the indicator light, and use a first counter to count the periodic changes in the indicator light to obtain a first count value.
[0055] The first level control signal can be a level control signal that periodically changes between a high level signal and a low level signal. When the first level control signal is a high level signal, the indicator light of the network interface is lit; when the first level control signal is a low level signal, the indicator light of the network interface is turned off. The first counter is used to represent the level change period of the network interface.
[0056] In specific application scenarios, after the medical data acquisition terminal is powered by a 12V DC power supply, the CPU can activate the Type-C power supply module, putting the Type-C interface into a powered state. Then, it can periodically send a first-level control signal (high-level signal → low-level signal) to the network interface, causing the network interface indicator light to respond to the first-level control signal with a periodic "on-off" change. Furthermore, the CPU can activate a level cycle counter for the network port indicator light (i.e., the first counter) to count the network port level change cycles, obtaining the first count value (abbreviated as Cnt_T) of the indicator light's "on-off" cycle change. While activating the first counter to count the network port level change cycles, a second-level control signal can be sent to the first counter. The second-level control signal is used to control the activation of the first counter. The second-level control signal can be a high-level signal that controls the activation of the first counter.
[0057] Step 230: When it is determined that the first count value has reached the first preset threshold, the second counter is used to count the number of times the reset button is pressed to obtain the second count value, and the time interval between the start time of the timer and the press time of the reset button is counted using a timer.
[0058] The first preset threshold can be set according to the actual application scenario, for example, it can be 2.
[0059] In this embodiment of the present disclosure, the CPU continuously polls the first count value Cnt_T of the first counter. When the value of Cnt_T is found to be 2, Cnt_T is set to 0, and its counting stops until the CPU restarts the terminal after the next power supply. At the same time, the reset button press counter (i.e., the second counter) and the reset button press timer (i.e., the timer) are started. The reset button press counter records the number of times the reset button is pressed (Cnt_R), and the reset button press timer records the time interval (Time) from the start of the module to the pressing of the reset button.
[0060] Accordingly, when determining that the first count value has reached the first preset threshold, the implementation steps may further include: sending a third-level control signal to the first counter, the third-level control signal being used to control the first counter to turn off and clear the first count value; sending a fourth-level control signal to the second counter, the fourth-level control signal being used to control the second counter to start; and sending a fifth-level control signal to the timer, the fifth-level control signal being used to control the timer to start. Wherein, the third-level control signal may be a low-level signal controlling the first counter to turn off; the fourth-level control signal may be a high-level signal controlling the second counter to start; and the fifth-level control signal may be a high-level signal controlling the timer to start.
[0061] Step 240a: When it is determined that the second count value reaches the second preset threshold and the time interval is less than the preset duration, the data transmission control conditions of the Type-C interface are satisfied.
[0062] The second preset threshold and preset duration can be set according to the actual application scenario. For example, the second preset threshold can be 1 and the preset duration can be 3000ms.
[0063] In this embodiment of the present disclosure, the CPU polls the values of Cnt_R and Time. When the data transmission control condition that Cnt_R equals 1 and Time is less than 3000ms is met, the Type-C serial port function module is activated, enabling the Type-C interface to be used as a data interaction interface with the terminal. If the data transmission control condition is not met, step 240b of the embodiment can be further executed, i.e., the Type-C serial port function module is not activated, and the Type-C interface is only used as a power supply interface.
[0064] When the Cnt_R value equals 1 and Time is less than 3000ms, Cnt_R and Time can be further set to 0 to stop counting until the CPU resumes operation after the terminal is powered on again. Correspondingly, when it is determined that the second count value has reached the second preset threshold and the time interval is less than a preset duration, the implementation steps may include: sending a sixth-level control signal to the second counter and a seventh-level control signal to the timer, wherein the sixth-level control signal is used to control the second counter to turn off and clear the second count value, and the seventh-level control signal is used to control the timer to turn off and clear the time interval. The sixth-level control signal may be a low-level signal that controls the second counter to turn off; the seventh-level control signal may be a low-level signal that controls the timer to turn off.
[0065] Step 250a: Enable the serial port function of the Type-C interface so that the Type-C interface can be used as a data interaction interface for data transmission.
[0066] In this embodiment of the disclosure, when the CPU determines that the data transmission control conditions of the Type-C interface are met, it indicates that the user has completed a special operation for the medical data acquisition terminal, namely, the authorization verification for switching data transmission via the Type-C interface. At this time, the CPU will control the activation of the serial port function of the Type-C interface to ensure the data transmission security of the medical data acquisition terminal. When controlling the activation of the serial port function of the Type-C interface, the CPU can activate the Type-C serial port function module. Specifically, it can send a level control signal to the Type-C serial port function module, enabling the Type-C interface to be used as a data interaction interface with the terminal. At this time, the Type-C interface is simultaneously in power supply and data transmission states.
[0067] In embodiment step 240b, which is parallel to embodiment step 240a, if it is determined that the data transmission control conditions of the Type-C interface are not met when it is determined that the second count value has not reached the second preset threshold and / or the time interval is greater than or equal to the preset duration.
[0068] To better illustrate the complete technical content of this disclosure, in conjunction with... Figure 4 The technical solution in this disclosure is described in its entirety as follows: After the medical data acquisition terminal is powered by a 12V DC power supply, the CPU starts up. Then, the CPU activates the Type-C power supply module to keep the Type-C interface powered. The CPU controls the network interface indicator light to change periodically from "on" to "off" via level control, and activates a network port indicator light level change counter (i.e., the first counter). When the first counter is successfully activated, it counts the periodic changes of the indicator light to obtain a first count value, Cnt_T. The CPU continuously polls the first count value. When it finds that Cnt_T is 2, it sets Cnt_T to 0, stopping its counting until the terminal is powered on again and the CPU activates it. Simultaneously, it starts a reset button press counter (i.e., the second counter) and a reset button press timer (i.e., the timer). The second counter records the number of times the reset button is pressed (Cnt_R), and the timer records the time interval (Time) between the module's startup and the pressing of the reset button. The CPU polls the values of Cnt_R and Time. When the conditions are met (Cnt_R equals 1 and Time is less than 3000ms), the CPU sets Cnt_R and Time to 0, stopping the counting until the terminal is powered on again. The CPU then restarts the Type-C serial port module, enabling the Type-C interface to function as a data exchange interface with the terminal. At this time, the Type-C interface can simultaneously supply power and transmit data. Data transmission may include system image burning and file operations on the medical data acquisition terminal, which are not specifically limited here. If the restart conditions are not met, the Type-C serial port module is not restarted, and the Type-C interface is only used for power supply.
[0069] In summary, the technical solution in this application distinguishes between the power supply and data transmission functions of the Type-C interface of the medical data acquisition terminal through special operating methods. Without special operation, the Type-C interface can only be used for power supply and cannot transmit data. Data transmission is only enabled after verification by the data transmission control conditions of this invention. This application ensures the information security of the medical data acquisition terminal in medical institution settings and effectively prevents unauthorized personnel from maliciously damaging the acquisition terminal system or stealing data directly through the Type-C interface.
[0070] Based on the above Figure 2 , Figure 3 A detailed description of the data transmission control methods provided for the Type-C interface, such as... Figure 5 As shown, Figure 5 This is a block diagram illustrating a data transmission control device with a Type-C interface according to an exemplary embodiment. This device can be applied to the central processing unit in a medical data acquisition terminal, which also includes a Type-C interface, a network interface, and a reset button. Figure 5 As shown, the device includes:
[0071] The control module 31 can be used to control the power supply function of the Type-C interface after determining that the medical data acquisition terminal is powered by DC power.
[0072] The acquisition module 32 can be used to acquire the level cycle change information of the network interface and the button press information of the reset button when the Type-C interface is powered on.
[0073] The determination module 33 can be used to determine whether the data transmission control conditions of the Type-C interface are met by recognizing level period change information and key press information;
[0074] The control module 31 can also be used to enable the serial port function of the Type-C interface if the data transmission control conditions of the Type-C interface are met, so that the Type-C interface can be used as a data interaction interface for data transmission.
[0075] In some embodiments of this application, the level period change information includes the level change period of the network interface, and the key press information includes at least the key press count information and key press time information. The acquisition module 32 can be used to send a first level control signal to the network interface so that the network interface responds to the first level control signal to perform periodic changes in the indicator light; use a first counter to count the periodic changes of the indicator light to obtain a first count value, wherein the first counter is used to represent the level change period of the network interface; when it is determined that the first count value reaches a first preset threshold, use a second counter to count the number of times the reset button is pressed to obtain a second count value, and use a timer to count the time interval between the start time of the timer and the press time of the reset button.
[0076] In some embodiments of this application, the determining module 33 can be used to determine that the data transmission control conditions of the Type-C interface are met when the second count value reaches the second preset threshold and the time interval is less than the preset duration; or to determine that the data transmission control conditions of the Type-C interface are not met when the second count value does not reach the second preset threshold and / or the time interval is greater than or equal to the preset duration.
[0077] In some embodiments of this application, such as Figure 6 As shown, the device also includes: a transmitting module 34;
[0078] The transmitting module 34 can be used to send a second-level control signal to the first counter, which is used to control the start of the first counter.
[0079] In some embodiments of this application, the sending module 34 can also be used to send a third level control signal to the first counter when it is determined that the first count value has reached the first preset threshold. The third level control signal is used to control the first counter to be turned off and the first count value to be cleared.
[0080] In some embodiments of this application, the sending module 34 can also be used to send a fourth level control signal to the second counter when it is determined that the first count value has reached the first preset threshold, the fourth level control signal being used to control the start of the second counter; and to send a fifth level control signal to the timer, the fifth level control signal being used to control the start of the timer.
[0081] In some embodiments of this application, the sending module 34 can also be used to send a sixth-level control signal to the second counter and a seventh-level control signal to the timer when it is determined that the second count value has reached the second preset threshold and the time interval is less than the preset duration. The sixth-level control signal is used to control the second counter to be turned off and the second count value to be cleared, and the seventh-level control signal is used to control the timer to be turned off and the time interval to be cleared.
[0082] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0083] In embodiments of this application, the data transmission control conditions of the Type-C interface are determined before data transmission is performed. Only after the data transmission control conditions of the Type-C interface are met is the Type-C interface allowed to transmit data as a data interaction interface. This operation can distinguish between the power supply and data transmission functions of the Type-C interface, preventing automatic data transmission when the Type-C interface is connected for charging. This reduces the risk of data theft or tampering and ensures the security of data transmission scenarios using the Type-C interface.
[0084] The data transmission control device for the Type-C interface of this invention has been described above from the perspective of functional modules, with reference to the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, each step of the data transmission control method embodiment for the Type-C interface in this invention can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the data transmission control method for the Type-C interface claimed in this invention can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above-described data transmission control method embodiment for the Type-C interface.
[0085] Figure 7 This is a schematic block diagram of an electronic device 800 according to an embodiment of the present invention.
[0086] like Figure 7 As shown, the electronic device 400 may include:
[0087] The system includes a memory 410 for storing computer programs and a processor 420 for transferring program code to the processor 420. In other words, the processor 420 can retrieve and run the computer program from the memory 410 to implement the methods described in the embodiments of the present invention.
[0088] For example, the processor 420 can be used to execute the above-described method embodiments according to instructions in the computer program.
[0089] In some embodiments of the present invention, the electronic device 420 may include, but is not limited to:
[0090] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0091] In some embodiments of the present invention, the memory 410 includes, but is not limited to:
[0092] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0093] In some embodiments of the present invention, the computer program may be divided into one or more modules, which are stored in the memory 410 and executed by the processor 420 to perform the method provided by the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the controller.
[0094] like Figure 7 As shown, the electronic device 400 may further include:
[0095] Transceiver 430, which can be connected to processor 420 or memory 410.
[0096] The processor 420 can control the transceiver 430 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 430 may include a transmitter and a receiver. The transceiver 430 may further include antennas, and the number of antennas may be one or more.
[0097] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.
[0098] The present invention also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the methods of the above-described method embodiments. Alternatively, one embodiment of the present invention also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods of the above-described method embodiments.
[0099] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., Digital Video Disc (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)).
[0100] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments claimed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0101] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or modules may be electrical, mechanical, or other forms.
[0102] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0103] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A data transmission control method for a Type-C interface, characterized in that, The method is applied to the central processing unit in a medical data acquisition terminal, which further includes a Type-C interface, a network interface, and a reset button. The data transmission control method for the Type-C interface includes: After determining that the medical data acquisition terminal is powered by a DC power supply, the power supply function of the Type-C interface is enabled. Obtain the level cycle change information of the network interface and the button press information of the reset button when the Type-C interface is powered on; By identifying the level cycle change information and the button press information, it is determined whether the data transmission control conditions of the Type-C interface are met; If so, then control the serial port function of the Type-C interface to be enabled, so that the Type-C interface can be used as a data interaction interface for data transmission; The level change information includes the level change period of the network interface, and the button press information includes at least the number of button presses and the button press time. Obtaining the level change information of the network interface and the button press information of the reset button when the Type-C interface is powered on includes: Send a first-level control signal to the network interface so that the network interface responds to the first-level control signal by periodically changing the indicator light; The periodic changes of the indicator light are counted using a first counter to obtain a first count value, wherein the first counter is used to represent the level change period of the network interface; When the first count value reaches the first preset threshold, the second counter is used to count the number of times the reset button is pressed to obtain the second count value, and the time interval between the start time of the timer and the press time of the reset button is counted using a timer.
2. The method according to claim 1, characterized in that, The step of determining whether the data transmission control conditions of the Type-C interface are met by identifying the level cycle change information and the button press information includes: When the second count value reaches the second preset threshold and the time interval is less than the preset duration, it is determined that the data transmission control conditions of the Type-C interface are met; or If the second count value does not reach the second preset threshold and / or the time interval is greater than or equal to the preset duration, it is determined that the data transmission control conditions of the Type-C interface are not met.
3. The method according to claim 1, characterized in that, Before counting the periodic changes of the indicator light using the first counter, the method further includes: A second-level control signal is sent to the first counter, and the second-level control signal is used to control the start of the first counter.
4. The method according to claim 1, characterized in that, When determining that the first count value has reached a first preset threshold, the method further includes: A third-level control signal is sent to the first counter, the third-level control signal being used to control the first counter to be turned off and the first count value to be cleared.
5. The method according to claim 1, characterized in that, When determining that the first count value has reached a first preset threshold, the method further includes: Sending a fourth-level control signal to the second counter, the fourth-level control signal being used to control the start of the second counter; and A fifth-level control signal is sent to the timer, the fifth-level control signal being used to control the start of the timer.
6. The method according to claim 1, characterized in that, When it is determined that the second count value reaches a second preset threshold and the time interval is less than a preset duration, the method further includes: A sixth-level control signal is sent to the second counter and a seventh-level control signal is sent to the timer, wherein the sixth-level control signal is used to control the second counter to be turned off and the second count value to be cleared, and the seventh-level control signal is used to control the timer to be turned off and the time interval to be cleared.
7. A data transmission control device with a Type-C interface, characterized in that, The device is used in the central processing unit of a medical data acquisition terminal, which also includes a Type-C interface, a network interface, and a reset button. The device comprises: The control module is used to control the power supply function of the Type-C interface to be turned on after determining that the medical data acquisition terminal is powered by DC power. The acquisition module is used to acquire the level cycle change information of the network interface and the button press information of the reset button when the Type-C interface is powered on. The determination module is used to determine whether the data transmission control conditions of the Type-C interface are met by recognizing the level cycle change information and the key press information; The control module is also used to enable the serial port function of the Type-C interface if the data transmission control conditions of the Type-C interface are met, so that the Type-C interface can be used as a data interaction interface for data transmission. The level change information includes the level change period of the network interface, and the key press information includes at least the number of key presses and the key press time. The acquisition module is used to send a first level control signal to the network interface so that the network interface responds to the first level control signal by periodically changing the indicator light; the first counter is used to count the periodic changes of the indicator light to obtain a first count value, wherein the first counter is used to represent the level change period of the network interface; when it is determined that the first count value reaches a first preset threshold, the second counter is used to count the number of times the reset button is pressed to obtain a second count value, and a timer is used to count the time interval between the start time of the timer and the press time of the reset button.
8. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, the processor being used to invoke and run the computer program stored in the memory to perform the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Printing apparatus
CN114987050A
Mobile deploying and controlling terminal based on face recognition
CN211127981U