CN116880770A - USB flash disk reading control method, electronic equipment and storage medium - Google Patents

USB flash disk reading control method, electronic equipment and storage medium Download PDF

Info

Publication number
CN116880770A
CN116880770A CN202310930547.0A CN202310930547A CN116880770A CN 116880770 A CN116880770 A CN 116880770A CN 202310930547 A CN202310930547 A CN 202310930547A CN 116880770 A CN116880770 A CN 116880770A
Authority
CN
China
Prior art keywords
disk
usb
target
usb flash
flash disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310930547.0A
Other languages
Chinese (zh)
Inventor
王绍密
杨少飞
张帅民
程学志
张燕
石增玲
庄绪杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Traceability Safety Technology Co ltd
Original Assignee
Shandong Traceability Safety Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Traceability Safety Technology Co ltd filed Critical Shandong Traceability Safety Technology Co ltd
Priority to CN202310930547.0A priority Critical patent/CN116880770A/en
Publication of CN116880770A publication Critical patent/CN116880770A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices

Abstract

The invention provides a USB flash disk reading control method, electronic equipment and a storage medium, wherein m first USB interfaces are respectively connected with a target USB flash disk, a detection sequence list corresponding to the m target USB flash disks is obtained, data in each target USB flash disk are sequentially subjected to safety detection according to the detection sequence list, a key USB flash disk information queue is updated after each target USB flash disk passes through the safety detection, the key USB flash disk information queue is continuously traversed, n transformer substation servers are continuously polled according to the designated USB flash disk information, a driving control module is in communication connection with the first USB interface corresponding to the designated USB flash disk information and the designated transformer substation server, state parameters corresponding to the designated transformer substation server in the designated USB flash disk information are adjusted to be first state parameters, a reading state identifier in the designated USB flash disk information is adjusted to be 0, and the key USB flash disk information queue is continuously traversed again. The data reading efficiency is improved, the data safety is high, and the accuracy of key operation is ensured.

Description

USB flash disk reading control method, electronic equipment and storage medium
Technical Field
The present invention relates to the field of read control technologies, and in particular, to a method for controlling a usb flash disk read, an electronic device, and a storage medium.
Background
In the prior art, the USB flash disk is taken as a convenient data storage device, and is popular with users due to the characteristics of small size and portability. In many cases, data often needs to be transferred between different devices via a USB flash disk. For example, in the power industry, each substation server needs to acquire and update data in time, and a usb disk is often used as a tool for data carrying and transmission.
However, in the practical application process, there are some inherent problems in the conventional usb disk reading method. Firstly, data reading of a plurality of U disks is usually performed in a sequence from beginning to end, and only one U disk can be read at a time, so that the efficiency of data processing is greatly limited. If the reading mode cannot meet the requirement in an environment where a large amount of data needs to be read quickly, the reading mode clearly becomes a bottleneck of data processing efficiency. Second, there is a lack of effective security detection mechanisms. When an unverified USB flash disk is accessed to the system, potential risks such as viruses, malicious software and the like may be carried, which may bring about a certain safety hazard to the system. In addition, under the prior art, there is no effective mechanism to help identify and prioritize more important data reading tasks. For example, in a power system, some servers are responsible for critical facilities and some servers' data is not of great importance. For all connected USB flash drives, the data they may contain may be important to some parts of the system, while it may be less important to other parts. In this case, a mechanism is provided that can distinguish this importance and take it as the basis of processing priority, which can certainly improve the efficiency of updating the data of the whole system. Therefore, a new method for controlling the read of a usb disk with efficient data processing capability, while ensuring data security and optimizing data read priority is urgently needed.
Disclosure of Invention
Aiming at the technical problems, the invention adopts the following technical scheme:
according to a first aspect of the present invention, a method for controlling the read of a USB disk is provided, the method is applied to a USB disk read control system, the USB disk read control system includes a database, an industrial personal computer, a control module and n substation servers, the database stores importance degrees corresponding to each substation server, the control module includes n first USB interfaces, each substation server and the industrial personal computer are connected with the control module, the first USB interfaces are used for connecting a target USB disk, the control module is used for controlling any first USB interface to be in communication connection with any substation server, and the value of i is 1 to n, n is greater than or equal to 2;
the method comprises the following steps:
s100, responding to the fact that m first USB interfaces are all connected into the target U disk, and acquiring detection sequence lists FV corresponding to the m target U disks;
s200, sequentially carrying out security detection on data in each target U disk according to FV, and updating a key U disk information queue H= (H) after each target U disk passes the security detection 1 ,H 2 ,…,H d ,…,H D ) D is 1 to D, and D is the number of target U disks passing the security detection currently; wherein, the d-th key USB flash disk information H d =(KH d ,FH d1 ,FH d2 ,…,FH di ,…,FH dn ),KH d Read status identification (FH) of the d-th key USB flash disk di The method comprises the steps that the state parameters corresponding to the d key U disk and the i transformer substation server are used, and the key U disk is a target U disk passing safety detection; the key USB flash disk information is arranged according to the sequence of the corresponding key USB flash disk passing through the safety detection; KH (KH) d =1, the first USB interface where the d-th key USB disk is located is not currently connected to any substation server, KH d If the USB interface is=0, the first USB interface where the d-th key USB flash disk is located is currently connected with the transformer substation server;
s300, if H is not NULL, proceeding to step S400;
s400, continuously traversing H, and if the specified U disk information exists in the H, entering step S500; designating the USB flash disk information as the key USB flash disk information with the earliest corresponding safety detection sequence in the key USB flash disk information with the reading state identification of 1;
s500, continuously polling n transformer substation servers according to the designated U disk information, and if the designated transformer substation servers exist in the n transformer substation servers, entering a step S600; the specified substation server is the substation server which is not connected with any first USB interface at present and has the highest importance degree, and the corresponding state parameter in the specified USB flash disk information is the second state parameter;
s600, the drive control module carries out communication connection on a first USB interface where a key USB flash disk corresponding to the designated USB flash disk information is located and a designated substation server;
s700, adjusting a state parameter corresponding to a specified substation server in the specified U disk information to be a first state parameter, adjusting a reading state identifier in the specified U disk information to be 0, and entering step S300.
According to a second aspect of the present invention there is provided a non-transitory computer readable storage medium having stored therein at least one instruction or at least one program loaded and executed by a processor to implement a method as described above.
According to a third aspect of the present invention there is provided an electronic device comprising a processor and a non-transitory computer readable storage medium as previously described.
The invention has at least the following beneficial effects:
the invention provides a USB flash disk reading control method, which is characterized in that m first USB interfaces are accessed into target USB flash disks, a detection sequence list corresponding to the m target USB flash disks is obtained, data in each target USB flash disk is sequentially subjected to safety detection according to the detection sequence list, a key USB flash disk information queue is updated after each target USB flash disk passes through the safety detection, the key USB flash disk information queue is continuously traversed, if specified USB flash disk information exists in the key USB flash disk information queue, n transformer substation servers are continuously polled according to the specified USB flash disk information, if the specified transformer substation servers exist in the n transformer substation servers, a driving control module is in communication connection with the first USB interfaces corresponding to the specified USB flash disk information and the specified transformer substation servers, state parameters corresponding to the specified transformer substation servers in the specified USB flash disk information are adjusted to be first state parameters, a reading state identifier in the specified USB flash disk information is adjusted to be 0, and the key USB flash disk information queue is continuously traversed again.
Through the steps, (1) the reading efficiency of the data is improved, namely, in the prior art, the USB flash disk is usually read one by one, and the data cannot be read in parallel among a plurality of devices, so that the reading efficiency is lower. In the method, a plurality of USB flash discs can be simultaneously connected into a plurality of USB interfaces, and the connection of each USB flash disc to each transformer substation server can be independently controlled through the control module, so that the problem of low reading efficiency of a single USB flash disc is solved, and the data reading efficiency is improved.
(2) The data security is high: in the control method, when all U disks are accessed to a control system, security detection is needed, and only the U disks passing the security detection can be added into a key U disk information queue and further controlled by a control module to read data. The design effectively ensures the safety of data and avoids the data risk possibly caused by viruses in illegal U disk and U disk.
(3) Ensuring the correctness of key operations: according to the method, the reading state identification and the two state parameters are set, so that the connection states of different U disks and the transformer substation server are controlled, disorder in the data reading process can be prevented, and the accuracy of data reading is ensured. In addition, after the data reading is completed, the safety of the equipment is protected by disconnecting the connection, meanwhile, the queue is also arranged, and the completed key U disk information is removed from the queue, so that the operation flow is simplified.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic circuit diagram corresponding to a method for controlling the read of a usb disk according to an embodiment of the present invention.
Fig. 2 is a flow chart of a method for controlling the read of a usb disk according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The invention provides a USB flash disk reading control method which is applied to a USB flash disk reading control system, as shown in fig. 1, wherein the USB flash disk reading control system comprises a database, an industrial personal computer, a control module and n transformer substation servers, wherein the database stores importance degrees corresponding to each transformer substation server, the control module comprises n first USB interfaces, each transformer substation server and the industrial personal computer are connected with the control module, the first USB interfaces are used for connecting a target USB flash disk, the control module is used for controlling any first USB interface to be in communication connection with any transformer substation server, and the value of i is 1 to n, and n is more than or equal to 2.
Specifically, the target usb disk is a usb disk to be connected to the substation server, and the target usb disk may be a usb disk that includes only a communication protocol connected to the substation server or includes substation data in addition to a communication protocol connected to the substation server.
Furthermore, the substation server is difficult to directly carry out communication connection with the industrial personal computer.
As shown in fig. 2, the method includes:
s100, responding to the fact that m first USB interfaces are all connected into the target U disk, and obtaining detection sequence lists FV corresponding to the m target U disks.
Specifically, m.ltoreq.n.
S200, sequentially carrying out security detection on data in each target U disk according to FV, and updating a key U disk information queue H= (H) after each target U disk passes the security detection 1 ,H 2 ,…,H d ,…,H D ) D is 1 to D, and D is the number of target U disks passing the security detection currently; wherein, the d-th key USB flash disk information H d =(KH d ,FH d1 ,FH d2 ,…,FH di ,…,FH dn ),KH d Read status identification (FH) of the d-th key USB flash disk di The method comprises the steps that the state parameters corresponding to the d key U disk and the i transformer substation server are used, and the key U disk is a target U disk passing safety detection; the key USB flash disk information is arranged according to the sequence of the corresponding key USB flash disk passing through the safety detection; KH (KH) d =1, the first USB interface where the d-th key USB disk is located is not currently connected to any substation server, KH d And (0), the first USB interface where the d-th key USB flash disk is located is currently connected with the transformer substation server.
Specifically, the security detection may detect whether a virus exists in the target usb disk, and if the target usb disk passes the security detection, the target usb disk indicates that the virus does not exist in the target usb disk.
Further, the state parameter is used for indicating whether the current target USB flash disk is in communication connection with the substation server.
If H is not NULL, step S300 is performed.
Specifically, if H is not NULL, it may be understood that there are one or more target U discs that do not complete communication connection with all supplements of each substation server; if the H is not NULL, the communication connection between the target USB flash disk passing the security detection and each substation server is completed by the target USB flash disk passing the security detection.
S400, continuously traversing H, and if the specified U disk information exists in the H, entering step S500; and designating the U disk information as the key U disk information with the earliest corresponding safety detection sequence in the key U disk information with the contained reading state identification of 1.
Specifically, the designated USB flash disk information is obtained through the following steps:
s401, continuously traversing H to obtain one or more pieces of intermediate U disk information; the intermediate USB flash disk information is key USB flash disk information with a reading state identification of 1;
specifically, if the designated usb disk information with the read status flag of 0 exists, the traversal H is stopped.
Further, the interval time of the traversal can be set by a person skilled in the art according to actual requirements, which is not described herein.
S402, taking the intermediate U disk information corresponding to the intermediate U disk with the earliest safety detection sequence as the designated U disk information.
S500, continuously polling n transformer substation servers according to the designated U disk information, and if the designated transformer substation servers exist in the n transformer substation servers, entering a step S600; the specified substation server is the substation server which is not connected with any first USB interface at present and has the highest importance degree, and the corresponding state parameter in the specified USB flash disk information is the second state parameter.
Specifically, when the state parameter is the second state parameter, the target USB flash disk corresponding to the current designated USB flash disk information is not in communication connection with the current designated substation server.
Further, the designated substation server is obtained through the following steps:
s501, continuously polling n transformer substation servers according to the designated U disk information to acquire one or more transformer substation servers which are not currently connected with any first USB interface;
specifically, the interval time of the polling can be set by a person skilled in the art according to actual needs, which is not described herein.
S502, acquiring a transformer substation server with a second state parameter corresponding to the designated U disk information in one or more transformer substation servers which are not connected with any first USB interface at present as an intermediate transformer substation server;
and S503, taking the intermediate substation server with the highest importance degree as a designated substation server.
And S600, the drive control module carries out communication connection on a first USB interface where the key USB flash disk corresponding to the specified USB flash disk information is located and the specified transformer substation server.
S700, adjusting a state parameter corresponding to a specified substation server in the specified U disk information to be a first state parameter, adjusting a reading state identifier in the specified U disk information to be 0, and entering step S300.
Specifically, when the state parameter is the first state parameter, the state parameter indicates that the target USB flash disk corresponding to the current designated USB flash disk information has been in communication connection with the current designated substation server.
Further, any of the substation servers is configured to disconnect the first USB port where the currently connected target USB disk is located after the data in the currently connected target USB disk is read.
Further, the H is configured to adjust the read status identifier included in the key USB disk information to 1 if the first USB port where the key USB disk corresponding to the key USB disk information is located is not currently connected to any substation server.
Further, the H is configured to delete any critical usb disk information from the H if all the state parameters included in the critical usb disk information are the first state parameters. It can be understood that when any target usb disk passing through the security detection is communicatively connected to each substation server, the key usb disk information corresponding to the target usb disk is deleted from H, and when any target usb disk passing through the security detection is communicatively connected to each substation server, the key usb disk information corresponding to the target usb disk does not need to be traversed, so that the key usb disk information is directly deleted from H, the efficiency of subsequent H traversal is improved, and the time for H traversal is saved.
The invention provides a USB flash disk reading control method, which is characterized in that m first USB interfaces are accessed into target USB flash disks, a detection sequence list corresponding to the m target USB flash disks is obtained, data in each target USB flash disk is sequentially subjected to safety detection according to the detection sequence list, a key USB flash disk information queue is updated after each target USB flash disk passes through the safety detection, the key USB flash disk information queue is continuously traversed, if specified USB flash disk information exists in the key USB flash disk information queue, n transformer substation servers are continuously polled according to the specified USB flash disk information, if the specified transformer substation servers exist in the n transformer substation servers, a driving control module is in communication connection with the first USB interfaces corresponding to the specified USB flash disk information and the specified transformer substation servers, state parameters corresponding to the specified transformer substation servers in the specified USB flash disk information are adjusted to be first state parameters, a reading state identifier in the specified USB flash disk information is adjusted to be 0, and the key USB flash disk information queue is continuously traversed again.
Through the steps, (1) the reading efficiency of the data is improved, namely, in the prior art, the USB flash disk is usually read one by one, and the data cannot be read in parallel among a plurality of devices, so that the reading efficiency is lower. In the method, a plurality of USB flash discs can be simultaneously connected into a plurality of USB interfaces, and the connection of each USB flash disc to each transformer substation server can be independently controlled through the control module, so that the problem of low reading efficiency of a single USB flash disc is solved, and the data reading efficiency is improved.
(2) The data security is high: in the control method, when all U disks are accessed to a control system, security detection is needed, and only the U disks passing the security detection can be added into a key U disk information queue and further controlled by a control module to read data. The design effectively ensures the safety of data and avoids the data risk possibly caused by viruses in illegal U disk and U disk.
(3) Ensuring the correctness of key operations: according to the method, the reading state identification and the two state parameters are set, so that the connection states of different U disks and the transformer substation server are controlled, disorder in the data reading process can be prevented, and the accuracy of data reading is ensured. In addition, after the data reading is completed, the safety of the equipment is protected by disconnecting the connection, meanwhile, the queue is also arranged, and the completed key U disk information is removed from the queue, so that the operation flow is simplified.
In an exemplary embodiment of the present invention, if the data type of the file to be read corresponding to any target usb disk is one, FV obtains the data type of the file to be read by:
s110, acquiring a data volume list FM= (FM) of a file to be read corresponding to the target USB flash disk 1 ,FM 2 ,…,FM j ,…,FV m ) The value of j is 1 to m, and m is the number of target U disks; wherein FM j The data size of the file to be read corresponding to the jth target USB flash disk is obtained;
s120, acquiring a first specified detection priority list DM= (DM) according to FM 1 ,DM 2 ,…,DM j ,…,DM m );DM j The first appointed detection priority corresponding to the jth target USB flash disk and DM j Meets the following conditions:
wherein D is j Is FM j Corresponding unit data volume processing time;
s130, arranging the first appointed detection priority in the DM according to the sequence from large to small to generate FV.
According to the method, the sum of products between the data amount of each data type and the processing time in the file to be read corresponding to the calculated first specified detection priority is smaller, the corresponding first specified detection priority of the substation server is larger, so that when the sum of products between the data amount of each data type and the processing time in the file to be read corresponding to the calculated first specified detection priority is smaller, the corresponding first specified detection priority is larger, and the first specified detection priority is larger, the target U disk corresponding to the first specified detection priority needs to be detected earlier, and therefore, the time for which the target U disk is detected is short in priority processing considering the amount of the target data to be read, the target U disk can be accessed to the substation server more quickly, and in this way, the target U disk with the larger first specified detection priority should be detected preferentially.
In another exemplary embodiment of the present invention, if there are a plurality of data types of files to be read corresponding to any target usb disk, FV obtains the data types of the files to be read by:
s101, acquiring a data type list set PM= (PM) of a file to be read corresponding to a target U disk 1 ,PM 2 ,…,PM j ,…,PV m ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein, the data type list PM of the file to be read corresponding to the jth target U disk j =(PM j1 ,PM j2 ,…,PM jt ,…,PM jT(j) ) T is 1 to T (j), T (j) is the number of data types of the file to be read corresponding to the jth target U disk, and PM jt The data type of the file to be read corresponding to the jth target USB flash disk is the jth data type of the file to be read;
s102, acquiring a second specified detection priority list TM= (TM) according to PM 1 ,TM 2 ,…,TM j ,…,TM m );TM j For the second designated detection priority corresponding to the jth target USB flash disk, TM j Meets the following conditions:
wherein N is jt Is PM jt Corresponding unit data volume processing time;
s103, arranging the second designated detection priority in the TM according to the order from small to large, and generating FV.
In the above, it is considered that multiple data types corresponding to the target files to be processed may exist, so that the first target detection priority obtained by adding the data types of the target files to be read of the same target usb disk after being calculated alone is more accurate.
In another exemplary embodiment provided by the invention, if the number of the substation servers and the number of the first USB interfaces are n, determining the detection sequence of the target USB flash disk by the method is applied to a detection sequence determining system, wherein the detection sequence determining system comprises a database, n substation servers, an industrial personal computer and a control module, each substation server and each industrial personal computer are in communication connection with the control module, and the database comprises importance degrees corresponding to each substation server.
Specifically, the control module is provided with a singlechip, a first USB interface, a second USB interface and a third USB interface; the number of the transformer substation server, the first USB interface, the third USB interface, the first switch and the second switch is n; a fifth USB interface is arranged on each transformer substation server; the ith first USB interface is connected with the second USB interface through the ith first switch; the ith first USB interface is connected with the third USB interface through the ith second switch; the ith third USB interface is connected with a fifth USB interface of the ith transformer substation server; the single chip microcomputer is connected with each first switch and each second switch, the first USB interface is used for being connected with a target USB flash disk, and when the first USB interface is not connected with the target USB flash disk, the first switch is in a closed state, and the second switch is in an open state; the transformer station server and the industrial personal computer are in a peer-to-peer relationship; the industrial personal computer is provided with a safety detection program; i has a value of 1 to n, n is more than or equal to 2.
Specifically, the target usb disk is a usb disk to be connected to the substation server, and the target usb disk may be a usb disk that includes only a communication protocol connected to the substation server or includes substation data in addition to a communication protocol connected to the substation server.
Furthermore, the substation server is difficult to directly carry out communication connection with the industrial personal computer.
The method comprises the following steps:
responding to m target U disks in communication connection with a control module, and acquiring a target file information list Z= (Z) to be read corresponding to the target U disk 1 ,Z 2 ,……,Z j ,……,Z m ) The value of j is 1 to m, and m is the number of target U disks; wherein, the target to-be-read file information Z corresponding to the jth target USB flash disk j =(ZS j ,ZB j ),ZS j ZB is the target file data quantity to be read of the jth target U disk j And the importance degree corresponding to the transformer substation server which needs to be in communication connection with the jth target USB flash disk is obtained.
Specifically, since only one external USB interface exists in each substation server, and in order to prevent errors in data transmission, the number of one substation server and the target USB flash disk is smaller than or equal to the number of the substation servers at the same time, that is, m is smaller than or equal to n.
Further, the importance degree corresponding to the transformer substation server can be understood as the priority corresponding to the transformer substation server, and the higher the importance degree of the transformer substation server is, the more important the transformer substation server is proved.
According to Z, a first target detection priority list JY= (JY) corresponding to the target U disk is obtained 1 ,JY 2 ,……,JY j ,……,JY m ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein JY i For the first target detection priority corresponding to the jth target USB flash disk, JY j Meets the following conditions:
specifically, if the database further includes an ID list of the key usb disk, a first target detection priority corresponding to the target usb disk is processed in a first manner; the key USB flash disk is a USB flash disk which needs a substation server to write substation data;
the first mode includes:
acquiring the ID of a target U disk corresponding to each target U disk;
traversing an ID list of the key U disk according to the ID of each target U disk, and setting a first target detection priority of a target U disk corresponding to the ID of the target U disk which is identical to the ID of any key U disk in the ID list of the key U disk as a first target priority; wherein the first target priority is ≡.
Further, if the database does not include the ID list of the key USB flash disk, processing the first target detection priority corresponding to the target USB flash disk in a second mode;
the second mode includes:
the control module detects the data quantity of the target to-be-read file corresponding to each target USB flash disk, and sets a first target detection priority corresponding to the target USB flash disk with the data quantity of 0 of the target to-be-read file as a second target priority; wherein the second target priority is the same as the first target priority.
In the above, since the target usb disk not only has a usb disk that needs to be read by the substation server, but also has a usb disk that needs to be written by the substation server, and when the target usb disk that needs to be written does not have a target file to be read, the key usb disk has no file that needs to be detected, and the processing time is fast, so that the priority corresponding to the key usb disk is set to ++priority for detection.
Arranging the first target detection priorities in order from small to large to generate a second target detection priority list TY= (TY) 1 ,TY 2 ,……,TY j ,……,TY m ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein TY is j The priority is detected for the j-th second target.
Specifically, the smaller the first target detection priority is, the earlier the target usb disk corresponding to the first target detection priority needs to be detected, the higher the importance of the substation server corresponding to the first target priority calculated according to the above formula is, and the smaller the target to-be-read file of the corresponding target usb disk is, the smaller the first target detection priority is, and because the target usb disk which is detected first can be preferentially accessed to the corresponding server, and the smaller the target to-be-read file of the target usb disk is, the shorter the time spent for detection is, so that in order to make the substation server with high importance faster be connected to the corresponding target usb disk, the shorter the time for which the target usb disk is detected is prioritized, and the faster the target usb disk can be accessed to the substation server, so that the target usb disk with lower the first target detection priority should be preferentially detected.
According to TY, a detection order list ZU= (ZU) 1 ,ZU 2 ,……,ZU j ,……,ZU m ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein ZU j Is TY j And the USB flash disk identifier of the corresponding target USB flash disk.
Specifically, the usb disk identifier is a unique identifier of the target usb disk, and the usb disk identifiers corresponding to any two target usb disks are different.
The method comprises the steps of responding to m target U disks in communication connection with a control module, obtaining a target file information list to be read corresponding to the target U disk, obtaining a first target detection priority list corresponding to the target U disk, arranging the first target detection priorities according to the sequence from small to large, generating a second target detection priority list, and obtaining a detection sequence list; the detection priority is allocated to the U disk by considering factors such as importance degree of the transformer substation server and data quantity of the file to be read, so that the detection sequence is more reasonable, and the method is suitable for differences of the data quantity among different U disks and the importance degree of the transformer substation server. The target USB flash disk which is detected firstly can be preferentially accessed to the corresponding server, and the shorter the target file to be read corresponding to the target USB flash disk is, the shorter the detection time is, so that in order to enable the substation server with high importance to be connected with the corresponding target USB flash disk more quickly, the priority processing of the short detection time of the target USB flash disk is considered, and the target USB flash disk can be accessed to the substation server more quickly, and therefore the target USB flash disk with smaller first target detection priority should be preferentially detected, and the detection efficiency is effectively improved. The detection priority of the USB flash disk is automatically calculated, errors of manual adjustment and assignment are reduced, and error rate is reduced. Through realizing more intelligent, automatic USB flash disk detection order confirm, promote electric power system's automation level.
In an exemplary embodiment of the present invention, when the control module includes only one first USB interface, the connection sequence of the server is determined by the following steps, and the method is applied to a substation server connection sequence determining system, where the substation server connection sequence determining system includes a database, n substation servers, an industrial personal computer, and a control module, where the database stores importance degrees corresponding to each substation server, and the control module is provided with a single chip microcomputer, a first USB interface, a second USB interface, and n third USB interfaces; the first USB interface is connected with the second USB interface through a first switch, the first USB interface is connected with an ith third USB interface through an ith second switch, the single chip microcomputer is connected with the first switch, the second switch and the second USB interface, a fourth USB interface is arranged on the industrial personal computer, the second USB interface is connected with the fourth USB interface, a fifth USB interface is arranged on each transformer substation server, and the fifth USB interface on the ith transformer substation server is connected with the ith third USB interface; the first USB interface is used for being connected with a target USB flash disk, and when the first USB interface is not connected with the target USB flash disk, the first switch is in a closed state, and the second switch is in an open state; the transformer station server and the industrial personal computer are in a peer-to-peer relationship; the industrial personal computer is provided with a safety detection program.
The method comprises the following steps:
the industrial personal computer responds to the connection of the target USB flash disk and the first USB interface, and controls a safety detection program to detect whether a preset certificate exists in the target USB flash disk or not;
if the target USB flash disk is provided with the preset certificate, the industrial personal computer controls a safety detection program to carry out safety detection on data in the target USB flash disk;
acquiring a target file data quantity SL to be read corresponding to a target U disk;
according to SL, a first connection priority list LD= (LD) corresponding to the substation server is obtained 1 ,LD 2 ,……,LD i ,……,LD n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein LD i For the first connection priority, LD corresponding to the ith substation server i Meets the following conditions:
wherein, CD i The importance degree corresponding to the ith transformer station server;
in an exemplary embodiment of the present invention, if the data types of the file sets to be read corresponding to the target usb disk are multiple and there are two substation servers that need to read the data types corresponding to the target file sets to be read that are not completely the same, the LD i The method comprises the following steps of:
acquiring a target data volume list set corresponding to a transformer substation serverU=(U 1 ,U 2 ,……,U i ,……,U n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein, the target data volume list U corresponding to the ith transformer station server i =(U i1 ,U i2 ,……,U if ,……,U iF(i) ) The value of F is 1 to F, F is the number of data types in the target file to be read corresponding to the target USB flash disk, and U is the number of data types in the target file to be read if The method comprises the steps that the target data volume corresponding to the f data type which is required to be read in a target file to be read is obtained for an i-th substation server;
acquiring LD from U i ,LD i Meets the following conditions:
wherein UT (UT) if Is U (U) if Corresponding unit processing time.
In an exemplary embodiment of the present invention, if the database further includes an identification list of a key substation server, the first connection priority is processed by the following steps; the key substation server is a substation server which needs to write substation data into the target U disk;
acquiring a corresponding identifier of each transformer substation server;
traversing an identification list of the key substation servers according to the identification of each substation server, and setting a first connection priority of the substation server corresponding to the identification of the substation server with the same identification as any key substation server in the identification list of the key substation server as a fifth target priority; wherein the fifth target priority is ≡infinity.
Arranging the first connection priorities in order from small to large, and generating a second connection priority list td= (TD 1 ,TD 2 ,……,TD i ,……,TD n ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein TD i Is the ith second connection priority;
specifically, the higher the importance of the substation server corresponding to the first connection priority calculated according to the above formula is, the target usb disk corresponding to the substation server needs to be connected with the substation server as soon as possible, and in the above formula, if the other parameters are the same except for the importance of the substation server, the higher the importance of the substation server is, the smaller the first connection priority of the substation server corresponding to the same, and the larger the data size of the target to-be-read file corresponding to the target usb disk is, the smaller the first connection priority is, and the earlier the target usb disk corresponding to the first connection priority needs to be detected; therefore, in order to enable the substation server with high importance to be connected with the corresponding target USB flash disk more quickly, the priority processing of the detected target USB flash disk with short time is considered in consideration of the quantity of the target data to be read, so that the target USB flash disk with smaller connection priority can be connected to the substation server more quickly, and therefore the target USB flash disk with smaller connection priority should be detected preferentially.
And according to the TD, the control module controls the target U disk to be connected with the transformer substation server corresponding to each second connection priority in sequence.
The industrial personal computer responds to the connection of the target USB flash disk and the first USB interface, controls the safety detection program to detect whether a preset certificate exists in the target USB flash disk, if the preset certificate exists in the target USB flash disk, the industrial personal computer controls the safety detection program to perform safety detection on data in the target USB flash disk, obtains the data quantity of the target file to be read corresponding to the target USB flash disk, obtains a first connection priority list corresponding to the substation server, arranges the first connection priorities in sequence from small to large, generates a second connection priority list, and controls the target USB flash disk to be connected with the substation server corresponding to each second connection priority in sequence; the detection priority is allocated to the USB flash disk by considering factors such as importance of the transformer substation server, so that the detection sequence is more reasonable, and the difference of importance of the transformer substation server is adapted. Because the transformer substation server with high importance degree can be connected with the target USB flash disk preferentially, the transformer substation server with high importance degree can be connected with the corresponding target USB flash disk more quickly, so that the read-write efficiency of the transformer substation server is effectively improved. And the connection priority is automatically calculated, so that errors of manual adjustment and assignment are reduced, and the error rate is reduced. The connection sequence of the substation servers is determined by realizing more intelligent and automatic connection, so that the automation level of the power system is improved.
Embodiments of the present invention also provide a non-transitory computer readable storage medium that may be disposed in an electronic device to store at least one instruction or at least one program for implementing one of the methods embodiments, the at least one instruction or the at least one program being loaded and executed by the processor to implement the methods provided by the embodiments described above.
Embodiments of the present invention also provide an electronic device comprising a processor and the aforementioned non-transitory computer-readable storage medium.
Embodiments of the present invention also provide a computer program product comprising program code for causing an electronic device to carry out the steps of the method according to the various exemplary embodiments of the invention as described in the specification, when said program product is run on the electronic device.
While certain specific embodiments of the invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the invention. Those skilled in the art will also appreciate that many modifications may be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.

Claims (10)

1. The USB flash disk reading control method is characterized by being applied to a USB flash disk reading control system, wherein the USB flash disk reading control system comprises a database, an industrial personal computer, a control module and n transformer substation servers, the database stores importance degrees corresponding to each transformer substation server, the control module comprises n first USB interfaces, each transformer substation server and the industrial personal computer are connected with the control module, the first USB interfaces are used for connecting a target USB flash disk, the control module is used for controlling any first USB interface to be in communication connection with any transformer substation server, and the value of i is 1 to n, and n is more than or equal to 2;
the method comprises the following steps:
s100, responding to the fact that m first USB interfaces are all connected into the target U disk, and acquiring detection sequence lists FV corresponding to the m target U disks;
s200, sequentially carrying out security detection on data in each target U disk according to FV, and updating a key U disk information queue H= (H) after each target U disk passes the security detection 1 ,H 2 ,…,H d ,…,H D ) D is 1 to D, and D is the number of target U disks passing the security detection currently; wherein, the d-th key USB flash disk information H d =(KH d ,FH d1 ,FH d2 ,…,FH di ,…,FH dn ),KH d Read status identification (FH) of the d-th key USB flash disk di The method comprises the steps that the state parameters corresponding to the d key U disk and the i transformer substation server are used, and the key U disk is a target U disk passing safety detection; the key USB flash disk information is arranged according to the sequence of the corresponding key USB flash disk passing through the safety detection; KH (KH) d =1, the first USB interface where the d-th key USB disk is located is not currently connected to any substation server, KH d If the USB interface is=0, the first USB interface where the d-th key USB flash disk is located is currently connected with the transformer substation server;
s300, if H is not NULL, proceeding to step S400;
s400, continuously traversing H, and if the specified U disk information exists in the H, entering step S500; designating the USB flash disk information as the key USB flash disk information with the earliest corresponding safety detection sequence in the key USB flash disk information with the reading state identification of 1;
s500, continuously polling n transformer substation servers according to the designated U disk information, and if the designated transformer substation servers exist in the n transformer substation servers, entering a step S600; the specified substation server is the substation server which is not connected with any first USB interface at present and has the highest importance degree, and the corresponding state parameter in the specified USB flash disk information is the second state parameter;
s600, the drive control module carries out communication connection on a first USB interface where a key USB flash disk corresponding to the designated USB flash disk information is located and a designated substation server;
s700, adjusting a state parameter corresponding to a specified substation server in the specified U disk information to be a first state parameter, adjusting a reading state identifier in the specified U disk information to be 0, and entering step S300.
2. The method of claim 1, wherein any of the substation servers is configured to disconnect a first USB port where a currently connected target USB disk is located after reading data in the currently connected target USB disk is completed;
and H is configured to adjust the reading state identifier contained in the key USB disk information to be 1 if the first USB port of the key USB disk corresponding to the key USB disk information is not currently connected with any transformer substation server.
3. The method of claim 1, wherein H is configured to delete any critical usb disk information from H if all state parameters included in the critical usb disk information are the first state parameters.
4. The method of claim 1, wherein the designated usb disk information is obtained by:
s401, continuously traversing H to obtain one or more pieces of intermediate U disk information; the intermediate USB flash disk information is key USB flash disk information with a reading state identification of 1;
s402, taking the intermediate U disk information corresponding to the intermediate U disk with the earliest safety detection sequence as the designated U disk information.
5. The method of claim 1, wherein the designated substation server is obtained by:
s501, continuously polling n transformer substation servers according to the designated U disk information to acquire one or more transformer substation servers which are not currently connected with any first USB interface;
s502, acquiring a transformer substation server with a second state parameter corresponding to the designated U disk information in one or more transformer substation servers which are not connected with any first USB interface at present as an intermediate transformer substation server;
and S503, taking the intermediate substation server with the highest importance degree as a designated substation server.
6. The method of claim 1, wherein if the data types of the files to be read corresponding to any target usb disk are all one, the FV obtains the data types by:
s110, acquiring a data volume list FM= (FM) of a file to be read corresponding to the target USB flash disk 1 ,FM 2 ,…,FM j ,…,FV m ) The value of j is 1 to m, and m is the number of target U disks; wherein FM j The data size of the file to be read corresponding to the jth target USB flash disk is obtained;
s120, acquiring a first specified detection priority list DM= (DM) according to FM 1 ,DM 2 ,…,DM j ,…,DM m );DM j The first appointed detection priority corresponding to the jth target USB flash disk and DM j Meets the following conditions:
DM j =e -Dj×FMj the method comprises the steps of carrying out a first treatment on the surface of the Wherein D is j Is FM j Corresponding unit data volume processing time;
s130, arranging the first appointed detection priority in the DM according to the sequence from large to small to generate FV.
7. The method of claim 6, wherein if there are a plurality of data types of the file to be read corresponding to any target usb disk, the FV obtains the data types by:
s101, acquiring a data type list set PM= (PM) of a file to be read corresponding to a target U disk 1 ,PM 2 ,…,PM j ,…,PV m ) The method comprises the steps of carrying out a first treatment on the surface of the Wherein, the data type list PM of the file to be read corresponding to the jth target U disk j =(PM j1 ,PM j2 ,…,PM jt ,…,PM jT(j) ) T is 1 to T (j), T (j) is the number of data types of the file to be read corresponding to the jth target U disk, and PM jt The data type of the file to be read corresponding to the jth target USB flash disk is the jth data type of the file to be read;
s102, acquiring a second specified detection priority list TM= (TM) according to PM 1 ,TM 2 ,…,TM j ,…,TM m );TM j For the second designated detection priority corresponding to the jth target USB flash disk, TM j Meets the following conditions:
wherein N is jt Is PM jt Corresponding unit data volume processing time;
s103, arranging the second designated detection priority in the TM according to the sequence from large to small to generate FV.
8. The method of claim 1, wherein m.ltoreq.n.
9. A non-transitory computer readable storage medium having stored therein at least one instruction or at least one program loaded and executed by a processor to implement the method of any one of claims 1-8.
10. An electronic device comprising a processor and the non-transitory computer readable storage medium of claim 9.
CN202310930547.0A 2023-07-27 2023-07-27 USB flash disk reading control method, electronic equipment and storage medium Pending CN116880770A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310930547.0A CN116880770A (en) 2023-07-27 2023-07-27 USB flash disk reading control method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310930547.0A CN116880770A (en) 2023-07-27 2023-07-27 USB flash disk reading control method, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116880770A true CN116880770A (en) 2023-10-13

Family

ID=88256714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310930547.0A Pending CN116880770A (en) 2023-07-27 2023-07-27 USB flash disk reading control method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116880770A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160320785A1 (en) * 2015-04-30 2016-11-03 Abb Inc. Secured Control of Circuit Breakers in a Digital Substation
US10318346B1 (en) * 2016-09-23 2019-06-11 Amazon Technologies, Inc. Prioritized scheduling of data store access requests
CN111552974A (en) * 2020-03-19 2020-08-18 沈阳通用软件有限公司 USB flash disk encryption and decryption method based on Windows operating system
WO2020211378A1 (en) * 2019-04-15 2020-10-22 平安科技(深圳)有限公司 Request processing method and apparatus, computer device and storage medium
CN113778916A (en) * 2021-08-03 2021-12-10 西安万像电子科技有限公司 Data processing method and device
CN114865793A (en) * 2022-06-01 2022-08-05 沈强 Substation equipment intelligent management system and method based on big data
WO2022188440A1 (en) * 2021-03-11 2022-09-15 中国电信股份有限公司 Method and apparatus for adjusting data forwarding queue, and computer-readable storage medium
CN115827111A (en) * 2023-02-16 2023-03-21 苏州浪潮智能科技有限公司 Method and device for adjusting server startup items, storage medium and electronic device
US20230195339A1 (en) * 2020-09-30 2023-06-22 Fujitsu Limited Control method, information processing device, non-transitory computer-readable recording medium storing control program, and information processing system
CN116301644A (en) * 2023-03-24 2023-06-23 四川水利职业技术学院 Data storage method, system, terminal and medium based on multi-hard disk coordination

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160320785A1 (en) * 2015-04-30 2016-11-03 Abb Inc. Secured Control of Circuit Breakers in a Digital Substation
US10318346B1 (en) * 2016-09-23 2019-06-11 Amazon Technologies, Inc. Prioritized scheduling of data store access requests
WO2020211378A1 (en) * 2019-04-15 2020-10-22 平安科技(深圳)有限公司 Request processing method and apparatus, computer device and storage medium
CN111552974A (en) * 2020-03-19 2020-08-18 沈阳通用软件有限公司 USB flash disk encryption and decryption method based on Windows operating system
US20230195339A1 (en) * 2020-09-30 2023-06-22 Fujitsu Limited Control method, information processing device, non-transitory computer-readable recording medium storing control program, and information processing system
WO2022188440A1 (en) * 2021-03-11 2022-09-15 中国电信股份有限公司 Method and apparatus for adjusting data forwarding queue, and computer-readable storage medium
CN113778916A (en) * 2021-08-03 2021-12-10 西安万像电子科技有限公司 Data processing method and device
CN114865793A (en) * 2022-06-01 2022-08-05 沈强 Substation equipment intelligent management system and method based on big data
CN115827111A (en) * 2023-02-16 2023-03-21 苏州浪潮智能科技有限公司 Method and device for adjusting server startup items, storage medium and electronic device
CN116301644A (en) * 2023-03-24 2023-06-23 四川水利职业技术学院 Data storage method, system, terminal and medium based on multi-hard disk coordination

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
夏昀;: "基于FAT32文件系统的安全存储方案", 信息技术, no. 05 *
张维君;王威;任立鹏;: "基于MC9S12UF32加密U盘的研究与设计", 中国科技信息, no. 19 *

Similar Documents

Publication Publication Date Title
CN100517313C (en) Method and system of verifying metadata of a migrated file
CN104380263B (en) Backup image replicates
US9083673B2 (en) Systems, methods, and apparatus for facilitating claims processing
JP4838112B2 (en) Power consumption adjustment program, apparatus, and processing method
US8667567B2 (en) Apparatus and method for managing access among devices
EP3018581B1 (en) Data staging management system
CN116209995A (en) System and method for customer data handling
CN116880770A (en) USB flash disk reading control method, electronic equipment and storage medium
Abdullaev et al. Modelling segmental duplications in the human genome
CN113407973B (en) Software function authority management method, system, server and storage medium
CN116644487B (en) Safety detection system
CN116662017B (en) Method, equipment and medium for determining read-write sequence of industrial control server
US6279074B1 (en) Contention handling for task requests to storage devices within a host system
US20110084666A1 (en) Smart Cart To Automatically Manage Portable Information Handling Systems
CN116955049A (en) Method for determining detection sequence, electronic equipment and storage medium
CN116846665A (en) Method, equipment and medium for determining connection sequence of transformer substation servers
US20080215806A1 (en) Access control management
EP4102380A1 (en) Database offloading utilizing a locater index
CN111638885A (en) Plug-in issuing method and device, electronic equipment and storage medium
US10305740B2 (en) System and method for performing mass renaming of list of items at run-time with variable differentiation factor
CN112000390B (en) User information management method, device, electronic equipment and storage medium
CN113655967A (en) Method and device for deleting disk, electronic equipment and computer storage medium
CN114490267A (en) Method and device for acquiring state information of hard disk
US10783931B1 (en) Robotic device movement optimization in data storage library systems
US8561076B1 (en) Prioritization and queuing of media requests

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination