CN113656626A - Image data storage method and device, computer equipment and storage medium - Google Patents

Image data storage method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113656626A
CN113656626A CN202110898032.8A CN202110898032A CN113656626A CN 113656626 A CN113656626 A CN 113656626A CN 202110898032 A CN202110898032 A CN 202110898032A CN 113656626 A CN113656626 A CN 113656626A
Authority
CN
China
Prior art keywords
picture
cutting
clipping
result
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110898032.8A
Other languages
Chinese (zh)
Other versions
CN113656626B (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 Chuangle Information Technology Co ltd
Original Assignee
Guangzhou Chuanglehai 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 Chuanglehai Technology Co ltd filed Critical Guangzhou Chuanglehai Technology Co ltd
Priority to CN202110898032.8A priority Critical patent/CN113656626B/en
Publication of CN113656626A publication Critical patent/CN113656626A/en
Application granted granted Critical
Publication of CN113656626B publication Critical patent/CN113656626B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to an image data saving method, an image data saving device, computer equipment and a storage medium, wherein the method comprises the following steps: according to the received cutting request of the target picture, cutting the data of the target picture; when a storage request for a result of the cutting operation is received, storing the time sequence last picture in the cutting step-by-step result pictures as a cutting result picture, and storing time and cutting snapshot information of the cutting result picture in a preset database; acquiring the storage data volume of a preset database according to a received checking request of the preset database; if the storage data volume is larger than a preset storage volume threshold, acquiring the storage time of the cutting result picture; and if the storage time exceeds a preset time threshold, deleting the clipping result picture. The method combines various image data storage methods, and combines the picture cutting and the indexDB storage, so that the beneficial effects of reducing the labor cost caused by continuously cutting the picture again by an operator and improving the working efficiency are achieved.

Description

Image data storage method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of information processing, in particular to an image data storage method and device, computer equipment and a storage medium.
Background
In the E-commerce commodity updating scene, picture maintenance is an important link in the life cycle of commodities. The commodity operation and release optimization operators can adjust pictures, documentaries and other parameters of the commodities according to market feedback data at any time. The picture editing and cutting of the commodity is one of the most important working links. However, the optimization and modification of the commodity are determined according to market changes and the sense of an optimizer, and the market environment and the demand are changed at any time, so that the commodity picture needs to be continuously cropped, and a fixed period and a regular rule are not available. To this end, a limited and persistent saving of the modification or cropping history of each picture is required. However, when there are too many products (currently, tens of thousands of products), the data generated by modifying the product pictures is also increased, and particularly, the large amount of temporary data generated in the case of batch cropping has the following problems: first, the browser must regularly clean and flush data if it stores too much data, which is not very robust for the application. Such as removing cropping data for a product that has not been applied for a long time. Second, browser compatibility, should be downward compatible. Third, if there is too much data to save, and there is insufficient space, the past data should be removed in terms of time. It is very common for the local storage capacity to be too small to meet the persistence requirements.
At present, if the historical data of picture cropping is stored in a special physical database, the development of a system needs code writing, and a large amount of labor cost is spent.
Therefore, a data storage method which can store more data and requires less manpower cost is indispensable.
Disclosure of Invention
The embodiment of the invention provides an image data storage method, an image data storage device, computer equipment and a storage medium, and aims to solve the problem that a large amount of cost is consumed for storing picture cropping history data into a special physical database.
In a first aspect, an embodiment of the present invention provides an image data saving method, including:
acquiring clipping time information in a clipping request according to the received clipping request for the target picture; the clipping time information comprises the execution time sequence of the clipping operation;
if the cutting snapshot information of the target picture is not searched in a preset database according to the cutting time information, the cutting operation is executed according to the execution time sequence, and one or more cutting step result pictures obtained in one or more cutting operation steps are cached in the preset database in the mode of the cutting snapshot information; the clipping snapshot information is divided into backward snapshot information and forward snapshot information according to the execution time sequence of the clipping step-by-step result pictures;
when a storage request for a result of the cropping operation is received, storing the last picture in the execution time sequence in the cropping step-by-step result pictures as a cropping result picture, and storing time of the cropping result picture and the cropping snapshot information in the preset database;
acquiring the storage data volume of the preset database according to the received checking request of the preset database;
if the storage data amount is larger than a preset storage amount threshold, acquiring the storage time of the clipping result picture;
and if the storage time exceeds a preset time threshold, deleting the clipping result picture and the corresponding clipping snapshot information.
In a second aspect, an embodiment of the present invention further provides an image data saving apparatus, including:
the cutting module is used for acquiring cutting time information in a cutting request according to the received cutting request of the target picture; the clipping time information comprises the execution time sequence of the clipping operation;
the cutting picture storage module is used for searching the cutting snapshot information of the target picture in a preset database according to the cutting time information unsuccessfully, executing the cutting operation according to the execution time sequence, and caching one or more cutting step result pictures obtained in one or more cutting operation steps in the preset database in a cutting snapshot information mode; the clipping snapshot information is divided into backward snapshot information and forward snapshot information according to the execution time sequence of the clipping step-by-step result pictures;
a storage module, configured to store, in the preset database, a last picture in the execution time sequence in the step-by-step trimming result pictures as a trimming result picture, and storage time of the trimming result picture and the trimming snapshot information when a storage request for a result of the trimming operation is received;
the checking module is used for acquiring the storage data volume of the preset database according to the received checking request of the preset database;
the storage time acquisition module is used for acquiring the storage time of the clipping result picture if the storage data volume is larger than a preset storage volume threshold;
and the deleting module is used for deleting the clipping result picture and the corresponding clipping snapshot information if the storage time exceeds a preset time threshold.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the image data saving method according to any one of the first aspects.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the image data saving method according to any one of the first aspect.
In the embodiment, according to a received clipping request for a target picture, clipping time information in the clipping request is acquired; the clipping time information comprises the execution time sequence of the clipping operation; if the cutting snapshot information of the target picture is not searched in a preset database according to the cutting time information, the cutting operation is executed according to the execution time sequence, and one or more cutting step result pictures obtained in one or more cutting operation steps are cached in the preset database in the mode of the cutting snapshot information; the clipping snapshot information is divided into backward snapshot information and forward snapshot information according to the execution time sequence of the clipping step-by-step result pictures; when a storage request for a result of the cropping operation is received, storing the last picture in the execution time sequence in the cropping step-by-step result pictures as a cropping result picture, and storing time of the cropping result picture and the cropping snapshot information in the preset database; acquiring the storage data volume of the preset database according to the received checking request of the preset database; if the storage data amount is larger than a preset storage amount threshold, acquiring the storage time of the clipping result picture; and if the storage time exceeds a preset time threshold, deleting the clipping result picture and the corresponding clipping snapshot information. The method combines various image data storage methods, on one hand, the labor cost caused by continuous re-cutting of the image by an operator is reduced by combining image cutting and indexDB storage, and on the other hand, when the original image is to be modified, the image does not need to be uploaded again. The clipping can be withdrawn and then the clipping is carried out, thereby greatly improving the working efficiency.
Drawings
Fig. 1 is a flowchart of an image data saving method according to an embodiment of the present invention;
fig. 2 is an exemplary diagram of a target picture display page according to a first embodiment of the present invention;
FIG. 3 is a diagram illustrating an example of a target picture processing operation interface according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an image data storage device according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of an image data saving method according to an embodiment of the present invention, where the method may be executed by an image data saving device, where the image data saving device may be implemented by software and/or hardware, and may be configured in a computer device, such as a server, a workstation, a personal computer, and the like, and specifically includes the following steps:
step 101, obtaining cutting time information in a cutting request according to the received cutting request for a target picture; the cropping time information includes an execution time sequence of the cropping operations.
In the embodiment of the invention, as shown in fig. 2, two interactive scenes of the commodity are involved on the picture display page. The method comprises the steps that a commodity is newly added into a system, and the commodity is edited (the commodity is edited), generally, when a user clicks an uploading key on a picture display page, a picture updating request is received immediately, and information of a target picture is obtained, wherein the picture updating information comprises data such as picture data, picture uploading time, a unique identification of the commodity corresponding to the picture and the like, a form is displayed on the page according to the uploading request, and the user can directly upload pictures in batches. Certainly, in practical application, the pictures may be uploaded in batch or individually to the preset database, which is not limited in this embodiment of the present invention.
Further, the user cuts the uploaded picture, namely clicking a cutting key on the picture display page, and after receiving a cutting request for the target picture, performing cutting operation on the picture data. Before executing the cropping request, the cropping proportion of the pictures in the cropping request, namely the cropping requirement of a user, is acquired, and then the pictures are cropped in batches or individually according to the cropping requirement.
Of course, in practical application, not only the clipping request processing but also various image processing operations such as adding watermark, matching beautification and the like can be performed on the picture.
It can be understood that in the life cycle maintenance scene of the e-commerce platform goods, the picture processing is an important link, wherein the picture is cut and the most common operation in the picture processing in the scene is performed.
102, if the cutting snapshot information of the target picture is not successfully searched in a preset database according to the cutting time information, executing the cutting operation according to the execution time sequence, and caching one or more cutting step result pictures obtained in one or more cutting operation steps in the preset database in a mode of the cutting snapshot information; and the clipping snapshot information is divided into backward snapshot information and forward snapshot information according to the execution time sequence of the clipping step-by-step result picture.
In the embodiment of the invention, the cutting time information comprises the execution time sequence of the cutting operation, the picture display position identification, the cache link of the cut picture and the cutting snapshot information, and the cutting snapshot information is divided into backward snapshot information and forward snapshot information according to the generation time of the cutting step-by-step result picture.
It is understood that the trimming step result pictures obtained by each step of trimming are cached in the preset database according to the trimming time sequence of the last trimming operation. The clipping snapshot information stores the clipping step result pictures generated by each piece of forward and backward information in the clipping process, and the clipping step result pictures are cached one by one according to the time sequence.
For example: the step-by-step clipping result picture in the determined aspect is temporarily stored, and the following steps can be realized: when a user opens a page, historical data of current commodity picture cutting needs to be found.
1) When a new page on a commodity is opened, history data is obviously not available before;
2) when a commodity editing page is opened, the commodity editing page is found through the commodity unique identifier and the sequence position identifier of the sequence in which the pictures are arranged;
3) the saved data is divided into two pieces, one is batch cut saved data and one is single cut saved data. And storing separately.
And historical data of which picture under the commodity corresponds is taken out from a preset database and is put on a page for temporary storage.
The stored data comprises a commodity unique identifier, a position identifier of a picture, a link generated after historical clipping of the picture, and a current clipping snapshot position (a position for recording backward and forward) of the picture.
Therefore, after the cutting operation information is received, the unique identification of the commodity corresponding to the target picture in the cutting operation information is obtained, corresponding historical cutting data, namely cutting snapshot information, is searched in a preset database according to the unique identification, if the searching fails, a cutting scheme is implemented according to the cutting step in the cutting request, and the cutting step-by-step result pictures are gradually saved as the cutting snapshot information.
It is understood that the clipping snapshot information is saved according to the execution time of the clipping step, and the user can perform ten-step clipping operations, and then go back to the sixth step to save the clipping result as the final result, the step result pictures before the sixth step are the backward snapshot information, and the clipping step result pictures from the sixth step to the tenth step are stored as the forward snapshot information.
Preferably, in another embodiment of the present invention, the clipping request includes a batch clipping request, and step 102 may include:
substep A1, when receiving a batch clipping request for the target picture, searching a corresponding clipping substep result picture in the preset database according to the commodity unique identifier corresponding to the picture, the picture display position identifier and the clipping snapshot information;
specifically, if the cutting request is a batch cutting request, the cutting proportion in the cutting request is obtained, then the commodity unique representation and the page position identifier displayed by the picture corresponding to the target picture stored in the preset database are further obtained, and according to the cutting snapshot information in the cutting request, whether the cutting step-by-step result picture of the target picture already exists is searched in the preset database.
It can be understood that, for the same commodity, the user may continuously update the picture information of the commodity on the display page, so before cutting according to the cutting request of the current target picture, whether the historical cutting data exists in the preset database according to the cutting information or not is determined, and the historical cutting data is stored in the preset database according to the cutting snapshot information.
Substep a2, if the corresponding clipping substep result pictures are found, replacing the target pictures with the clipping substep result pictures in batches; otherwise, respectively cutting the target picture data;
specifically, if the corresponding step-by-step cropping result picture is found in the preset database, the target picture is directly replaced by the picture, and the cropping operation is completed.
Of course, if the corresponding historical cropping result picture is not found in the preset database, the cropping operation is performed on the target picture.
Sub-step a3, respectively updating the cropping snapshot information of the cropping step result pictures in the preset database.
Specifically, in the clipping process, the step result picture of each clipping step is saved and stored in a preset database as clipping snapshot information.
Step 103, when receiving a request for saving the result of the cropping operation, storing the last picture in the execution time sequence in the cropping step-by-step result pictures as a cropping result picture, and storing time of the cropping result picture and the cropping snapshot information in the preset database.
In the embodiment of the present invention, as shown in fig. 3, after each clipping step in the clipping request is completed and the cache is successful, if a storage request for the current clipping result is received (a user clicks an enter button), a picture corresponding to the last clipping step in the clipping operation is stored in the preset database as a clipping result picture.
It can be understood that batch rollback and non-rollback of own cropping results can be achieved through the storage of the cropping step result pictures. Clipping can also be done separately, and the clipping results can be backed off and not backed off.
And 104, acquiring the storage data volume of the preset database according to the received checking request of the preset database.
In the embodiment of the invention, all the pictures of the step-by-step clipping result of the batch and individual clipping pictures are cached in the preset database all the time, which may cause excessive data cached in the database and influence the storage performance of the database, so that when an inspection request for the preset database is received, the stored data information of the preset database is obtained, which generally comprises the stored data amount of the database, the storage time information of all the stored data and the finally called time information.
It can be understood that, a related technician sets and initiates a periodic inspection request in an actual application according to a preset database, where a specific inspection period differs according to the actual application, and the embodiment of the present invention is not limited thereto.
And 105, if the storage data volume is larger than a preset storage volume threshold, acquiring the storage time of the cutting result picture.
In the embodiment of the invention, if the acquired data storage capacity exceeds the storage upper limit of the preset database, the storage time of all the stored data and the time information called finally are checked.
It is understood that the storage upper limit is not limited to the full storage capacity of the preset database, and a certain proportion of the total storage capacity of the database is set as the preset storage threshold according to a specific use scenario in order to not affect the performance of the database.
And 106, if the storage time exceeds a preset time threshold, deleting the clipping result picture and the corresponding clipping snapshot information.
In the embodiment of the invention, if the storage time for further acquiring the stored data exceeds a preset time threshold, for example, three months, the target picture and all historical cropping data thereof, namely the cropping snapshot information, are searched, and if the historical cropping data exists, the corresponding outdated data is deleted.
It is to be understood that the preset time threshold is also set by a related technician according to a specific use scenario and may be changed at any time, and the embodiment of the present invention is not limited in this respect.
For example: when the user newly submits and stores the form data on the commodity, the server returns the unique commodity identification after the request is successful. The data is persisted to a preset database indexDB. If the commodity edition is carried out, the unique identification is already existed, the persistent storage preset database indexDB is also updated, and the operation time is recorded. When the user opens the system, the system calls the checking module to check whether the stored data is too much and whether the data is not operated for a long time. These data will be removed. Typically 2 months or 3 months, has not been edited, indicating that the service has no need to record the need for history pruning.
Preferably, in a further embodiment of the present invention, further comprising:
step B1, when receiving the position exchange operation request for a plurality of target pictures, updating the picture display position identifier in the preset database.
Specifically, when the user moves the two picture positions, the sequence position identifiers of the pictures need to be synchronized, so that the purpose of exchanging the picture display positions on the commodity display page is achieved, and the effect of unique identifiers is achieved. And temporarily stored in a preset database.
Step B2, when receiving the delete operation request for the cropping result picture, deleting the cropping result picture and the cropping snapshot information in the preset database.
Specifically, when a user deletes a picture, the user clicks a delete key corresponding to the picture, based on a delete request of the user, clipping history data of the picture needs to be deleted synchronously in a preset database, and after a subsequent picture sequence position identifier is synchronously modified, the clipping history data is temporarily stored in the preset database.
Preferably, in an additional embodiment of the present invention, the cropping snapshot information further includes a picture cache link, and further includes:
step C1, when receiving a rollback request for one or more of the cropping result pictures, obtaining the rollback snapshot information corresponding to the rollback request;
specifically, when the user cuts in batch, before cutting, whether the historical data of the picture is saved or not is determined through the backspacing snapshot information in the cutting request.
Step C2, searching the corresponding cutting step-by-step result picture in the preset database according to the rollback snapshot information;
specifically, the unique identification of the corresponding commodity picture is inquired in a preset database through backspacing snapshot information in the cutting request, and the corresponding cutting step-by-step result picture is searched.
Step C3, replacing the clipping result picture with the clipping step result picture;
specifically, if the search is successful, the current cropping result pictures are all replaced one by one, and if not, a batch cropping saving unit is created for each picture that first saves the history data. The unique commodity identification plus the sequence position is used as the unique identification for positioning the picture. Recording the batch clipping record in the form of an array queue, saving the storage link path of the current picture, and temporarily saving the storage link path in a preset database.
And step C4, updating the rollback snapshot information of the cropping result picture and the picture cache link.
Specifically, after replacement or re-cropping, the rollback snapshot information of the current cropping result picture is stored again, and the picture cache link generated during storage is updated.
Preferably, in a further embodiment of the invention, the cut request comprises a batch cut or an individual cut; the clipping snapshot information further includes a picture cache link, and further includes:
step D1, when a forward request for one or more of the cropping result pictures is received, acquiring the forward snapshot information corresponding to the forward request;
specifically, when the user backs in batch, before backing, the previous picture of the history record is obtained according to the forward snapshot information corresponding to the batch forward request.
Step D2, searching the corresponding cutting step-by-step result picture in the preset database according to the forward snapshot information;
specifically, the history clipping snapshot picture is inquired in a preset database according to the forward snapshot information.
Step D3, replacing the clipping result picture with the clipping step result picture;
specifically, if the search is successful, the respective currently displayed pictures are replaced in batches, the clipping snapshot position is modified, and the clipping snapshot position is temporarily stored in the preset database.
And D4, updating the forward snapshot information of the cropping result picture and the picture cache link.
Specifically, after the replacement, the forward snapshot information of the current cropping result picture is stored again.
It will be appreciated that the batch processing described above is equally applicable to single picture processing, such as when a user cuts a single picture, determining whether historical data for that picture has been saved prior to cutting. If not, a cropped saving unit is created for each picture for which history data is saved for the first time. The commodity unique identification and the sequence position are used as the unique identification for positioning the picture. And saving the batch clipping records by an array queue. The storage link path of the current picture (the picture cache link generated during storage) is saved, and is temporarily saved in a preset database.
Preferably, the preset database is an indexDB database.
It will be appreciated that in special cases, if the service uses a browser that does not support indexDB, the system already provides localstorage, with the cookies being downward compatible. According to the size of the available capacity, when the capacity is exceeded for storage, the data with earlier operation time is deleted, and the new data can be stored.
In the embodiment, according to a received clipping request for a target picture, clipping time information in the clipping request is acquired; the clipping time information comprises the execution time sequence of the clipping operation; if the cutting snapshot information of the target picture is not searched in a preset database according to the cutting time information, the cutting operation is executed according to the execution time sequence, and one or more cutting step result pictures obtained in one or more cutting operation steps are cached in the preset database in the mode of the cutting snapshot information; the clipping snapshot information is divided into backward snapshot information and forward snapshot information according to the execution time sequence of the clipping step-by-step result pictures; when a storage request for the result of the cropping operation is received, and when a storage request for the result of the cropping operation is received, storing the last picture in the execution time sequence in the cropping step-by-step result pictures as a cropping result picture, and storing time and the cropping snapshot information of the cropping result picture in the preset database; acquiring the storage data volume of the preset database according to the received checking request of the preset database; if the storage data amount is larger than a preset storage amount threshold, acquiring the storage time of the clipping result picture; and if the storage time exceeds a preset time threshold, deleting the clipping result picture. The method combines various image data storage methods, on one hand, the labor cost caused by continuous re-cutting of the image by an operator is reduced by combining image cutting and indexDB storage, and on the other hand, when the original image is to be modified, the image does not need to be uploaded again. The clipping can be withdrawn and then the clipping is carried out, thereby greatly improving the working efficiency.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Example two
Fig. 4 is a block diagram of an image data saving apparatus according to a second embodiment of the present invention, which may specifically include the following modules:
the cutting module 201 is configured to obtain cutting time information in a cutting request according to the received cutting request for a target picture; the cropping time information includes an execution time sequence of the cropping operations.
A cut picture storage module 202, configured to, if the cut snapshot information of the target picture is not successfully searched in a preset database according to the cutting time information, sequentially execute the cutting operation according to the execution time, and cache one or more cut step-by-step result pictures obtained in one or more cutting operation steps in the preset database in the manner of the cut snapshot information; and the clipping snapshot information is divided into backward snapshot information and forward snapshot information according to the execution time sequence of the clipping step-by-step result picture.
Preferably, in a further embodiment of the present invention, the cropping request includes a batch cropping request, and the cropping picture storage module 202 is further configured to:
when a batch cutting request for the target picture is received, searching a corresponding cutting step-by-step result picture in the preset database according to the commodity unique identification corresponding to the picture, the picture display position identification and the cutting snapshot information;
if the corresponding cutting step result pictures are found, replacing the target pictures with the cutting step result pictures in batch; otherwise, respectively cutting the target picture data;
and respectively updating the clipping snapshot information of the clipping step-by-step result pictures in the preset database.
A saving module 203, configured to, when a saving request for a result of the cropping operation is received, store, in the preset database, a last picture in the execution time sequence in the cropping step-by-step result picture as a cropping result picture, as well as storage time of the cropping result picture and the cropping snapshot information.
The checking module 204 is configured to obtain a stored data amount of the preset database according to a received checking request for the preset database.
A storage time obtaining module 205, configured to obtain the storage time of the cropping result picture if the amount of the storage data is greater than a preset storage threshold.
A deleting module 206, configured to delete the clipping result picture and the corresponding clipping snapshot information if the storage time exceeds a preset time threshold.
Preferably, in another embodiment of the present invention, the cropping time information further includes a picture display position identifier, and the apparatus further includes:
and the replacement operation module is used for updating the picture display position identification in the preset database when receiving position exchange operation requests of a plurality of target pictures.
Preferably, in a further embodiment of the present invention, the apparatus further comprises:
and the deleting module is used for deleting the clipping result picture and the clipping snapshot information in the preset database when receiving a deleting operation request of the clipping result picture.
Preferably, in a further embodiment of the invention, the cut request comprises a batch cut or an individual cut; the clip snapshot information further includes a picture cache link, the apparatus further includes:
the matching backspacing module is used for acquiring backspacing snapshot information corresponding to one or more clipping result pictures when receiving backspacing requests for the one or more clipping result pictures;
the matching search module is used for searching the corresponding cutting step-by-step result picture in the preset database according to the backspacing snapshot information;
a replacement module for replacing the cropping result picture with the cropping step result picture;
and the updating backspacing snapshot module is used for updating backspacing snapshot information of the clipping result picture and the picture cache link.
Preferably, in a further embodiment of the present invention, the clip snapshot information further includes a picture cache link, and the apparatus further includes:
the matching forward module is used for acquiring forward snapshot information corresponding to one or more forward requests when the forward requests for one or more clipping result pictures are received;
the forward image searching module is used for searching the corresponding cutting step-by-step result image in the preset database according to the forward snapshot information;
a cropping result replacement module for replacing the cropping result picture with the cropping step result picture;
and the forward snapshot updating module is used for updating the forward snapshot information of the cropping result picture and the picture cache link.
Preferably, the preset database is an indexDB database.
The image data storage device provided by the embodiment of the invention can execute the image data storage method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE III
Fig. 5 is a schematic structural diagram of a computer device according to a third embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in FIG. 5 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 5, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, computer device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, for example, implementing an image data saving method provided by an embodiment of the present invention, by executing a program stored in the system memory 28.
Example four
A fourth embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the image data saving method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
A computer readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An image data saving method, comprising:
acquiring clipping time information in a clipping request according to the received clipping request for the target picture; the clipping time information comprises the execution time sequence of the clipping operation;
if the cutting snapshot information of the target picture is not searched in a preset database according to the cutting time information, the cutting operation is executed according to the execution time sequence, and one or more cutting step result pictures obtained in one or more cutting operation steps are cached in the preset database in the mode of the cutting snapshot information; the clipping snapshot information is divided into backward snapshot information and forward snapshot information according to the execution time sequence of the clipping step-by-step result pictures;
when a storage request for a result of the cropping operation is received, storing the last picture in the execution time sequence in the cropping step-by-step result pictures as a cropping result picture, and storing time of the cropping result picture and the cropping snapshot information in the preset database;
acquiring the storage data volume of the preset database according to the received checking request of the preset database;
if the storage data amount is larger than a preset storage amount threshold, acquiring the storage time of the clipping result picture;
and if the storage time exceeds a preset time threshold, deleting the clipping result picture and the corresponding clipping snapshot information.
2. The method according to claim 1, wherein the cropping request comprises a batch cropping request, and if the cropping snapshot information of the target picture is not successfully searched in a preset database according to the cropping time information, the cropping operation is executed according to the execution time sequence, and one or more cropping step result pictures obtained by one or more cropping operation steps are cached in the preset database in the manner of the cropping snapshot information, including:
when a batch cutting request for the target picture is received, searching a corresponding cutting step-by-step result picture in the preset database according to the commodity unique identification corresponding to the picture, the picture display position identification and the cutting snapshot information;
if the corresponding cutting step result pictures are found, replacing the target pictures with the cutting step result pictures in batch; otherwise, respectively cutting the target picture data;
and respectively updating the clipping snapshot information of the clipping step-by-step result pictures in the preset database.
3. The method of claim 1, wherein the cropping time information further comprises a picture display location identifier, the method further comprising:
and when position exchange operation requests for a plurality of target pictures are received, updating the picture display position identification in the preset database.
4. The method of claim 1, further comprising:
and when a deletion operation request for the clipping result picture is received, deleting the clipping result picture and the clipping snapshot information in the preset database.
5. The method of claim 1, the crop request comprising a batch crop or an individual crop; the clip snapshot information further includes a picture cache link, and the method further includes:
when a backspacing request for one or more clipping result pictures is received, backspacing snapshot information corresponding to the backspacing request is obtained;
searching the corresponding clipping step-by-step result picture in the preset database according to the backspacing snapshot information;
replacing the cropped result picture with the cropped step-by-step result picture;
and updating the backspacing snapshot information of the clipping result picture and the picture cache link.
6. The method of claim 1, the crop request comprising a batch crop or an individual crop; the clip snapshot information further includes a picture cache link, and the method further includes:
when a forward request for one or more clipping result pictures is received, acquiring forward snapshot information corresponding to the forward request;
searching the corresponding cutting step-by-step result picture in the preset database according to the forward snapshot information;
replacing the cropped result picture with the cropped step-by-step result picture;
and updating the forward snapshot information of the cropping result picture and the picture cache link.
7. The method according to claim 1, characterized in that said preset database is an indexDB database.
8. An image data saving apparatus, comprising:
the cutting module is used for acquiring cutting time information in a cutting request according to the received cutting request of the target picture; the clipping time information comprises the execution time sequence of the clipping operation;
the cutting picture storage module is used for searching the cutting snapshot information of the target picture in a preset database according to the cutting time information unsuccessfully, executing the cutting operation according to the execution time sequence, and caching one or more cutting step result pictures obtained in one or more cutting operation steps in the preset database in a cutting snapshot information mode; the clipping snapshot information is divided into backward snapshot information and forward snapshot information according to the execution time sequence of the clipping step-by-step result pictures;
a storage module, configured to store, in the preset database, a last picture in the execution time sequence in the step-by-step trimming result pictures as a trimming result picture, as well as storage time of the trimming result picture and the trimming snapshot information when a storage request for a result of the trimming operation is received;
the checking module is used for acquiring the storage data volume of the preset database according to the received checking request of the preset database;
the storage time acquisition module is used for acquiring the storage time of the clipping result picture if the storage data volume is larger than a preset storage volume threshold;
and the deleting module is used for deleting the clipping result picture and the corresponding clipping snapshot information if the storage time exceeds a preset time threshold.
9. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the image data saving method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which when executed by a processor implements the image data saving method according to any one of claims 1 to 7.
CN202110898032.8A 2021-08-05 2021-08-05 Image data storage method, device, computer equipment and storage medium Active CN113656626B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110898032.8A CN113656626B (en) 2021-08-05 2021-08-05 Image data storage method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110898032.8A CN113656626B (en) 2021-08-05 2021-08-05 Image data storage method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113656626A true CN113656626A (en) 2021-11-16
CN113656626B CN113656626B (en) 2023-10-10

Family

ID=78478544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110898032.8A Active CN113656626B (en) 2021-08-05 2021-08-05 Image data storage method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113656626B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115567737A (en) * 2022-09-21 2023-01-03 飞狐信息技术(天津)有限公司 Method and device for replacing cut-out picture

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130069980A1 (en) * 2011-09-15 2013-03-21 Beau R. Hartshorne Dynamically Cropping Images
CN105335925A (en) * 2014-07-30 2016-02-17 北京畅游天下网络技术有限公司 Picture clipping method and browser device
CN107610131A (en) * 2017-08-25 2018-01-19 百度在线网络技术(北京)有限公司 A kind of image cropping method and image cropping device
CN107748636A (en) * 2017-11-17 2018-03-02 深圳泉眼体育运营管理有限公司 Picture batch cut-out method, device and terminal
CN107948605A (en) * 2017-12-11 2018-04-20 日立楼宇技术(广州)有限公司 Method, apparatus, equipment and the storage medium of vehicle-mounted monitoring video data storage
CN109963205A (en) * 2017-12-25 2019-07-02 上海全土豆文化传播有限公司 Multimedia clips method and device
CN111611310A (en) * 2020-04-28 2020-09-01 深圳壹账通智能科技有限公司 Block chain data clipping method, node recovery method, device, equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130069980A1 (en) * 2011-09-15 2013-03-21 Beau R. Hartshorne Dynamically Cropping Images
CN105335925A (en) * 2014-07-30 2016-02-17 北京畅游天下网络技术有限公司 Picture clipping method and browser device
CN107610131A (en) * 2017-08-25 2018-01-19 百度在线网络技术(北京)有限公司 A kind of image cropping method and image cropping device
CN107748636A (en) * 2017-11-17 2018-03-02 深圳泉眼体育运营管理有限公司 Picture batch cut-out method, device and terminal
CN107948605A (en) * 2017-12-11 2018-04-20 日立楼宇技术(广州)有限公司 Method, apparatus, equipment and the storage medium of vehicle-mounted monitoring video data storage
CN109963205A (en) * 2017-12-25 2019-07-02 上海全土豆文化传播有限公司 Multimedia clips method and device
CN111611310A (en) * 2020-04-28 2020-09-01 深圳壹账通智能科技有限公司 Block chain data clipping method, node recovery method, device, equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115567737A (en) * 2022-09-21 2023-01-03 飞狐信息技术(天津)有限公司 Method and device for replacing cut-out picture
CN115567737B (en) * 2022-09-21 2023-05-16 飞狐信息技术(天津)有限公司 Method and device for replacing cut-out picture

Also Published As

Publication number Publication date
CN113656626B (en) 2023-10-10

Similar Documents

Publication Publication Date Title
CN102142024B (en) Use in distributed data base and increase progressively seizure to carry out logical data backup and rollback
EP3428811A1 (en) Database interface agent for a tenant-based upgrade system
US20160179919A1 (en) Asynchronous data replication using an external buffer table
US7681001B2 (en) Storage system
US8380663B2 (en) Data integrity in a database environment through background synchronization
CN111651519B (en) Data synchronization method, data synchronization device, electronic equipment and storage medium
CN113672627B (en) Method and device for constructing index of elastic search engine
EP3264291A1 (en) Data block processing method and device
CN112860706A (en) Service processing method, device, equipment and storage medium
CN113656626A (en) Image data storage method and device, computer equipment and storage medium
US9886490B1 (en) Common extract store
JP2008033527A (en) Storage device, disk device and data restoring method
CN110716804A (en) Method and device for automatically deleting useless resources, storage medium and electronic equipment
CN118069745A (en) SQL SERVER increment acquisition method, storage medium and equipment based on transaction log
CN113918532A (en) Portrait label aggregation method, electronic device and storage medium
CN113010208A (en) Version information generation method, version information generation device, version information generation equipment and storage medium
CN110968569B (en) Database management method, database management device, and storage medium
CN114546999A (en) Data cleaning method and device, electronic equipment and storage medium
CN114970476A (en) Data processing method, system, electronic device and storage medium
JP2016012272A (en) Business processing system and business processing method
CN112612648B (en) SQL Server database recovery method, terminal equipment and storage medium
CN118503298B (en) Data processing method, device, equipment and storage medium based on double caches
US20210306415A1 (en) Highly efficient native e-mail message data protection for office 365
CN114443660A (en) Abnormity positioning method, abnormity positioning device, storage medium and computing equipment
CN117112351A (en) Monitoring method and system for internet financial lending assistance product

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230908

Address after: 510000 4f401, building 2, Jiadu science and technology building, No. 4, Jiangong Road, Tianhe District, Guangzhou City, Guangdong Province (office only)

Applicant after: GUANGZHOU CHUANGLE INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 510000 301, floor 3, building 1, Jiadu Xintai building, No. 51-53, Jiangong Road, Tianhe District, Guangzhou, Guangdong

Applicant before: Guangzhou chuanglehai Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant