Hot plug data transmission method and device

By detecting the insertion and removal actions of storage units, recording interface information, and re-establishing the link and retransmitting data, the problem of link interruption during SSD hot-swapping is solved, enabling rapid recovery of data transmission and ensuring data integrity without power interruption.

CN114461444BActive Publication Date: 2025-11-07BEIJING TIMES JINGHENG AEROSPACE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111472275.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2025-11-07
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

In existing technologies, the link cannot be automatically re-established when an SSD is hot-swapped, resulting in data transmission interruption and data loss. Existing solutions require power-off and restart, which is cumbersome and incomplete.

Method used

By detecting the insertion and removal of storage units, the interface information is recorded and the link is re-established, including data transmission reset and retransmission mechanisms, to ensure data integrity.

Benefits of technology

It can quickly establish links and restore data transmission without power interruption, ensuring data integrity and avoiding cumbersome operations and data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114461444B_ABST
    Figure CN114461444B_ABST
Patent Text Reader

Abstract

The application provides a hot plug data transmission method and device. The method comprises judging whether a storage unit plug action is generated; performing link re-establishment or data transmission according to the judgment result; and performing data transmission according to the result of the previous step. The device comprises a collection unit for collecting data; a storage unit for storing the data collected by the collection unit and connected with the collection unit; and a processing unit for establishing a link according to the state of the storage unit and connected with the collection unit and the storage unit. The hot plug data transmission method and device can quickly establish a link and restore data transmission without interrupting other services of the collection board card under the premise of power-off and power-on, and ensure data integrity.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data transmission control, in particular to a hot plug data transmission method and device. BACKGROUND

[0002] With the demand for large-capacity image transmission devices on the market, solid-state disks that are relatively inexpensive and have large transmission capacity have become the first choice for transmission devices.

[0003] The SSD in the prior art adopts a SATA interface and is mainly used for communication with a computer motherboard. In order to meet higher requirements, the prior art integrates circuit components required for high-speed serial transmission inside an FPGA device, so that the SATA protocol can be implemented inside the FPGA. In order to use the SSD hard disk in an image transmission device, the prior art communicates with the SSD by simulating the SATA protocol through the FPGA. However, the corresponding initialization link IP core and initialization instance reference in the prior art do not support SSD hot plugging, so that the link cannot be re-established for connection and data transmission is interrupted once hot plugging occurs during communication between the acquisition board and the SSD. The solution in the prior art is to power off and power on the acquisition board to re-establish the link. However, this process is cumbersome and causes data loss and incomplete data after the link is disconnected. SUMMARY

[0004] The present application aims to provide a hot plug data transmission method and device, which solves the problem that the acquisition board needs to be powered off and powered on to re-establish the link after the interface hot plugging link is disconnected during communication between the FPGA and the SSD, and ensures the integrity of the data and prevents data loss after the link is reconnected.

[0005] The present application provides a hot plug data transmission method, which includes the following steps:

[0006] S1, determining whether a storage unit plugging action occurs;

[0007] S2, re-establishing the link or performing data transmission according to the determination result in S1;

[0008] S3, performing data transmission according to the result in S2.

[0009] As a further technical solution, S2 includes:

[0010] If the determination result in S1 is that the plugging action occurs, the link is re-established. If the determination result in S1 is that no plugging action occurs, data transmission is performed.

[0011] As a further technical solution, if the result of the step S1 is that the plug-in action is generated, link re-establishment is performed, including:

[0012] S21, record the interface information of the plug-in action generation;

[0013] S22, initialize the link establishment state and perform data transmission reset;

[0014] S23, according to the information in the step S21, restore the interface state and complete the retransmission.

[0015] Preferably, the interface information in the step S21 is the data transmission direction and the SSD read-write address information.

[0016] As a further technical solution, the step S3 includes:

[0017] When the result in the step S2 is link re-establishment, such as the plug-in action is generated in the write process, the data write retransmission mechanism is performed; if the plug-in action is generated in the reading process, the data read retransmission mechanism is performed.

[0018] The application also provides a hot plug data transmission device, including:

[0019] The acquisition unit is used for data acquisition;

[0020] The storage unit is used for storing the data collected by the acquisition unit, and is connected with the acquisition unit;

[0021] The processing unit is used for link establishment according to the state of the storage unit, and is connected with the acquisition unit and the storage unit respectively.

[0022] As a further technical solution, it also includes a mounting frame, and the acquisition unit, the storage unit and the processing unit are arranged on the mounting frame.

[0023] Preferably, the storage unit is movably arranged on the mounting frame.

[0024] As a further technical solution, it also includes a power supply unit connected with the acquisition unit and the storage unit respectively.

[0025] As a further technical solution, the processing unit includes a detection module, a link establishment module and a retransmission module, which are connected in sequence.

[0026] The technical scheme of the present application judges the plugging action of the storage unit, and then determines whether to perform link re-establishment according to the judgment result, for example, if the storage unit generates a plugging action, link re-establishment is needed, if the storage unit has no plugging action or re-establishes the connection, data transmission is continuously performed; in this way, when hot plugging occurs, the link can be quickly established, data transmission is recovered, and data integrity is ensured without power-off and re-powering interruption of other services of the acquisition board card. BRIEF DESCRIPTION OF DRAWINGS

[0027] In order to more clearly illustrate the specific embodiments of the present application or the technical scheme in the prior art, the drawings needed to be used in the specific embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0028] Figure 1 Flow chart of the hot plug data transmission method in the present application;

[0029] Figure 2 Structure diagram of the hot plug data transmission in the present application;

[0030] Figure 3 Exploded view of the structure of the hot plug data transmission in the present application;

[0031] Figure 4 Structure block diagram of the hot plug data transmission device in the present application;

[0032] Figure 5 Structure block diagram of the processing unit in the present application;

[0033] Figure 6 Work flow chart of the hot plug data transmission device in the present application;

[0034] Figure 7 Flow chart of the data write retransmission mechanism;

[0035] Figure 8 Flow chart of the data read retransmission mechanism;

[0036] Figure 9 Flow chart of link establishment and link re-establishment.

[0037] Explanation of reference signs:

[0038] 1-acquisition unit; 2-storage unit; 3-processing unit; 31-detection module; 32-link establishment module; 33-retransmission module; 4-mounting rack; 5-power supply unit. DETAILED DESCRIPTION

[0039] The technical solutions of the present application will be described clearly and completely in connection with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.

[0040] In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only used to facilitate the description of the present application and simplify the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation of the present application.

[0041] In addition, the terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited. In addition, the terms "mounting", "connection", "connection" should be broadly understood, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the communication between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0042] As Figure 1 The hot plug data transmission method proposed by the present application comprises the following steps:

[0043] Determine whether a storage unit 2 insertion and removal action is generated; three determination results will be generated in this process, the first result is no insertion and removal action, the second result is that the removal action is generated, and the third result is that the insertion action is generated;

[0044] Based on the judgment result, the link is re-established or data transmission is performed. Specifically, the corresponding action is taken when the judgment is one of the three results: if no plugging / unplugging action is detected (the first result), data transmission is performed; if plugging / unplugging action is detected (the second or third result), link reconstruction is performed. If the judgment result in step S1 is that a plugging / unplugging action has occurred, the link is re-established; if the judgment result in step S1 is that no plugging / unplugging action has occurred, data transmission is performed. The process of re-establishing the link when a plugging / unplugging action has occurred includes: recording the interface information of the plugging / unplugging action; initializing the link establishment state and resetting data transmission; restoring the interface state based on the information from the previous step; and completing the retransmission.

[0045] That is, when it is determined that the storage unit 2 is being plugged in or unplugged, the interface information is recorded, specifically the data transmission direction and SSD read / write address information; then the link is re-established, and the initial link establishment state mechanism is reset; in this invention, it is preferred to complete the initial link by partial reset; the interface state is restored according to the recorded interface information, and a retransmission operation is performed;

[0046] Based on the results of the previous step, data transmission is performed. Specifically, when the structure is determined to be without plugging or unplugging, data transmission is performed directly. However, when the structure is determined to be plugged or unplugged, the link needs to be re-established, and data transmission is performed after the link is reconnected. Specifically, when the link needs to be re-established, it means that a plugging or unplugging action has occurred. If the plugging or unplugging action occurs during a write process, a data write retransmission mechanism is implemented. If the plugging or unplugging action occurs during a read process, a data read retransmission mechanism is implemented.

[0047] Specifically, there are two states when a plugging / unplugging action occurs. The first state is when the acquisition unit 1 writes data to the storage unit 2, which is the writing process; the second state is when the storage unit 2 writes data to the acquisition unit 1, which is the reading process. Therefore, when a plugging / unplugging action occurs, it is a writing process, and a data write retransmission mechanism is implemented; when a plugging / unplugging action occurs, it is a reading retransmission mechanism is implemented.

[0048] like Figure 7 As shown, when performing data write retransmission, the system first checks whether the link is established. If the link is successfully established, a write command is sent to storage unit 2 (the command content includes the write operation address and the interface information of the write capacity). After receiving feedback from storage unit 2, the system reads the 8KB data to be written from the cache. After the 8KB data is sent, the system checks whether the link is connected again. If the link is not connected, it indicates that a hot-plugging action has occurred. The system waits for the link to be established and then resends the write command (the command content includes the write operation address and the interface information of the write capacity) to complete the write retransmission by sending the 8KB data in the cache to storage unit 2. If the link is still connected, the system erases the 8KB data stored in the cache and writes the next 8KB data to be transmitted.

[0049] As Figure 8 shown, first determine whether the link is established, if the link is successfully established, send read command to the storage unit 2 (command content includes read operation address and read capacity interface information), after receiving the feedback from the storage unit 2, read 8KB data from the storage unit 2 and write into the cache, after receiving 8KB data, determine whether the link is connected again, if not connected, it proves that there is hot plug action, wait for the link to be established, resend the read command (command content includes read operation address and read capacity interface information), and read 8KB data again to realize read retransmission; if the link is still connected, the data stored in the cache is written into the collection unit 1 at this time. As Figures 2-6 shown, the application also provides a hot plug data transmission device, comprising:

[0050] The collection unit 1, the storage unit 2 and the processing unit 3, the collection unit 1 is used for data collection; the storage unit 2 is used for storing the data collected by the collection unit 1, and is connected with the collection unit 1; the processing unit 3 is used for link establishment according to the state of the storage unit 2, and is connected with the collection unit 1 and the storage unit 2 respectively;

[0051] In the actual application, the data is collected by the collection unit 1, and the collected data is transmitted to the storage unit 2, and there is data exchange between the storage unit 2 in the transmission process; in the process of data exchange, the processing unit 3 always detects the connection state between the collection unit 1 and the storage unit 2; and in the process of data exchange, when the storage capacity of the storage unit 2 cannot write data, the storage unit 2 needs to be replaced at this time, the storage unit 2 needs to be separated from the collection unit 1, when separated, the processing unit 3 obtains the interface state of the collection unit 1 connected with the storage unit 2 as the storage unit 2 and the interface are separated, at this time, the state information of the interface is recorded, and the link is reestablished, and the data transmission is continued after the link is reestablished;

[0052] It should be noted that in this invention, the storage unit 2 includes two SSDs, which can be divided into a first SSD and a second SSD. Data exchange with the acquisition unit 1 is achieved by switching between the first SSD and the second SSD. Specifically, data exchange occurs through the first SSD. When the storage space of the first SSD reaches the minimum threshold, the acquisition unit 1 automatically switches the data to the second SSD through internal logic and exchanges data with the second SSD. The first SSD is then disconnected from the interface (preferably a SATA interface) on the acquisition unit 1. At this time, the processing unit 3 obtains the unplugging information, records the status information of the interface, and re-establishes the link. Since no new SSD is connected, the link re-establishment process is in a loop confirmation state. A new SSD is inserted into the interface of the acquisition unit 1, and the link re-establishment process is completed, and data transmission begins. This operation is repeated to replace the SSD, so that the SSD can be replaced without power interruption.

[0053] in,

[0054] The processing unit 3 includes a detection module 31, a link establishment module 32, and a retransmission module 33, which are connected in sequence. Specifically, during the usage phase, the detection module 31 continuously monitors the connection interface between the acquisition unit 1 and the storage unit 2. When a plugging or unplugging occurs, the link establishment module 32 re-establishes the link, and once the link is re-established, the retransmission module 33 controls the acquisition unit 1 and the storage unit 2 to re-exchange data.

[0055] like Figure 9 The flowchart shown below illustrates the link establishment and re-establishment process, which includes the following steps:

[0056] 1. Processing unit 3 reset state: After the system is powered on and the phase-locked loop is locked, the processing unit 3 continuously sends a reset signal to the storage unit 2, and the processing unit 3 enters the state of waiting for the storage unit 2 signal initialization.

[0057] 2. Waiting for the initialization state of storage unit 2: When the processing unit 3 receives the initialization completion signal from storage unit 2 within 10ms, the processing unit 3 enters the next state, that is, the processing unit 3 is in the wake-up state, and returns to the reset state of processing unit 3 after timeout.

[0058] 3. Processing unit 3 wake-up state: After entering the processing unit 3 wake-up state, the processing unit 3 will send a wake-up signal to the storage unit 2 and enter the waiting state for the storage unit 2 to wake up;

[0059] 4, waiting for the storage unit 2 to wake up state: when the processing unit 3 receives the wake-up completion signal feedback by the storage unit 2 within 10ms, the processing unit 3 enters the waiting for the storage unit 2 to wake up state, and returns to the processing unit 3 reset state if timeout;

[0060] 5, waiting for the storage unit 2 to wake up state: when the processing unit 3 identifies the working signal of the storage unit 2, the processing unit 3 enters the processing unit 3 sends source language state;

[0061] 6, processing unit 3 sends source language state: when the processing unit 3 receives the aligned source language sent by the storage unit 2 within 10ms, the processing unit 3 enters the next state, i.e. the processing unit 3 sends source language state, and returns to the processing unit 3 reset state if timeout;

[0062] 7, processing unit 3 sends source language state: when the processing unit 3 receives the synchronization source language signal sent by the storage unit 2 within 10ms for three times in succession, the processing unit 3 enters the link establishment state, and returns to the processing unit 3 reset state if timeout;

[0063] 8, link establishment state: in this state, the processing unit 3 always monitors the idle signal of the storage unit 2, when the storage unit 2 is in the "busy" state, it indicates that the link is successfully established; if the storage unit 2 is in the "idle" state, it indicates that the link is disconnected or there is a hot plug action, the processing unit 3 immediately enters the processing unit 3 reset state, and re-executes the link establishment initialization process.

[0064] Through the above method, the link establishment between the collection unit 1 and the storage unit 2 in the initial state can be completed, and the link can be re-established according to the judgment result in the case of plugging.

[0065] As shown in Figure 2 and 3 In the present application, a mounting rack 4 is preferably provided, and the collection unit 1, the storage unit 2 and the processing unit 3 are arranged on the mounting rack 4; specifically, the collection unit 1 and the storage unit 2 are arranged on the mounting rack 4, and the processing unit 3 is arranged inside the mounting rack 4; wherein the collection unit 1 and the processing unit 3 are connected through an interface, and in the present application, the collection unit 1 is preferably a collection card; in addition, in the present application, the storage unit 2 is movably arranged on the mounting rack 4; that is, two slides are arranged on the mounting rack 4, the first SSD and the second SSD in the storage unit 2 are arranged on the slides respectively, and are moved on the mounting rack 4 under the driving of the slides, thereby reducing the volume of the whole in use and realizing the protection of the storage unit 2;

[0066] Of course, in the use stage, the collecting unit 1 and the storage unit 2 can be powered by external power supply respectively, and in order to increase convenience, the power supply unit 5 is preferably arranged in the application, which is connected with the collecting unit 1 and the storage unit 2 respectively; when the mounting rack 4 is used, the power supply unit 5 can be placed on the mounting rack 4, so that the power supply unit 5 moves together with the whole, and can be used at the required position without being limited by space;

[0067] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A hot plug data transfer method, characterized by, Comprising the following steps: S1, judging whether a storage unit plug-in action is generated; S2, according to the judgment result in S1 step, link re-establishment or data transmission is performed, comprising: If the judgment result in S1 step is that the plug-in action is generated, link re-establishment is performed, comprising: S21, recording the plug-in action generation interface information, the interface information is data transmission direction and storage unit read-write address information; S22, completing initialization link establishment state through local reset and performing data transmission reset; S23, according to the information in S21 step, restoring the interface state and completing retransmission; If the judgment result in S1 step is that the plug-in action is not generated, data transmission is performed; S3, according to the result in S2 step, data transmission is performed, comprising: When the result in S2 step is link re-establishment, if the plug-in action is generated in the writing process, data write retransmission mechanism is performed, the data write retransmission mechanism is: firstly judging whether the link is established, if the link is successfully established, sending a write command to the storage unit (2), the command content includes the interface information of the write operation address and the write capacity, after receiving the feedback of the storage unit (2), reading 8KB data to be written from the cache, after the 8KB data is sent, judging again whether the link is connected, if not connected, it proves that there is a hot plug action, waiting for the link to be established, re-sending the write command to complete the write retransmission of 8KB data in the cache to the storage unit (2); if the link is still connected, the 8KB data stored in the cache is written into the next 8KB data to be transmitted; If the plug-in action is generated in the reading process, data read retransmission mechanism is performed, the data read retransmission mechanism is: firstly judging whether the link is established, if the link is successfully established, sending a read command to the storage unit (2), the command content includes the interface information of the read operation address and the read capacity, after receiving the feedback of the storage unit (2), reading 8KB data from the storage unit (2) and writing into the cache, after the 8KB data is received, judging again whether the link is connected, if not connected, it proves that there is a hot plug action, waiting for the link to be established, re-sending the read command to read 8KB data again to realize read retransmission; if the link is still connected, the data stored in the cache is written into the collection unit (1).

2. A hot plug data transfer device using the method of claim 1, wherein, Comprising: The collection unit (1) is used for collecting data; The storage unit (2) is used for storing the data collected by the collection unit (1) and is connected with the collection unit (1); The processing unit (3) is used for establishing a link according to the state of the storage unit (2) and is connected with the collection unit (1) and the storage unit (2) respectively, and the processing unit (3) comprises: The detection module (31), the link establishment module (32) and the retransmission module (33) are connected in sequence.

3. The hot plug data transfer device of claim 2, wherein, Further comprising: The mounting rack (4), and the collection unit (1), the storage unit (2) and the processing unit (3) are all arranged on the mounting rack (4).

4. The hot plug data transfer device of claim 3, wherein, The storage unit (2) is movably arranged on the mounting rack (4).

5. The hot plug data transfer device of claim 2, wherein, Further comprising: A power supply unit (5) is connected to the collection unit (1) and the storage unit (2) respectively.

Citation Information

Patent Citations

  • Link connection method and link connection establishing device

    CN102736884A

  • Hot plug identification method and device for PCIe equipment and medium

    CN109614286A

  • Apparatus and method for queue assignment for each link in multi-links of an access pointer controller

    CN1549623A