Method, device, medium, equipment and system for processing insertion and extraction events of multiple disks

By associating the disk serial number with the USB port serial number and detecting plug-and-removal events, the disk plug-and-removal efficiency problem in the existing technology that requires multiple people to cooperate, and efficient single-person operation is achieved.

CN119718812APending Publication Date: 2025-03-28CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311265441.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing disk plug-in and unplugging processing methods require multiple people to cooperate and work efficiency is not high.

Method used

By associating the disk's serial number with the USB port serial number, check whether the USB interface has a disk inserted or unplugged, and prompt it when a plug-in event occurs.

Benefits of technology

It enables multiple USB socket disks to be operated simultaneously without the need for multiple people to collaborate, which improves work efficiency and simplifies disk plug-in and unplug.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718812A_ABST
    Figure CN119718812A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of seismic wave node identification processing, in particular to a multi-disk plugging event processing method, device, medium, equipment and system. In order to solve the problems that an existing disk plugging processing mode needs multi-person cooperation and the working efficiency is not high, the method for processing the multiple disk plugging events comprises the following steps that serial numbers of disks are associated with serial numbers of usb ports; detecting whether a disk is inserted into or pulled out of each usb interface; and if a data disk is inserted into or pulled out of the usb interface, prompting according to a set mode. According to the method, the plurality of disks are mounted in the computer operating system at the same time, the plurality of usb interface disks can be operated at the same time for file copying, and the serial numbers of the disks are associated with the serial numbers of the usb interfaces, so that the disks do not need to be plugged according to a fixed sequence, the plurality of disks can be plugged at the same time when the disks are plugged, and the working efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of seismic wave node identification and processing, and in particular to a method, device, medium, equipment and system for processing multiple disk plug-in and pull-out events. Background Art

[0002] The current data collection nodes need to be plugged in and out in sequence during data transmission, and only one node can be plugged in and out at a time. During use, it was found that there are some disadvantages that affect work efficiency and progress, and multiple people cannot collaborate on one machine.

[0003] Accordingly, there is a need in the art to provide a method for processing disk plugging and unplugging events that does not require collaboration of multiple people and improves work efficiency. Summary of the invention

[0004] The present invention aims to solve the above technical problem, that is, the existing disk plugging and unplugging processing method requires the cooperation of multiple people and has low work efficiency.

[0005] In a first aspect, the present invention provides a method for processing multiple disk plugging and unplugging events, comprising the following steps:

[0006] Associate the disk serial number with the USB port serial number;

[0007] Check whether there is a disk inserted or unplugged in each USB interface;

[0008] If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

[0009] Preferably, associating the serial number of the disk with the serial number of the USB port includes:

[0010] Get the serial number of each disk and create a disk mount directory;

[0011] A map mapping between the disk mount directory and the USB port serial number is established; when the disk is plugged in or out, the map mapping changes.

[0012] Preferably, the step of obtaining the serial number of each disk and establishing a disk mount directory includes:

[0013] Mount each disk into the computer operating system;

[0014] Record the serial number of each disk and create the disk mount directory.

[0015] Preferably, before establishing a map mapping between the disk mount directory and the USB port serial number, the process further includes:

[0016] Associate the USB port serial number with the USB interface serial number.

[0017] Preferably, the detecting whether a disk is inserted or removed from each USB interface includes:

[0018] Detect whether the map mapping has changed;

[0019] If the map mapping has changed, then the USB interface whose map mapping has changed is determined.

[0020] Preferably, the step of determining the USB interface whose map mapping has changed comprises:

[0021] Get the mapping relationship between the serial numbers of each USB port;

[0022] Compare the mapping relationship of each USB port serial number with the mapping relationship of each USB port serial number obtained last time, and find out the USB port serial number that has changed;

[0023] The USB interface serial number corresponding to the changed USB port serial number is determined according to the map mapping.

[0024] Preferably, the determining of the USB interface whose map mapping has changed further includes:

[0025] It is determined whether the disk is pulled out or inserted according to the change of the map.

[0026] In a second aspect, the present invention provides a device for processing multiple disk plug-in and pull-out events, comprising:

[0027] An association unit, which is used to associate the serial number of the disk with the serial number of the USB port;

[0028] A detection unit, which is used to detect whether a disk is inserted or removed from each USB interface;

[0029] The prompt unit is used to prompt in a set manner if a data disk is inserted or removed from the USB interface.

[0030] In a third aspect, the present invention provides a storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor implements the method described in the first aspect.

[0031] In a fourth aspect, the present invention provides an electronic device, comprising a memory and a processor communicatively connected to the memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0032] Through the above technical solution, the present invention has the following beneficial effects:

[0033] The present invention mounts multiple disks to a computer operating system at the same time, can operate multiple USB socket disks at the same time to copy files, and can associate the serial numbers of the disks with the USB interface serial numbers, so there is no need to plug and unplug the disks in a fixed order. When plugging and unplugging the disks, multiple disks can be plugged and unplugged at the same time, thereby improving work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the main steps of the method for handling multiple disk plug-in and pull-out events;

[0035] Figure 2 It is a schematic diagram of the main steps to associate the serial number of the disk with the serial number of the USB port;

[0036] Figure 3 It is another diagram of the main steps to associate the serial number of the disk with the serial number of the USB port;

[0037] Figure 4 This is a diagram of the main steps to create a disk mount directory;

[0038] Figure 5 This is a schematic diagram of the main steps for detecting whether a disk is inserted or removed from each USB interface;

[0039] Figure 6 It is a schematic diagram of the main steps of determining the USB interface where the map mapping has changed;

[0040] Figure 7 It is another main step diagram for determining the USB interface where the map mapping has changed;

[0041] Figure 8 This is a schematic diagram of the USB interface serial number;

[0042] Fig. 9 This is a schematic diagram of disk insertion;

[0043] Fig.10 This is a schematic diagram of the prompt when the disk is inserted;

[0044] Fig.11 This is a schematic diagram with a disk pulled out;

[0045] Fig.12 This is a diagram showing the prompt when a disk is pulled out. DETAILED DESCRIPTION

[0046] The present disclosure is further described below in conjunction with the embodiments shown in the accompanying drawings.

[0047] In a first aspect, this embodiment provides a method for processing multiple disk plugging and unplugging events.

[0048] Example 1

[0049] Reference Figure 1 This embodiment provides a method for processing multiple disk plug-in and pull-out events, the method comprising the following steps:

[0050] S1. Associate the disk serial number with the USB port serial number.

[0051] S2. Check whether a disk is inserted or removed from each USB port.

[0052] S3. If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

[0053] This embodiment associates the serial number of the disk with the serial number of the USB interface, so the disk does not need to be plugged in and out in a fixed order. When plugging in and out the disk, multiple disks can be plugged in and out at the same time, thereby improving work efficiency.

[0054] Example 2

[0055] Reference Figure 1 This embodiment provides a method for processing multiple disk plug-in and pull-out events, the method comprising the following steps:

[0056] S1. Associate the disk serial number with the USB port serial number.

[0057] Reference Figure 2 , step S1 specifically includes the following steps:

[0058] S11. Obtain the serial number of each disk and create a disk mount directory.

[0059] S12. Establish a map mapping between the disk mount directory and the USB port serial number; when the disk is plugged in or out, the map mapping changes.

[0060] S2. Check whether a disk is inserted or removed from each USB port.

[0061] S3. If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

[0062] The present invention mounts multiple disks to a computer operating system at the same time, can operate multiple USB socket disks at the same time to copy files, and can associate the serial numbers of the disks with the USB interface serial numbers, so there is no need to plug and unplug the disks in a fixed order. When plugging and unplugging the disks, multiple disks can be plugged and unplugged at the same time, thereby improving work efficiency.

[0063] Example 3

[0064] Reference Figure 1 This embodiment provides a method for processing multiple disk plug-in and pull-out events, the method comprising the following steps:

[0065] S1. Associate the disk serial number with the USB port serial number.

[0066] Reference Figure 3 , step S1 specifically includes the following steps:

[0067] S11. Obtain the serial number of each disk and create a disk mount directory.

[0068] S12. Associate the USB port serial number with the USB interface serial number.

[0069] S13. Establish a map mapping between the disk mount directory and the USB port serial number; when the disk is plugged in or out, the map mapping changes.

[0070] S2. Check whether a disk is inserted or removed from each USB port.

[0071] S3. If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

[0072] The present invention mounts multiple disks to a computer operating system at the same time, can operate multiple USB socket disks at the same time to copy files, and can associate the serial numbers of the disks with the USB interface serial numbers, so there is no need to plug and unplug the disks in a fixed order. When plugging and unplugging the disks, multiple disks can be plugged and unplugged at the same time, thereby improving work efficiency.

[0073] Example 4

[0074] Reference Figure 1 This embodiment provides a method for processing multiple disk plug-in and pull-out events, the method comprising the following steps:

[0075] S1. Associate the disk's serial number with the USB port's serial number.

[0076] Reference Figure 3 , step S1 specifically includes the following steps:

[0077] S11. Obtain the serial number of each disk and create a disk mount directory.

[0078] Reference Figure 4 , step S11 specifically includes:

[0079] S111. Mount each disk to the computer operating system.

[0080] S112. Record the serial number of each disk and create the disk mount directory.

[0081] S12. Associate the USB port serial number with the USB interface serial number.

[0082] S13. Establish a map mapping between the disk mount directory and the USB port serial number; when the disk is plugged in or out, the map mapping changes.

[0083] S2. Check whether a disk is inserted or removed from each USB port.

[0084] S3. If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

[0085] The present invention mounts multiple disks to a computer operating system at the same time, can operate multiple USB socket disks at the same time to copy files, and can associate the serial numbers of the disks with the USB interface serial numbers, so there is no need to plug and unplug the disks in a fixed order. When plugging and unplugging the disks, multiple disks can be plugged and unplugged at the same time, thereby improving work efficiency.

[0086] Example 5

[0087] Reference Figure 1 This embodiment provides a method for processing multiple disk plug-in and pull-out events, the method comprising the following steps:

[0088] S1. Associate the disk serial number with the USB port serial number.

[0089] Reference Figure 3 , step S1 specifically includes the following steps:

[0090] S11. Obtain the serial number of each disk and create a disk mount directory.

[0091] Reference Figure 4 , step S11 specifically includes:

[0092] S111. Mount each disk to the computer operating system.

[0093] S112. Record the serial number of each disk and create the disk mount directory.

[0094] S12. Associate the USB port serial number with the USB interface serial number.

[0095] S13. Establish a map mapping between the disk mount directory and the USB port serial number; when the disk is plugged in or out, the map mapping changes.

[0096] S2. Check whether a disk is inserted or removed from each USB port.

[0097] Reference Figure 5 , step S2 specifically includes the following steps:

[0098] S21. Detect whether the map mapping has changed.

[0099] S22. If the map mapping has changed, determine the USB interface whose map mapping has changed.

[0100] S3. If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

[0101] The present invention mounts multiple disks to a computer operating system at the same time, can operate multiple USB socket disks at the same time to copy files, and can associate the serial numbers of the disks with the USB interface serial numbers, so there is no need to plug and unplug the disks in a fixed order. When plugging and unplugging the disks, multiple disks can be plugged and unplugged at the same time, thereby improving work efficiency.

[0102] Example 6

[0103] Reference Figure 1 This embodiment provides a method for processing multiple disk plug-in and pull-out events, the method comprising the following steps:

[0104] S1. Associate the disk serial number with the USB port serial number.

[0105] Reference Figure 3 , step S1 specifically includes the following steps:

[0106] S11. Obtain the serial number of each disk and create a disk mount directory.

[0107] Reference Figure 4 , step S11 specifically includes:

[0108] S111. Mount each disk to the computer operating system.

[0109] S112. Record the serial number of each disk and create the disk mount directory.

[0110] S12. Associate the USB port serial number with the USB interface serial number.

[0111] S13. Establish a map mapping between the disk mount directory and the USB port serial number; when the disk is plugged in or out, the map mapping changes.

[0112] S2. Check whether a disk is inserted or removed from each USB port.

[0113] Reference Figure 5 , step S2 specifically includes the following steps:

[0114] S21. Detect whether the map mapping has changed.

[0115] S22. If the map mapping has changed, determine the USB interface whose map mapping has changed.

[0116] Reference Figure 6 Step S22 specifically includes the following steps:

[0117] S221. Obtain the mapping relationship between the serial numbers of each USB port.

[0118] S222. Compare the mapping relationship of each USB port serial number with the mapping relationship of each USB port serial number obtained last time, and find out the USB port serial number that has changed.

[0119] S223. Determine the USB interface serial number corresponding to the changed USB port serial number according to the map mapping.

[0120] S3. If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

[0121] The present invention mounts multiple disks to a computer operating system at the same time, can operate multiple USB socket disks at the same time to copy files, and can associate the serial numbers of the disks with the USB interface serial numbers, so there is no need to plug and unplug the disks in a fixed order. When plugging and unplugging the disks, multiple disks can be plugged and unplugged at the same time, thereby improving work efficiency.

[0122] Example 7

[0123] Reference Figure 1 This embodiment provides a method for processing multiple disk plug-in and pull-out events, the method comprising the following steps:

[0124] S1. Associate the disk serial number with the USB port serial number.

[0125] Reference Figure 3 , step S1 specifically includes the following steps:

[0126] S11. Obtain the serial number of each disk and create a disk mount directory.

[0127] Reference Figure 4 , step S11 specifically includes:

[0128] S111. Mount each disk to the computer operating system.

[0129] S112. Record the serial number of each disk and create the disk mount directory.

[0130] S12. Associate the USB port serial number with the USB interface serial number.

[0131] S13. Establish a map mapping between the disk mount directory and the USB port serial number; when the disk is plugged in or out, the map mapping changes.

[0132] S2. Check whether a disk is inserted or removed from each USB port.

[0133] Reference Figure 5 , step S2 specifically includes the following steps:

[0134] S21. Detect whether the map mapping has changed.

[0135] S22. If the map mapping has changed, determine the USB interface whose map mapping has changed.

[0136] Reference Figure 7 Step S22 specifically includes the following steps:

[0137] S221. Obtain the mapping relationship between the serial numbers of each USB port.

[0138] S222. Compare the mapping relationship of each USB port serial number with the mapping relationship of each USB port serial number obtained last time, and find out the USB port serial number that has changed.

[0139] S223. Determine the USB interface serial number corresponding to the changed USB port serial number according to the map mapping.

[0140] S224: Determine whether a disk is unplugged or inserted according to the change in the map.

[0141] S3. If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

[0142] The present invention mounts multiple disks to a computer operating system at the same time, can operate multiple USB socket disks at the same time to copy files, and can associate the serial numbers of the disks with the USB interface serial numbers, so there is no need to plug and unplug the disks in a fixed order. When plugging and unplugging the disks, multiple disks can be plugged and unplugged at the same time, thereby improving work efficiency.

[0143] Example 8

[0144] Reference Figure 1 This embodiment provides a method for processing multiple disk plug-in and pull-out events, the method comprising the following steps:

[0145] S1. Associate the disk serial number with the USB port serial number.

[0146] Reference Figure 3 , step S1 specifically includes the following steps:

[0147] S11. Obtain the serial number of each disk and create a disk mount directory.

[0148] Reference Figure 4 , step S11 specifically includes:

[0149] S111. Mount each disk to the computer operating system.

[0150] S112. Record the serial number of each disk and create the disk mount directory.

[0151] S12. Associate the USB port serial number with the USB interface serial number.

[0152] S13. Establish a map mapping between the disk mount directory and the USB port serial number; when the disk is plugged in or out, the map mapping changes.

[0153] S2. Check whether a disk is inserted or removed from each USB port.

[0154] Reference Figure 5 , step S2 specifically includes the following steps:

[0155] s21. Detect whether the map mapping has changed.

[0156] S22. If the map mapping has changed, determine the USB interface whose map mapping has changed.

[0157] Reference Figure 7 Step S22 specifically includes the following steps:

[0158] S221. Obtain the mapping relationship between the serial numbers of each USB port.

[0159] S222. Compare the mapping relationship of each USB port serial number with the mapping relationship of each USB port serial number obtained last time, and find out the USB port serial number that has changed.

[0160] S223. Determine the USB interface serial number corresponding to the changed USB port serial number according to the map mapping.

[0161] S224: Determine whether a disk is unplugged or inserted according to the change in the map.

[0162] S3. If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

[0163] The present invention mounts multiple disks to a computer operating system at the same time, can operate multiple USB socket disks at the same time to copy files, and can associate the serial numbers of the disks with the USB interface serial numbers, so there is no need to plug and unplug the disks in a fixed order. When plugging and unplugging the disks, multiple disks can be plugged and unplugged at the same time, thereby improving work efficiency.

[0164] In this embodiment, a disk mounted with 10 USB interfaces is used as an example for description.

[0165] Mount each disk to the computer's operating system. This embodiment uses the Linux system as an example. Use the disk automatic mounting tool that comes with the Raspberry Pi Linux system desktop or the open source disk management tool udev, or use block files to write a disk mounting program to mount 10 disks to the Raspberry Pi Linux system. Record the serial number of each disk and create a disk mounting directory.

[0166] Reference Figure 8 , number the USB interface and get the USB interface serial number. Associate the USB port serial number with the USB interface serial number.

[0167] Create a map between the disk mount directory and the USB port serial number. When the disk is plugged in or out, the map changes.

[0168] Check whether the map mapping has changed. If the map mapping has changed, obtain the map mapping relationship of each USB port serial number. Compare the map mapping relationship of each USB port serial number with the mapping relationship of each USB port serial number obtained last time, find out the USB port serial number whose mapping relationship has changed, find out the serial number of the unplugged or inserted disk through the USB port serial number whose mapping relationship has changed, and finally determine the USB interface serial number of the unplugged or inserted disk.

[0169] Reference Fig. 9 and 10 If it is determined that the change in the map mapping is a disk insertion, the USB interface number of the disk insertion interface and the event corresponding to the map mapping change are specifically node insertion.

[0170] Reference Fig.11 and 12 If it is determined that the change in the map mapping is caused by the unplugging of the disk, the USB interface number of the interface from which the disk is unplugged and the event corresponding to the map mapping change are specifically the unplugging of the node.

[0171] Through the above technical solution, users can operate multiple disks to copy files at the same time, and do not need to plug and unplug disks in a fixed way, and multiple disks can be plugged and unplugged at the same time, which simplifies the user's operation and improves the user's work efficiency.

[0172] In a second aspect, the present invention provides a device for processing multiple disk plug-in and pull-out events, comprising:

[0173] An association unit, which is used to associate the serial number of the disk with the serial number of the USB port;

[0174] A detection unit, which is used to detect whether a disk is inserted or removed from each USB interface;

[0175] The prompt unit is used to prompt in a set manner if a data disk is inserted or removed from the USB interface.

[0176] In a third aspect, the present invention provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method described in the first aspect.

[0177] In a fourth aspect, the present invention provides an electronic device, comprising a memory and a processor communicatively connected to the memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0178] In a fifth aspect, the present invention provides a system for processing multiple disk plug-in and pull-out events, the system comprising: the electronic device as described in the fourth aspect.

[0179] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0180] The protection scope of the present disclosure is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.

Claims

1. A method for processing multiple disk plug-in and pull-out events, characterized in that: The following steps are involved: Associate the disk serial number with the USB port serial number; Check whether there is a disk inserted or unplugged in each USB interface; If a data disk is inserted or removed from the USB interface, prompts will be given according to the settings.

2. The method for processing multiple disk plug-in and pull-out events according to claim 1, characterized in that: The step of associating the serial number of the disk with the serial number of the USB port includes: Get the serial number of each disk and create a disk mount directory; A map mapping between the disk mount directory and the USB port serial number is established; when the disk is plugged in or out, the map mapping changes.

3. The method for processing multiple disk plug-in and pull-out events according to claim 2, characterized in that: The step of obtaining the serial number of each disk and establishing a disk mount directory includes: Mount each disk into the computer operating system; Record the serial number of each disk and create the disk mount directory.

4. The method for processing multiple disk plug-in and pull-out events according to claim 2, characterized in that: Before establishing the map mapping between the disk mount directory and the USB port serial number, the following steps are also included: Associate the USB port serial number with the USB interface serial number.

5. The method for processing multiple disk plug-in and pull-out events according to claim 4, characterized in that: The step of detecting whether a disk is inserted or removed from each USB interface includes: Detect whether the map mapping has changed; If the map mapping has changed, the USB interface whose map mapping has changed is determined.

6. The method for processing multiple disk plug-in and pull-out events according to claim 5, characterized in that: The determining of the USB interface whose map mapping has changed includes: Get the mapping relationship between the current serial numbers of each USB port; Compare the current mapping relationship of each USB port serial number with the mapping relationship of each USB port serial number obtained last time, and find out the USB port serial number that has changed; The USB interface serial number corresponding to the changed USB port serial number is determined according to the map mapping.

7. The method for processing multiple disk plug-in and pull-out events according to claim 6, characterized in that: The determining of the USB interface whose map mapping has changed also includes: It is determined whether the disk is pulled out or inserted according to the change of the map.

8. A device for processing multiple disk plug-in and pull-out events, characterized in that: include: An association unit, which is used to associate the serial number of the disk with the serial number of the USB port; A detection unit, which is used to detect whether a disk is inserted or removed from each USB interface; The prompt unit is used to prompt in a set manner if a data disk is inserted or removed from the USB interface.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The method comprises a memory and a processor in communication with the memory, wherein the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.