Processing method and device, electronic equipment and computer readable storage medium

By responding to target instructions in electronic devices and using different processing strategies to save image files, the problem of intricacy and efficiency of image file processing when users are photographed is solved, and automated saving time limit management, format conversion and location information processing are realized, improving User experience and resource utilization.

CN119299838APending Publication Date: 2025-01-10LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411391816.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-10

Smart Images

  • Figure CN119299838A_ABST
    Figure CN119299838A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a processing method and device, electronic equipment and a computer readable storage medium, relates to the technical field of image data processing, and aims to identify an image file according to different requirements and improve the operation efficiency and convenience of processing the image file. The processing method comprises the steps of obtaining a target operation for triggering a target instruction in response to the target instruction; and if the target operation is the first operation, storing the target image data as a target image file according to a first processing strategy. And if the target operation is the second operation, storing the target image data as a target image file according to a second processing strategy. Wherein the target instruction is used for storing target image data acquired by the image acquisition device as a target image file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image data processing, and in particular to a processing method, device, electronic device, and computer-readable storage medium. Background Art

[0002] With the popularization of electronic terminals such as smart phones, user needs are becoming more and more diverse. Among them, image acquisition functions (such as taking pictures) for electronic devices are relatively common functions.

[0003] Currently, there are many ways for electronic devices to obtain image data. However, the processing methods based on a large number of saved image files are different, the steps are cumbersome, and the processing efficiency is low. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a processing method, device and electronic device, computer-readable storage medium, and computer program product to solve at least one problem existing in the background technology, which can identify image files according to different needs and improve the operational efficiency and convenience of processing image files.

[0005] To achieve the above purpose, the technical solution of this application is implemented as follows:

[0006] On the one hand, an embodiment of the present application provides a processing method. The processing method includes: in response to a target instruction, obtaining a target operation that triggers the target instruction. If the target operation is a first operation, saving the target image data as a target image file with a first processing strategy. If the target operation is a second operation, saving the target image data as the target image file with a second processing strategy. Wherein, the target instruction is used to save the target image data acquired by the image acquisition device as the target image file.

[0007] In some examples, saving the target image data as a target image file using the first processing strategy includes: adding a first file identifier to the target image file.

[0008] The step of saving the target image data as the target image file using the second processing strategy includes: adding a second file identifier to the target image file.

[0009] In some examples, the first file identifier indicates that the storage period of the target image file is a first period; the second file identifier indicates that the storage period of the target image file is a second period; and the first period is different from the second period.

[0010] Or, the first file identifier indicates that the target image file is an automatically deleted image file; and the second file identifier indicates that the target image file is a non-automatically deleted image file.

[0011] In some examples, saving the target image data as a target image file using a first processing strategy includes: converting the target image data into the target image file using a first image file format conversion strategy.

[0012] The maintaining the target image data as the target image file by using a second processing strategy includes converting the target image data into the target image file by using a second image file format conversion strategy.

[0013] In some examples, if the target control for triggering the target instruction is detected to be touched N times within a first duration, the target operation is a first operation. If the target control is detected to be touched M times within the first duration, the target operation is a second operation. Wherein, both M and N are not 0, and M is different from N.

[0014] In some examples, the method further includes: reading a file identifier of the target image file; and deleting the target image file in the first storage space if a storage time limit represented by the file identifier has expired.

[0015] In some examples, the method further includes: if the target image file is deleted from the first storage space through a delete interaction operation, storing the target image file in a second storage space. If the target image file is deleted in the first storage space due to reaching the preservation time limit, storing the target image file in a third storage space. The second storage space and the third storage space are used to store image files deleted from the first storage space, and after detecting a restore interaction operation indicating that the target image file is to be restored, the target image file is moved from the second storage space or the third storage space to the first storage space; the image files stored in the second storage space and the third storage space are permanently deleted after the storage time reaches a second time.

[0016] On the other hand, an embodiment of the present application provides a processing device. The processing device includes: a trigger module, a first processing module, and a second processing module. The trigger module is used to obtain a target operation that triggers the target instruction in response to a target instruction. The first processing module is used to save the target image data as a target image file using a first processing strategy if the target operation is a first operation. The second processing module is used to save the target image data as the target image file using a second processing strategy if the target operation is a second operation. Among them, the target instruction is used to save the target image data acquired by the image acquisition device as the target image file.

[0017] On the other hand, an embodiment of the present application provides an electronic device. The electronic device includes: an image acquisition device and a processor. The image acquisition device is used to acquire target image data. The processor is used to execute: in response to a target instruction, obtain a target operation that triggers the target instruction; if the target operation is a first operation, save the target image data as a target image file with a first processing strategy; if the target operation is a second operation, save the target image data as the target image file with a second processing strategy. Wherein, the target instruction is used to save the target image data acquired by the image acquisition device as the target image file.

[0018] In another aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium includes a stored computer program or instruction; when the computer program or instruction is executed, the device where the computer-readable storage medium is located is controlled to implement a processing method provided in any of the above examples.

[0019] In another aspect, the embodiments of the present application further provide a computer program product. The computer program product includes a computer program or instructions; when the computer program or instructions are executed by a processing module, the steps of the processing method provided in any of the above examples are implemented.

[0020] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of a processing method provided in an embodiment of the present application Figure 1 ;

[0022] Figure 2 A schematic diagram of a processing method provided in an embodiment of the present application Figure 2 ;

[0023] Figure 3 A schematic diagram of a processing method provided in an embodiment of the present application Figure 3 ;

[0024] Figure 4 A schematic diagram of a processing method provided in an embodiment of the present application Figure 4 ;

[0025] Figure 5 A schematic diagram of a processing method provided in an embodiment of the present application Figure 5 ;

[0026] Figure 6 A schematic diagram of the structure of a processing device provided in one embodiment of the present application;

[0027] Figure 7 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0028] The exemplary embodiments disclosed in the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the specific embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope disclosed in the present application to those skilled in the art.

[0029] In the following description, a large number of specific details are given to provide a more thorough understanding of the present application. However, it is obvious to those skilled in the art that the present application can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present application, some technical features known in the art are not described; that is, all features of the actual embodiments are not described here, and well-known functions and structures are not described in detail.

[0030] It should be understood that although the terms first, second, third, etc. can be used to describe various elements, modules, areas, layers and / or parts, these elements, modules, areas, layers and / or parts should not be limited by these terms. These terms are only used to distinguish an element, module, area, layer or part from another element, module, area, layer or part. Therefore, without departing from the teachings of the present application, the first element, module, area, layer or part discussed below can be expressed as a second element, module, area, layer or part. And when the second element, module, area, layer or part discussed, it does not indicate that the present application necessarily has a first element, module, area, layer or part.

[0031] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be a limitation of the present application. When used herein, the singular forms of "one", "an" and "said / the" are also intended to include plural forms, unless the context clearly indicates another way. It should also be understood that the terms "consisting of" and / or "comprising" when used in this specification determine the presence of the features, integers, steps, operations, elements and / or modules, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.

[0032] In order to thoroughly understand the present application, detailed steps and detailed structures will be presented in the following description to illustrate the technical solution of the present application. The preferred embodiments of the present application are described in detail below, but in addition to these detailed descriptions, the present application may also have other implementation methods.

[0033] With the continuous development of communication technology, the application of smart terminals (such as mobile phones) is becoming more and more widespread. In related technologies, there are many types of smart phones with many functions, among which the more common functions include camera photography.

[0034] Based on the current camera function of smart terminals, when the smart terminal detects a camera instruction, the image data collected by the image acquisition device is saved as an image file. During the saving process, the image data is processed and saved as the final image file according to the user's operation before taking the photo or the system default settings.

[0035] However, in actual applications, different users have different requirements for the final image files to be saved, and the same user has different requirements for the final image files to be saved in different scenarios.

[0036] For example, users may need to take some temporary images and store them as reference images within a certain time limit, which are not needed for long-term reference. For example, when parking outside, you will take pictures of signs and other signs in the parking lot to help remember the route. For the photos taken, in many cases, users only need to view the photo within one day or one week. If the information of the photo has no reference value after one day or one week, the user may search and manually delete it from the gallery after one day or one week. The operation is complicated, and users are prone to forget to delete these pictures that have no reference value, resulting in unnecessary storage space and affecting the response speed of the mobile phone when it is working.

[0037] For example, in some scenarios, users may need images to contain location information (such as longitude and latitude information) so that smart terminals can retrieve the image based on the location information; in some scenarios, for confidentiality reasons, image files cannot contain location information so that the image is shared immediately without revealing the location where the image was taken. In related technologies, generally all images have location information, and users delete the location information by using special software or performing corresponding operations as needed; or all images have no location information. Either way, it is inconvenient for users.

[0038] For example, when shooting the same scene, the user may want an optimized display effect, or may want a realistic display effect, or the user may need to store the image in a different format. In the related art, either the user needs to enter the corresponding setting menu to operate when shooting, or the user needs to perform further operations after shooting.

[0039] The same problem in the above scenarios is that the same user has different requirements for the final image file to be saved; and the same user has different requirements for the final image file to be saved in different scenarios, so the current shooting process is inconvenient for the user.

[0040] Based on this, the present application provides a processing method: in response to a target instruction, obtaining a target operation that triggers the target instruction; if the target operation is a first operation, saving the target image data as a target image file with a first processing strategy; if the target operation is a second operation, saving the target image data as the target image file with a second processing strategy, wherein the target instruction is used to save the target image data acquired by the image acquisition device as a target image file.

[0041] Through the method of the present application, the user uses different shooting operations when shooting, that is, different processing strategies can be used to save the target image data collected by the image acquisition device as a target image file, thereby reducing the operational complexity of the user obtaining the target image file according to different needs.

[0042] The present application provides a processing method, and a processing device, an electronic device, and a computer storage medium corresponding to the processing method.

[0043] The processing method provided in this application can be applied to electronic devices with image acquisition devices, such as mobile phones and tablets with cameras, etc., which are not listed here in detail.

[0044] First, the present application provides a processing method. Figure 1 As shown, the processing method includes: S100, S200 and S300.

[0045] S100: In response to a target instruction, obtaining a target operation that triggers the target instruction.

[0046] For example, the target instruction is used to save the target image data collected by the image acquisition device as a target image file. The target instruction can be an operation for the user to obtain image data, for example, in the camera mode of the mobile phone, the target instruction is generated by obtaining one or more of the user's gestures or facial expressions, and obtaining the touch signals of the mobile phone buttons or touch screen. Among them, the information of one or more of the user's gestures or facial expressions, and obtaining the touch signals of the mobile phone buttons or touch screen is the target operation. Based on this, different activation function instructions can be set according to different target operations. In the case where the same image acquisition device can have the function of identifying different target operations, one or more recognition functions can be selected to be enabled based on one or more target operation types of user gestures, user facial expressions, mobile phone button methods, and touch screen touch methods.

[0047] When the camera function is turned on, the target operation is acquired and the target instruction is triggered to take a photo, and the target image data is collected in response to the target instruction. The image processing strategies of the target instructions generated based on different target operations are different.

[0048] S200: If the target operation is the first operation, save the target image data as a target image file using a first processing strategy.

[0049] S300: If the target operation is the second operation, save the target image data as a target image file using a second processing strategy.

[0050] For example, the target operation may include a first operation and a second operation. Based on the type of the above-mentioned target operation, the action types of the first operation and the second operation may be the same or different. Also, when the action types of the first operation and the second operation are the same, the specific action postures of the first operation and the second operation are different. For example, the first operation and the second operation are both click operations on the touch screen of a mobile phone (ie, the action types are the same), wherein the first operation may include a two-finger single-click operation on the touch screen of the mobile phone; and the second operation may include a two-finger double-click operation on the touch screen of the mobile phone (ie, the specific action postures are different).

[0051] The first processing strategy corresponding to the first operation may include adding multiple parameters of the image file, wherein each parameter has a preset data range. For example, the first processing strategy may include adding one or more parameters of the image file such as a storage time limit, a storage format, a latitude and longitude coordinates, and a storage location.

[0052] Similarly, the second processing strategy corresponding to the second operation may include multiple parameters for adding image files, wherein each parameter has a preset data range, and for the same parameter in different processing strategies, the data range of the parameter in the second processing strategy is different from the data range of the parameter in the first processing strategy.

[0053] For example, the first operation may include a two-finger single-click operation on the touch screen of the mobile phone, and the target image data is saved as a target image file with a storage duration of a first preset duration using a first processing strategy. The second operation may include a two-finger double-click operation on the touch screen of the mobile phone, and the target image data is saved as a target image file with a storage duration of a second preset duration using a second processing strategy. The first preset duration is different from the second preset duration.

[0054] In the process of acquiring target image data in the above processing method, target instructions for capturing images are generated based on target operations, and different image processing strategies are operated based on different target operations to store target image files. Target image files saved with different image processing strategies do not need to be manually processed by the user, and image files can be processed more conveniently and quickly.

[0055] In some examples, such as Figure 2 As shown, step S200: saving the target image data as a target image file using a first processing strategy, including S210.

[0056] S210: Add a first file identifier to the target image file.

[0057] Step S300: saving the target image data as a target image file using a second processing strategy, including S310.

[0058] S310: Add a second file identifier to the target image file.

[0059] Specifically, some processing procedures cannot be performed during the image saving process, and a file identifier is added so that the device can identify different processing procedures performed on the image file. For example, the first processing strategy may include adding a saving time limit for the image file, and the first file identifier is the saving time limit for the image file. The second processing strategy may also include adding a saving time limit for the image file, and the second file identifier is the saving time limit for the image file. And for the same parameter (such as the saving time limit for the image file), the length of the saving time limit represented by the first file identifier is different from the length of the saving time limit represented by the second file identifier.

[0060] The first file identifier and the second file identifier can be added to the file header of the target image file so that the terminal device can identify it. For example, when displaying the target image, the first file identifier (or the second file identifier) ​​can be displayed at a certain position of the target image file so that the user can clearly understand the processing type of the target image file. For example, it can be displayed in the upper left corner of the target image file.

[0061] When the target operation is the first operation, the image data is processed and a first file identifier is added. When the target operation is the second operation, the image data is processed and a second file identifier is added. The first file identifier and the second file identifier are for the convenience of implementing subsequent operations based on these identifiers. For example, when the target image file is saved, it is not processed. After saving it to the album, different processing operations are implemented according to the first file identifier or the second file identifier. For example, the first file identifier or the second file identifier is the storage time limit of the image file, and whether the picture needs to be deleted is determined according to the first file identifier or the second file identifier. Specifically, the first file identifier and the second file identifier can identify the moment when the target image file is processed, and the data of the first file identifier and the second file identifier are the time when the target image file is processed.

[0062] In addition, the first processing strategy may include adding one or more parameters of the image file such as the preservation time limit, storage format, latitude and longitude coordinates and storage location. The first file identifier may be one or more parameters of the image file such as the preservation time limit, storage format, latitude and longitude coordinates and storage location.

[0063] It is understandable that the specific data of the file identification added based on different processing strategies can be the same or different. In combination with the actual application process, different processing strategies are adopted to identify different data ranges or different information types for subsequent operations. Therefore, in the examples provided by this application, the file identification added based on different processing strategies, if the file identification is the same information type, the specific data is set to be different, which is convenient for reflecting the application effect of the processing method and is not used as a limiting condition.

[0064] For example, different processing strategies are used to identify different data ranges of the same information type for subsequent operations. The first processing strategy may include adding the storage location of the image file, and the first file identifier may be the storage location of the image file. Similarly, the second processing strategy may include adding the storage location of the image file, and the second file identifier may be the storage location of the image file. Moreover, the storage location of the image file represented by the first file identifier is different from the storage location of the image file represented by the second file identifier (for example, stored in different folders). In this way, the storage location of the target image file can be adjusted according to the storage space of the device, which is conducive to the classification management of different target image files.

[0065] Alternatively, the first processing strategy may include the resolution or filter parameters of the image file, and the first file identifier may be the resolution or filter parameter value when the shooting target is a landscape. Similarly, the second processing strategy may include the resolution or filter parameters of the image file, and the second file identifier may be the resolution or filter parameter value when the shooting target is a person. Different shooting targets use different resolutions or filter parameter values. In this way, it is possible to select a suitable image data processing method according to different targets, thereby improving the visual effect of the acquired target image file.

[0066] For another example, different processing strategies are used to identify different types of information for subsequent operations. The first processing strategy may include the latitude and longitude coordinate information of the image file, and the first file identifier may be the latitude and longitude coordinate information of the image file. The second processing strategy may not include adding the latitude and longitude coordinate information of the image file, and may include adding the preservation time limit of the image file, and the second file identifier is the preservation time limit of the image file. Different target operations are used according to user needs, and target image files with different information are obtained with different processing strategies. In this way, the configuration information of the acquired target image file can be adjusted according to user needs to meet the user's screening conditions for different target image files, so as to facilitate the subsequent search for the required target image file according to the file identifier classification.

[0067] The target image files with different file identifications can be processed in the same or different ways. For example, different file identifications can be displayed on the image files to help users understand the shooting scenes and conditions of the target image files. These different identification information can be deleted later, or target image files that meet one file identification condition can be deleted, while target image files that meet another file identification condition cannot be deleted. The specific settings can be made according to actual needs, and the examples provided in this application do not limit this.

[0068] Further, in some examples, the first file identifier indicates that the storage time limit of the target image file is a first time limit, and the second file identifier indicates that the storage time limit of the target image file is a second time limit. The first time limit is different from the second time limit.

[0069] It is understandable that the specific durations of the first time limit and the second time limit can be selected and set according to user needs. For example, the first duration of the storage time limit corresponding to the first processing strategy is pre-selected to be 1 day on the device, and the second duration of the storage time limit corresponding to the second processing strategy is pre-selected to be 3 days. Alternatively, the first duration of the storage time limit corresponding to the first processing strategy is pre-selected to be 3 days on the same device, and the second duration of the storage time limit corresponding to the second processing strategy is pre-selected to be 5 days. This application does not impose specific restrictions on this.

[0070] For example, the first file identifier indicates that the storage time limit of the target image file is a first time limit, which may include 1 day. The second file identifier indicates that the storage time limit of the target image file is a second time limit, which may include 5 days.

[0071] Based on the different file identifiers of the target image file, the target image file can be processed if the conditions of the file identifier are met. In this example, after the storage time limit of the first file identifier and the storage time limit of the second file identifier are met, there is no specific restriction on the processing method of the target image file, which can be any one or more of the processing methods such as deletion, format conversion, image resolution adjustment and transfer. For example, the target image file with the first file identifier is automatically deleted after the storage time limit (for example, 1 day) is met. The target image file with the second file identifier is automatically deleted after the storage time limit (for example, 5 days) is met. In this way, the user does not need to manually screen and delete the target image files stored based on the target operation from the gallery, which improves the efficiency of image processing and is easy to operate. Alternatively, the target image file with the first file identifier is format converted (for example, the image format is converted to a portable document format (PDF) format) after the storage time limit (for example, 1 day) is met. The target image file with the second file identifier is format converted (for example, the image format is converted to PDF format) after the storage time limit (for example, 5 days) is met.

[0072] Further, in some other examples, the first file identifier indicates that the target image file is an automatically deleted image file, and the second file identifier indicates that the target image file is a non-automatically deleted image file.

[0073] For example, the first file identifier indicates that the target image is an automatically deleted image file, and the target image file obtained based on the first operation is automatically deleted when the parameter conditions of the first processing strategy are met.

[0074] The second file identifier represents that the target image is a non-automatically deleted image file. The target image file obtained based on the second operation is not automatically deleted if the parameter conditions of the second processing strategy are met. An early warning reminder can be given to prompt the user whether to delete it, or no early warning reminder is given and it is permanently saved until the user manually deletes it.

[0075] The above-mentioned method adopts different target operations and different processing strategies according to user needs, and stores different target image data with different file identifiers. Based on the set identifier of the automatically deleted image file, the target image file can be automatically deleted after a preset time or preset time period set according to the needs; based on the set identifier of the non-automatically deleted image file, an early warning reminder of whether to delete can be provided, or in the subsequent process of automatically deleting files according to the file identifier, the identification information of these image files may not be identified, which can improve the efficiency of image processing. In this way, the needs of users in different application scenarios can be met, and the situation where unnecessary storage space is occupied because the user forgets to delete can be avoided, which is conducive to improving the user experience.

[0076] In other examples, such as Figure 3 As shown, step S200: save the target image data as a target image file using a first processing strategy, including S220. Then S220: convert the target image data into a target image file using a first image file format conversion strategy.

[0077] Step S300: keep the target image data as a target image file using the second processing strategy, including S320. Then S320: convert the target image data into a target image file using the second image file format conversion strategy.

[0078] For example, the first processing strategy may include a storage format of an image file. The first image file format conversion strategy may select and set a target storage format according to the target image data. For example, the preset storage format of the target image data is a first format (e.g., any one of JPEG, JPG, GIF, and PNG), and the target image data is stored in the first format based on the first processing strategy.

[0079] The second processing strategy may include a storage format of the image file. The second image file format conversion strategy may select and set a target storage format according to the target image data. For example, the preset storage format of the target image data is a second format (e.g., any one of JPEG, JPG, GIF, and PNG), and the target image data is stored in the second format based on the second processing strategy.

[0080] In this way, different storage formats can be set according to different requirements for the properties of the target image file (i.e., image formats suitable for different applications), and different target image files can be adaptively stored to meet the image requirements for different captured images, which is conducive to improving user experience. For example, the data processing method for processing the target image data in JPG format is adjusted to a data processing method that can obtain PDF format after processing the image data, and save the target image file in PDG format.

[0081] In addition, the collected target image data may also be converted to a format different from the preset storage format. For example, after the target image file is identified under the first processing strategy or the second processing strategy, the identified target image file may be converted to a format after a certain period of time, so as to facilitate the subsequent compression storage of a large number of files, reduce the occupied storage space, or adapt to the image file requirements in different scenarios. The parameters contained in the first processing strategy may be set for identification as required, and this example does not impose specific restrictions on this. For example, the preset storage format of the target image data is the first format, and the target image data is converted from the first format to the target format based on the first image file format conversion. Alternatively, the preset storage format of the target image data is the second format, and the target image data is converted from the second format to the target format based on the second image file format conversion. As a specific example, a stored target image file in JPG format may be converted into a file in PDF format.

[0082] In some other examples, the first file identifier represents a resolution of a visual effect of a target image file as a first resolution; the second file identifier represents a resolution of a visual effect of the target image file as a second resolution; and the first resolution is different from the second resolution.

[0083] Based on different shooting targets, the resolution configuration of the target image data can be adjusted according to demand. For example, the user's demand is that the image visual effect of the landscape image is clearer and more detailed, and the image visual effect of the figure image has an overall atmosphere (no need to show details more clearly and carefully). If the shooting target is a landscape, the first file identifier of the target image file is set to the first resolution based on the first operation. If the shooting target is a figure, the second file identifier of the target image file is set to the second resolution based on the second operation. The first resolution can be greater than the second resolution.

[0084] In some examples, if it is detected that a target control for triggering a target instruction is touched N times within a first time period, the target operation is a first operation.

[0085] If it is detected that the target control is touched M times within the first duration, the target operation is the second operation.

[0086] Among them, M and N are not 0, and M is different from N.

[0087] For example, the target control for triggering the target instruction may be one or more of a touch screen, a volume button, and a power button of a mobile phone.

[0088] For example, based on the target operation being a first operation, the target image data is saved as a target image file using a first processing strategy. The first operation may be an operation in which a target control for triggering a target instruction is detected to be touched N times within a first time period.

[0089] And, based on the target operation being a second operation, the target image data is saved as a target image file using a second processing strategy, and the second operation may be an operation in which a target control for triggering a target instruction is detected to be touched M times within a first time period.

[0090] For example, the target control may be a touch screen. The first duration may be a preset sensing duration, for example, 1 second.

[0091] Thus, the value of N may be 1. Then, the operation of detecting a finger clicking the touch screen (ie, the target control) once (eg, double-finger clicking) within 1 second is regarded as the first operation, and the target image data is saved as the target image file using the first processing strategy.

[0092] And, the value of M may be 2. Then, the operation of detecting a finger clicking the touch screen (ie, the target control) twice (eg, double-clicking with two fingers) within 1 second is regarded as the second operation, and the target image data is saved as the target image file using the second processing strategy.

[0093] The first file identifier based on the first processing strategy means that the storage duration of the target image file is the first time limit. And, the second file identifier based on the second processing strategy means that the storage duration of the target image file is the second time limit. The duration of the first time limit is different from the duration of the second time limit. The process of the processing method may be that in response to a two-finger single-click operation on the touch screen of the mobile phone (i.e., the first operation), the target image data is stored as a target image file with a storage duration of the first time limit. In response to a two-finger double-click operation on the touch screen of the mobile phone (i.e., the second operation), the target image data is stored as a target image file with a storage duration of the first time limit.

[0094] For another example, the target control may be a device sensor. The first duration may be a preset sensing duration, such as 1 second.

[0095] In this way, the value of N can be 1, that is, the sensor detects a gesture image within an angle range, which is characterized as touching the target control once. Then, within 1 second, the device sensor (i.e., the target control) detects a user's non-contact gesture once (e.g., a gesture image within an angle range) as the first operation, and the target image data is saved as a target image file using the first processing strategy.

[0096] And, the value of M can be 2, that is, the gesture images detected by the sensor in two angle ranges are characterized as touching the target control twice. Then, within 1 second, the device sensor (i.e., the target control) detects the user's non-contact gesture twice (for example, gesture images in different angle ranges during the palm flipping process) as the second operation, and the target image data is saved as the target image file using the second processing strategy.

[0097] The examples provided in this application do not impose any specific restrictions on the number of times a target control is touched. Different target controls can be selected according to needs, and touch conditions corresponding to different target controls can be set.

[0098] In some examples, such as Figure 4 As shown, the method further includes: S400.

[0099] S400: Reading a file identifier of a target image file; if the storage time limit represented by the file identifier has expired, deleting the target image file in the first storage space.

[0100] For example, the image processing device collects image data and stores the target image file based on the preservation time limit of the first processing strategy (or the preservation time limit of the second processing strategy). Then, the first file identifier (or the second file identifier) ​​of the target image file is read at a preset interval or at a fixed time every day, and the processing operation is performed on the target image file according to the preservation time limit value contained in the first file identifier (or the second file identifier). For example, based on the preservation time limits of different processing strategies, when the preservation time of the target image file (based on the time when the target image file is shot) has reached the preservation time limit, the target image file is deleted from the first storage space.

[0101] It can be understood that the retention period of the target image file is the time for storing the table image file in the corresponding storage space. After the target image file reaches the retention period, any one or more of the processing operations such as deletion, transfer, format conversion, etc. can be performed, which can be set according to actual needs.

[0102] In addition, according to the content of the file identifier of the target image file, other features besides the preservation time limit may also be included, for example, one or more of the storage format of the target image file, the latitude and longitude coordinates, and the resolution of the image file.

[0103] The target image files are filtered by reading the contents of different file identifiers, and some target image files that do not meet the user's needs are deleted. For example, target image files with a resolution less than a preset resolution value can be deleted from the first storage space, where the preset resolution value is the minimum resolution that meets the user's needs for image effects. In this way, some invalid target image files can be deleted, improving the user's subsequent processing efficiency for valid target image files.

[0104] In some examples, such as Figure 5 As shown, the method further includes: S500 and S600.

[0105] S500: If the target image file is deleted from the first storage space through the deletion interaction operation, the target image file is stored in the second storage space.

[0106] It can be understood that the “deletion interaction operation” refers to an operation of deleting an image file manually performed by a user.

[0107] For example, for the stored target image file, the user can manually delete it and transfer it to other storage spaces. For example, the target image file obtained by the target operation is stored in the first storage space by default, and the user can delete it from the first storage space and transfer it to the second storage space.

[0108] S600: If the target image file is deleted in the first storage space due to reaching the storage time limit, the target image file is stored in the third storage space.

[0109] It can be understood that “the target image file is deleted in the first storage space due to reaching the saving time limit” means that after the saving time is reached, the first storage space does not continue to save the file, that is, the file is automatically deleted.

[0110] For example, based on the first file identifier (or second file identifier) ​​with different preservation time limits in the processing strategy, the first file identifier (or second file identifier) ​​of the target image file is read at every preset time interval, and the target image file is automatically deleted according to the preservation time limit value contained in the first file identifier (or second file identifier), and stored in the third storage space.

[0111] The second storage space and the third storage space are used to store image files that have been deleted from the first storage space, and after detecting a restore interaction operation indicating that the target image file is to be restored, the target image file is moved from the second storage space or the third storage space to the first storage space. The image files stored in the second storage space and the third storage space are permanently deleted after the storage time reaches a second time.

[0112] For example, the second storage space and the third storage space can be different storage areas in the image acquisition device, or can be the same storage area based on different ways of deleting and transferring images. This application does not impose specific restrictions on this, and can be set according to the structure of the image acquisition device and user needs. In addition, the second storage space and the third storage space are not preferred as the storage area for the target image file. For example, the second storage space and the third storage space can be used as two types of recycle bins for image files actively deleted by users and automatically deleted by the image acquisition device, respectively.

[0113] The examples provided in this application can execute the above two methods of deleting and transferring the target image files according to different priority levels, so as to improve the user experience.

[0114] Further, for the image file transferred to the second storage space or the third storage space, after detecting the restore interaction operation indicating to restore the target image file, the target image file can be moved from the second storage space or the third storage space to the first storage space. For example, for the image file in the second storage space or the third storage space, after detecting the restore interaction operation, the corresponding image file is restored to the first storage space.

[0115] Alternatively, the image files stored in the second storage space or the third storage space may be permanently deleted after the storage time reaches a second time. The second time is set for the storage time of the image files transferred to the second storage space or the third storage space. For example, the image files may be permanently deleted at a certain time every day, or based on the storage time of the transferred image files reaching the second time.

[0116] In this way, the second storage space and the third storage space can be used as a backup space, making it easier for users to find files that have been deleted by mistake, thereby improving user experience.

[0117] Based on the above embodiments, Figure 6 As shown, the embodiment of the present application provides a processing device 100. The processing device 100 includes: a trigger module 110, a first processing module 120 and a second processing module 130.

[0118] The trigger module 110 is used for acquiring a target operation that triggers the target instruction in response to the target instruction.

[0119] The first processing module 120 is used for saving the target image data as a target image file according to a first processing strategy if the target operation is a first operation.

[0120] The second processing module 130 is used to save the target image data as a target image file using a second processing strategy if the target operation is the second operation. The target instruction is used to save the target image data collected by the image collection device as a target image file.

[0121] The description of the embodiment of the processing device 100 of the present application is similar to the description of the above-mentioned method embodiment, and has similar beneficial effects as the method embodiment. Among them, the meanings of "target instruction", "target operation", "first processing strategy" and "second processing strategy" can be referred to the examples in the above-mentioned processing method, and will not be repeated here. For technical details not disclosed in the embodiment of the processing device 100 of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0122] In some embodiments, Figure 7 As shown, an embodiment of the present application provides an electronic device 200. The electronic device 200 includes: an image acquisition device 210 and a processor 220.

[0123] The image acquisition device 210 is used to acquire target image data. For example, according to the classification of structural characteristics, the image acquisition device 210 can be an area array camera or a line array camera. For another example, according to the classification of picture resolution, the image acquisition device 210 can be a standard definition camera or a high definition camera. For another example, according to the classification of signal type, the image acquisition device 210 can be an analog camera or a digital camera. For another example, according to the classification of the number of cameras, the image acquisition device 210 can be a monocular camera or a binocular camera. This example does not limit this, and it only needs to meet the processing conditions of the processing strategy in the above-mentioned processing method of this application for the processing of the target image data.

[0124] The processor 220 is used to execute: in response to the target instruction, obtain the target operation that triggers the target instruction; if the target operation is the first operation, save the target image data as the target image file with the first processing strategy; if the target operation is the second operation, save the target image data as the target image file with the second processing strategy. The target instruction is used to save the target image data collected by the image acquisition device as the target image file.

[0125] For example, the processor 220 may include one or more of a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processing unit (DSP), or a field programmable gate array (FPGA).

[0126] For the meanings of “target instruction”, “target operation”, “first processing strategy” and “second processing strategy”, please refer to the examples in the above processing method, which will not be repeated here.

[0127] The description of the embodiment of the electronic device of the present application is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiment of the electronic device of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0128] Correspondingly, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium includes a stored computer program or instruction; when the computer program or instruction is executed, the device where the computer-readable storage medium is located is controlled to implement a processing method as provided in any of the above examples. For example, in response to a target instruction, a target operation that triggers the target instruction is obtained, if the target operation is a first operation, the target image data is saved as a target image file with a first processing strategy, if the target operation is a second operation, the target image data is saved as the target image file with a second processing strategy, wherein the target instruction is used to save the target image data acquired by the image acquisition device as a target image file.

[0129] Furthermore, an embodiment of the present application also provides a computer program product. The computer program product includes a computer program or an instruction. When the computer program or the instruction is executed by the processing module, the steps of the processing method provided in any of the above examples are implemented. In an example, in response to a target instruction, a target operation that triggers the target instruction is obtained, and if the target operation is a first operation, the target image data is saved as a target image file with a first processing strategy, and if the target operation is a second operation, the target image data is saved as the target image file with a second processing strategy, wherein the target instruction is used to save the target image data acquired by the image acquisition device as a target image file.

[0130] It should be noted that in the embodiments of the present application, if the above-mentioned processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer program product is stored in a storage medium, including several instructions for a service module to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory module (ROM), a disk or an optical disk. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0131] It should be noted here that the description of the above storage medium and computer program product embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and computer program product embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0132] Of course, the device in the embodiment of the present application may also have other similar protocol interaction implementation cases. Without departing from the spirit and essence of the present application, technicians in this field can make various corresponding changes and deformations according to the embodiment of the present application, but these corresponding changes and deformations should all fall within the scope of protection of the claims attached to the method of the present application.

[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, electronic devices, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage modules and optical storage modules, etc.) that contain computer-usable program codes.

[0134] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing module of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine module, so that the instructions executed by the processing module of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that has the functions specified in one or more boxes.

[0135] These computer program instructions may also be stored in a computer-readable storage module that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable storage module produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0137] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0138] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0139] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or modules can be electrical, mechanical or other forms.

[0140] The modules described above as separated modules may or may not be physically separated, and the modules displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network modules; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0141] The above is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A processing method comprising: In response to a target instruction, acquiring a target operation that triggers the target instruction; If the target operation is a first operation, saving the target image data as a target image file using a first processing strategy; If the target operation is a second operation, saving the target image data as the target image file using a second processing strategy; The target instruction is used to save the target image data acquired by the image acquisition device as the target image file.

2. The method according to claim 1, wherein: The step of saving the target image data as a target image file using the first processing strategy includes: Adding a first file identifier to the target image file; The step of saving the target image data as the target image file using the second processing strategy includes: adding a second file identifier to the target image file.

3. The method according to claim 2, wherein: The first file identifier indicates that the storage period of the target image file is a first period; the second file identifier indicates that the storage period of the target image file is a second period; the first period is different from the second period; or, The first file identifier indicates that the target image file is an automatically deleted image file; the second file identifier indicates that the target image file is a non-automatically deleted image file.

4. The method according to claim 1, wherein: The step of saving the target image data as a target image file using the first processing strategy includes: Converting the target image data into the target image file using a first image file format conversion strategy; The step of maintaining the target image data as the target image file using the second processing strategy comprises: The target image data is converted into the target image file using a second image file format conversion strategy.

5. The method according to claim 1, wherein: If it is detected within a first time period that the target control for triggering the target instruction is touched N times, the target operation is the first operation; If it is detected that the target control is touched M times within the first time period, the target operation is the second operation; Among them, M and N are not 0, and M is different from N.

6. The method according to claim 3, wherein: The method further comprises: Reading the file identifier of the target image file; If the storage time limit represented by the file identifier has arrived, the target image file is deleted in the first storage space.

7. The method according to claim 3, wherein: The method further comprises: If the target image file is deleted from the first storage space through the deletion interaction operation, storing the target image file in the second storage space; If the target image file is deleted in the first storage space due to reaching the storage time limit, storing the target image file in a third storage space; Among them, the second storage space and the third storage space are used to store image files that have been deleted from the first storage space, and after detecting a recovery interaction operation indicating that the target image file is to be restored, the target image file is moved from the second storage space or the third storage space to the first storage space; the image files stored in the second storage space and the third storage space are permanently deleted after the storage time reaches a second time.

8. A processing device comprising: A trigger module, configured to obtain a target operation that triggers the target instruction in response to the target instruction; A first processing module, configured to save the target image data as a target image file using a first processing strategy if the target operation is a first operation; A second processing module, configured to save the target image data as the target image file using a second processing strategy if the target operation is a second operation; The target instruction is used to save the target image data acquired by the image acquisition device as the target image file.

9. An electronic device, comprising: An image acquisition device, used for acquiring target image data; Processor to perform: In response to a target instruction, acquiring a target operation that triggers the target instruction; If the target operation is a first operation, saving the target image data as a target image file using a first processing strategy; If the target operation is a second operation, saving the target image data as the target image file using a second processing strategy; The target instruction is used to save the target image data acquired by the image acquisition device as the target image file.

10. A computer-readable storage medium, comprising a stored computer program or instruction; when the computer program or instruction is executed, the device where the computer-readable storage medium is located is controlled to implement the processing method according to any one of claims 1 to 7.