CN105446856A - Electronic device interface detection method and apparatus - Google Patents

Electronic device interface detection method and apparatus Download PDF

Info

Publication number
CN105446856A
CN105446856A CN201510770319.7A CN201510770319A CN105446856A CN 105446856 A CN105446856 A CN 105446856A CN 201510770319 A CN201510770319 A CN 201510770319A CN 105446856 A CN105446856 A CN 105446856A
Authority
CN
China
Prior art keywords
electronic equipment
unit
speed
binding
file
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.)
Granted
Application number
CN201510770319.7A
Other languages
Chinese (zh)
Other versions
CN105446856B (en
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.)
Huzhou Yinglie Intellectual Property Operation Co ltd
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201510770319.7A priority Critical patent/CN105446856B/en
Publication of CN105446856A publication Critical patent/CN105446856A/en
Application granted granted Critical
Publication of CN105446856B publication Critical patent/CN105446856B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3027Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The present invention discloses an electronic device interface detection method. The method comprises: detecting an external storage device accessed by an electronic device interface; binding the detected external storage device to a preset binding directory by using a hot-plug mechanism; storing the preset binding directory and a device path into a specified file; reading the preset binding directory and the device path from the specified file so as to confirm whether the external storage device exists; and when it is confirmed that the external storage device exists, detecting a writing speed and a reading speed of the electronic device interface by a detection command. Accordingly, the present invention also discloses an electronic device interface detection apparatus and an electronic device. According to the technical scheme adopted by the present invention, a test of the writing speed and the reading speed of the electronic device interface is implemented, and efficiency and comprehensiveness of the electronic device interface test are improved.

Description

The detection method of electronic equipment interfaces, device
Technical field
The present invention relates to field of electric control, particularly relate to a kind of detection method of electronic equipment interfaces, device.
Background technology
The exterior storage interface of electronic equipment realizes electronic equipment to expand the important interface storing and exchange outside storage device data.The existing test for electronic device exterior memory interface, usually when accessing External memory equipment, manual input test order is tested External memory equipment, and be only limitted to can normally read-write capability test and cannot the writing speed of test electronic interface and reading speed, cause testing efficiency not high and test function is limited.
Summary of the invention
Given this, the invention provides a kind of detection method of electronic equipment interfaces, device and equipment, the not high and technical matters that test function is limited of the testing efficiency solving the existing exterior storage interface for electronic equipment.
According to embodiments of the invention, a kind of detection method of electronic equipment interfaces is provided, comprises: the External memory equipment of detected electrons equipment interface access; By hot plug mechanism, the External memory equipment detected is tied to default binding catalogue; Described default binding catalogue and device path are saved in specified file; Described default binding catalogue and device path is read to confirm whether described External memory equipment exists from described specified file; And when described External memory equipment confirms to exist, detected writing speed and the reading speed of described electronic equipment interfaces by sense command.
Preferably, described being tied to by the External memory equipment detected by hot plug mechanism is preset binding catalogue step and is comprised: call hot plug events process function, and read the device node of described External memory equipment and the system format of partitioned file according to implementor name and environmental variance; And bind described device node to presetting binding catalogue according to the system format select command of described partitioned file.
Preferably, the described system format select command according to described partitioned file is bound described device node and is also comprised to presetting binding catalogue step: whether the system format judging described partitioned file is new technology file system; When the system format of described partitioned file is judged as new technology file system, select device node described in ntfs-3g command binding to presetting binding catalogue; And when the system format of described partitioned file judges not as new technology file system, select device node described in mount command binding to presetting binding catalogue.
Preferably, describedly the writing speed of the interface of described electronic equipment is detected when described External memory equipment confirms to exist by sense command and reading speed step comprises: the writing speed being detected the interface of described electronic equipment by sense command; Judge that whether the writing speed detected is up to standard; And when said write speed is up to standard, detected the reading speed of the interface of described electronic equipment by sense command; And when said write speed is below standard, export said write speed and dependence test failure information.
Preferably, the described writing speed step being detected the interface of described electronic equipment by sense command is comprised: write the null character (NUL) stream file of default file size by dd order to described default binding catalogue and record the beginning and ending time; And calculate writing speed according to the default file size of described null character (NUL) stream file and beginning and ending time.
Preferably, the described reading speed step being detected the interface of described electronic equipment by sense command is comprised: in described default binding catalogue, read the data file of default file size by dd order and record the beginning and ending time; And calculate reading speed according to the default file size of described data file and beginning and ending time.
Preferably, described detected the reading speed step of the interface of described electronic equipment by sense command when said write speed is up to standard after also comprise: judge that whether the reading speed that detects up to standard; And when described reading speed is up to standard, export the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information.
Preferably, said write speed, reading speed and dependence test failure information is exported when described reading speed is below standard.
Preferably, also comprised before the External memory equipment of described detected electrons equipment interface access: at the hot plug events of the kernel registration External memory equipment of described electronic equipment.
Preferably, also comprise after the writing speed being detected the interface of described electronic equipment by sense command described and reading speed step: export the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information.
According to another embodiment of the present invention, a kind of pick-up unit of electronic equipment interfaces is provided, comprises: detecting unit, for the External memory equipment of detected electrons equipment interface access; Binding unit, for being tied to default binding catalogue by hot plug mechanism by the External memory equipment that described detecting unit detects; Storage unit, for being saved in specified file by described default binding catalogue and device path; Confirmation unit, for reading described default binding catalogue and device path to confirm whether described External memory equipment exists from described specified file; And read or write speed detecting unit, during for confirming that when described confirmation unit described External memory equipment confirms to exist, detected writing speed and the reading speed of described electronic equipment interfaces by sense command.
Preferably, described binding unit comprises: hot plug processing unit, for calling hot plug events process function, and reads the device node of described External memory equipment and the system format of partitioned file according to implementor name and environmental variance; And binding processing unit, the system format select command for the described partitioned file read according to described hot plug processing unit binds described device node to presetting binding catalogue.
Preferably, described binding processing unit comprises: zoned format judging unit, for judging whether the system format of described partitioned file is new technology file system; Select binding unit, for when the system format that described zoned format judging unit judges described partitioned file is new technology file system, select device node described in ntfs-3g command binding to presetting binding catalogue, and when described zoned format judging unit judges the system format of described partitioned file not as new technology file system, select device node described in mount command binding to presetting binding catalogue.
Preferably, described read or write speed detecting unit comprises: writing speed detecting unit, for being detected the writing speed of the interface of described electronic equipment by sense command; Judging unit, whether up to standard for judging the writing speed that said write speed detection unit detects; Reading speed detecting unit, for detecting the reading speed of the interface of described electronic equipment by sense command when described judging unit judges that said write speed is up to standard; And output unit, for exporting said write speed and dependence test failure information when described judging unit judges that writing speed is below standard.
Preferably, said write speed detection unit comprises: writing unit, for being write the null character (NUL) stream file of default file size by dd order to described default binding catalogue and record the beginning and ending time; And writing speed computing unit, calculate writing speed for the default file size of described null character (NUL) stream file that writes according to said write unit and beginning and ending time.
Preferably, described reading speed detecting unit comprises: reading unit, for reading the data file of default file size by dd order in described default binding catalogue and recording the beginning and ending time; And reading speed computing unit, calculate reading speed for the default file size of described data file that reads according to described reading unit and beginning and ending time.
Preferably, whether described judging unit is also up to standard for judging the reading speed that described reading speed detecting unit detects, when described judging unit judges that described reading speed is up to standard, described output unit is also for exporting the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information.
Preferably, when described judging unit judges that described reading speed is below standard, described output unit is also for exporting said write speed, reading speed and dependence test failure information.
Preferably, the pick-up unit of described electronic equipment interfaces also comprises hot plug events registering unit, for the hot plug events of the kernel registration External memory equipment at described electronic equipment.
Preferably, the pick-up unit of described electronic equipment interfaces also comprises output unit, for exporting the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information.
According to further embodiment of this invention, also provide a kind of electronic equipment, described electronic equipment comprises the pick-up unit of above-mentioned electronic equipment interfaces.
The detection method of electronic equipment interfaces provided by the invention, device and equipment, by the External memory equipment of hot plug mechanism binding access, and writing speed and the reading speed of the interface of described electronic equipment is detected by test instruction, with existing test for electronic equipment interfaces time need manual input test order to compare with limited test function, achieve the writing speed of electronic equipment interfaces and the test of reading speed, improve the efficiency of electronic equipment interfaces test and the comprehensive of test.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described.Apparently, the accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the schematic flow sheet of the detection method of electronic equipment interfaces in first embodiment of the invention.
Fig. 2 is the schematic flow sheet of the binding External memory equipment of the detection method of electronic equipment interfaces in first embodiment of the invention.
Fig. 3 is the writing speed of detected electrons equipment interface and the schematic flow sheet of reading speed of the detection method of electronic equipment interfaces in first embodiment of the invention.
Fig. 4 is the structural representation of the pick-up unit of the electronic equipment interfaces of second embodiment of the invention.
Fig. 5 is the structural representation of the binding unit of the pick-up unit of the electronic equipment interfaces of second embodiment of the invention.
Fig. 6 is the structural representation of the read or write speed detecting unit of the pick-up unit of the electronic equipment interfaces of second embodiment of the invention.
Fig. 7 is the structural representation of the writing speed detecting unit of the pick-up unit of the electronic equipment interfaces of second embodiment of the invention.
Fig. 8 is the structural representation of the reading speed detecting unit of the pick-up unit of the electronic equipment interfaces of second embodiment of the invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, more detailed description is further done to technical scheme of the present invention.Obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the prerequisite of not making creative work, all should belong to the scope of protection of the invention.
In describing the invention, it is to be appreciated that term " first ", " second " etc. are only for describing object, and instruction or hint relative importance can not be interpreted as.In describing the invention, it should be noted that, unless otherwise clearly defined and limited, term " is connected ", " connection " should be interpreted broadly, such as, can be fixedly connected with, also can be removably connect, or connect integratedly; Can be mechanical connection, also can be electrical connection; Can be directly be connected, also indirectly can be connected by intermediary.For the ordinary skill in the art, above-mentioned term concrete meaning in the present invention can be understood in conjunction with concrete condition.In addition, in describing the invention, except as otherwise noted, the implication of " multiple " is two or more.
Describe and can be understood in process flow diagram or in this any process otherwise described or method, represent and comprise one or more for realizing the module of the code of the executable instruction of the step of specific logical function or process, fragment or part, and the scope of the preferred embodiment of the present invention comprises other realization, wherein can not according to order that is shown or that discuss, comprise according to involved function by the mode while of basic or by contrary order, carry out n-back test, this should understand by embodiments of the invention person of ordinary skill in the field.
Fig. 1 is the schematic flow sheet of the detection method of electronic equipment interfaces in first embodiment of the invention.As shown in the figure, the detection method of the electronic equipment interfaces that the present embodiment provides, comprising:
Step S101: the External memory equipment of detected electrons equipment interface access.
Wherein, described electronic equipment interfaces can be the physical interface of accessible External memory equipment arbitrarily, such as USB interface, SD card interface, TF card interface etc., for realizing the expansion storage of electronic equipment and the electronic data transfer with External memory equipment.In described electronic equipment kernel, register the hot plug events of External memory equipment in advance, the such as hot plug events of SD card or USB flash disk, can be accessed by interface when not closing described electronic equipment and read and write External memory equipment like this.
Step S102: the External memory equipment detected is tied to default binding catalogue by hot plug mechanism.
Concrete, Fig. 2 is the schematic flow sheet of the binding External memory equipment of the detection method of electronic equipment interfaces in first embodiment of the invention.As shown in the figure, the method for the binding External memory equipment of the detection method of electronic equipment interfaces described in step S102, comprising:
Step S201: call hot plug events process function, and read the device node of described External memory equipment and the system format of partitioned file according to implementor name and environmental variance.
Wherein, when electronic equipment has detected that External memory equipment accesses, the process function udevd of the hot plug events that the External memory equipment of Lunix system kernel invoke user layer registered in advance is corresponding, and transmit implementor name and the environmental variance of External memory equipment, udevd reads sys system file by libsysfs, the partition table of the described External memory equipment of such reading and device node, and obtain the file system format of each subregion.
Step S202: whether the system format judging described partitioned file is new technology file system.
Step S203: when the system format of described partitioned file is judged as new technology file system, selects device node described in ntfs-3g command binding to presetting binding catalogue.
Wherein, described default binding catalogue is the catalogue identical with zone name that kernel creates automatically, binds described device node to presetting binding catalogue according to the system format select command of described partitioned file.
Step S204: when the system format of described partitioned file judges not as new technology file system, selects device node described in mount command binding to presetting binding catalogue.
Step S103: described default binding catalogue and device path are saved in specified file.
By hot plug mechanism, the External memory equipment detected is tied to default binding catalogue like this, electronic equipment by the described default binding catalogue in the described specified file of reading and device path, can carry out follow-up reading and write test to the described External memory equipment of access.
Step S104: read described default binding catalogue and device path to confirm whether described External memory equipment exists from described specified file.
Step S105: when described External memory equipment confirms to exist, detected writing speed and the reading speed of described electronic equipment interfaces by sense command.
Concrete, Fig. 3 is the writing speed of detected electrons equipment interface and the schematic flow sheet of reading speed of the detection method of electronic equipment interfaces in first embodiment of the invention.As shown in the figure, the described writing speed of detected electrons equipment interface and the method for reading speed, specifically comprise:
Step S301: read described default binding catalogue and device path from described specified file.
The present embodiment is when carrying out electronic equipment interfaces test, electronic equipment can be connected computing machine by serial ports, to be checked by serial ports or to print relevant detecting information, such as testing apparatus designation number, test duration, writing speed, reading speed and test success failure information etc.
Step S302: confirm whether described External memory equipment exists.
Wherein, when described default binding catalogue and device path can be read in step S301, determine that described External memory equipment exists, continue follow-up writing speed and reading speed test; When described default binding catalogue and device path can not be read, determine that described External memory equipment does not exist, perform the non-existent test crash information of step S310 direct output detections equipment, exported or print the information of dependence test failure by serial ports of computers.
Step S303: write the null character (NUL) stream file of default file size by dd order to described default binding catalogue and record the beginning and ending time.
Step S304: according to default file size and the beginning and ending time calculating writing speed of described null character (NUL) stream file.
Like this, in step S303 and step S304, according to size and the time of dd order copy writing in files data, be easy to the writing speed of the interface calculating described electronic equipment.
Step S305: judge that whether the writing speed detected is up to standard.
Wherein, for dissimilar electronic equipment interfaces, the standard of writing speed is also not quite similar.In the present embodiment, the test of follow-up reading speed is then continued when writing speed is up to standard, perform step S310 when writing speed is not up to standard and directly export writing speed and test crash information, exported or print the information of relevant writing speed and test crash by serial ports of computers.
Step S306: read the data file of default file size by dd order in described default binding catalogue and record the beginning and ending time.
Step S307: according to default file size and the beginning and ending time calculating reading speed of described data file.
Like this, in step S306 and step S307, according to size and the time of dd order copy file reading data, be easy to the reading speed of the interface calculating described electronic equipment.
Step S308: judge that whether the reading speed detected is up to standard.
Wherein, for dissimilar electronic equipment interfaces, the standard of reading speed is also not quite similar.In the present embodiment, perform step S310 when reading speed is not up to standard and directly export writing speed, reading speed and test crash information, exported or print the information of relevant writing speed, reading speed and test crash by serial ports of computers.
Step S309: when described reading speed is up to standard, exports the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information.
Fig. 4 is the structural representation of the pick-up unit of the electronic equipment interfaces of second embodiment of the invention, as shown in the figure, on the basis of said method embodiment, the pick-up unit 10 of the electronic equipment interfaces that the present embodiment provides, comprises detecting unit 101, binding unit 102, storage unit 103, confirmation unit 104 and read or write speed detecting unit 105.
Described detecting unit 101, for the External memory equipment of detected electrons equipment interface access.Wherein, described electronic equipment interfaces can be the physical interface of accessible External memory equipment arbitrarily, such as USB interface, SD card interface, TF card interface etc., for realizing the expansion storage of electronic equipment and the electronic data transfer with External memory equipment.In the present embodiment, in described electronic equipment kernel, the hot plug events of External memory equipment is registered in advance by hot plug events registering unit, the such as hot plug events of SD card or USB flash disk, can be accessed by interface when not closing described electronic equipment and read and write External memory equipment like this.
Described binding unit 102, for being tied to default binding catalogue by hot plug mechanism by the External memory equipment that described detecting unit 101 detects.Fig. 5 is the structural representation of the binding unit 102 of the pick-up unit of the electronic equipment interfaces of the embodiment of the present invention.As shown in the figure, described binding unit 102 comprises hot plug processing unit 1021 and binding processing unit 1022.
Described hot plug processing unit 1021, for calling hot plug events process function, and reads the device node of described External memory equipment and the system format of partitioned file according to implementor name and environmental variance.Concrete, when the detecting unit 101 of electronic equipment has detected that External memory equipment accesses, the process function udevd of the hot plug events that the External memory equipment of the described hot plug processing unit 1021 invoke user layer registered in advance of Lunix system kernel is corresponding, and transmit implementor name and the environmental variance of External memory equipment, udevd reads sys system file by libsysfs, the partition table of the described External memory equipment of such reading and device node, and obtain the file system format of each subregion.
Described binding processing unit 1022 comprises zoned format judging unit 10221 and selects binding unit 10222, and the system format select command for the described partitioned file read according to described hot plug processing unit 1021 binds described device node to presetting binding catalogue.Described zoned format judging unit 10221, for judging whether the system format of described partitioned file is new technology file system.Described selection binding unit 10222, for when the system format that described zoned format judging unit 10221 judges described partitioned file is new technology file system, select device node described in ntfs-3g command binding to presetting binding catalogue, and when described zoned format judging unit 10221 judges the system format of described partitioned file not as new technology file system, select device node described in mount command binding to presetting binding catalogue.Wherein, described default binding catalogue is the catalogue identical with zone name that kernel creates automatically, binds described device node to presetting binding catalogue according to the system format select command of described partitioned file.
Described storage unit 103, for being saved in described default binding catalogue and device path in specified file.The External memory equipment detected is tied to default binding catalogue by hot plug mechanism by described like this binding unit 102, electronic equipment by the described default binding catalogue in the described specified file of reading and device path, can carry out follow-up reading and write test to the described External memory equipment of access by described read or write speed detecting unit 105.
Described confirmation unit 104, for reading described default binding catalogue and device path to confirm whether described External memory equipment exists from described specified file.The present embodiment is when carrying out electronic equipment interfaces test, electronic equipment can be connected computing machine by serial ports, to be checked by serial ports or to print relevant detecting information, such as testing apparatus designation number, test duration, writing speed, reading speed and test success failure information etc.When described confirmation unit 104 reads described default binding catalogue and device path, determine that described External memory equipment exists, writing speed and reading speed test can be carried out subsequently through read or write speed test cell 105; When described confirmation unit 104 can not read described default binding catalogue and device path, determine that described External memory equipment does not exist, then the direct non-existent test crash information of output detections equipment, exports or prints the information of dependence test failure by serial ports of computers.
Described read or write speed detecting unit 105, during for confirming that when described confirmation unit 104 described External memory equipment confirms to exist, detects writing speed and the reading speed of described electronic equipment interfaces by sense command.Fig. 6 is the structural representation of the read or write speed detecting unit of the pick-up unit of the electronic equipment interfaces of second embodiment of the invention, as shown in the figure, described read or write speed detecting unit 105 comprises writing speed detecting unit 1051, judging unit 1052, reading speed detecting unit 1053 and output unit 1054.
Wherein, said write speed detection unit 1051, for detecting the writing speed of the interface of described electronic equipment by sense command.Fig. 7 is the structural representation of the writing speed detecting unit of the pick-up unit of the electronic equipment interfaces of the embodiment of the present invention.As shown in the figure, said write speed detection unit 1051 comprises writing unit 10511 and writing speed computing unit 10512 further.
Said write unit 10511, for being write the null character (NUL) stream file of default file size by dd order to described default binding catalogue and record the beginning and ending time.Said write speed computing unit 10512, calculates writing speed for the default file size of described null character (NUL) stream file that writes according to said write unit 10511 and beginning and ending time.Like this, said write speed detection unit 1051, according to the size of dd order copy writing in files data and time, is easy to the writing speed of the interface calculating described electronic equipment.
Described judging unit 1052, whether up to standard for judging the writing speed that said write speed detection unit 1051 detects.Wherein, for dissimilar electronic equipment interfaces, the standard of writing speed is also not quite similar.In the present embodiment, the test carrying out reading speed subsequently through described reading speed detecting unit 1053 is then continued when writing speed is up to standard, when described judging unit 1052 judges that writing speed is not up to standard, direct output writing speed and test crash information, export or print the information of relevant writing speed and test crash by serial ports of computers.
Described reading speed detecting unit 1053, for detecting the reading speed of the interface of described electronic equipment by sense command when described judging unit 1052 judges that said write speed is up to standard.Fig. 8 is the structural representation of the reading speed detecting unit of the pick-up unit of the electronic equipment interfaces of second embodiment of the invention.As shown in the figure, described reading speed detecting unit 1053 comprises reading unit 10531 and reading speed computing unit 10532.
Described reading unit 10531, for reading the data file of default file size by dd order and recording the beginning and ending time in described default binding catalogue.Described reading speed computing unit 10532, for default file size and the beginning and ending time calculating reading speed of the described data file according to described reading unit 10531 reading.Like this, described reading speed detecting unit 1053, according to the size of dd order copy file reading data and time, is easy to the reading speed of the interface calculating described electronic equipment.
Preferably, described judging unit 1052 also can be used for judging that whether the reading speed that described reading speed detecting unit 1053 detects is up to standard.When described judging unit 1052 judges that described reading speed is up to standard, described output unit 1054 also can be used for exporting the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information; When described judging unit 1052 judges that described reading speed is below standard, described output unit 1054 is also for exporting said write speed, reading speed and dependence test failure information.When described judging unit 1052 judges that writing speed is below standard, described output unit 1054 exports said write speed and dependence test failure information.When described confirmation unit 104 can not read described default binding catalogue and device path, described output unit 1054 is the non-existent test crash information of output detections equipment directly.
Based on above-described embodiment, the present invention also provides a kind of electronic equipment, and described electronic equipment comprises the pick-up unit of above-mentioned electronic equipment interfaces.
In sum, the detection method of electronic equipment interfaces provided by the invention, device and equipment, by the External memory equipment of hot plug mechanism binding access, and writing speed and the reading speed of the interface of described electronic equipment is detected by test instruction, with existing test for electronic equipment interfaces time need manual input test order to compare with limited test function, achieve the writing speed of electronic equipment interfaces and the test of reading speed, improve the efficiency of electronic equipment interfaces test and the comprehensive of test.
Should be appreciated that each several part of the present invention can realize with hardware, software, firmware or their combination.In the above-described embodiment, multiple step or method can with to store in memory and the software performed by suitable instruction execution system or firmware realize.Such as, if realized with hardware, the same in another embodiment, can realize by any one in following technology well known in the art or their combination: the discrete logic with the logic gates for realizing logic function to data-signal, there is the special IC of suitable combinational logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) etc.
In the description of this instructions, reference term " embodiment ", " some embodiments ", " example ", " concrete example " or " some examples " etc. describe the specific features, structure, material or the feature that mean to describe in conjunction with this embodiment or example and are contained at least one embodiment of the present invention or example.In this manual, identical embodiment or example are not necessarily referred to the schematic representation of above-mentioned term.And the specific features of description, structure, material or feature can combine in an appropriate manner in any one or more embodiment or example.
Although illustrate and describe embodiments of the invention, those having ordinary skill in the art will appreciate that: can carry out multiple change, amendment, replacement and modification to these embodiments when not departing from principle of the present invention and aim, scope of the present invention is by claim and equivalents thereof.

Claims (20)

1. a detection method for electronic equipment interfaces, is characterized in that, comprising:
The External memory equipment of detected electrons equipment interface access;
By hot plug mechanism, the External memory equipment detected is tied to default binding catalogue;
Described default binding catalogue and device path are saved in specified file;
Described default binding catalogue and device path is read to confirm whether described External memory equipment exists from described specified file; And
When described External memory equipment confirms to exist, detected writing speed and the reading speed of described electronic equipment interfaces by sense command.
2. the detection method of electronic equipment interfaces as claimed in claim 1, is characterized in that, wherein said being tied to by the External memory equipment detected by hot plug mechanism is preset binding catalogue step and comprised:
Call hot plug events process function, and read the device node of described External memory equipment and the system format of partitioned file according to implementor name and environmental variance; And
Described device node is bound to presetting binding catalogue according to the system format select command of described partitioned file.
3. the detection method of electronic equipment interfaces as claimed in claim 2, is characterized in that, the wherein said system format select command according to described partitioned file is bound described device node and also comprised to presetting binding catalogue step:
Whether the system format judging described partitioned file is new technology file system;
When the system format of described partitioned file is judged as new technology file system, select device node described in ntfs-3g command binding to presetting binding catalogue; And
When the system format of described partitioned file judges not as new technology file system, select device node described in mount command binding to presetting binding catalogue.
4. the detection method of electronic equipment interfaces as claimed in claim 1, is characterized in that, wherein saidly detects the writing speed of the interface of described electronic equipment when described External memory equipment confirmation exists by sense command and reading speed step comprises:
The writing speed of the interface of described electronic equipment is detected by sense command;
Judge that whether the writing speed detected is up to standard; And
When said write speed is up to standard, detected the reading speed of the interface of described electronic equipment by sense command; And when said write speed is below standard, export said write speed and dependence test failure information.
5. the detection method of electronic equipment interfaces as claimed in claim 4, it is characterized in that, the wherein said writing speed step being detected the interface of described electronic equipment by sense command is comprised:
Write the null character (NUL) stream file of default file size by dd order to described default binding catalogue and record the beginning and ending time; And
According to default file size and the beginning and ending time calculating writing speed of described null character (NUL) stream file.
6. the detection method of electronic equipment interfaces as claimed in claim 4, it is characterized in that, the wherein said reading speed step being detected the interface of described electronic equipment by sense command is comprised:
In described default binding catalogue, read the data file of default file size by dd order and record the beginning and ending time; And
According to default file size and the beginning and ending time calculating reading speed of described data file.
7. the detection method of electronic equipment interfaces as claimed in claim 4, is characterized in that, wherein described detected the reading speed step of the interface of described electronic equipment by sense command when said write speed is up to standard after also comprise:
Judge that whether the reading speed detected is up to standard; And
When described reading speed is up to standard, export the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information.
8. the detection method of electronic equipment interfaces as claimed in claim 7, is characterized in that, wherein exports said write speed, reading speed and dependence test failure information when described reading speed is below standard.
9. the detection method of electronic equipment interfaces as claimed in claim 1, is characterized in that, wherein also comprises before the External memory equipment of described detected electrons equipment interface access: at the hot plug events of the kernel registration External memory equipment of described electronic equipment.
10. the detection method of electronic equipment interfaces as claimed in claim 1, it is characterized in that, also comprise after the writing speed wherein being detected the interface of described electronic equipment by sense command described and reading speed step: export the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information.
The pick-up unit of 11. 1 kinds of electronic equipment interfaces, is characterized in that, comprising:
Detecting unit, for the External memory equipment of detected electrons equipment interface access;
Binding unit, for being tied to default binding catalogue by hot plug mechanism by the External memory equipment that described detecting unit detects;
Storage unit, for being saved in specified file by described default binding catalogue and device path;
Confirmation unit, for reading described default binding catalogue and device path to confirm whether described External memory equipment exists from described specified file; And
Read or write speed detecting unit, during for confirming that when described confirmation unit described External memory equipment confirms to exist, detects writing speed and the reading speed of described electronic equipment interfaces by sense command.
The pick-up unit of 12. electronic equipment interfaces as claimed in claim 11, it is characterized in that, wherein said binding unit comprises:
Hot plug processing unit, for calling hot plug events process function, and reads the device node of described External memory equipment and the system format of partitioned file according to implementor name and environmental variance; And
Binding processing unit, the system format select command for the described partitioned file read according to described hot plug processing unit binds described device node to presetting binding catalogue.
The pick-up unit of 13. electronic equipment interfaces as claimed in claim 12, it is characterized in that, wherein said binding processing unit comprises:
Zoned format judging unit, for judging whether the system format of described partitioned file is new technology file system;
Select binding unit, for when the system format that described zoned format judging unit judges described partitioned file is new technology file system, select device node described in ntfs-3g command binding to presetting binding catalogue, and when described zoned format judging unit judges the system format of described partitioned file not as new technology file system, select device node described in mount command binding to presetting binding catalogue.
The pick-up unit of 14. electronic equipment interfaces as claimed in claim 11, it is characterized in that, wherein said read or write speed detecting unit comprises:
Writing speed detecting unit, for detecting the writing speed of the interface of described electronic equipment by sense command;
Judging unit, whether up to standard for judging the writing speed that said write speed detection unit detects;
Reading speed detecting unit, for detecting the reading speed of the interface of described electronic equipment by sense command when described judging unit judges that said write speed is up to standard; And
Output unit, for exporting said write speed and dependence test failure information when described judging unit judges that writing speed is below standard.
The pick-up unit of 15. electronic equipment interfaces as claimed in claim 14, it is characterized in that, wherein said writing speed detecting unit comprises:
Writing unit, for being write the null character (NUL) stream file of default file size by dd order to described default binding catalogue and record the beginning and ending time; And
Writing speed computing unit, calculates writing speed for the default file size of described null character (NUL) stream file that writes according to said write unit and beginning and ending time.
The pick-up unit of 16. electronic equipment interfaces as claimed in claim 14, it is characterized in that, wherein said reading speed detecting unit comprises:
Reading unit, for reading the data file of default file size by dd order and recording the beginning and ending time in described default binding catalogue; And
Reading speed computing unit, calculates reading speed for the default file size of described data file that reads according to described reading unit and beginning and ending time.
The pick-up unit of 17. electronic equipment interfaces as claimed in claim 14, it is characterized in that, whether described judging unit is also up to standard for judging the reading speed that described reading speed detecting unit detects, when described judging unit judges that described reading speed is up to standard, described output unit is also for exporting the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information.
The pick-up unit of 18. electronic equipment interfaces as claimed in claim 17, it is characterized in that, wherein when described judging unit judges that described reading speed is below standard, described output unit is also for exporting said write speed, reading speed and dependence test failure information.
The pick-up unit of 19. electronic equipment interfaces as claimed in claim 11, is characterized in that, also comprise hot plug events registering unit, for the hot plug events of the kernel registration External memory equipment at described electronic equipment.
The pick-up unit of 20. electronic equipment interfaces as claimed in claim 11, is characterized in that, also comprise output unit, for exporting the writing speed of described electronic equipment interfaces, reading speed and dependence test successful information.
CN201510770319.7A 2015-11-12 2015-11-12 The detection method of electronic equipment interfaces, device Active CN105446856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510770319.7A CN105446856B (en) 2015-11-12 2015-11-12 The detection method of electronic equipment interfaces, device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510770319.7A CN105446856B (en) 2015-11-12 2015-11-12 The detection method of electronic equipment interfaces, device

Publications (2)

Publication Number Publication Date
CN105446856A true CN105446856A (en) 2016-03-30
CN105446856B CN105446856B (en) 2018-02-06

Family

ID=55557088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510770319.7A Active CN105446856B (en) 2015-11-12 2015-11-12 The detection method of electronic equipment interfaces, device

Country Status (1)

Country Link
CN (1) CN105446856B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117344A (en) * 2018-08-29 2019-01-01 郑州云海信息技术有限公司 Method of calibration and device before a kind of starting of storage unit
CN109992463A (en) * 2018-01-03 2019-07-09 浙江舜宇智能光学技术有限公司 A kind of method and system with automatic detection packaged type storage equipment read or write speed adaptation electronic equipment
CN113076225A (en) * 2021-03-30 2021-07-06 山东英信计算机技术有限公司 External storage medium detection method, device and equipment and storage medium
CN117406924A (en) * 2023-10-19 2024-01-16 合肥力高动力科技有限公司 TF card-based data storage method in BMS

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296250A (en) * 2007-04-27 2008-10-29 株式会社东芝 Device control apparatus and device control method
US20090193490A1 (en) * 2008-01-25 2009-07-30 General Instrument Corporation Set-Top Box for Converting Media Signals Based on Stored Output Settings
CN103024219A (en) * 2011-09-27 2013-04-03 深圳市普联技术有限公司 IAD (Integrated Access Device) and voice processing method and system based on same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296250A (en) * 2007-04-27 2008-10-29 株式会社东芝 Device control apparatus and device control method
US20090193490A1 (en) * 2008-01-25 2009-07-30 General Instrument Corporation Set-Top Box for Converting Media Signals Based on Stored Output Settings
CN103024219A (en) * 2011-09-27 2013-04-03 深圳市普联技术有限公司 IAD (Integrated Access Device) and voice processing method and system based on same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992463A (en) * 2018-01-03 2019-07-09 浙江舜宇智能光学技术有限公司 A kind of method and system with automatic detection packaged type storage equipment read or write speed adaptation electronic equipment
CN109117344A (en) * 2018-08-29 2019-01-01 郑州云海信息技术有限公司 Method of calibration and device before a kind of starting of storage unit
CN113076225A (en) * 2021-03-30 2021-07-06 山东英信计算机技术有限公司 External storage medium detection method, device and equipment and storage medium
CN117406924A (en) * 2023-10-19 2024-01-16 合肥力高动力科技有限公司 TF card-based data storage method in BMS

Also Published As

Publication number Publication date
CN105446856B (en) 2018-02-06

Similar Documents

Publication Publication Date Title
TWI387023B (en) Method of preventing data loss during a solder reflow process and memory device using the same
CN112331253B (en) Chip testing method, terminal and storage medium
US8266371B2 (en) Non-volatile storage device, host device, non-volatile storage system, data recording method, and program
CN103999055A (en) Accessing data stored in a command/address register device
CN103164523A (en) Inspection method, device and system of data consistency inspection
CN105446856A (en) Electronic device interface detection method and apparatus
CN102609741B (en) A kind of method of exchanges data between mobile device and inside and outside portion storage card thereof
CN103222006A (en) Copyback operations
TWI420313B (en) Data management method, memory controller and embedded memory storage apparatus using the same
CN103530215B (en) A kind of self checking method of internal integrated circuit main frame, device and main frame
TW201447578A (en) Data storage apparatus and management method thereof
KR100825786B1 (en) Memory card and debugging method for the same
US7447853B2 (en) Data copy device
US8776232B2 (en) Controller capable of preventing spread of computer viruses and storage system and method thereof
CN104636271A (en) Method for having access to data stored in instruction/address register device
CN101354673B (en) SPD chip error information simulation apparatus of memory
CN111367710B (en) eMMC problem reduction method and device
CN102305906B (en) Chip testing method and device
CN102866864B (en) Realize method and the memory device of One Time Programmable storage
TWI502350B (en) Flash memory accessing apparatus and method thereof
CN112470227B (en) Data block processing method and controller
CN103064803B (en) A kind of data read-write method of NAND Flash storage device and device
TWI417888B (en) An embedded chip system, a method for burning a wafer, and a computer program product
CN201804319U (en) Embedded type chip writing system
CN103914263A (en) SD card and device and method for accessing SD card

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201203

Address after: Dai Xi Zhen Shang Qiang Lu, Wuxing District, Huzhou City, Zhejiang Province

Patentee after: HUZHOU AIDI ELECTRIC Co.,Ltd.

Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221229

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: Dai Xi Zhen Shang Qiang Lu, Wuxing District, Huzhou City, Zhejiang Province

Patentee before: HUZHOU AIDI ELECTRIC Co.,Ltd.

TR01 Transfer of patent right