CN113791732A - Optical disc information acquisition method, computing equipment and readable storage medium - Google Patents

Optical disc information acquisition method, computing equipment and readable storage medium Download PDF

Info

Publication number
CN113791732A
CN113791732A CN202111021533.4A CN202111021533A CN113791732A CN 113791732 A CN113791732 A CN 113791732A CN 202111021533 A CN202111021533 A CN 202111021533A CN 113791732 A CN113791732 A CN 113791732A
Authority
CN
China
Prior art keywords
optical disc
file system
disc
type
optical
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
CN202111021533.4A
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.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software 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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202111021533.4A priority Critical patent/CN113791732A/en
Publication of CN113791732A publication Critical patent/CN113791732A/en
Pending legal-status Critical Current

Links

Images

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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0677Optical disk device, e.g. CD-ROM, DVD

Abstract

The invention discloses a method for acquiring optical disc information, which is suitable for being executed in an operating system, wherein the operating system resides in computing equipment, the computing equipment comprises an optical drive, and the method comprises the following steps: mounting an optical disc inserted into the optical disc drive, wherein the type of a file system of the optical disc comprises a first type and a second type; identifying the file system type of the optical disc according to the loading process of the file system of the first type; if the file system type of the optical disc is successfully identified according to the file system loading process of the first type, judging that the file system type of the optical disc is the first type, otherwise, judging that the file system type of the optical disc is the second type; and acquiring the optical disc information of the optical disc according to the file system type of the optical disc. The invention also discloses corresponding computing equipment and a readable storage medium.

Description

Optical disc information acquisition method, computing equipment and readable storage medium
This application is a divisional application of the invention patent application 2021100223090 filed on 8/1/2021.
Technical Field
The present invention relates to the field of optical disc data storage, and in particular, to an optical disc information obtaining method, a computing device, and a readable storage medium.
Background
Optical discs are common external storage media for computers, and have wide application in application scenarios involving data security. Similar to a hard disk having file systems such as FAT16, FAT32, NTFS, etc., an optical disk also has its own file system, and common file systems of optical disks are ISO9660 (and its extensions) and UDF. ISO9660 is the original standard file system for CD data discs, a format recognized on a number of operating systems, including MSDOS, MacOS, UNIX, and Windows operating systems. The ISO9660 format is promulgated by the International Organization for Standardization (ISO). Yet another Universal Disk Format (UDF) is a newer file system developed by the Optical Storage Technology Association (OSTA) for optical media, UDF is a portable Format recognized by multiple operating systems, and is replacing ISO9660 as a new standard, particularly for read/write media.
For historical reasons, most optical discs are data recording completed under Windows operating system, and there are two native recording modes of Windows. The first mode is a recording mode similar to a U disk, and the optical disk file system recorded in the mode is pure UDF; the second method is a CD/DVD recording method, and the optical disc file system recorded by the recording method is a mixed mode of ISO9660 and UDF.
In a file resource manager of Windows, file information of an optical disc recorded in two modes can be clearly read for display, while in a desktop environment of various Linux distribution versions based on a Linux kernel, a mode of analyzing the optical disc mostly still adopts the specification of ISO9660 for analysis, and for an optical disc of the UDF specification, data cannot be accurately analyzed.
At present, in a Linux desktop environment, an xorriso tool provided by GNU is commonly used for reading optical disc information by application software, and the optical disc information is obtained by introducing a header file xorriso.h to perform interface call. The method can also be realized through a D-BUS interface, after a computer CD driver loads a CD, the name of a file system can directly complete attribute acquisition through the system D-BUS interface according to the name of equipment, but the data acquired through the D-BUS interface is limited and cannot be flexibly written by a developer to acquire CD information in a personalized manner, the data provided by the D-BUS interface is not reliable, and the data is provided by other components of the system, so that the correctness of the CD information under different architectures and system versions cannot be ensured.
Disclosure of Invention
To this end, the present invention provides an optical disc information acquisition method, a computing device and a readable storage medium, in an attempt to solve or at least alleviate the above-existing problems.
According to an aspect of the present invention, there is provided an optical disc information acquisition method adapted to be executed in an operating system, the operating system residing in a computing device, the computing device including an optical drive, the method comprising: mounting an optical disc inserted into the optical disc drive, wherein the type of a file system of the optical disc comprises a first type and a second type; identifying the file system type of the optical disc according to the loading process of the file system of the first type; if the file system type of the optical disc is successfully identified according to the file system loading process of the first type, judging that the file system type of the optical disc is the first type, otherwise, judging that the file system type of the optical disc is the second type; and acquiring the optical disc information of the optical disc according to the file system type of the optical disc.
Optionally, in the method for acquiring information from an optical disc according to the present invention, identifying the file system type of the optical disc according to the loading process of the file system of the first type includes: acquiring a basic address of the optical disc; identifying first identification information of the optical disc according to a loading process of the first class file system; and identifying second identification information of the optical disc according to the loading process of the first class file system.
Optionally, in the method for acquiring information from an optical disc according to the present invention, acquiring a base address of the optical disc includes: if the optical disc is multi-segment recording, the base address of the optical disc is the initial address of the last recording segment; if the optical disc is not multi-sector recorded, the base address of the optical disc is 0.
Optionally, in the method for acquiring information on an optical disc according to the present invention, the first type is UDF, and the first identification information for identifying the optical disc according to the loading process of the first type file system is implemented based on ECMA-167 and OSTA _ UDF.
Optionally, in the method for acquiring information from an optical disc according to the present invention, identifying the first identification information of the optical disc according to the loading process of the first class file system includes: shifting 32 kbytes backwards from the basic address to obtain a volume identification sequence code (VRS); the start extent descriptor bed, the volume order descriptor VSD, and the end extent descriptor TEAD are acquired from the volume identification sequence code VRS.
Optionally, in the method for acquiring information from an optical disc according to the present invention, the identifying the second identification information of the optical disc according to the loading process of the first class file system includes: acquiring a positioning volume description pointer AVDP from 256 addresses of the optical disc sector; acquiring a main volume descriptor sequence VDS from the positioning volume descriptor pointer; the partition descriptor PD and the logical volume descriptor LVD are fetched.
Optionally, in the method for acquiring optical disc information according to the present invention, the optical disc information includes an optical disc format identifier, an optical disc format, an optical disc used capacity, an optical disc data block, an optical disc device ID, a total optical disc capacity, and an optical disc volume name, and when the file system of the optical disc is UDF, acquiring the optical disc information of the optical disc according to the file system type of the optical disc includes: acquiring an optical disk formatting identification, an optical disk format, an optical disk data block and an optical disk device ID through a file system tool GNUxorriso; and acquiring the total capacity of the optical disc, the used capacity of the optical disc and the volume name of the optical disc by a system function call mode based on ECMA-167 and OSTA _ UDF.
Optionally, in the method for acquiring optical disc information according to the present invention, when the file system of the optical disc is ISO9660, acquiring the optical disc information of the optical disc according to the identified file system type includes: the disc format identification, disc format, disc used capacity, disc data blocks, disc device ID, total disc capacity, and disc volume name are obtained by the file system tool GNUxorriso.
Optionally, in the method for acquiring information from an optical disc according to the present invention, the identifying the first identification information of the optical disc according to the loading process of the first class file system further includes: identifying a start extension area descriptor BEAD by obtaining a string "BEA 01"; identifying the volume order descriptor VSD by retrieving the string "NSR 02" or "NSR 03"; the ending extension region descriptor TEAD is recognized by fetching the string "TEA 01".
Optionally, in the disc information retrieving method according to the present invention, the retrieving the partition descriptor PD and the logical volume descriptor LVD includes: scanning the main volume descriptor sequence VDS and offsetting by the block size; acquiring the first two bytes after offset; converting the first two bytes of data into a reshape to obtain the values of a partition descriptor PD and a logical volume descriptor LVD; if the value of the partition descriptor PD is equal to 0x0005, the partition descriptor is determined to be successfully identified, and if the value of the logical volume descriptor LVD is 0x0006, the logical descriptor is determined to be successfully identified.
Alternatively, in the optical disc information acquisition method according to the present invention, the second category is ISO 9660.
Optionally, in the method for acquiring information from an optical disc according to the present invention, the operating system is a Linux operating system.
According to yet another aspect of the invention, there is provided a computing device comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the above-mentioned optical disc information acquisition method.
According to still another aspect of the present invention, there is provided a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to execute the above-described optical disc information acquisition method.
According to the optical disc information acquisition method, the problem that the optical disc file systems have different categories can be solved, the optical disc is loaded according to the loading process of the first category of file systems for the first time, if the loading is successful, the file system of the optical disc is judged to be the first category, otherwise, the file system of the optical disc is judged to be the second category, and the optical disc information of the optical disc is acquired according to the category of the file system, wherein the problem that the optical disc file systems are identified through two different modes is avoided, a universal method is provided for analyzing the optical disc information of different file systems, the compatibility is strong, the optical disc information acquisition method corresponding to the category of the file system is adopted for the optical discs of different file systems respectively to acquire the optical disc information, the problem that the optical disc information is acquired inaccurately through a unified method is avoided, and the technical problem of reading the optical disc information under an operating system in a Linux desktop environment is solved.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a block diagram of a computing device 100, according to one embodiment of the invention;
fig. 2 shows a flowchart of a disc information acquisition method 200 according to an embodiment of the present invention;
fig. 3 shows a flow diagram of an optical disc file system identification process 300 according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Optical discs are widely used as storage media, however, most optical discs are data recorded under a Windows operating system, file systems include ISO9660 and UDF, information of the optical discs recorded under the two modes can be clearly read in a file resource manager of Windows, and when the optical discs are converted into Linux, different modes are required to obtain information of the optical discs for different types of file systems. The invention identifies the file system type according to the first phase of the file system loading process, and then obtains the optical disc information by a corresponding optical disc information obtaining method.
An operating system for performing the optical disc information acquisition method of the present invention is adapted to reside in a computing device, and fig. 1 shows a schematic diagram of a computing device 100 according to an embodiment of the present invention. It should be noted that the computing device 100 shown in fig. 1 is only an example, and in practice, the computing device for implementing the optical disc information obtaining method of the present invention may be any type of device, and the hardware configuration thereof may be the same as that of the computing device 100 shown in fig. 1, or may be different from that of the computing device 100 shown in fig. 1. In practice, the computing device implementing the optical disc information obtaining method of the present invention may add or delete hardware components of the computing device 100 shown in fig. 1, and the present invention does not limit the specific hardware configuration of the computing device.
As shown in FIG. 1, in a basic configuration 102, a computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.
Depending on the desired configuration, the processor 104 may be any type of processing, including but not limited to: a microprocessor (μ P), a microcontroller (μ C), a Digital Signal Processor (DSP), or any combination thereof. The processor 104 may include one or more levels of cache, such as a level one cache 110 and a level two cache 112, a processor core 114, and registers 116. The example processor core 114 may include an Arithmetic Logic Unit (ALU), a Floating Point Unit (FPU), a digital signal processing core (DSP core), or any combination thereof. The example memory controller 118 may be used with the processor 104, or in some implementations the memory controller 118 may be an internal part of the processor 104.
Depending on the desired configuration, system memory 106 may be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The physical memory in the computing device is usually referred to as a volatile memory RAM, and data in the disk needs to be loaded into the physical memory to be read by the processor 104. System memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some implementations, the application 122 can be arranged to execute instructions on an operating system with program data 124 by one or more processors 104. Operating system 120 may be, for example, Linux, Unix, UOS, etc., which includes program instructions for handling basic system services and performing hardware-dependent tasks. The application 122 includes program instructions for implementing various user-desired functions, and the application 122 may be, for example, but not limited to, a browser, instant messenger, a software development tool (e.g., an integrated development environment IDE, a compiler, etc.), and the like. When the application 122 is installed into the computing device 100, a driver module may be added to the operating system 120.
When the computing device 100 is started, the processor 104 reads program instructions of the operating system 120 from the memory 106 and executes them. The application 122 runs on top of the operating system 120, utilizing the operating system 120 and interfaces provided by the underlying hardware to implement various user-desired functions. When the user starts the application 122, the application 122 is loaded into the memory 106, and the processor 104 reads the program instructions of the application 122 from the memory 106 and executes the program instructions.
The computing device 100 also includes a storage device 132, the storage device 132 including removable storage 136 and non-removable storage 138, the removable storage 136 and the non-removable storage 138 each connected to the storage interface bus 134.
Computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus/interface controller 130. The example output device 142 includes a graphics processing unit 148 and an audio processing unit 150. They may be configured to facilitate communication with various external devices, such as a display or speakers, via one or more a/V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., printer, scanner, etc.) via one or more I/O ports 158. An example communication device 146 may include a network controller 160, which may be arranged to facilitate communications with one or more other computing devices 162 over a network communication link via one or more communication ports 164.
A network communication link may be one example of a communication medium. Communication media may typically be embodied by computer readable instructions, data structures, program modules, and may include any information delivery media, such as carrier waves or other transport mechanisms, in a modulated data signal. A "modulated data signal" may be a signal that has one or more of its data set or its changes made in such a manner as to encode information in the signal. By way of non-limiting example, communication media may include wired media such as a wired network or private-wired network, and various wireless media such as acoustic, Radio Frequency (RF), microwave, Infrared (IR), or other wireless media. The term computer readable media as used herein may include both storage media and communication media.
In the computing device 100 according to the present invention, the operating system 120 includes instructions for performing the disc information acquisition method 200 of the present invention.
Fig. 2 shows a flowchart of a disc information acquisition method 200 according to an embodiment of the present invention. The method is suitable for running in a Linux operating system installed in a computing device (such as the computing device shown in fig. 1) comprising an optical drive.
As shown in fig. 2, the method 200 starts at step S210, and in step S210, when an optical disc is inserted into the optical disc drive, the optical disc is loaded. The file system of an optical disc has different categories and according to an embodiment of the invention comprises a UDF (i.e. first category) file system and an ISO9660 (i.e. second category) file system.
Step S220 is then entered for identifying the file system class of the optical disc according to a loading procedure of a file system of the first class, i.e. UDF.
The UDF file system includes two specifications: ECMA-167 and OSTA _ UDF. ECMA-167 is a standard for volume and file structures, and is also known as ISO/IEC 13346. ECMA-167 has two versions: ECMA-167/2 and ECMA-167/3, UDF is made by OSTA, also called OSTA _ UDF, which is based on ECMA-167 framework, supplemented with some necessary details, UDF1.x is based on ECMA-167/2 and UDF2.x is based on ECMA-167/3.
The UDF file system loading process is to analyze the file system volume structure of the optical disc according to the above two specifications. The metadata structure of UDF is defined in ECMA-167 and OSTA _ UDF standards as Descriptors (Descriptors) all of which are aligned with sectors, and the Descriptors are connected in a specific order. The identification process of the volume structure includes identification of the first identification information and identification of the second identification information.
According to an embodiment of the present invention, the identification of the first identification information of the UDF, specifically, according to ECMA-167 and OSTA _ UDF, shifts the position of reading the data of the optical disc to an address 32kB after the base address, obtains the volume identification sequence code VRS including the start extent descriptor BEA, the volume sequence descriptor VSD, and the end extent descriptor TEA, and sequentially searches the BEA, VSD, and TEA therefrom. And performing descriptor matching through character string comparison, wherein when the three descriptors are matched, the UDF volume identification sequence code VRS is successfully identified, and otherwise, the UDF volume identification sequence code VRS is failed.
After the Volume identification sequence code VRS is successfully identified, the identification of the second identification information is continued, according to an embodiment of the present invention, by finding a location Volume Descriptor Pointer (AVDP) at 256 addresses of a sector of the optical disc, reading the primary Volume Descriptor sequence VDS in the AVDP, and before encountering the end Descriptor TD, further confirming a Partition Descriptor (PD) and a Logical Volume Descriptor (LVD).
In the above identification process, if any descriptor fails to be identified, the UDF file system identification fails.
According to an embodiment of the present invention, in step S220, the UDF file system identification is successful, and the optical disc file system is identified as the UDF file system, then step S230 is entered, the optical disc is parsed based on ECMA-167 and OSTA _ UDF, and a system function is called to obtain the disc information.
The disc information includes disc format ID, disc format, disc used capacity, disc data block, disc device ID, total disc capacity and disc volume name. The optical disc format identifier, the optical disc format, the optical disc data block, and the optical disc device ID may be obtained by using the file system tool GNUxorriso, and it is not reliable to parse the information such as the capacity of the optical disc, the used capacity of the optical disc, the volume name, etc. by using GNU xorriso, so that the parsing needs to be performed by using a method and a system call based on ECMA-167 and OSTA _ UDF.
According to an embodiment of the present invention, the size of a block in an optical disc is equal to the size occupied by a sector on the optical disc, after opening the optical disc to obtain a file descriptor, a system function ioctl () is called, and a request parameter BLKSSZGET is introduced to obtain the block size, and a parameter BLKGETSIZE64, i.e., ioctl (fd, BLKGETSIZE64, & size), is introduced to obtain the total capacity of the optical disc.
According to the above identification process, it is known that the volume descriptor sequence VDS contains many descriptors before encountering the end descriptor TD, and the logical volume descriptor LVD is associated with the volume name, so that the name of the UDF volume can be specified by LVD.
If the identification of any descriptor fails in the identification process of step S220, it is determined that the file system of the optical disc is ISO9660, and after step S220, the process proceeds to step S240, and the process proceeds to the process of acquiring the optical disc information based on GNU xorisso.
The core idea of acquiring the optical disc information based on GNU xorisso is to introduce rules, and acquire interesting data through an interface, where the relevant interface is as follows:
xorriso _ opt _ dev interface: specifying an optical disc drive, usually a/dev/srN string, where N is a natural number;
xorriso _ sieve _ get _ results interface: querying a result through a set rule, typically xorrito _ sieve _ get _ result (Xorriso, PCHAR ("Volumeid:"), & ac, & av, & avail, 0); in the code, the Volume name of the optical disc can be inquired through the rule PCHAR ("Volume id:");
xorriso __ dispose _ words interface: processing the character string recorded by the result;
xorriso _ sieve _ clear _ results interface: and cleaning the inquiry site.
In practical applications, it is inconvenient to directly use xorriso for development, a current method of a file manager of the UOS is to encapsulate the xorriso, and encapsulate an API provided by xorriso as to be a class function macro for an application program to call, and example codes are as follows:
#define XORRISO_OPT(opt,x,...)\
Xorriso_set_problem_status(x,PCHAR(""),0);\
r=Xorriso_option_##opt(x,__VA_ARGS__);\
r=Xorriso_eval_problem_status(x,r,0);
FIG. 3 illustrates a flow diagram of UDF file system identification 300 according to one embodiment of the present invention. As shown in fig. 3, the method 300 starts with step S310, i.e. detecting whether the optical disc is in a normal state.
If the optical disc is in a normal state, step S320 is performed to obtain the basic address of the optical disc, and according to an embodiment of the present invention, the basic address of the optical disc is determined according to whether the optical disc is multi-sector recording: if the optical disc is multi-segment recording, the base address of the optical disc is the initial address of the last recording segment; if the optical disc is non-multi-sector recording, the base address of the optical disc is 0.
Subsequently, the process proceeds to step S330, where the first identification information is identified. According to an embodiment of the present invention, according to ECMA-167 and OSTA _ UDF, the location of reading the data from the optical disc is shifted to an address 32kB after the base address, and the volume identification sequence code VRS including the start extent descriptor BEA, the volume sequence descriptor VSD, and the end extent descriptor TEA is obtained, from which the BEA, VSD, TEA are sequentially searched. According to the standard, the size of each descriptor is known to be 5 bytes, a character string comparison function memcmp () is called to compare a key character string 'BEA 01' to confirm the existence of the start extension area descriptor BEA, to confirm the existence of the volume sequence descriptor VSD through comparing the key character string 'NSR 02' or 'NSR 03', to confirm the existence of the end extension area descriptor TEA through comparing the key character string 'TEA 01', and after all three descriptors are matched, the identification of the UDF volume identification sequence code VRS is successful, otherwise, the identification is failed.
Subsequently, the process proceeds to step S340, where second identification information identification is performed.
According to the embodiment of the present invention, by finding the Anchor Volume Descriptor Pointer (AVDP) at 256 addresses of the optical disc sector, the primary Volume Descriptor sequence VDS in the AVDP is read, and before encountering the end Descriptor TD, the Partition Descriptor (PD) and the Logical Volume Descriptor (LVD) are also required to be confirmed. The method specifically comprises the following steps: firstly, a main volume descriptor sequence VDS needs to be scanned, then, offset is carried out according to the block size, the first 2 bytes of data are intercepted and converted into integer after each offset, whether the TAG value 0x0005 of a partition descriptor PD and the TAG value 0x0006 of a logic volume descriptor LVD specified in ECMA-167 are equal or not is compared, and if the two values are equal, the UDF file system is identified.
According to the method for acquiring the optical disc information, in the process of loading the optical disc, the volume structure of the UDF file system is analyzed, so that whether the file system of the optical disc is the UDF or the ISO9660 is identified, xorisso is adopted to acquire the optical disc information if the file system of the optical disc is the ISO9660, and the optical disc information is acquired based on ECMA-167 and OSTA _ UDF combined with system function calling if the file system of the optical disc is the UDF file system, so that the problem that a Linux system cannot acquire the optical disc information or the optical disc information is inaccurate is solved, and the method has universality.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the computing device will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to execute the optical disc information acquisition method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
It should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim.
Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in a device as described in this embodiment or alternatively may be located in one or more devices different from the devices in this example. The modules in the foregoing examples may be combined into one module or may be further divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Furthermore, some of the described embodiments are described herein as a method or combination of method elements that can be performed by a processor of a computer system or by other means of performing the described functions. A processor having the necessary instructions for carrying out the method or method elements thus forms a means for carrying out the method or method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as described herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed in an illustrative rather than a restrictive sense, and the scope of the present invention is defined by the appended claims.

Claims (9)

1. An optical disc information acquisition method adapted to be executed in an operating system residing in a computing device, the computing device including an optical drive, the method comprising:
mounting an optical disc inserted into the optical disc drive, wherein the type of a file system of the optical disc comprises a first type and a second type;
identifying the file system type of the optical disc according to the loading process of the file system of the first type;
if the file system type of the optical disc is successfully identified according to the file system loading process of the first type, judging that the file system type of the optical disc is the first type, otherwise, judging that the file system type of the optical disc is the second type;
acquiring the optical disc information of the optical disc according to the file system type of the optical disc;
wherein the identifying the file system class of the optical disc according to the loading process of the first class of file systems comprises:
acquiring a basic address of the optical disc;
identifying first identification information of the optical disc according to a loading process of a first class file system;
and identifying second identification information of the optical disc according to the loading process of the first class file system.
2. The method of claim 1, wherein the obtaining the base address of the optical disc comprises:
if the optical disc is multi-segment recording, the base address of the optical disc is the initial address of the last recording segment;
if the optical disc is not multi-sector recorded, the base address of the optical disc is 0.
3. The method according to claim 1 or 2, wherein said first class is UDF, and said first identification information identifying said optical disc according to a loading procedure of a first class file system is implemented based on ECMA-167 and OSTA _ UDF.
4. The method of claim 1 or 2, wherein the identifying the first identification information of the optical disc according to the loading process of the first class file system comprises:
shifting 32 kbytes backwards from the basic address to obtain a volume identification sequence code (VRS);
a start extent descriptor bed, a volume order descriptor VSD, and an end extent descriptor TEAD are acquired from the volume identification sequence code VRS.
5. The method of claim 3, wherein the identifying the second identification information of the optical disc according to the loading process of the first class file system comprises:
acquiring a positioning volume description pointer AVDP from 256 addresses of the optical disc sector;
acquiring a main volume descriptor sequence VDS from the positioning volume descriptor pointer;
the partition descriptor PD and the logical volume descriptor LVD are fetched.
6. The method according to claim 1 or 2, wherein the disc information includes a disc format identifier, a disc format, a used disc capacity, a disc data block, a disc device ID, a total disc capacity, and a disc volume name, and when the file system of the disc is UDF, the obtaining the disc information of the disc according to the file system category of the disc includes:
acquiring an optical disk formatting identification, an optical disk format, an optical disk used capacity, an optical disk data block and an optical disk device ID through a file system tool GNU xorriso;
and acquiring the total capacity of the optical disc, the used capacity of the optical disc and the volume name of the optical disc by a system function call mode based on ECMA-167 and OSTA _ UDF.
7. The method according to claim 1 or 2, wherein when the file system of the optical disc is of the second category, the obtaining the disc information of the optical disc according to the identified file system category comprises:
the disc format identification, disc format, disc used capacity, disc data blocks, disc device ID, total disc capacity and disc volume name are obtained by the file system tool GNU xorriso.
8. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-7.
9. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-7.
CN202111021533.4A 2021-01-08 2021-01-08 Optical disc information acquisition method, computing equipment and readable storage medium Pending CN113791732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111021533.4A CN113791732A (en) 2021-01-08 2021-01-08 Optical disc information acquisition method, computing equipment and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111021533.4A CN113791732A (en) 2021-01-08 2021-01-08 Optical disc information acquisition method, computing equipment and readable storage medium
CN202110022309.0A CN112346668B (en) 2021-01-08 2021-01-08 Optical disc information acquisition method, computing equipment and readable storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202110022309.0A Division CN112346668B (en) 2021-01-08 2021-01-08 Optical disc information acquisition method, computing equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113791732A true CN113791732A (en) 2021-12-14

Family

ID=74427365

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202111021533.4A Pending CN113791732A (en) 2021-01-08 2021-01-08 Optical disc information acquisition method, computing equipment and readable storage medium
CN202110022309.0A Active CN112346668B (en) 2021-01-08 2021-01-08 Optical disc information acquisition method, computing equipment and readable storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202110022309.0A Active CN112346668B (en) 2021-01-08 2021-01-08 Optical disc information acquisition method, computing equipment and readable storage medium

Country Status (1)

Country Link
CN (2) CN113791732A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116778975A (en) * 2023-05-29 2023-09-19 上海沪方软件有限公司 Method and device for additionally recording optical disc, electronic equipment and readable storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113066515B (en) * 2021-04-14 2022-04-29 统信软件技术有限公司 Optical disc recording method, computing equipment and readable storage medium
CN114155885B (en) * 2022-02-08 2022-05-20 成都统信软件技术有限公司 File encryption method, recording method, decryption method, device and computing equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6591363B1 (en) * 1999-12-15 2003-07-08 Roxio, Inc. System for writing incremental packet data to create bootable optical medium by writing boot catalog and boot image onto second track before writing volume descriptors onto first track
JP2006172596A (en) * 2004-12-15 2006-06-29 Funai Electric Co Ltd Optical disk recording device
KR101379138B1 (en) * 2012-08-17 2014-03-28 도시바삼성스토리지테크놀러지코리아 주식회사 Optical disk drive, user terminal and file processing method
US10339073B2 (en) * 2017-06-29 2019-07-02 Keysight Technologies, Inc. Systems and methods for reducing write latency

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116778975A (en) * 2023-05-29 2023-09-19 上海沪方软件有限公司 Method and device for additionally recording optical disc, electronic equipment and readable storage medium
CN116778975B (en) * 2023-05-29 2024-03-12 上海沪方软件有限公司 Method and device for additionally recording optical disc, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN112346668B (en) 2021-10-15
CN112346668A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
CN112346668B (en) Optical disc information acquisition method, computing equipment and readable storage medium
US6725178B2 (en) Use of hidden partitions in a storage device for storing BIOS extension files
US7934209B2 (en) Method for firmware variable storage with eager compression, fail-safe extraction and restart time compression scan
CN113553010B (en) Optical disc file verification method, optical disc recording method and computing device
US20030192043A1 (en) Method for installing software bundles on target computers
CN113823331B (en) Optical disc additional recording method and device and computing equipment
CN110928559A (en) Data burning method and device, electronic equipment and storage medium
JP2019053729A (en) Test method and test apparatus of smart contract
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
US20060026415A1 (en) Method of updating a portion BIOS
US20080313472A1 (en) Method and apparatus for changing and adding activation keys for functions of digital content without having to change and recompile the digital content
US20100050166A1 (en) Updating system and method of portable executable programs
CN114816772B (en) Debugging method, debugging system and computing device for application running based on compatible layer
US6915512B1 (en) Software editing with indication of format and processing state of each process of the software
CN114356290A (en) Data processing method and device and computer readable storage medium
US20040054945A1 (en) Symbol support in embedded firmware images
US8200895B2 (en) File system recognition structure
CN112231761A (en) Device mounting method, computing device and readable storage medium
KR102546946B1 (en) Method and System for Automatically Analyzing Bugs in Cellular Baseband Software using Comparative Analysis based on Cellular Specifications
CN114281257A (en) Rapid previewing method of optical disc file, computing equipment and storage medium
US20050160407A1 (en) Memory management method for dynamic conversion type emulator
JP3183398B2 (en) Resource configuration information management method
CN114968328A (en) Function searching method, computing device and readable storage medium
CN114242119A (en) Optical disc data repairing method, optical disc data checking method and computing device
CN117271440A (en) File information storage method, reading method and related equipment based on freeRTOS

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