Data storage method and device, electronic equipment and readable storage medium
By detecting screen capture operations in electronic devices, acquiring multimedia data and storing it to the storage space corresponding to the specified application, the problem of difficulty for users to find or call data is solved, and more convenient data search and call is achieved.
Patent Information
- Application Number
- CN202311518380.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, the acquired data is directly stored in the default storage space, making it difficult for users to find or call the data in the future.
When a screen capture operation is detected, the multimedia data corresponding to the content currently displayed by the electronic device is obtained, and its corresponding designated application and storage space are determined, and the multimedia data is stored in the designated storage space.
By storing multimedia data in different designated storage spaces according to the corresponding application, users can more conveniently find or call multimedia data according to the designated storage spaces corresponding to different applications, reducing the difficulty of searching or calling for users.
Smart Images

Figure CN120010745A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data technology, and more specifically, to a data storage method, device, electronic device, and readable storage medium. Background Art
[0002] At present, with the development of electronic information technology, some data can be obtained through electronic devices and then stored. Although a default storage space can be set, and then after the data is obtained, the data is directly stored in the default storage space. However, directly storing the obtained data in the default storage space will make it difficult for users to find or call the data later. Summary of the invention
[0003] The present application proposes a data storage method, device, electronic device and readable storage medium.
[0004] In a first aspect, an embodiment of the present application provides a data storage method, which is applied to an electronic device, and the method includes: when a screen capture operation is detected, obtaining multimedia data corresponding to content currently displayed by the electronic device, the multimedia data including image data or video data; determining a designated application corresponding to the multimedia data; determining a storage space corresponding to the designated application as a designated storage space; and storing the multimedia data in the designated storage space.
[0005] In a second aspect, the embodiment of the present application further provides a data storage device, which is applied to an electronic device, and the device includes: an acquisition unit, a first determination unit, a second determination unit, and a storage unit. The acquisition unit is used to acquire multimedia data corresponding to the content currently displayed by the electronic device when a screen capture operation is detected, and the multimedia data includes image data or video data; the first determination unit is used to determine the designated application corresponding to the multimedia data; the second determination unit is used to determine the storage space corresponding to the designated application as the designated storage space; the storage unit is used to store the multimedia data in the designated storage space.
[0006] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method described in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the method described in the first aspect above.
[0008] The data storage method, device, electronic device and readable storage medium provided in the embodiments of the present application are applied to electronic devices. First, when a screen capture operation is detected, the multimedia data corresponding to the content currently displayed by the electronic device is obtained; then the designated application corresponding to the multimedia data is determined; then the storage space corresponding to the designated application is determined as the designated storage space; finally, the multimedia data is stored in the designated storage space. If the multimedia data is directly stored in the default storage space after the multimedia data is obtained, it will cause inconvenience to the user's subsequent search or use of the multimedia data. In the present application, the obtained multimedia data is stored in the corresponding designated storage space respectively, and specifically, the multimedia data is stored in different designated storage spaces according to the corresponding applications. Therefore, subsequent users can search or call multimedia data according to the designated storage spaces corresponding to different applications, which reduces the difficulty for users to search or call multimedia data.
[0009] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and partly become apparent from the description, or can be understood by practicing the embodiments of the present application. The purposes and other advantages of the embodiments of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0011] Figure 1 An application scenario diagram of the data storage method provided by an embodiment of the present application is shown;
[0012] Figure 2 A method flow chart of a data storage method provided by an embodiment of the present application is shown;
[0013] Figure 3 A method flow chart of a data storage method provided by another embodiment of the present application is shown;
[0014] Figure 4 A method flow chart of a data storage method provided by another embodiment of the present application is shown;
[0015] Figure 5 A structural block diagram of a data storage device provided by another embodiment of the present application is shown;
[0016] Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application is shown;
[0017] Figure 7 A structural block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown;
[0018] Figure 8 A structural block diagram of a computer program product provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0019] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0020] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0021] At present, with the development of electronic information technology, some data can be obtained through electronic devices, and then the obtained data can be stored. Although a default storage space can be set, and then after the data is obtained, the data is directly stored in the default storage space. However, directly storing the obtained data in the default storage space will make it difficult for users to find or call the data later. How to reasonably store the obtained data so that it is convenient for users to find or call the data later is a problem that needs to be solved.
[0022] Currently, data can be obtained through electronic devices, for example, a screenshot of the content currently displayed by the electronic device can be taken to obtain image data corresponding to the currently displayed content. Further, the obtained image data can be stored in a default storage space.
[0023] However, the inventors found in their research that if the acquired data, such as screenshot data, is directly stored in the default storage space, if the user subsequently needs to view or call a certain screenshot data, it is necessary to search or call it in the default storage space, which is relatively difficult.
[0024] Therefore, in order to solve or partially solve the above problems, the present application provides a data storage method, device, electronic device and readable storage medium.
[0025] See also Figure 1 , Figure 1 An application scenario diagram of the data storage method provided in an embodiment of the present application is shown, namely, a data storage scenario 100. Among them, the data storage scenario 100 includes an electronic device 110 and a user 120, and the electronic device 110 is a smart phone. When the user 120 uses the electronic device 110, for example, the user can perform a screen capture operation on the electronic device 110, so that the electronic device 110 can obtain multimedia data corresponding to the content currently displayed by the electronic device when the screen capture operation is detected, and then further store the multimedia data through the data storage method provided by the present application. For a specific introduction to the storage method, please refer to the subsequent embodiments.
[0026] See also Figure 2 , Figure 2 A method flow chart of a data storage method provided by an embodiment of the present application is shown. The data storage method can be applied to Figure 1 The electronic device in the data storage scenario shown may specifically use a processor of the electronic device as an execution subject for executing the data storage method. The data storage method may include steps S110 to S140.
[0027] Step S110: when a screen capture operation is detected, multimedia data corresponding to the content currently displayed by the electronic device is obtained, where the multimedia data includes image data or video data.
[0028] The electronic device can run an operating system, which can be, for example, Windows, Linux, Android, or MacOS. Furthermore, on the basis of running the operating system, the electronic device can also run application programs, thereby executing corresponding functions through various application programs to meet the needs of users. For example, the electronic device can run a novel application program to meet the needs of users to read novels; the electronic device can also run a music player application program to meet the needs of users to enjoy music; the electronic device can also run a video player application program to meet the needs of users to enjoy videos.
[0029] It is understandable that the content currently displayed by the electronic device has a corresponding relationship with the currently running application. For example, if the electronic device runs a novel application, the currently displayed content may be a novel related to the novel application; if the electronic device runs a music player application, the currently displayed content may be content related to the music player application, such as information about the currently playing music, which may include information such as the name, lyrics, or playback volume; if the electronic device runs a video player application, the currently displayed content may be content related to the video player application, such as the content of the currently playing video.
[0030] The user can capture the content currently displayed by the electronic device through the screen capture operation, thereby obtaining the multimedia data corresponding to the content currently displayed by the electronic device. Therefore, when the screen capture operation is detected, the multimedia data corresponding to the content currently displayed by the electronic device can be obtained. Among them, the screen capture operation can be triggered by the user directly through the corresponding operation control on the electronic device, or by the user controlling other applications and thus controlling the trigger through the application. In some embodiments, the screen capture operation can include a screenshot operation or a screen recording operation.
[0031] It can be understood that the content currently displayed by the electronic device can be captured through the screenshot operation, thereby generating image data corresponding to the content currently displayed by the electronic device; and the content currently displayed by the electronic device can be recorded through the screen recording operation, thereby generating video data corresponding to the content currently displayed by the electronic device.
[0032] Thus, the acquired multimedia data may include image data or video data. Exemplarily, the user may perform a screenshot operation on the content currently displayed by the electronic device. When the screenshot operation is detected, the image data corresponding to the currently displayed content may be acquired. In another exemplary embodiment, the user may also perform a screen recording operation on the currently displayed content. When the screen recording operation is detected, the video data corresponding to the content currently displayed by the electronic device may be acquired. It should be noted that the video data corresponding to the content currently displayed by the electronic device may be the content displayed by the electronic device within a certain time period. The starting time of the certain time period may be the time when the user is detected to perform the screen recording operation, and the ending time may be the time when the user is detected to stop the screen recording operation, or the time when a pre-set screen recording duration is reached.
[0033] Step S120: Determine a designated application corresponding to the multimedia data.
[0034] After the multimedia data is acquired, the multimedia data can be stored. If the multimedia data is directly stored in the default storage space, if the user needs to view or call a certain multimedia data later, it is necessary to search or call it in the default storage space, which is not very convenient and difficult.
[0035] Therefore, in the embodiments provided in the present application, the designated application corresponding to the multimedia data can also be determined, so that the multimedia data can be subsequently stored in the storage space corresponding to the designated application. For some embodiments, since the multimedia data is determined based on the content currently displayed by the electronic device, and the content currently displayed by the electronic device can be determined by the application currently running in the foreground of the electronic device. Therefore, the designated application can be determined by the application currently running in the foreground. Exemplarily, if the application currently running in the foreground is a novel application, the designated application can be determined to be a novel application; if the application currently running in the foreground is a music player application, the designated application can be determined to be a music player application; if the application currently running in the foreground is a video player application, the designated application can be determined to be a video player application.
[0036] The electronic device can determine which application is currently running in the foreground through an application programming interface (API) provided by the operating system. For example, the identifier of the application currently running in the foreground can be obtained through the ActivityManager class, and the identifier can be, for example, a name.
[0037] For other implementations, the acquired multimedia data may be identified to determine the designated application corresponding to the multimedia data. Exemplarily, if the multimedia data is image data, image recognition may be performed on the image data to determine the designated application corresponding to the image data; in another exemplary embodiment, if the multimedia data is video data, the video data may be firstly frame-segmented to obtain multiple image frames, and then image recognition may be performed on the multiple image frames to determine the designated application corresponding to the video data.
[0038] It should be noted that, in the case where the multimedia data includes video data, multiple applications may be determined from the multimedia data. Therefore, for some implementations, the application corresponding to the start time of the video data may be used as the designated application. That is, the application running in the foreground of the electronic device at the start time of the video data may be detected as the designated application; or the image frame corresponding to the start time of the video data may be obtained, and then the image frame may be subjected to image recognition to determine the designated application.
[0039] The image data or image frame is subjected to image recognition, that is, image analysis is performed on the image data or image frame, so as to obtain the application corresponding to the image data or image frame by analysis. Exemplarily, the image data or image frame can be subjected to image recognition by a pre-trained image recognition model.
[0040] Therefore, multimedia data corresponding to different applications can be stored in different storage spaces respectively, so as to facilitate the subsequent search or call by users. For a detailed storage method introduction, please refer to the subsequent steps.
[0041] Step S130: determining a storage space corresponding to the designated application as the designated storage space.
[0042] Step S140: storing the multimedia data into the designated storage space.
[0043] Different multimedia data can be stored in different storage spaces according to different designated applications, so as to facilitate subsequent search or call by users. Therefore, the storage space corresponding to the designated application can be determined as the designated storage space.
[0044] It should be noted that the storage space can be a storage space divided from a memory included in the electronic device; it can also be a storage space divided from a storage pool of a cloud server; it can also be a storage space divided from a storage pool of other devices that are connected to the electronic device.
[0045] In some embodiments, the storage space is a storage space divided in the memory of the electronic device as an example for further explanation. The storage space can be specifically characterized by a directory and an identifier. For example, it can be represented by Pictures / Screenshots / AppName1. It can be seen that AppName1 is the identifier of the storage space, and Pictures / Screenshots / is the directory, so it can be seen that the AppName1 storage space is specifically located under the Pictures / Screenshots / directory.
[0046] Therefore, after obtaining the specified application, the specified storage space corresponding to the application can be determined, and the multimedia data can be stored in the specified storage space. For example, if the specified application is AppName1, then Pictures / Screenshots / AppName1 can be determined as the specified storage space, and the multimedia data corresponding to AppName1 can be stored in the specified space of Pictures / Screenshots / AppName1; if the specified application is AppName2, then Pictures / Screenshots / AppName2 can be determined as the specified storage space, and the multimedia data corresponding to AppName2 can be stored in the specified space of Pictures / Screenshots / AppName2.
[0047] It is understandable that the designated storage space generally corresponds to only one application, namely the designated application. That is, the designated storage space is generally only used to store multimedia data corresponding to the designated application. For other storage spaces, they may also correspond to multiple applications. Exemplarily, if the storage space is the default storage space, the default storage space may store multimedia data corresponding to multiple applications.
[0048] Storing the multimedia data in the designated storage space may be storing the acquired multimedia data in a cache or memory first and then storing the multimedia data in the designated storage space; or directly storing the acquired multimedia data in the designated storage space.
[0049] In some implementations, a user may view or call multimedia data stored in a storage space on an electronic device, for example, the user may view or call image data or video data through an album.
[0050] Combined with the above introduction to the storage space, it can be known that the designated storage space can be a storage space divided from the memory in the electronic device. Therefore, the acquired multimedia data can be first stored in the cache or memory, and then the multimedia data can be stored in the designated storage space of the electronic device; or the acquired multimedia data can be directly stored in the designated storage space of the electronic device. In this case, the multimedia data is stored in the electronic device, and the user can directly view the multimedia data stored in the electronic device through the album.
[0051] The designated storage space may also be a storage space divided from the storage pool of the cloud server. Therefore, the acquired multimedia data may be first stored in the cache or memory, and then the multimedia data may be stored in the designated storage space of the cloud; or the acquired multimedia data may be directly stored in the designated storage space of the cloud. In this case, the multimedia data is stored in the cloud. Optionally, in the case of viewing multimedia data through the photo album of the electronic device, a mapping relationship is actually established between the photo album and the multimedia data stored in the designated storage space of the cloud, so that the multimedia data can be viewed through the photo album.
[0052] The designated storage space may also be a storage space divided from a storage pool of other devices that are connected to the electronic device. Therefore, the acquired multimedia data may be first stored in a cache or memory, and then the multimedia data may be stored in the designated storage space of other devices; or the acquired multimedia data may be directly stored in the designated storage space of other devices. In this case, the multimedia data is stored in the cloud. Optionally, in the case of viewing multimedia data through the photo album of the electronic device, a mapping relationship is actually established between the photo album and the multimedia data stored in the designated storage space of other devices, so that the multimedia data can be viewed through the photo album.
[0053] The data storage method provided in the embodiment of the present application is applied to an electronic device. First, when a screen capture operation is detected, the multimedia data corresponding to the content currently displayed by the electronic device is obtained; then the designated application corresponding to the multimedia data is determined; then the storage space corresponding to the designated application is determined as the designated storage space; finally, the multimedia data is stored in the designated storage space. If the multimedia data is directly stored in the default storage space after the multimedia data is obtained, it will cause inconvenience to the user's subsequent search or use of the multimedia data. In the present application, the obtained multimedia data is stored in the corresponding designated storage space respectively, and specifically, the multimedia data is stored in different designated storage spaces according to the corresponding applications. Therefore, subsequent users can search or call the multimedia data according to the designated storage spaces corresponding to different applications, which reduces the difficulty for users to search or call the multimedia data.
[0054] See also Figure 3 , Figure 3 A method flow chart of a data storage method provided by an embodiment of the present application is shown. The data storage method can be applied to Figure 1 The electronic device in the data storage scenario shown may specifically use a processor of the electronic device as an execution subject for executing the data storage method. The data storage method may include steps S210 to S290.
[0055] Step S210: when a screen capture operation is detected, multimedia data corresponding to the content currently displayed by the electronic device is obtained, where the multimedia data includes image data or video data.
[0056] Step S220: Determine a designated application corresponding to the multimedia data.
[0057] Step S230: Determine a storage space corresponding to the designated application as the designated storage space.
[0058] Step S240: storing the multimedia data into the designated storage space.
[0059] Among them, step S210 to step S240 have been introduced in detail in the above embodiments and will not be repeated here.
[0060] Step S250: Generate prompt information based on at least one historical storage space, where the prompt information is used to instruct the user to change the storage space for storing the multimedia data.
[0061] After the multimedia data is stored in the designated storage space, it may be further determined whether the multimedia data needs to be stored in other storage spaces selected by the user.
[0062] For some implementations, prompt information may be generated first according to at least one historical storage space, and the prompt information may be used to instruct the user to change the storage space storing the multimedia data. The historical storage space may be an established storage space, for example, the historical storage space may include a default storage space and a storage space corresponding to an established application. The default storage space may be a storage space configured by default by the system, and may be used to store data.
[0063] Exemplarily, if when a screen capture operation is detected, a storage space corresponding to the AppName3 application has been established before obtaining the multimedia data corresponding to the content currently displayed by the electronic device, the historical storage space may include the storage space corresponding to the AppName3 application and the default storage space.
[0064] In some implementations, the prompt information may instruct the user based on the historical storage space. Exemplarily, the prompt information may ask the user whether to store the acquired multimedia data in the historical storage space. If there are multiple historical storage spaces, the user may also be instructed as to which historical storage space the acquired multimedia data should be stored.
[0065] Therefore, the prompt information may be a query information generated based on the historical storage space. Exemplarily, the prompt information may include "Do you need to store the multimedia data in other storage spaces?" and at least one historical storage space, so that the user can select the historical storage space to store the multimedia data.
[0066] Step S260: Determine whether feedback information input by the user based on the prompt information is obtained.
[0067] Furthermore, the user may input feedback information based on the prompt information. For example, the feedback information may be used to represent the specific historical storage space selected by the user to store the multimedia data.
[0068] Exemplarily, in addition to the historical storage space, the prompt information may also include a selection control corresponding to each historical storage space, so that the user can directly interact with the selection control corresponding to the historical storage space to select the historical storage space corresponding to the selection control, so that the multimedia data can be subsequently stored in the historical storage space corresponding to the selection control.
[0069] The user interacts with the selection control by clicking on the selection control, selecting the selection control through voice input, or determining the selection control that the user is looking at through eye tracking, which is not specifically limited in this application.
[0070] If feedback information input by the user based on the prompt information is obtained, the process may jump to step S270 ; if feedback information input by the user is not obtained, the process may jump to step S290 .
[0071] Step S270: If the feedback information is obtained, the historical storage space selected by the user is determined based on the feedback information as the target storage space.
[0072] Step S280: storing the multimedia data into the target storage space.
[0073] As can be seen from the above introduction, the user can input feedback information based on the prompt information, so that the historical storage space selected by the user can be determined as the target storage space based on the feedback information.
[0074] For some implementations, the target storage space may include a history storage space, so that after the target storage space is determined, the multimedia data may be stored in the target storage space.
[0075] It should be noted that, since the multimedia data has been currently stored in the designated storage space, the multimedia data can be moved to the target storage space, thereby avoiding the waste of data space caused by storing multiple copies of multimedia data.
[0076] Optionally, the multimedia data may not be moved, but reference data of the multimedia data may be established in the target storage space, wherein the reference data hardly occupies data space, and through the reference data, the user may also directly search or call the multimedia data through the target storage space, which is convenient for the user to search or use later, and does not occupy much extra data space.
[0077] For some other implementations, the target storage space may also include multiple historical storage spaces. That is, when the user inputs feedback information through the prompt information, multiple historical storage spaces may be determined. Thus, the target storage space subsequently determined based on the feedback information may include multiple historical storage spaces.
[0078] Furthermore, when executing step S280, steps S281 to S283 may also be included.
[0079] Step S281: Determine one from a plurality of historical storage spaces as a candidate storage space.
[0080] Step S282: storing the multimedia data in the alternative storage space.
[0081] Step S283: creating reference data corresponding to the multimedia data in a historical storage space other than the candidate storage space among a plurality of historical storage spaces, wherein the data space occupied by the reference data is smaller than the data space occupied by the multimedia data.
[0082] When the target storage space may include multiple historical storage spaces, one of the multiple historical storage spaces may be first determined as an alternative storage space, and then the multimedia data may be stored in the alternative storage space. Specifically, the multimedia data may be moved from the designated storage space to the alternative storage space.
[0083] Furthermore, reference data corresponding to the multimedia data can be established in a historical storage space other than the candidate storage space among the multiple historical storage spaces, so that the multimedia data can be searched or called through the reference data, wherein the data space occupied by the reference data is smaller than the data space occupied by the multimedia data.
[0084] Exemplarily, the reference data may include a multimedia identifier and pointer data, so that only the multimedia identifier and the pointer data may be stored in a historical storage space other than the alternative storage space among the multiple historical storage spaces, and the multimedia identifier is pointed to the multimedia data stored in the alternative storage space through the pointer data. Furthermore, the user may search or call the multimedia identifier in the historical storage space other than the alternative storage space among the multiple historical storage spaces, and then obtain the multimedia data stored in the alternative storage space corresponding to the multimedia identifier through the pointer data.
[0085] Exemplarily, determining one from multiple historical storage spaces as the candidate storage space may be that the user specifies a historical storage space as the candidate storage space. In another exemplary embodiment, the user may also allocate data space that can be used for storage to different storage spaces, such as 1GB, 2GB, etc. Thus, the one with the largest remaining data space may also be determined from multiple historical storage spaces in the target storage space as the candidate storage space.
[0086] Step S290: If the feedback information is not obtained, the multimedia data is stored in the designated storage space.
[0087] In some implementations, if no feedback information is obtained, the multimedia data may continue to be stored in the designated storage space.
[0088] In the embodiment provided by the present application, after the acquired multimedia data is stored in the designated storage space, it is also possible to determine whether to store the multimedia data in other storage spaces according to the user's feedback information. Therefore, if the user needs to manually classify the multimedia data, it is not necessary to search for the stored multimedia data in the designated storage space by himself and then store the multimedia data in other storage spaces. Instead, the multimedia data can be directly stored in other storage spaces by inputting feedback information based on the prompt information of the electronic device, which facilitates the user to classify the acquired multimedia data.
[0089] See also Figure 4 , Figure 4 A method flow chart of a data storage method provided by an embodiment of the present application is shown. The data storage method can be applied to Figure 1 The electronic device in the data storage scenario shown may specifically use a processor of the electronic device as an execution subject for executing the data storage method. The data storage method may include steps S310 to S360.
[0090] Step S310: when a screen capture operation is detected, multimedia data corresponding to the content currently displayed by the electronic device is obtained, where the multimedia data includes image data or video data.
[0091] Step S320: Determine a designated application corresponding to the multimedia data.
[0092] Among them, step S310 and step S320 have been introduced in detail in the above embodiments and will not be repeated here.
[0093] Step S330: Find whether there is a historical storage space that is the same as the storage space corresponding to the specified application.
[0094] It is understandable that if the multimedia data corresponding to the specified application has been obtained previously, the historical storage space should include the storage space corresponding to the specified application, so there is no need to establish the specified storage space at this time, but the storage space corresponding to the specified application can be directly called as the designated storage space.
[0095] Specifically, it is possible to first check whether there is a historical storage space that is the same as the storage space corresponding to the specified application. If not, the process may jump to step S340; if so, the process may jump to step S350.
[0096] In some implementations, when step S330 is executed, it may specifically include steps S331 to S333.
[0097] Step S331: traverse the history identifiers of each of the history storage spaces to determine whether there is a history identifier that is the same as the designated identifier of the designated storage space.
[0098] Step S332: If there is a historical identifier that is the same as the designated identifier of the designated storage space, it is determined that there is a historical storage space that is the same as the storage space corresponding to the designated application.
[0099] Step S333: If there is no historical identifier identical to the designated identifier of the designated storage space, it is determined that there is no historical storage space identical to the storage space corresponding to the designated application.
[0100] In some implementations, a storage space may correspond to an identifier, and the identifier may be used to uniquely characterize the storage space. Specifically, a historical storage space may correspond to a historical identifier, and a designated storage space may correspond to a designated identifier. Thus, the historical identifiers of each of the historical storage spaces may be traversed to determine whether there is a historical identifier that is the same as the designated identifier of the designated storage space.
[0101] If there is a history identifier that is the same as the designated identifier of the designated storage space, it is determined that there is a history storage space that is the same as the storage space corresponding to the designated application. If there is no history identifier that is the same as the designated identifier of the designated storage space, it is determined that there is no history storage space that is the same as the storage space corresponding to the designated application.
[0102] Exemplarily, if the historical identifiers of three historical storage spaces are detected, including AppName1, AppName3 and default, respectively, and the designated identifier of the designated storage space includes AppName1, then it can be determined that there is a historical storage space that is the same as the storage space corresponding to the designated application. If the historical identifiers of three historical storage spaces are detected, including AppName1, AppName3 and default, respectively, and the designated identifier of the designated storage space includes AppName2, then it can be determined that there is no historical storage space that is the same as the storage space corresponding to the designated application.
[0103] Step S340: If it does not exist, then create a storage space corresponding to the designated application as the designated storage space.
[0104] Step S350: If it exists, the historical storage space that is the same as the storage space corresponding to the designated application is used as the designated storage space.
[0105] If there is no historical storage space identical to the storage space corresponding to the designated application, a storage space corresponding to the designated application may be created as the designated storage space. After the designated storage space is determined, the process may jump to step S360.
[0106] If there is a historical storage space that is the same as the storage space corresponding to the designated application, the historical storage space that is the same as the storage space corresponding to the designated application can be directly used as the designated storage space. After determining the designated storage space, the process can jump to step S360.
[0107] Step S360: Storing the multimedia data in the designated storage space.
[0108] Among them, step S360 has been introduced in detail in the above embodiment and will not be repeated here.
[0109] In the embodiment provided by the present application, before establishing the storage space corresponding to the specified application, it is first determined whether there is already a historical storage space in the historical storage space that is the same as the storage space corresponding to the specified application, thereby avoiding the establishment of a duplicate storage space. Multiple duplicate storage spaces will increase the difficulty for users to subsequently search or call multimedia data, so the implementation method provided by the present application can reduce the difficulty for users to subsequently search or call multimedia data.
[0110] See also Figure 5 , Figure 5 A structural block diagram of a data storage device provided in an embodiment of the present application is shown. The data storage device 500 includes: an acquisition unit 510, a first determination unit 520, a second determination unit 530 and a storage unit 540.
[0111] The acquisition unit 510 is used to acquire multimedia data corresponding to the content currently displayed by the electronic device when a screen capture operation is detected, where the multimedia data includes image data or video data.
[0112] The first determining unit 520 is configured to determine a designated application corresponding to the multimedia data.
[0113] The second determining unit 530 is configured to determine a storage space corresponding to the designated application as the designated storage space.
[0114] Optionally, the second determining unit 530 may also be configured to search whether there is a historical storage space that is the same as the storage space corresponding to the designated application; if not, then establish a storage space corresponding to the designated application as the designated storage space.
[0115] Optionally, the second determining unit 530 may also be configured to use, if available, a historical storage space that is the same as the storage space corresponding to the designated application as the designated storage space.
[0116] Optionally, the second determination unit 530 can also be used to traverse the historical identifier of each of the historical storage spaces to determine whether there is a historical identifier that is identical to the specified identifier of the specified storage space; if there is a historical identifier that is identical to the specified identifier of the specified storage space, it is determined that there is a historical storage space that is identical to the storage space corresponding to the specified application; if there is no historical identifier that is identical to the specified identifier of the specified storage space, it is determined that there is no historical storage space that is identical to the storage space corresponding to the specified application.
[0117] The storage unit 540 is used to store the multimedia data in the designated storage space.
[0118] Optionally, the data storage device 500 may further include a transfer unit ( Figure 5 (not shown), the transfer unit can also be used to generate prompt information based on at least one historical storage space, the prompt information is used to instruct the user to change the storage space storing the multimedia data; determine whether feedback information input by the user based on the prompt information is obtained; if the feedback information is obtained, determine the historical storage space selected by the user based on the feedback information as the target storage space; and store the multimedia data in the target storage space.
[0119] Optionally, the transfer unit may also be configured to keep storing the multimedia data in the designated storage space if the feedback information is not obtained.
[0120] Optionally, the transfer unit can also be used to determine one from multiple historical storage spaces as an alternative storage space; store the multimedia data in the alternative storage space; and establish reference data corresponding to the multimedia data in a historical storage space other than the alternative storage space among the multiple historical storage spaces, wherein the data space occupied by the reference data is smaller than the data space occupied by the multimedia data.
[0121] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0122] In several embodiments provided in the present application, the coupling between the units may be electrical, mechanical or other forms of coupling. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0123] See also Figure 6 , Figure 6 The block diagram of a structure of an electronic device provided in an embodiment of the present application is shown. The electronic device 110 may be a smart phone, a desktop computer, a vehicle-mounted computer, a server or a tablet computer, etc. The electronic device 110 in the present application may include one or more of the following components: a processor 111, a memory 112 and one or more application programs, wherein the processor 111 is electrically connected to the memory 112, and the one or more program configurations are used to execute the methods described in the aforementioned embodiments.
[0124] The processor 111 may include one or more processing cores. The processor 111 uses various interfaces and lines to connect various parts of the entire electronic device 110, and executes various functions and processes data of the electronic device 110 by running or executing instructions, programs, code sets or instruction sets stored in the memory 112, and calling data stored in the memory 112. Optionally, the processor 111 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 111 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and computer programs; the GPU is responsible for rendering and drawing display content; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 111, and it can be implemented separately through a communication chip. Specifically, the method described in the above embodiment can be executed by one or more processors 111.
[0125] For some embodiments, the memory 112 may include a random access memory (RAM) or a read-only memory (ROM). The memory 112 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 112 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the electronic device 110 during use, etc.
[0126] See also Figure 7 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 700 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0127] The computer readable storage medium 700 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 700 includes a non-transitory computer-readable storage medium. The computer readable storage medium 700 has storage space for program code 710 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 710 can be compressed, for example, in an appropriate form.
[0128] Please refer to Figure 8 , which shows a structural block diagram of a computer program product 800 provided in an embodiment of the present application. The computer program product 800 includes a computer program / instruction 810, and when the computer program / instruction 810 is executed by a processor, the steps of the above method are implemented.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A data storage method, characterized in that: Applied to electronic equipment, the method comprises: When a screen capture operation is detected, acquiring multimedia data corresponding to content currently displayed by the electronic device, the multimedia data including image data or video data; Determining a designated application corresponding to the multimedia data; Determine a storage space corresponding to the designated application as the designated storage space; The multimedia data is stored in the designated storage space.
2. The method according to claim 1, characterized in that After storing the multimedia data in the designated storage space, the method further includes: generating prompt information based on at least one historical storage space, the prompt information being used to instruct a user to change the storage space storing the multimedia data; Determining whether feedback information input by the user based on the prompt information is obtained; If the feedback information is obtained, determining the historical storage space selected by the user based on the feedback information as the target storage space; The multimedia data is stored in the target storage space.
3. The method according to claim 2, characterized in that The method further comprises: If the feedback information is not obtained, the multimedia data is stored in the designated storage space.
4. The method according to claim 2, characterized in that: The target storage space includes a plurality of historical storage spaces, and storing the multimedia data in the target storage space includes: Determine one from multiple historical storage spaces as an alternative storage space; storing the multimedia data in the alternative storage space; Reference data corresponding to the multimedia data is established in a historical storage space other than the candidate storage space among a plurality of historical storage spaces, and a data space occupied by the reference data is smaller than a data space occupied by the multimedia data.
5. The method according to claim 1, characterized in that The determining the storage space corresponding to the designated application as the designated storage space includes: Find out whether there is a historical storage space that is the same as the storage space corresponding to the specified application; If it does not exist, a storage space corresponding to the designated application is established as the designated storage space.
6. The method according to claim 5, characterized in that The method further comprises: If it exists, the historical storage space that is the same as the storage space corresponding to the designated application is used as the designated storage space.
7. The method according to claim 5, characterized in that The searching whether there is a history storage space that is the same as the storage space corresponding to the specified application program includes: Traversing the history identifiers of each of the history storage spaces to determine whether there is a history identifier that is the same as the designated identifier of the designated storage space; If there is a history identifier that is the same as the designated identifier of the designated storage space, determining that there is a history storage space that is the same as the storage space corresponding to the designated application; If there is no historical identifier identical to the designated identifier of the designated storage space, it is determined that there is no historical storage space identical to the storage space corresponding to the designated application.
8. A data storage device, characterized in that: Applied to electronic equipment, the device comprises: an acquisition unit, configured to acquire multimedia data corresponding to content currently displayed by the electronic device when a screen capture operation is detected, wherein the multimedia data includes image data or video data; A first determining unit, configured to determine a designated application corresponding to the multimedia data; A second determining unit, configured to determine a storage space corresponding to the designated application as the designated storage space; The storage unit is used to store the multimedia data into the designated storage space.
9. An electronic device, characterized in that: include: one or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 7.