CN114564244A - Storage device memory method, electronic device and computer readable storage medium - Google Patents

Storage device memory method, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN114564244A
CN114564244A CN202210265410.3A CN202210265410A CN114564244A CN 114564244 A CN114564244 A CN 114564244A CN 202210265410 A CN202210265410 A CN 202210265410A CN 114564244 A CN114564244 A CN 114564244A
Authority
CN
China
Prior art keywords
identification code
preset
storage
storage equipment
storage device
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
CN202210265410.3A
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.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics 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 Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN202210265410.3A priority Critical patent/CN114564244A/en
Publication of CN114564244A publication Critical patent/CN114564244A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/73Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by creating or determining hardware identification, e.g. serial numbers

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a memory method of a storage device, an electronic device and a computer readable storage medium, and belongs to the technical field of digital televisions. The storage device memorizing method comprises the following steps: after the insertion of the storage equipment is detected, acquiring storage association parameters of the storage equipment; if the storage associated parameters meet the preset video recording service use conditions, acquiring identification code information corresponding to the storage equipment, wherein the identification code information is generated according to a unique identification code; and if the identification code information meets the preset identification code condition, judging that the storage equipment is the target storage equipment. The memory device solves the technical problem that memory accuracy of the storage device is low in the prior art.

Description

Storage device memory method, electronic device and computer readable storage medium
Technical Field
The present application relates to the field of digital television technologies, and in particular, to a storage device memory method, an electronic device, and a computer-readable storage medium.
Background
When a Linux platform designs a Pvr (Personal Video Recorder) service, a storage device needs to be subjected to large file operation exceeding 4G, and currently, the file formats supporting the Linux platform storage device exceeding 4G are only NTFS, exFat and Ext4 formats. Due to the property protection of the NTFS and exFat32 file formats by Microsoft, only the Ext4 format can be used for free by the Linux platform. In addition to the format requirements, the capacity of the storage device is also limited by the pv service, and when the capacity is not satisfied, the pv service is not used. Therefore, the storage device can be successfully used in the Pvr service, which shows that the storage device can meet the format and capacity requirements of the Pvr service. The storage device needs to be recorded, so that the storage device can be identified to directly start the Pvr service when the storage device is inserted for use next time.
In most schemes in the prior art, a target storage device is identified according to a UUID (Universally Unique Identifier) or a serial number of the storage device, and due to the fact that the UUID and the serial number of a part of the storage devices are missing or repeated, a situation that the target storage device cannot be identified or a plurality of target storage devices are identified occurs, that is, a situation that the storage device has inaccurate memory exists, and a result is caused: the Pvr service cannot correspond to the correct target storage device, and the Pvr service cannot achieve the expected design effect.
The above is only for the purpose of assisting understanding of the technical solutions of the present application, and does not represent an admission that the above is prior art.
Disclosure of Invention
The present application mainly aims to provide a storage device memory method, which aims to solve the technical problem of low memory accuracy of the storage device in the prior art.
To achieve the above object, the present application provides a storage device memorizing method, including:
after the insertion of the storage equipment is detected, acquiring storage association parameters of the storage equipment;
if the storage associated parameters meet the preset video recording service use conditions, acquiring identification code information corresponding to the storage equipment, wherein the identification code information is generated according to a unique identification code;
and if the identification code information meets the preset identification code condition, judging that the storage equipment is the target storage equipment.
Optionally, if the storage association parameter satisfies a preset video recording service usage condition, the step of obtaining the identification code information corresponding to the storage device further includes:
judging whether the storage equipment meets a preset capacity condition or not, and judging whether the storage equipment meets a preset file format condition or not;
and if the storage equipment simultaneously meets the preset capacity condition and the preset file format condition, judging that the storage associated parameters meet the preset video recording service use condition.
Optionally, the step of determining whether the storage device meets a preset capacity condition includes:
judging whether the capacity of the storage equipment is not less than a preset capacity or not;
if the capacity of the storage equipment is not smaller than the preset capacity, judging that the storage equipment meets the preset capacity condition;
and if the capacity of the storage equipment is smaller than the preset capacity, judging that the storage equipment does not meet the preset capacity condition.
Optionally, the step of determining whether the storage device meets a preset file format condition includes:
judging whether the file format of the storage equipment conforms to a preset format or not;
if the file format of the storage equipment conforms to a preset format, judging that the storage equipment meets the preset file format condition;
and if the capacity of the storage equipment is smaller than the preset capacity, judging that the storage equipment does not meet the preset capacity condition.
Optionally, before the step of acquiring the identification code information corresponding to the storage device, the method further includes:
acquiring a current mounting path of the storage equipment;
searching whether the storage equipment has corresponding identification code information or not according to the mounting path;
if the storage equipment has the corresponding identification code information, executing the following steps: and acquiring identification code information corresponding to the storage equipment.
Optionally, if the storage device has corresponding identification code information, performing the following steps: after the step of obtaining the identification code information corresponding to the storage device, the method further includes:
if the storage equipment does not have corresponding identification code information, current date information and a random code are obtained, and the current date information and the random code are combined to generate a unique identification code corresponding to the storage equipment;
and generating new identification code information according to the unique identification code, and storing the new identification code information to a preset local database.
Optionally, before the step of determining that the storage device is the target storage device if the identification code information meets a preset identification code condition, the method further includes:
judging whether preset identification code information consistent with the identification code information exists in a preset local database or not;
if so, judging that the identification code information meets the preset identification code condition;
if the identification code information does not meet the preset identification code condition, judging that the identification code information does not meet the preset identification code condition, and storing the identification code information to the preset local database.
In addition, to achieve the above object, the present application also provides a storage device memory apparatus, including:
the acquisition module is used for acquiring storage association parameters of the storage equipment after the insertion of the storage equipment is detected;
the retrieval module is used for acquiring identification code information corresponding to the storage equipment if the storage association parameters meet the service conditions of the preset video recording service;
and the judging module is used for judging that the storage equipment is the target storage equipment if the identification code information meets the preset identification code condition.
Optionally, the storage device memory is further configured to:
judging whether the storage equipment meets a preset capacity condition or not, and judging whether the storage equipment meets a preset file format condition or not;
and if the storage equipment simultaneously meets the preset capacity condition and the preset file format condition, judging that the storage associated parameters meet the preset video recording service use condition.
Optionally, the storage device memory is further configured to:
judging whether the capacity of the storage equipment is not less than a preset capacity or not;
if the capacity of the storage equipment is not smaller than the preset capacity, judging that the storage equipment meets the preset capacity condition;
and if the capacity of the storage equipment is smaller than the preset capacity, judging that the storage equipment does not meet the preset capacity condition.
Optionally, the storage device memory is further configured to:
judging whether the file format of the storage equipment conforms to a preset format or not;
if the file format of the storage equipment conforms to a preset format, judging that the storage equipment meets the preset file format condition;
and if the file format of the storage equipment does not accord with the preset format, judging that the storage equipment does not meet the preset file format condition.
Optionally, the storage device memory is further configured to:
acquiring a current mounting path of the storage equipment;
searching whether the storage equipment has corresponding identification code information or not according to the mounting path;
if the storage equipment has the corresponding identification code information, executing the following steps: and acquiring identification code information corresponding to the storage equipment.
Optionally, the storage device memory is further configured to:
if the storage equipment does not have corresponding identification code information, current date information and a random code are obtained, and the current date information and the random code are combined to generate a unique identification code corresponding to the storage equipment;
and generating new identification code information according to the unique identification code, and storing the new identification code information to a preset local database.
Optionally, the storage device memory is further configured to:
judging whether preset identification code information consistent with the identification code information exists in a preset local database or not;
if yes, judging that the identification code information meets the preset identification code condition;
if the identification code information does not meet the preset identification code condition, judging that the identification code information does not meet the preset identification code condition, and storing the identification code information to the preset local database.
In addition, to achieve the above object, the present application also provides an electronic device, including: the storage device comprises a memory, a processor and a storage device memorizing program which is stored on the memory and can run on the processor, wherein the storage device memorizing program is configured to realize the steps of the storage device memorizing method.
In addition, to achieve the above object, the present application also provides a computer readable storage medium having a storage device memory program stored thereon, which when executed by a processor implements the steps of the storage device memory method described above.
Compared with the technical means of identifying a target storage device according to the UUID or the serial number of the storage device to perform a video recording service in the prior art, the memory method of the storage device, the electronic device and the computer readable storage medium provided by the application firstly acquire the storage association parameters of the storage device after detecting the insertion of the storage device, namely, the capacity and the file format of the storage device, so as to judge whether the storage device meets the preset video recording service use condition; if the storage association parameters meet preset video recording service use conditions, acquiring identification code information corresponding to the storage equipment, wherein the identification code information is generated according to a unique identification code, namely, on the premise that the storage equipment can be used for a video recording service, detecting whether the identification code information generated by the unique identification code exists in the storage equipment or not, so that the storage equipment can be accurately identified after a hot plug condition occurs, and power failure protection is realized; and if the identification code information meets the preset identification code condition, judging that the storage equipment is the target storage equipment, namely, the storage equipment has identification code information generated by the unique identification code, and the identification code information is consistent with the preset identification code information in the preset local database and can be accurately identified. Therefore, the target storage equipment which can be used for the video recording service is obtained according to the storage association parameters of the storage equipment, and then each storage equipment has the unique identification code information, so that the storage equipment can be accurately identified when being inserted and used next time, the video recording service can correspond to the correct target storage equipment, the technical defects that in the prior art, the unique identification cannot be obtained in the video recording service due to repeated and missing identification codes, the capacity of the storage equipment is insufficient or the file format is not accordant in the video recording service, the target storage equipment cannot be identified or a plurality of target storage equipment cannot be identified, the memory of the storage equipment is inaccurate are overcome, and the memory accuracy of the storage equipment is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a first embodiment of a storage device memorizing method according to the present application;
FIG. 3 is a flowchart illustrating a second embodiment of a storage device memorizing method according to the present application;
FIG. 4 is a flowchart illustrating a storage device memorizing method according to a third embodiment of the present application;
FIG. 5 is a flowchart illustrating a fourth embodiment of a storage device memorizing method according to the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
At present, when a Linux platform designs a Pvr service, a storage device needs to be subjected to large file operation exceeding 4G. Currently, the only file formats supporting the Linux platform storage device to exceed 4G are NTFS, exFat and Ext4 formats. Due to the property protection of the NTFS and exFat32 file formats by Microsoft, only the Ext4 format can be used for free by the Linux platform. Therefore, the Linux platform Pvr service adopts the Ext4 file format, when other file formats exist in the storage device of the user, the storage device needs to be prompted to be formatted as the Ext4 so that the Pvr service can be used, the capacity of the storage device is also required by the Pvr service, and when the capacity does not meet the requirement, the Pvr service is not used. Therefore, the storage device can be successfully used in the Pvr service, which shows that the storage device can meet the format and capacity requirements of the Pvr service. This storage device needs to be recorded to when guaranteeing next time to insert the use, can directly open the Pvr business, most schemes in the prior art discern target storage device according to storage device's UUID or serial number, because partial storage device's UUID and serial number have disappearance or repetition, and then the condition that can not discern target storage device or discern a plurality of target storage devices appears, also there is the inaccurate condition of storage device memory, and the consequence that causes: therefore, it is difficult for the Pvr service to correspond to the correct target storage device, and the Pvr service cannot achieve the expected design effect, which needs to improve the accuracy of the storage device memory.
The main solution of the embodiment of the application is as follows: after detecting that the storage equipment is inserted, acquiring storage association parameters of the storage equipment; if the storage associated parameters meet the preset video recording service use conditions, acquiring identification code information corresponding to the storage equipment, wherein the identification code information is generated according to a unique identification code; if the identification code information meets the preset identification code condition, the storage equipment is judged to be target storage equipment, the condition that the capacity and the file format of the storage equipment do not meet the requirement of the video recording service is avoided, each storage equipment has unique identification code information, the identification code information can be accurately identified, the video recording service can correspond to the correct target storage equipment, and the memory accuracy of the storage equipment is improved.
In the conventional technical scheme, the unique storage device is generally identified according to the UUID or serial number of the storage device, and there are cases where the target storage device cannot be identified or a plurality of target storage devices are identified, that is, the memory of the storage device is inaccurate.
The application provides a solution to the problem of low memory accuracy of storage devices.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the memory 1005, which is a storage medium, may include therein an operating system, a data storage module, a network communication module, a user interface module, and a storage device memorizing program.
In the electronic device shown in fig. 1, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the electronic device may be disposed in the electronic device, and the electronic device calls the storage device memory program stored in the memory 1005 through the processor 1001 and executes the following steps:
after the insertion of the storage equipment is detected, acquiring storage association parameters of the storage equipment;
if the storage associated parameters meet the preset video recording service use conditions, acquiring identification code information corresponding to the storage equipment, wherein the identification code information is generated according to a unique identification code;
and if the identification code information meets the preset identification code condition, judging that the storage equipment is the target storage equipment.
Further, the processor 1001 may call a storage device memory program stored in the memory 1005, and further perform the following operations:
if the storage associated parameter meets the preset video recording service use condition, the step of acquiring the identification code information corresponding to the storage device further comprises:
judging whether the storage equipment meets a preset capacity condition or not, and judging whether the storage equipment meets a preset file format condition or not;
and if the storage equipment simultaneously meets the preset capacity condition and the preset file format condition, judging that the storage associated parameters meet the preset video recording service use condition.
Further, the processor 1001 may call a storage device memory program stored in the memory 1005, and further perform the following operations:
the step of judging whether the storage device meets a preset capacity condition comprises the following steps:
judging whether the capacity of the storage equipment is not less than a preset capacity or not;
if the capacity of the storage equipment is not smaller than the preset capacity, judging that the storage equipment meets the preset capacity condition; and if the capacity of the storage equipment is smaller than the preset capacity, judging that the storage equipment does not meet the preset capacity condition.
Further, the processor 1001 may call a storage device memory program stored in the memory 1005, and further perform the following operations:
the step of judging whether the storage device meets the preset file format condition comprises the following steps:
judging whether the file format of the storage equipment conforms to a preset format or not;
if the file format of the storage equipment conforms to a preset format, judging that the storage equipment meets the preset file format condition;
and if the file format of the storage equipment does not accord with the preset format, judging that the storage equipment does not meet the preset file format condition.
Further, the processor 1001 may call a storage device memory program stored in the memory 1005, and further perform the following operations:
before the step of acquiring the identification code information corresponding to the storage device, the method further includes:
acquiring a current mounting path of the storage equipment;
searching whether the storage equipment has corresponding identification code information or not according to the mounting path;
if the storage equipment has the corresponding identification code information, executing the following steps: and acquiring identification code information corresponding to the storage equipment.
Further, the processor 1001 may call a storage device memory program stored in the memory 1005, and further perform the following operations:
if the storage equipment has corresponding identification code information, executing the following steps: after the step of obtaining the identification code information corresponding to the storage device, the method further includes:
if the storage equipment does not have corresponding identification code information, current date information and a random code are obtained, and the current date information and the random code are combined to generate a unique identification code corresponding to the storage equipment;
and generating new identification code information according to the unique identification code, and storing the new identification code information to a preset local database.
Further, the processor 1001 may call a storage device memory program stored in the memory 1005, and further perform the following operations:
before the step of determining that the storage device is a target storage device if the identification code information satisfies a preset identification code condition, the method further includes:
judging whether preset identification code information consistent with the identification code information exists in a preset local database or not;
if so, judging that the identification code information meets the preset identification code condition;
if the identification code information does not meet the preset identification code condition, judging that the identification code information does not meet the preset identification code condition, and storing the identification code information to the preset local database.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a first embodiment of a storage device memorizing method according to the present application.
In this embodiment, the storage device memorizing method includes:
step S10: after the insertion of the storage equipment is detected, acquiring storage association parameters of the storage equipment;
as an example, the storage device is a device for storing information, and generally digitizes the information and stores the information on a medium using an electric, magnetic, optical, or the like, and may be, for example, a usb disk, a portable computer diskette, or a hard disk. The storage device memorizing method is applied to an electronic device for memorizing used storage devices, and the electronic device may be a set top box, a television, or a mobile terminal, and is not limited herein.
As an example, the target storage device is a storage device that has been accurately memorized and meets the requirements of the video recording service in terms of capacity and file format, and is used for performing the video recording service, and may be, for example, a usb disk, a portable computer disk, or a hard disk.
As an example, the storage related parameter is information related to a storage aspect of the storage device, and is used to determine whether the storage device is available for a video recording service, and may be any one or more of a capacity and a file format of the storage device, for example, in a case that a target storage device does not exist, detecting that the storage device is inserted, acquiring the capacity and the file format of the storage device, and determining whether the storage related parameter meets a preset video recording service usage condition, where the preset video recording service usage condition is used to determine whether the capacity and the file format of the storage device meet a requirement of the video recording service.
Step S20: if the storage associated parameters meet the preset video recording service use conditions, acquiring identification code information corresponding to the storage equipment, wherein the identification code information is generated according to a unique identification code;
as an example, the unique identification code is an identification code for identifying a storage device, and the identity information for uniquely identifying the storage device may be, for example, a binary code, a device name code, or a device tag value.
As an example, the identification code information is content related to a unique identification code for identifying the storage device, and may be, for example, the unique identification code, an identification code file, or an identification code file name.
As an example, if the storage related parameter meets a preset video recording service use condition, acquiring identification code information corresponding to the storage device; if the storage associated parameters do not meet the preset video recording service use conditions, displaying reminding information to a user to inform the user that the capacity or the file format of the storage equipment does not meet the video recording service requirements, and providing a subsequent operation scheme for the user.
Step S30: and if the identification code information meets the preset identification code condition, judging that the storage equipment is the target storage equipment.
As an example, if the identification code information meets a preset identification code condition, determining that the storage device is a target storage device; and if the identification code information does not meet the preset identification code condition, judging that the storage equipment is not the target storage equipment and the video recording service cannot be started.
Compared with the technical means of identifying a target storage device according to the UUID or the serial number of the storage device to perform the video recording service in the prior art, the embodiment of the application firstly detects that the storage device is inserted, and then obtains the storage associated parameters of the storage device, namely, the capacity and the file format of the storage device, so as to judge whether the storage device meets the preset video recording service use condition; if the storage association parameters meet the preset video recording service use conditions, acquiring identification code information corresponding to the storage equipment, wherein the identification code information is generated according to a unique identification code, namely, on the premise that the storage equipment can be used for a video recording service, detecting whether the identification code information generated by the unique identification code exists in the storage equipment or not, so that the storage equipment can be accurately identified when a hot plug condition occurs, and power failure protection is realized; and if the identification code information meets the preset identification code condition, judging that the storage equipment is the target storage equipment, namely, the storage equipment has identification code information generated by the unique identification code, and the identification code information is consistent with the preset identification code information in the preset local database and can be accurately identified. Therefore, the target storage equipment which can be used for the video recording service is obtained according to the storage association parameters of the storage equipment, and then each storage equipment has the unique identification code information, so that the storage equipment can be accurately identified when being inserted and used next time, the video recording service can correspond to the correct target storage equipment, the technical defects that in the prior art, the unique identification cannot be obtained in the video recording service due to repeated and missing identification codes, the capacity of the storage equipment is insufficient or the file format is not accordant in the video recording service, the target storage equipment cannot be identified or a plurality of target storage equipment cannot be identified, the memory of the storage equipment is inaccurate are overcome, and the memory accuracy of the storage equipment is improved.
Further, referring to fig. 3, a second embodiment of the present application provides a storage device memorizing method, based on the embodiment shown in fig. 2, before the step of acquiring the identification code information corresponding to the storage device, the method further includes:
s11, judging whether the storage equipment meets the preset capacity condition and whether the storage equipment meets the preset file format condition;
as an example, the preset capacity condition is a condition for determining whether the capacity of the storage device meets a video recording service requirement, for example, the capacity of the storage device is not less than a preset capacity, and the preset capacity is a minimum capacity meeting the video recording service requirement.
As an example, the preset file format condition is a condition for determining whether the file format of the storage device meets the video recording service requirement, for example, the file format of the storage device may be a preset format, and the preset format is a file format meeting the video recording service requirement, and may be one or more file formats, for example, Ext4, Ext4, exFat, Ext4, and NTFS.
As an example, the step of determining whether the storage device meets a preset capacity condition includes: judging whether the capacity of the storage equipment is not less than a preset capacity, wherein the capacity is the size of a storage space which can be used by the storage equipment currently; if the capacity of the storage equipment is not smaller than the preset capacity, judging that the storage equipment meets the preset capacity condition; if the capacity of the storage device is smaller than the preset capacity, judging that the storage device does not meet the preset capacity condition, and displaying reminding information (for example, if the capacity is too small, unnecessary files in the storage device can be deleted or the storage device can be replaced, and the like) to a user to inform the user that the capacity of the storage device does not meet the requirement of the video recording service, the video recording service cannot be started, and a subsequent operation scheme is provided for the user to improve the user experience.
As an example, the step of determining whether the storage device meets a preset file format condition includes: judging whether the file format of the storage equipment conforms to a preset format or not; if the file format of the storage equipment accords with a preset format, judging that the storage equipment meets the preset file format condition; if the file format of the storage device does not meet the preset format, judging that the storage device does not meet the preset file format condition, and displaying reminding information to a user (for example, if the file format is not matched, the file format in the storage device can be Ext4 or the storage device is replaced, and the like) to inform the user that the file format of the storage device does not meet the video recording service requirement, the video recording service cannot be started, and a subsequent operation scheme is provided for the user, so that the user experience is improved.
And S12, if the storage device simultaneously meets the preset capacity condition and the preset file format condition, judging that the storage association parameters meet the preset video recording service use condition.
As an example, if the storage device satisfies the preset capacity condition and the preset file format condition at the same time, the following steps are performed: if the capacity and the file format of the storage equipment meet the requirements of the video recording service, judging that the storage associated parameters meet the preset video recording service use conditions, wherein the storage equipment can be used for the video recording service; if the storage device does not meet the preset capacity condition, the preset file format condition is met, or the storage device does not meet the preset capacity condition, nor the preset file format condition, or the storage device meets the preset capacity condition, nor the preset file format condition, it is determined that the storage association parameter does not meet the preset video recording service use condition, and the storage device cannot be used for the video recording service.
In this embodiment, first, whether the storage device meets a preset capacity condition or not is determined, and whether the storage device meets a preset file format condition or not is determined, so as to determine whether the capacity and the file format of the storage device meet the video recording service requirement or not; if the storage device simultaneously meets the preset capacity condition and the preset file format condition, the method comprises the following steps: and if the capacity and the file format of the storage equipment meet the requirements of the video recording service, judging that the storage association parameters meet the preset video recording service use conditions, so that the problem that the video recording service is influenced due to insufficient capacity or incorrect file format of the storage equipment in the prior art is solved, and the storage equipment meeting the requirements of the video recording service can be identified.
Further, referring to fig. 4, a third embodiment of the present application provides a storage device memorizing method, based on the embodiment shown in fig. 2, before the step of acquiring the identification code information corresponding to the storage device, the method further includes:
step S21: acquiring a current mounting path of the storage equipment;
step S22: searching whether the storage equipment has corresponding identification code information or not according to the mounting path;
step S23: if the storage equipment has the corresponding identification code information, executing the following steps: and acquiring identification code information corresponding to the storage equipment.
As an example, if the storage device has corresponding identification code information, the method performs the following steps: after the step of obtaining the identification code information corresponding to the storage device, the method further includes:
step S24: if the storage equipment does not have corresponding identification code information, current date information and a random code are obtained, and the current date information and the random code are combined to generate a unique identification code corresponding to the storage equipment;
as an example, the date information may include year, month, day, hour, minute and second, the random code is a generated random character string used for generating the unique identification code, and may be composed of one or more of letters, numbers, symbols, and the like, and the random code is not limited in length, for example, when the current date information is acquired as 10 o 10, 10 min 16 s at 17 th in 2022 years, and the random code is 1234, the unique identification code of the storage device is generated as 202201171010161234.
Step S25: and generating new identification code information according to the unique identification code, and storing the new identification code information to a preset local database.
As an example, 202201181115164321 is used as a unique identification code, an identification code file is created according to the unique identification code, a prefix and a suffix are respectively added before and after the identification code to generate an identification code file name, that is, identification code information, the identification code information is stored in a preset local database in a read-only memory to avoid the identification code information from being changed, the prefix is added to hide the identification code file name, and the suffix pvr is added to indicate that the file is a video recording service related file, so that the identification code file can be conveniently and quickly retrieved to obtain the identification code information of the storage device while the safety of the identification code information is protected, and the final identification code information is ". 20281115164321. pvr".
In this embodiment, first, a current mount path of the storage device is obtained; then, searching whether the storage equipment has corresponding identification code information or not according to the mounting path; if the storage equipment has corresponding identification code information, executing the following steps: acquiring identification code information corresponding to the storage equipment; if the storage equipment does not have corresponding identification code information, current date information and a random code are obtained, and the current date information and the random code are combined to generate a unique identification code corresponding to the storage equipment; and finally, generating new identification code information according to the unique identification code, and storing the new identification code information into a preset local database, so that the storage equipment has corresponding identification code information and is accurately memorized compared with the prior art in which the identification cannot be realized or a plurality of target storage equipment is recognized due to the fact that UUIDs and serial numbers are repeated or lost, thereby realizing accurate identification.
Further, referring to fig. 5, a fourth embodiment of the present invention provides a storage device memorizing method, based on the embodiment shown in fig. 2, before the step S30, the method further includes:
step S31: judging whether preset identification code information consistent with the identification code information exists in a preset local database or not;
as an example, the preset local database stores preset identification code information corresponding to the identification code information of the storage device that has been used, for memorizing the storage device that has been used.
Step S32: if so, judging that the identification code information meets the preset identification code condition;
as an example, a preset identification code condition is used to determine whether the storage device is accurately memorized, and if a preset identification code information identical to the identification code information exists in a preset local database, it is determined that the identification code information satisfies the preset identification code condition.
Step S33: if the identification code information does not meet the preset identification code condition, judging that the identification code information does not meet the preset identification code condition, and storing the identification code information to the preset local database.
As an example, if there is no preset identification code information that is consistent with the identification code information in a preset local database, it is determined that the identification code information does not satisfy the preset identification code condition, and the identification code information is stored in the preset local database of the read-only memory. For example, if the identification code information of a storage device is B, and the preset identification code information B does not exist in the preset local database, the B is stored in the preset local database.
In the embodiment, whether preset identification code information consistent with the identification code information exists in a preset local database is judged; if the identification code information exists, the identification code information is judged to meet the preset identification code condition, the storage equipment has unique identification code information, the memory is accurate, and the storage equipment can be accurately identified; if the identification code information does not exist, the identification code information is judged not to meet the preset identification code condition, and the identification code information is stored in the preset local database, so that the storage equipment meets the preset identification code condition, and on the basis that the storage equipment can be memorized and accurately identified, waste of storage space caused by regeneration of the identification code information is avoided.
In addition, an embodiment of the present application further provides a storage device memory apparatus, where the apparatus includes:
the acquisition module is used for acquiring storage association parameters of the storage equipment after detecting the insertion of the storage equipment;
the retrieval module is used for acquiring the identification code information corresponding to the storage equipment if the storage associated parameters meet the preset video recording service use conditions;
and the judging module is used for judging that the storage equipment is the target storage equipment if the identification code information meets the preset identification code condition.
Optionally, the storage device memory is further configured to:
judging whether the storage equipment meets a preset capacity condition or not, and judging whether the storage equipment meets a preset file format condition or not;
and if the storage equipment simultaneously meets the preset capacity condition and the preset file format condition, judging that the storage associated parameters meet the preset video recording service use condition.
Optionally, the storage device memory is further configured to:
judging whether the capacity of the storage equipment is not less than a preset capacity or not;
if the capacity of the storage equipment is not smaller than the preset capacity, judging that the storage equipment meets the preset capacity condition; and if the capacity of the storage equipment is smaller than the preset capacity, judging that the storage equipment does not meet the preset capacity condition.
Optionally, the storage device memory is further configured to:
judging whether the file format of the storage equipment conforms to a preset format or not;
if the file format of the storage equipment accords with a preset format, judging that the storage equipment meets the preset file format condition;
and if the file format of the storage equipment does not accord with the preset format, judging that the storage equipment does not meet the preset file format condition.
Optionally, the storage device memory is further configured to:
acquiring a current mounting path of the storage equipment;
searching whether the storage equipment has corresponding identification code information or not according to the mounting path;
if the storage equipment has the corresponding identification code information, executing the following steps: and acquiring identification code information corresponding to the storage equipment.
Optionally, the storage device memory is further configured to:
if the storage equipment does not have corresponding identification code information, current date information and a random code are obtained, and the current date information and the random code are combined to generate a unique identification code corresponding to the storage equipment;
and generating new identification code information according to the unique identification code, and storing the new identification code information to a preset local database.
Optionally, the storage device memory is further configured to:
judging whether preset identification code information consistent with the identification code information exists in a preset local database or not;
if so, judging that the identification code information meets the preset identification code condition;
if the identification code information does not meet the preset identification code condition, judging that the identification code information does not meet the preset identification code condition, and storing the identification code information to the preset local database.
The storage device memory device provided by the application adopts the storage device memory method in the embodiment, and the technical problem of low memory accuracy of the storage device is solved. Compared with the prior art, the beneficial effects of the storage device memory apparatus provided by the embodiment of the present application are the same as the beneficial effects of the storage device memory method provided by the above embodiment, and other technical features in the storage device memory apparatus are the same as those disclosed in the above embodiment method, which are not described herein again.
In addition, an embodiment of the present application further provides an electronic device, where the electronic device includes: the storage device comprises a memory, a processor and a storage device memorizing program which is stored on the memory and can run on the processor, wherein the storage device memorizing program is configured to realize the steps of the storage device memorizing method.
The electronic device provided by the application adopts the storage device memory method in the embodiment, so that the technical problem of low memory accuracy of the storage device is solved. Compared with the prior art, the beneficial effects of the storage device memory apparatus provided by the embodiment of the present application are the same as the beneficial effects of the storage device memory method provided by the above embodiment, and other technical features in the electronic device are the same as those disclosed in the above embodiment method, which are not described herein again.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a storage device memory program is stored on the computer-readable storage medium, and when the storage device memory program is executed by a processor, the steps of the storage device memory method are implemented.
The computer-readable storage medium provided by the application stores computer-readable program instructions for executing the storage device memory method, and solves the technical problem of low memory accuracy of the storage device. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present application are the same as the beneficial effects of the storage device memorizing method provided by the above embodiment, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present application may be substantially or partially embodied in the form of a software product, which is stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A storage device memorizing method is characterized by comprising the following steps:
after the insertion of the storage equipment is detected, acquiring storage association parameters of the storage equipment;
if the storage association parameters meet the preset video recording service use conditions, acquiring identification code information corresponding to the storage equipment, wherein the identification code information is generated according to a unique identification code;
and if the identification code information meets the preset identification code condition, judging that the storage equipment is the target storage equipment.
2. The storage device memorizing method of claim 1, wherein before the step of acquiring the identification code information corresponding to the storage device if the storage related parameter satisfies a preset video recording service usage condition, the method further comprises:
judging whether the storage equipment meets a preset capacity condition or not, and judging whether the storage equipment meets a preset file format condition or not;
and if the storage equipment simultaneously meets the preset capacity condition and the preset file format condition, judging that the storage association parameters meet the preset video recording service use condition.
3. The storage device memorizing method as claimed in claim 2, wherein the step of determining whether the storage device satisfies a preset capacity condition comprises:
judging whether the capacity of the storage equipment is not less than a preset capacity or not;
if the capacity of the storage equipment is not smaller than the preset capacity, judging that the storage equipment meets the preset capacity condition;
and if the capacity of the storage equipment is smaller than the preset capacity, judging that the storage equipment does not meet the preset capacity condition.
4. The storage device memorizing method of claim 2, wherein the step of determining whether the storage device satisfies a predetermined file format condition comprises:
judging whether the file format of the storage equipment conforms to a preset format or not;
if the file format of the storage equipment accords with a preset format, judging that the storage equipment meets the preset file format condition;
and if the file format of the storage equipment does not accord with the preset format, judging that the storage equipment does not meet the preset file format condition.
5. The storage device memorizing method according to claim 1, wherein before the step of acquiring the identification code information corresponding to the storage device, the method further comprises:
acquiring a current mounting path of the storage equipment;
searching whether the storage equipment has corresponding identification code information or not according to the mounting path;
if the storage equipment has the corresponding identification code information, executing the following steps: and acquiring identification code information corresponding to the storage equipment.
6. The storage device memorizing method of claim 5, wherein if the storage device has the corresponding identification code information, the steps of: after the step of obtaining the identification code information corresponding to the storage device, the method further includes:
if the storage equipment does not have corresponding identification code information, current date information and a random code are obtained, and the current date information and the random code are combined to generate a unique identification code corresponding to the storage equipment;
and generating new identification code information according to the unique identification code, and storing the new identification code information to a preset local database.
7. The storage device memorizing method of claim 1, wherein before the step of determining that the storage device is a target storage device if the identification code information satisfies a preset identification code condition, the method further comprises:
judging whether preset identification code information consistent with the identification code information exists in a preset local database or not;
if so, judging that the identification code information meets the preset identification code condition;
if the identification code information does not meet the preset identification code condition, judging that the identification code information does not meet the preset identification code condition, and storing the identification code information to the preset local database.
8. A storage device memory apparatus, the apparatus comprising:
the acquisition module is used for acquiring storage association parameters of the storage equipment after the insertion of the storage equipment is detected;
the retrieval module is used for acquiring the identification code information corresponding to the storage equipment if the storage associated parameters meet the preset video recording service use conditions;
and the judging module is used for judging that the storage equipment is the target storage equipment if the identification code information meets the preset identification code condition.
9. An electronic device, characterized in that the electronic device comprises: a memory, a processor, and a storage device memory program stored on the memory and executable on the processor, the storage device memory program configured to implement the steps of the storage device memory method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a storage device memorizing program which, when executed by a processor, implements the steps of the storage device memorizing method according to any one of claims 1 to 7.
CN202210265410.3A 2022-03-17 2022-03-17 Storage device memory method, electronic device and computer readable storage medium Pending CN114564244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210265410.3A CN114564244A (en) 2022-03-17 2022-03-17 Storage device memory method, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210265410.3A CN114564244A (en) 2022-03-17 2022-03-17 Storage device memory method, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114564244A true CN114564244A (en) 2022-05-31

Family

ID=81720708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210265410.3A Pending CN114564244A (en) 2022-03-17 2022-03-17 Storage device memory method, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114564244A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002334021A (en) * 2001-05-08 2002-11-22 Sharp Corp Storage device authentication system
JP2010211717A (en) * 2009-03-12 2010-09-24 Canon Inc Controller, method of controlling same and program
US20170237563A1 (en) * 2013-11-27 2017-08-17 British Telecommunications Public Limited Company Controlled storage device access
CN108153495A (en) * 2018-01-15 2018-06-12 沈阳延云云计算技术有限公司 Date storage method, device and data-storage system
CN110688073A (en) * 2019-10-10 2020-01-14 深圳市网心科技有限公司 Data storage method, electronic device, system and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002334021A (en) * 2001-05-08 2002-11-22 Sharp Corp Storage device authentication system
JP2010211717A (en) * 2009-03-12 2010-09-24 Canon Inc Controller, method of controlling same and program
US20170237563A1 (en) * 2013-11-27 2017-08-17 British Telecommunications Public Limited Company Controlled storage device access
CN108153495A (en) * 2018-01-15 2018-06-12 沈阳延云云计算技术有限公司 Date storage method, device and data-storage system
CN110688073A (en) * 2019-10-10 2020-01-14 深圳市网心科技有限公司 Data storage method, electronic device, system and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
廖洪其;凌捷;郝彦军;柯钢;: "USB移动存储设备的惟一性识别方法研究", 计算机工程与设计, no. 12, 28 June 2010 (2010-06-28), pages 106 - 108 *

Similar Documents

Publication Publication Date Title
CN107454103B (en) Network security event process analysis method and system based on time line
CN101743746B (en) Method for displaying internet television information of broadcasting receiver and broadcasting receiver enabling the method
CN106909811B (en) Method and device for processing user identification
CN110472434B (en) Data desensitization method, system, medium, and electronic device
CN112256225A (en) Screen projection method, server, terminal device and computer readable storage medium
CN109672608B (en) Method for transmitting messages according to time
CN106550089B (en) Verification code processing method, client and user terminal
CN113507455B (en) Network security detection method and system based on big data
CN106874718B (en) Privacy processing method and device and terminal
CN106789973B (en) Page security detection method and terminal equipment
CN113204383B (en) Method, device and system for storing BMC configuration parameters and storage medium
CN106055693B (en) Information processing method and terminal
CN114564244A (en) Storage device memory method, electronic device and computer readable storage medium
CN111460403A (en) Information processing method and system
CN109712613B (en) Semantic analysis library updating method and device and electronic equipment
CN113810262A (en) Message reminding method and device, electronic equipment and readable storage medium
CN112015651A (en) Data processing method and device
CN106941496B (en) login verification method and device
CN107784064B (en) Webpage data processing method and device, computer equipment and computer storage medium
CN106302821B (en) Data request method and equipment thereof
CN111199137A (en) Cloud font loading method and device and electronic equipment
CN107343088B (en) Information protection method of mobile terminal and mobile terminal
CN111061701A (en) Information processing method, device, server and computer readable medium
CN106815249B (en) Vertical text advertisement filtering method and device
KR100483949B1 (en) Portable information terminal and control method

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