CN115083572B - Picture storing and extracting method, system, equipment and medium - Google Patents

Picture storing and extracting method, system, equipment and medium Download PDF

Info

Publication number
CN115083572B
CN115083572B CN202210874674.9A CN202210874674A CN115083572B CN 115083572 B CN115083572 B CN 115083572B CN 202210874674 A CN202210874674 A CN 202210874674A CN 115083572 B CN115083572 B CN 115083572B
Authority
CN
China
Prior art keywords
picture
stored
folder
data
picture data
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.)
Active
Application number
CN202210874674.9A
Other languages
Chinese (zh)
Other versions
CN115083572A (en
Inventor
余杰华
李万晶
马清飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Side Medical Technology Co ltd
Original Assignee
Guangzhou Side Medical 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 Guangzhou Side Medical Technology Co ltd filed Critical Guangzhou Side Medical Technology Co ltd
Priority to CN202210874674.9A priority Critical patent/CN115083572B/en
Publication of CN115083572A publication Critical patent/CN115083572A/en
Application granted granted Critical
Publication of CN115083572B publication Critical patent/CN115083572B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/20ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Radiology & Medical Imaging (AREA)
  • Software Systems (AREA)
  • Epidemiology (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a system, equipment and a medium for storing and extracting pictures, which relate to the technical field of picture storage and comprise the following steps: calculating a first numerical value according to the first picture identification and a preset folder storage amount; determining a first file name from the integer portion of the first value; storing first picture data to be stored into a first folder named with a first file name; the first picture identifier is determined by a picture recorder according to the first picture data to be stored; and the preset folder storage amount is the upper limit value of the folder storage picture. According to the invention, the picture data to be stored are sequentially stored in the corresponding folders according to the sequence of picture receiving, and the names of the folders are numbers associated with the picture identifiers, so that the position of the picture in the folders can be directly determined according to the picture identifiers in the subsequent extraction process, the problem of clamping caused by overlong file names can be solved, processor resources are saved, and the storage efficiency is improved.

Description

Picture storing and extracting method, system, equipment and medium
Technical Field
The present invention relates to the field of image storage technologies, and in particular, to a method, a system, an apparatus, and a medium for storing and extracting images.
Background
The capsule endoscope system generally has a data image recorder for storing images generated in real time in the inspection process, wherein each second of the images is at least 3 frames, the images generated in the whole inspection process are at least tens of thousands of images, and even tens of thousands of images, and the management of the images is generally realized based on a universal file system module.
The general file system module system is not a real-time file system, the process of creating folders or files sometimes exceeds hundreds of milliseconds, and as the more pictures are managed, the larger the picture list managed by the file system is, the longer and longer the time for operating the files becomes, and the processor with weaker computing capability and smaller memory obviously cannot store and manage a large amount of picture data in real time, so that the picture data is likely to be lost.
For tens of thousands of pictures exist in the capsule endoscope system, even if tens of thousands of pictures need to be processed, the universal file system module system is adopted to operate files at the same time, so that the working efficiency is greatly reduced, particularly, if tens of thousands of pictures are stored in one folder, the folder is more and more blocked, and when a plurality of folders are arranged, the longer the file names are arranged, the longer the comparison time is, and the more resources are consumed by a processor.
Disclosure of Invention
The invention provides a picture storage and extraction method, a system, equipment and a medium, which are used for solving the technical defect that the prior art can cause the occurrence of clamping when a capsule endoscope picture is stored in real time.
In a first aspect, the present invention provides a method for storing pictures, including:
calculating a first numerical value according to the first picture identification and a preset folder storage amount;
determining a first file name from an integer portion of the first value;
storing first picture data to be stored into a first folder named with a first file name;
the first picture identifier is determined by a picture recorder according to the first picture data to be stored;
and the preset folder storage amount is the upper limit value of the folder storage picture.
According to the picture storage method provided by the invention, after the first picture data to be stored is stored in the first folder named by the first file name, the method further comprises the following steps:
receiving second picture data to be stored;
Calculating a second numerical value according to the second picture identification and a preset folder storage amount;
determining a second file name from the integer portion of the second value;
creating a second folder and storing the second picture data to be stored into the second folder under the condition that the second file name is different from the first file name;
the second picture identification is determined according to the second picture data to be stored.
According to the picture storage method provided by the invention, the upper limit value of the folder storage picture is determined according to the following parameters:
the running speed of the central processing unit;
and/or a processing speed of a system for storing picture data to be stored;
and/or an operation speed of a storage medium for storing the picture data to be stored;
and/or a history memory amount for executing a memory task of the picture to be stored.
According to the image storage method provided by the invention, before calculating the first value according to the first image identifier and the preset folder storage amount, the method further comprises the following steps:
sequentially receiving each picture data packet;
extracting a data packet identifier in each picture data packet;
and generating first picture data to be stored according to all the picture data packets with the same data packet identification.
According to the image storage method provided by the invention, before each image data packet is sequentially received, the method further comprises the following steps:
controlling a picture generation device to generate first picture data to be stored;
the first picture data to be stored at least comprises a first picture identifier;
the first picture identification is determined according to the generation time of the first picture data to be stored.
According to the image storage method provided by the invention, after the image generation device is controlled to generate the first image data to be stored, the image storage method further comprises the following steps:
controlling the picture generation device to determine each picture data packet according to the preset length of the data packet and the first picture data to be stored;
controlling the picture generation device to transmit all picture data packets to the picture recorder;
each of the picture data packets includes the first picture identification.
In a second aspect, the present invention provides a method for extracting a picture of the storage method, including:
receiving a request instruction of an intelligent terminal;
determining a target picture address according to the target picture identification in the request instruction and a preset folder storage amount;
and determining the position of the target picture in the target folder according to the target picture address.
In a third aspect, the present invention provides a picture storage system, which adopts the picture storage method, including:
the picture recorder is used for storing picture data to be stored;
the intelligent terminal is used for extracting the picture data to be stored in the picture recorder;
and the picture generation device is used for generating the picture data to be stored with the picture identification in batches.
According to the picture storage system provided by the invention, the picture generation device is a capsule endoscope.
In a fourth aspect, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the picture storage method when executing the program.
In a fifth aspect, there is also provided a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the picture storage method.
The invention provides a picture storage and extraction method, a system, equipment and a medium, which calculate a first numerical value according to a first picture identifier generated by a picture generation device and a preset folder storage amount, and determine a first file name according to an integer part of the first numerical value; storing first picture data to be stored into a first folder named with a first file name; and the preset folder storage amount is the upper limit value of the folder storage picture. According to the invention, the picture data to be stored are sequentially stored in the corresponding folders according to the sequence of picture receiving, and the names of the folders are numbers associated with the picture identifications, so that the position of the pictures in the folders can be directly determined according to the picture identifications in the subsequent extraction process, the problem of clamping caused by overlong file names is solved, processor resources are further saved, and the storage efficiency is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a picture storage method provided by the invention;
FIG. 2 is a second flowchart of a picture storing method according to the present invention;
FIG. 3 is a third flow chart of a method for storing pictures according to the present invention;
FIG. 4 is a flowchart of a picture storing method according to the present invention;
fig. 5 is a schematic flow chart of a picture extraction method provided by the invention;
fig. 6 is a schematic structural diagram of a picture storage system according to the present invention;
fig. 7 is a schematic diagram of storing picture data to be stored in a folder according to the present invention;
fig. 8 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic flow chart of a picture storage method provided by the present invention, and the present invention discloses a picture storage method, which includes:
calculating a first numerical value according to the first picture identification and a preset folder storage amount;
determining a first file name from an integer portion of the first value;
storing first picture data to be stored into a first folder named with a first file name;
the first picture identifier is determined by a picture recorder according to the first picture data to be stored;
and the preset folder storage amount is the upper limit value of the folder storage picture.
In step 101, the first picture identifier is determined by the picture recorder according to the first picture to be stored, and the first picture to be stored includes the first picture identifier, when the first picture to be stored is not formed yet, but each data packet has the first picture identifier, so when the picture recorder receives the first picture to be stored, that is, each picture to be stored corresponds to a picture identifier, which is an identifier for characterizing picture uniqueness, and can be determined according to the generation time when the picture is generated. For example, the first picture identification may be 22, 199, 232, etc.
The preset folder storage amount is the upper limit value of the stored pictures of the folders, and is a preset value which is determined by calculating a large amount of experimental data according to the running speed of a central processing unit of the picture recorder, the storage speed of a storage unit of the picture recorder and other factors, if the numerical value of the preset folder storage amount is larger, the number of the pictures which can be stored in each folder is larger, but the time for storing the folders and the pictures is increased; if the value of the preset folder storage amount is smaller, the number of pictures which can be stored in each folder is smaller, at this time, although the folder and the time for storing the pictures are shortened, management of the folders is inconvenient, the creation frequency of the folders is increased, in order to achieve both management of the folders and the picture data and also achieve the creation time of the folders, the value range of the preset folder storage amount is optionally set to be 1-300, when the value of the preset folder storage amount is 1, each folder corresponds to one picture data to be stored, and when the value of the preset folder storage amount is 300, each folder can store 300 picture data to be stored.
For example, in an alternative embodiment, the first picture identifier is 225, the preset folder storage is 200, and then a first value is calculated according to the first picture identifier and the preset folder storage, and the first data is optionally determined by dividing the first picture identifier by the preset folder storage, specifically, the first value is 1.125.
In step 102, in combination with the first value in step 101 being 1.125, at this time, according to the integer part of the first value being 1, the first file name is determined to be 1. In yet other embodiments, if the first value is 18.2, the first file name is determined to be 18 based on the integer portion of the first value being 18. In yet another embodiment, if the first value is 0.895, the first file name is determined to be 0 based on the integer portion of the first value being 0.
In step 103, storing first picture data to be stored into a first folder named by a first file name, wherein the first picture data to be stored determines the first file name to be stored according to steps 101 to 102, further stores the first picture data to be stored into the first folder named by the first file name, if the first folder exists, stores the first picture data into the first folder, and if the first folder does not exist, creates the first folder and stores the first picture data into the first folder.
Those skilled in the art understand that, according to the first picture identifier and the preset folder storage amount, the first file name is determined, the first picture data to be stored is stored to the first folder named by the first file name, but when a plurality of picture data to be stored need to be stored under the same folder, in the process of storing the picture data to be stored, the file system traverses all the picture data to be stored in the current folder, the names of the picture data to be stored to be named and the names of other picture data to be stored in the folder are compared, whether a conflict exists is checked, the more the picture data to be stored is, the longer the file name is, the longer the compared time is, and the more the resources of the processor are consumed. The invention uses the picture mark generated in the capsule endoscope to determine the file name in the file, which is short and visual, and the time for creating and storing the file is shorter. After the file is built, the picture data currently in the buffer memory state can be formed into a complete picture, and the complete picture is placed into the built file.
The file name is calculated according to the picture identification generated in the specific capsule endoscope, and the complicated naming rule is abandoned, so that the storage mode is visual and concise.
Optionally, the upper limit value of the folder storage picture is determined according to the following parameters:
the running speed of the central processing unit;
and/or a processing speed of a system for storing picture data to be stored;
and/or an operation speed of a storage medium for storing the picture data to be stored;
and/or a history memory amount for executing a memory task of the picture to be stored.
The present invention discloses four parameters that can affect the upper limit value of the folder-stored picture, but this is not all factors that determine the upper limit value of the folder-stored picture, and these four parameters cannot be interpreted as limitations that are determined for the upper limit value of the folder-stored picture. And in the determination of the upper limit value of the folder storage picture, the following scheme is included:
scheme one: determining the upper limit value of the folder stored picture according to the running speed of the central processing unit;
scheme II: determining an upper limit value of the folder storage picture according to the processing speed of a system for storing the picture data to be stored;
scheme III: determining an upper limit value of the folder stored picture according to the running speed of a storage medium for storing picture data to be stored;
scheme IV: determining an upper limit value of the stored pictures of the folder according to the history storage amount for executing the storage task of the pictures to be stored;
Scheme five: determining an upper limit value of the stored picture of the folder according to the running speed of the central processing unit and the processing speed of a system for storing the picture data to be stored;
scheme six: determining an upper limit value of the folder stored picture according to the running speed of the central processing unit and the running speed of a storage medium for storing picture data to be stored;
scheme seven: determining an upper limit value of the stored pictures of the folder according to the running speed of the central processing unit and the history storage amount of the storage task for executing the pictures to be stored;
scheme eight: determining an upper limit value of the folder stored picture according to the processing speed of a system for storing the picture data to be stored and the running speed of a storage medium for storing the picture data to be stored;
scheme nine: determining an upper limit value of the folder stored picture according to the processing speed of a system for storing the picture data to be stored and the history storage amount for executing the storage task of the picture to be stored;
scheme ten: determining an upper limit value of the folder stored picture according to the running speed of a storage medium for storing the picture data to be stored and the history storage amount for executing the storage task of the picture to be stored;
Scheme eleven: determining an upper limit value of the folder stored picture according to the running speed of the central processing unit, the processing speed of a system for storing the picture data to be stored and the running speed of a storage medium for storing the picture data to be stored;
scheme twelve: determining an upper limit value of the stored picture of the folder according to the running speed of the central processing unit, the processing speed of a system for storing the picture data to be stored and the history storage amount for executing the storage task of the picture to be stored;
scheme thirteen: determining an upper limit value of the folder storage picture according to the processing speed of a system for storing the picture data to be stored, the running speed of a storage medium for storing the picture data to be stored and the history storage amount for executing the storage task of the picture to be stored;
scheme fourteen: and determining the upper limit value of the stored picture of the folder according to the running speed of the central processing unit, the processing speed of the system for storing the picture data to be stored, the running speed of the storage medium for storing the picture data to be stored and the historical storage amount for executing the storage task of the picture to be stored.
In an alternative embodiment, the upper limit value of the folder storage picture is determined according to the operation speed of the central processing unit in the initial state, the processing speed of the system for storing the picture data to be stored, the operation speed of the storage medium for storing the picture data to be stored, and the historical storage amount for executing the storage task of the picture to be stored.
The invention provides a picture storage and extraction method, a system, equipment and a medium, which calculate a first numerical value according to a first picture identifier generated by a picture generation device and a preset folder storage amount, and determine a first file name according to an integer part of the first numerical value; storing first picture data to be stored into a first folder named with a first file name; and the preset folder storage amount is the upper limit value of the folder storage picture. According to the invention, the picture data to be stored are sequentially stored in the corresponding folders according to the sequence of picture receiving, and the names of the folders are numbers associated with the picture identifications, so that the method and the device can directly determine the positions of the pictures in the folders according to the picture identifications in the subsequent extraction process, solve the problem of clamping caused by overlong file names, further save processor resources and improve the storage efficiency.
Fig. 2 is a second flowchart of a picture storing method according to the present invention, after storing the first picture data to be stored in a first folder named with a first file name, the method further includes:
receiving second picture data to be stored;
calculating a second numerical value according to the second picture identification and a preset folder storage amount;
Determining a second file name from the integer portion of the second value;
creating a second folder and storing the second picture data to be stored into the second folder under the condition that the second file name is different from the first file name;
the second picture identification is determined according to the second picture data to be stored.
In step 201, after storing the first picture data to be stored in the first folder named with the first file name, the second picture data to be stored may be stored in the first folder named with the first file name or in another folder, and specifically, the second picture data to be stored is generated by all data packets containing the second picture identifier, where the second picture identifier is determined according to the second picture data to be stored. And after receiving all the data packets containing the second picture identification, generating the second picture data to be stored, wherein the second picture data to be stored at least comprises the second picture identification.
In step 202, a second value is calculated according to the second picture identifier and the preset folder storage amount, and in an optional embodiment, the first picture identifier of the first picture to be stored is 200, and the preset folder storage amount is 200, so that it can be known that the first picture to be stored is the last picture in the first folder, at this time, the file name of the first folder is 0, and since the capsule endoscope is in a continuous picture acquisition state, the second picture to be stored is quickly acquired, and the second picture identifier corresponding to the second picture to be stored is 201, at this time, the second value is 1.005.
In step 203, a second file name is determined according to the integer part of the second value, and in step 202, the second value is 1.005, where the second file name is 1.
In step 204, if the second file name is different from the first file name, a second folder is created, and the second picture data to be stored is stored in the second folder, and in step 202, since only the folder with the file name of 0 is still present and the folder with the file name of 1 is not present, the second folder with the file name of 1 is created.
Fig. 3 is a third flowchart of a picture storing method according to the present invention, before calculating a first value according to a first picture identifier and a preset folder storage amount, the method further includes:
sequentially receiving each picture data packet;
extracting a data packet identifier in each picture data packet;
and generating first picture data to be stored according to all the picture data packets with the same data packet identification.
In step 301, before calculating a first value according to a first picture identifier and a preset folder storage amount, a first picture data to be stored is required to be generated.
Based on the short-range communication module, each picture data to be stored is sequentially received, the short-range communication module optionally adopts a frequency below 1GHZ for transmission, and has the characteristics of long transmission distance, low power consumption, strong anti-interference performance and the like, and in other embodiments, the short-range communication module also can be a Bluetooth module, a wireless fidelity technology, a cellular network and the like, which do not affect the implementation of the technical scheme of the invention.
The method comprises the steps of analyzing each piece of picture data to be stored to obtain the picture data and the picture identifications related to the picture data, controlling the picture generation device to obtain the picture data and the picture identifications related to each piece of picture data in real time, converting the pictures and the picture identifications into data packets, transmitting the data packets to a picture recorder based on a frequency band below 1GHZ, receiving each data packet by the picture recorder, identifying the data packet identifications of each data packet at the moment, and generating the picture data to be stored to obtain the picture data to be stored and the picture identifications related to the picture data to be stored.
In step 302, each of the image data packets includes a data packet identifier, and the image recorder extracts the data packet identifier in each of the image data packets.
In step 303, for example, there are four data packets, each data packet includes 2 parts, where one part is a data packet identifier, each data packet identifier is 5, and another part is a byte of the data packet, at this time, the to-be-stored picture data may be determined according to bytes of all data packets in the four data packets, and the data packet identifier is used as a picture identifier of the to-be-stored picture data. Optionally, the picture data to be stored is first picture data to be stored.
Optionally, before sequentially receiving each picture data packet, the method further includes:
controlling a picture generation device to generate first picture data to be stored;
the first picture data to be stored at least comprises a first picture identifier;
the first picture identification is determined according to the generation time of the first picture data to be stored.
The image generating device is a capsule endoscope, the capsule endoscope shoots an endoscopic object in real time, when each image is generated, the generating time of the image is recorded, meanwhile, the first image identification is determined according to the generating time of the first image data to be stored, the image identifications related to each image are sequentially generated based on different sequences of the generating time of the images, for example, the image identifications 0001, 0002, 0003, 0004 and … 0500 can be sequentially generated for each image according to the sequence from early to late of the generating time of the image, each image identification is associated with the corresponding image, the image comprises first image data to be stored, and accordingly, the first image data to be stored at least comprises the first image identification.
In the invention, the picture recorder sequentially receives each picture data packet on one hand, extracts the data packet identifier in each picture data packet, and can extract the effective data of the picture on the other hand, put the effective data into a buffer memory to wait for the end of the transmission of the data packet of the picture to be stored currently. The invention also provides a judging mechanism for ending the data packet transmission, namely judging whether the picture identification of the currently received data packet is consistent with the picture identification of the previous data packet, if so, the picture identification representing the currently received data packet is still the picture identification of the same picture, and judging whether the currently received data packet is the last data packet of the current picture according to the number of the data packets and the identifications of the data packets, wherein the judging formula is as follows:
Y=P+1(1)
in the formula (1), Y is the number of data packets contained in a picture, P is a picture identifier, and P starts counting from 0, if the picture identifier of the data packet is inconsistent with the picture identifier of the previous data packet, the transmission of the data packet representing the current picture is finished.
Fig. 4 is a flowchart of a picture storing method according to the present invention, after controlling a picture generating device to generate first picture data to be stored, further including:
controlling the picture generation device to determine each picture data packet according to the preset length of the data packet and the first picture data to be stored;
Controlling the picture generation device to transmit all picture data packets to the picture recorder;
each of the picture data packets includes the first picture identification.
In step 401, the first picture data to be stored is the picture data to be processed received by the picture recorder in the present invention, preferably, a capsule endoscope is taken as an example, the capsule endoscope generates a large amount of picture data in real time in a working state, specifically, the capsule endoscope photographs in real time to generate the picture data, at least 3 frames per second is transmitted to the outside of the body through a wireless signal, and the picture recorder is responsible for receiving data and analyzing a data packet to obtain the picture data.
The invention optionally controls the picture generation device to process the first picture data to be stored so as to obtain formatted picture characteristics, wherein the formatted picture characteristics are information characteristics representing virtual position information and image basic information of the first picture data to be stored, and have the characteristics of easy acquisition, less memory occupation and the like, for example, the formatted picture characteristics comprise picture identification byte characteristics and are used for representing unique attributes of pictures; the picture length byte characteristic is used for recording the byte number of the picture data to be stored; the data packet number byte characteristic is used for recording the data packet number; the data packet length byte characteristic is used for recording the byte number of the data packet data; the unique identification byte characteristic of the data packet is used for representing the unique attribute of the data packet; and creating a time byte characteristic for recording any one of the writing moments of the picture data to be stored.
As an optional embodiment of the present invention, the formatted picture features include a picture identification byte feature, a picture length byte feature, a data packet number byte feature, a data packet length byte feature, a data packet unique identification byte feature, a creation time byte feature, and picture data, and the present invention will implement storage address identification, acquisition of the first picture data to be stored, identification, acquisition of the picture data to be extracted during picture extraction, and so on based on the above features.
Meanwhile, the obtained formatted picture features are subdivided into individual data packets according to the following data format, and the following table shows:
the formatted picture features include at least a picture identification, the picture identification being generated by the capsule endoscope when taking a picture, the picture identification being unique, the identification being a positive integer, and being generated sequentially. The picture length byte characteristic refers to the byte number of the picture data to be stored, the data packet number byte characteristic is obtained by dividing the picture length by the data packet length, in an alternative embodiment, if the picture length cannot be divided, the divided data result is added with one as the data packet number, preferably, the data packet length is set to be not more than the maximum packet length transmitted by the short-range communication module, the data packet is convenient to directly transmit, the data packet unique identification byte characteristic is also generated when the capsule endoscope photographs, and the creation time byte characteristic is the time characteristic of writing the picture data to be stored.
According to the above embodiment of the present invention, it is possible to control the picture generation device to determine each picture data packet according to the preset length of the data packet and the first picture data to be stored, and in another alternative embodiment, the obtained formatted picture features may be further divided into individual data packets according to the following data format, as shown in the following table:
in step 402, the picture generation device is controlled to transmit all the picture data packets to the picture recorder, the picture recorder sequentially generates the first to-be-stored picture data, the second to-be-stored picture data, the third to-be-stored picture data, and the fourth to-be-stored picture data according to the picture data packets, and stores each to-be-stored picture data into the corresponding folder according to the storage rule shown in the present invention, fig. 7 is a schematic storage diagram of the to-be-stored picture data in the folder, as shown in fig. 7, N is a preset folder storage amount, that is, N to-be-stored picture data are stored in one folder, and after the current folder is fully stored, the picture data are stored in the next folder, the names of the folders are optionally 0, 1, 2, 3, etc., until M, M is the number of folders, (m+1) ×n is the total number of pictures acquired by the capsule endoscope during picture acquisition, that is the number of the last picture corresponding to the last picture.
Fig. 5 is a schematic flow chart of a picture extraction method provided by the present invention, and the present invention also discloses a picture extraction method for extracting pictures of the storage methods described in fig. 1 to 4, including:
receiving a request instruction of an intelligent terminal;
determining a target picture address according to the target picture identification in the request instruction and a preset folder storage amount;
and determining the position of the target picture in the target folder according to the target picture address.
In step 501, a request instruction of an intelligent terminal is received, the intelligent terminal may be a mobile phone, a tablet or other carriers with data interaction functions that can be used for viewing pictures, the intelligent terminal initiates request information for viewing pictures and extracting picture operations, and transmits the request information to the picture recorder, and the picture recorder confirms the identity of the intelligent terminal after receiving the request information and establishes a transmission channel with the intelligent terminal.
In step 502, a target picture address is determined according to the target picture identifier in the request instruction and a preset folder storage amount, for example, the target picture identifier is 269, the preset folder storage amount is 200, and at this time, the target picture address may be expressed as: 1/269, and in other embodiments, the target picture address may also be expressed as: 1/69, etc.
In step 503, the location of the target picture in the target folder is determined according to the target picture address, and in step 502, the target picture address is determined to be/1/269, that is, the location of the target picture is determined in the folder with the file name of 1, and in another alternative embodiment, if the target picture address is determined to be: 1/69, namely, determining the picture with the sequence position of 69 as a target picture in the folder with the file name of 1.
Fig. 6 is a schematic structural diagram of a picture storage system provided by the present invention, and the present invention discloses a picture storage system, which adopts the picture storage method, including:
a picture recorder 1 for storing picture data to be stored;
the intelligent terminal 2 is used for extracting the picture data to be stored in the picture recorder;
and the picture generation device 3 is used for generating the picture data to be stored with the picture identification in batches.
The invention discloses a data interaction relation among all components in a picture storage system, which comprises a picture recorder 1, wherein the picture recorder 1 comprises a universal file system module which is used for calculating a first numerical value according to a first picture identifier and a preset folder storage amount; determining a first file name from an integer portion of the first value; storing first picture data to be stored into a first folder named with a first file name; the first picture identifier is determined by a picture recorder according to the first picture data to be stored; and the preset folder storage amount is the upper limit value of the folder storage picture.
The picture storage system further comprises an intelligent terminal 2 for extracting picture data to be stored in the picture recorder, and the intelligent terminal can perform data interaction with the picture recorder in a Bluetooth mode.
The picture storage system further comprises a picture generation device 3 for generating picture data to be stored with picture identifications in batches, and the picture generation device 3 and the picture recorder 1 conduct data interaction in a Bluetooth mode.
Further, the image generating device is a capsule endoscope, and in other embodiments, the image generating device may be other photographing devices that acquire images in real time in a large batch.
The invention provides a picture storage and extraction method, a system, equipment and a medium, which calculate a first numerical value according to a first picture identifier generated by a picture generation device and a preset folder storage amount, and determine a first file name according to an integer part of the first numerical value; storing first picture data to be stored into a first folder named with a first file name; and the preset folder storage amount is the upper limit value of the folder storage picture. According to the invention, the picture data to be stored are sequentially stored in the corresponding folders according to the sequence of picture receiving, and the names of the folders are numbers associated with the picture identifications, so that the position of the pictures in the folders can be directly determined according to the picture identifications in the subsequent extraction process, the problem of clamping caused by overlong file names is solved, processor resources are further saved, and the storage efficiency is improved.
Fig. 8 is a schematic structural diagram of an electronic device provided by the present invention. Fig. 8 illustrates a physical structure diagram of an electronic device, as shown in fig. 8, which may include: processor 810, communication interface (Communications Interface) 820, memory 830, and communication bus 840, wherein processor 810, communication interface 820, memory 830 accomplish communication with each other through communication bus 840. The processor 810 may invoke logic instructions in the memory 830 to perform a picture storage method comprising: calculating a first numerical value according to the first picture identification and a preset folder storage amount; determining a first file name from an integer portion of the first value; storing first picture data to be stored into a first folder named with a first file name; the first picture identifier is determined by a picture recorder according to the first picture data to be stored; and the preset folder storage amount is the upper limit value of the folder storage picture.
Further, the logic instructions in the memory 830 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing a picture storage method provided by the above methods, the method comprising: calculating a first numerical value according to the first picture identification and a preset folder storage amount; determining a first file name from an integer portion of the first value; storing first picture data to be stored into a first folder named with a first file name; the first picture identifier is determined by a picture recorder according to the first picture data to be stored; and the preset folder storage amount is the upper limit value of the folder storage picture.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the method of storing pictures provided by the above methods, the method comprising: calculating a first numerical value according to the first picture identification and a preset folder storage amount; determining a first file name from an integer portion of the first value; storing first picture data to be stored into a first folder named with a first file name; the first picture identifier is determined by a picture recorder according to the first picture data to be stored; and the preset folder storage amount is the upper limit value of the folder storage picture.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (7)

1. A picture storage method, comprising:
calculating a first numerical value according to the first picture identification and a preset folder storage amount;
determining a first file name from an integer portion of the first value;
storing first picture data to be stored into a first folder named with a first file name;
the first picture identifier is determined by a picture recorder according to the first picture data to be stored;
the preset folder storage amount is the upper limit value of the folder storage picture;
the upper limit value of the folder storage picture is determined according to the following parameters:
the running speed of the central processing unit;
and/or a processing speed of a system for storing picture data to be stored;
And/or an operation speed of a storage medium for storing the picture data to be stored;
and/or, executing a history storage amount of a storage task of the picture to be stored;
before calculating the first value according to the first picture identifier and the preset folder storage amount, the method further comprises:
sequentially receiving each picture data packet;
extracting a data packet identifier in each picture data packet;
generating first picture data to be stored according to all picture data packets with the same data packet identifier;
before sequentially receiving each picture data packet, further comprising:
controlling a picture generation device to generate first picture data to be stored;
the first picture data to be stored at least comprises a first picture identifier;
the first picture identification is determined according to the generation time of the first picture data to be stored;
the picture generating device is a capsule endoscope;
after storing the first picture data to be stored in the first folder named with the first file name, further comprising:
receiving second picture data to be stored;
calculating a second numerical value according to the second picture identification and a preset folder storage amount;
determining a second file name from the integer portion of the second value;
Creating a second folder and storing the second picture data to be stored into the second folder under the condition that the second file name is different from the first file name;
the second picture identification is determined according to the second picture data to be stored.
2. The picture storage method according to claim 1, characterized by further comprising, after controlling the picture generation means to generate the first picture data to be stored:
controlling the picture generation device to determine each picture data packet according to the preset length of the data packet and the first picture data to be stored;
controlling the picture generation device to transmit all picture data packets to the picture recorder;
each of the picture data packets includes the first picture identification.
3. A picture extraction method for extracting a picture based on the storage method of claim 1 or 2, comprising:
receiving a request instruction of an intelligent terminal;
determining a target picture address according to the target picture identification in the request instruction and a preset folder storage amount;
and determining the position of the target picture in the target folder according to the target picture address.
4. A picture storage system employing the picture storage method according to claim 1 or 2, comprising:
The picture recorder is used for storing picture data to be stored;
the intelligent terminal is used for extracting the picture data to be stored in the picture recorder;
and the picture generation device is used for generating the picture data to be stored with the picture identification in batches.
5. The picture storage system of claim 4, wherein the picture generation device is a capsule endoscope.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the picture storage method according to claim 1 or 2 when the program is executed.
7. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the picture storage method according to claim 1 or 2.
CN202210874674.9A 2022-07-25 2022-07-25 Picture storing and extracting method, system, equipment and medium Active CN115083572B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210874674.9A CN115083572B (en) 2022-07-25 2022-07-25 Picture storing and extracting method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210874674.9A CN115083572B (en) 2022-07-25 2022-07-25 Picture storing and extracting method, system, equipment and medium

Publications (2)

Publication Number Publication Date
CN115083572A CN115083572A (en) 2022-09-20
CN115083572B true CN115083572B (en) 2023-07-21

Family

ID=83242615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210874674.9A Active CN115083572B (en) 2022-07-25 2022-07-25 Picture storing and extracting method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN115083572B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0838767A2 (en) * 1996-10-22 1998-04-29 Fuji Photo Film Co., Ltd. Picture image filing method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0778620B2 (en) * 1988-09-24 1995-08-23 凸版印刷株式会社 Layout scanner device
US20030142953A1 (en) * 2002-01-31 2003-07-31 Fuji Photo Film Co., Ltd. Album generation program and apparatus and file display apparatus
CN101763310B (en) * 2008-12-23 2013-10-23 康佳集团股份有限公司 Data storage control method
JP6955434B2 (en) * 2017-12-22 2021-10-27 株式会社Pfu File management device, file management method, and program
CN109033237A (en) * 2018-07-04 2018-12-18 奇酷互联网络科技(深圳)有限公司 Image searching method, device, readable storage medium storing program for executing and terminal
CN110807108A (en) * 2019-10-15 2020-02-18 华南理工大学 Asian face data automatic collection and cleaning method and system
CN112182266A (en) * 2020-09-17 2021-01-05 国家电网有限公司 Picture labeling and classifying method based on picture numbers
CN113986823A (en) * 2021-10-27 2022-01-28 广东电网有限责任公司 Picture archiving method, device, medium and equipment for communication machine room
CN114496176B (en) * 2022-04-06 2022-09-27 广州思德医疗科技有限公司 Picture storage and extraction method, system and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0838767A2 (en) * 1996-10-22 1998-04-29 Fuji Photo Film Co., Ltd. Picture image filing method and device

Also Published As

Publication number Publication date
CN115083572A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
CN112688967B (en) Internet of things data processing method, device, equipment and storage medium
KR101745456B1 (en) Ecu for transmitting large data in hil test environment, system including the same and method thereof
CN105450785B (en) File transmission method and device
CN107135189B (en) Message sending method and physical machine
CN110764924A (en) Inter-core communication method and device of multi-core processor
CN107613369A (en) Video broadcasting method, device and electronic equipment based on GStreamer frameworks
CN115083572B (en) Picture storing and extracting method, system, equipment and medium
CN109614345B (en) Memory management method and device for communication between protocol layers
CN112822737B (en) Method, equipment and storage medium for realizing mobile network system switching
CN106850149A (en) A kind of data transmission method, device, equipment and storage medium
CN114496176B (en) Picture storage and extraction method, system and storage medium
CN116455991B (en) Tunnel encapsulation message checksum calculation method and related device
CN117076341A (en) Data storage method, device, computer equipment and computer readable storage medium
CN109871939B (en) Image processing method and image processing device
CN115474164B (en) Bluetooth broadcast filtering method and system
CN101466163A (en) Method and system for processing information and relevant equipment
CN108874994A (en) A kind of piecemeal reads the method, apparatus and computer storage medium of data
CN111371536A (en) Control instruction sending method and device
CN112764673B (en) Hyperspectral linear array data storage rate optimization method, device and storage medium
CN109784226B (en) Face snapshot method and related device
JP2022553683A (en) Data integration method, device and storage medium for physical random access channel
CN115988438B (en) Call service data processing method, device, equipment and storage medium
CN115065865B (en) Video synthesis method and device, electronic equipment and storage medium
CN111914529B (en) Webpage process recording method and device
CN115277880B (en) Network message analysis method and device

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
GR01 Patent grant
GR01 Patent grant