Picture processing method, electronic device and computer readable medium
By classifying terminal image information and establishing synchronized storage locations, the problem of low flexibility in user terminal image storage functions is solved, enabling rapid image classification and synchronization between terminals and improving synchronization performance.
Patent Information
- Application Number
- CN202210076199.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-01-21
AI Technical Summary
Existing user terminal image storage functions have low flexibility and are not easy to synchronize images with other terminals.
By acquiring image information from the terminal, the images are categorized according to their type and transmitted to the synchronization storage location when preset synchronization conditions are met. The images are categorized using target elements, geographic location attributes, and time attributes, and a directory structure is established between the terminal and the cloud platform or computer device for image classification, export, and synchronization.
It enables rapid classification and synchronization of terminal images, improves image synchronization between different terminals, avoids duplicate classification, and enhances the synchronization of image display.
Smart Images

Figure CN114416647B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a picture processing method, an electronic device and a computer readable medium. BACKGROUND
[0002] With the development of computer technology and picture processing technology, user terminals can be used for picture shooting, transmission and storage. For example, a mobile phone has a mobile phone album function. However, the flexibility of the picture storage function of the user terminal is low, and it is not easy to synchronize pictures with other terminals. SUMMARY
[0003] The present disclosure aims to at least solve one of the technical problems in the prior art, and provides a picture processing method, an electronic device and a computer readable medium.
[0004] To achieve the above-mentioned purpose, in a first aspect, the embodiments of the present disclosure provide a picture processing method, comprising:
[0005] obtaining picture information of a picture to be classified of a first terminal, and classifying the picture to be classified into at least one picture category of the first terminal according to the picture information;
[0006] in response to a preset synchronization condition being met, obtaining a synchronization storage location of a second terminal, and determining at least one picture category to be synchronized of the first terminal;
[0007] for each picture category to be synchronized, determining a corresponding storage space of the picture category in the synchronization storage location, and transmitting pictures of the first terminal in the picture category to the storage space.
[0008] In some embodiments, the picture information comprises at least one of a target element in the picture to be classified, a geographical location attribute of the picture to be classified and a time attribute of the picture to be classified;
[0009] the picture category comprises a first category corresponding to the target element, a second category corresponding to the geographical location attribute and a third category corresponding to the time attribute;
[0010] the obtaining picture information of a picture to be classified of a first terminal, and classifying the picture to be classified into at least one picture category of the first terminal according to the picture information, comprises:
[0011] performing at least one of the following steps: identifying the target element in the picture to be classified, determining the first category of the picture to be classified according to the target element, determining the second category of the picture to be classified according to a geographical location attribute of the picture to be classified, determining the third category of the picture to be classified according to a time attribute of the picture to be classified;
[0012] classifying the picture to be classified into at least one determined picture category.
[0013] In some embodiments, after the picture information of the picture to be classified of the first terminal is obtained and the picture to be classified is classified into at least one picture category of the first terminal according to the picture information, the method further comprises:
[0014] receiving a first classification viewing instruction, the classification viewing instruction comprising category filtering information, the category filtering information being used to indicate at least one picture category of the first terminal as a filtering condition;
[0015] querying at least one target picture from pictures in each picture category of the first terminal according to the filtering condition indicated by the category filtering information;
[0016] creating a classification viewing window and rendering at least part of the target picture in the classification viewing window.
[0017] In some embodiments, after the storage space corresponding to each picture category to be synchronized in the synchronization storage location of the second terminal is determined and the pictures of the first terminal in the picture category are transmitted to the storage space, the method further comprises:
[0018] receiving a second classification viewing instruction, the second classification viewing instruction comprising category filtering information, the category filtering information being used to indicate at least one picture category as a filtering condition;
[0019] filtering each storage space in the synchronization storage location of the second terminal according to the filtering condition indicated by the category filtering information, and querying at least one target picture from the filtered storage space;
[0020] creating a classification viewing window and rendering at least part of the target picture in the classification viewing window.
[0021] In some embodiments, after the picture information of the picture to be classified of the first terminal is obtained and the picture to be classified is classified into at least one picture category of the first terminal according to the picture information, the method further comprises:
[0022] In response to the category integration instruction, a new picture category is integrated according to at least part of the picture categories to which the picture to be classified belongs;
[0023] The picture to be classified is classified into the new picture category.
[0024] In some embodiments, the preset synchronization condition comprises at least one of:
[0025] A preset time period has elapsed between the current time and the time of the last picture synchronization;
[0026] A picture synchronization instruction is received from the first terminal or the second terminal;
[0027] A user interaction event for triggering is detected by the first terminal or the second terminal.
[0028] In some embodiments, the second terminal is a cloud platform server, and the synchronization storage location is a cloud platform storage path;
[0029] For each picture category to be synchronized, a corresponding storage space of the picture category in the synchronization storage location is determined, and the pictures of the first terminal in the picture category are transmitted to the storage space, comprising:
[0030] For each picture category to be synchronized, a corresponding folder of the picture category in the cloud platform storage path is determined, and the pictures of the first terminal in the picture category are uploaded to the folder through an application programming interface.
[0031] In some embodiments, before the determination of the corresponding folder of each picture category to be synchronized in the cloud platform storage path and the uploading of the pictures of the first terminal in the picture category to the folder through the application programming interface, the method further comprises:
[0032] According to the directory structure corresponding to all picture categories to be synchronized in the first terminal, a directory structure is established and a folder is created in the cloud platform storage path through the application programming interface.
[0033] In some embodiments, the second terminal is a computer device, and the synchronization storage location is a computer storage path;
[0034] For each picture category to be synchronized, a corresponding storage space of the picture category in the synchronization storage location is determined, and the pictures of the first terminal in the picture category are transmitted to the storage space, comprising:
[0035] For each of the picture categories to be synchronized, a folder corresponding to the picture category under the computer storage path is determined, and pictures of the first terminal under the picture category are transmitted to the folder through a preset protocol.
[0036] In some embodiments, before the above-mentioned step, the method further comprises:
[0037] According to a directory structure corresponding to all the picture categories to be synchronized in the first terminal, a directory structure is established and folders are created under the computer storage path.
[0038] In some embodiments, the computer storage path belongs to an internal memory of the computer device.
[0039] The preset protocol comprises at least one of a wireless network broadcast protocol, a socket-based communication protocol, and a file transfer protocol.
[0040] In some embodiments, the computer storage path belongs to an external memory of the computer device.
[0041] The step of determining, for each of the picture categories to be synchronized, a folder corresponding to the picture category under the computer storage path and transmitting, through a preset protocol, pictures of the first terminal under the picture category to the folder comprises:
[0042] The step of determining, for each of the picture categories to be synchronized, a folder corresponding to the picture category under the computer storage path and transmitting, through a preset protocol, pictures of the first terminal under the picture category to the folder comprises:
[0043] In a second aspect, the embodiments of the present disclosure further provide an electronic device, which comprises:
[0044] One or more processors;
[0045] A memory for storing one or more programs;
[0046] When the one or more programs are executed by the one or more processors, the one or more processors implement the picture processing method according to any one of the above-mentioned embodiments.
[0047] In a third aspect, the embodiments of the present disclosure further provide a computer readable medium having a computer program stored thereon, wherein the program, when executed, implements the steps in the picture processing method according to any one of the above-mentioned embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0048] The accompanying drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and are used to explain the principles of the present disclosure, and do not limit the present disclosure. The above and other features and advantages of the present disclosure will become more apparent from the detailed description in conjunction with the accompanying drawings, in which:
[0049] Figure 1 A flowchart of a picture processing method provided for an embodiment of the present disclosure;
[0050] Figure 2 A flowchart of a specific implementation method for step S1 of an embodiment of the present disclosure;
[0051] Figure 3 A flowchart of another picture processing method provided for an embodiment of the present disclosure;
[0052] Figure 4 A schematic diagram of a relationship table provided for an embodiment of the present disclosure;
[0053] Figure 5 A schematic diagram of a classification viewing window provided for an embodiment of the present disclosure;
[0054] Figure 6 A flowchart of a specific implementation method for step S3 of an embodiment of the present disclosure;
[0055] Figure 7 A flowchart of another specific implementation method for step S3 of an embodiment of the present disclosure;
[0056] Figure 8 A block diagram of an electronic device provided for an embodiment of the present disclosure;
[0057] Figure 9 A block diagram of a non-transitory computer readable storage medium provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0058] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the picture processing method, the electronic device and the computer readable medium provided by the present disclosure will be described in detail below with reference to the accompanying drawings.
[0059] In the following, the example embodiments will be described more fully with reference to the accompanying drawings, but the example embodiments can be embodied in different forms and should not be interpreted as being limited to the embodiments set forth herein. Rather, the purpose of the embodiments is to enable the present disclosure to be thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0060] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0061] It will be understood that, although the terms first, second, etc. can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. Thus, a first element discussed below could be termed a second element without departing from the teachings of the present disclosure.
[0062] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure and will not be interpreted in an overly literal or overly formal sense unless expressly so defined herein.
[0063] Figure 1 A flowchart of a picture processing method provided by an embodiment of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the method comprises the following steps. Figure 1
[0064] In step S1, picture information of a picture to be classified of a first terminal is acquired, and the picture to be classified is classified into at least one picture category of the first terminal according to the picture information.
[0065] In some embodiments, the picture to be classified can be a specific picture selected by a user from pictures stored in the first terminal; the picture to be classified can also be a newly added picture in the first terminal, such as a picture acquired by an image acquisition device (camera, etc.) of the first terminal, a picture received or downloaded by the first terminal through a specific transmission path, etc.; in some embodiments, the first terminal can be a mobile terminal, a personal computer, and other interactive electronic devices.
[0066] In some embodiments, the picture information can include target elements in the picture, geographical location attributes of the picture, time attributes of the picture, etc.; and in some embodiments, the picture information can also include picture format, picture resolution, grayscale distribution of the picture, color distribution of the picture, etc.
[0067] In step S2, in response to the preset synchronization condition being met, a synchronization storage location of the second terminal is obtained, and at least one picture category to be synchronized of the first terminal is determined.
[0068] The synchronization storage location of the second terminal can be a file export root directory corresponding to the pictures in the picture category to be synchronized of the first terminal. In some embodiments, the second terminal can be a server, a mobile terminal, a personal computer, or the like.
[0069] In some embodiments, the preset synchronization condition includes at least one of the following: a preset time period has elapsed between a current time and a time of a last picture synchronization; a picture synchronization instruction issued by the first terminal or the second terminal is received; a user interaction event for triggering is detected by the first terminal or the second terminal. Correspondingly to the preset synchronization condition, the picture synchronization manner between the first terminal and the second terminal includes: periodically performing picture synchronization; picture synchronization initiated by any one of the first terminal and the second terminal; picture synchronization triggered based on a user interaction event, which can include pressing or clicking a specific button or area, a specific touch behavior, and a specific expression or body movement collected by a graphic collection device.
[0070] In step S3, for each picture category to be synchronized, a storage space corresponding to the picture category in the synchronization storage location is determined, and the pictures of the first terminal in the picture category are transmitted to the storage space.
[0071] Correspondingly, the storage spaces corresponding to the picture categories in the synchronization storage location of the second terminal are different from each other, thereby realizing picture classification export and synchronization.
[0072] The embodiments of the present disclosure provide a picture processing method, which includes classifying pictures to be classified of a first terminal, and performing picture classification export between the first terminal and a second terminal based on picture categories of the first terminal, so as to realize rapid classification of pictures on the first terminal, and export pictures of one terminal according to picture categories, so that another terminal for picture synchronization can learn the classification structure of the pictures, improve synchronization, and avoid repeated classification of the same pictures on different terminals.
[0073] Figure 2A specific implementation method flowchart of step S1 of the embodiments of the present disclosure. Specifically, the picture information includes at least one of a target element in the picture to be classified, a geographical location attribute of the picture to be classified, and a time attribute of the picture to be classified; the picture category includes a first category corresponding to the target element, a second category corresponding to the geographical location attribute, and a third category corresponding to the time attribute; as shown in Figure 2 Step S1, obtaining picture information of a picture to be classified of a first terminal, and classifying the picture to be classified into at least one picture category of the first terminal according to the picture information, includes:
[0074] At least one of steps S101, S102, and S103 is performed:
[0075] Step S101, identifying a target element in the picture to be classified, and determining a first category of the picture to be classified according to the target element.
[0076] Wherein, the target element is an image element that can be recognized based on a corresponding target recognition algorithm, which is obtained based on image data of the picture to be classified; the target element can include a portrait, food, natural scenery, an animal, text, etc., and the first category can also be named by the above-mentioned target element category name; in some embodiments, the picture to be classified includes multiple target elements, and accordingly, it can correspond to multiple first categories; in some embodiments, the target element can not only be recognized in real time based on the corresponding target recognition algorithm, but also can exist in the form of special fields or identifiers as additional data, so that the target element in the picture to be classified can also be obtained by direct reading.
[0077] Step S102, determining a second category of the picture to be classified according to a geographical location attribute of the picture to be classified.
[0078] Step S103, determining a third category of the picture to be classified according to a time attribute of the picture to be classified.
[0079] Wherein, the geographical location attribute and the time attribute are additional data, for example, when the picture to be classified is obtained by an image acquisition device of the first terminal, the first terminal can obtain the geographical location at the time of shooting based on its positioning module and corresponding positioning algorithm and attach it in the picture, and the first terminal can obtain the system time and attach it in the picture.
[0080] In some embodiments, the geographical location attribute can include information such as the country, province, city, district, and county, and can also include information such as latitude, longitude, and altitude, and the second category can use any one of the above-mentioned geographical location attribute categories; similar to the first category, the picture information of the picture to be classified can carry the above-mentioned multiple geographical location attributes of the latitude, and accordingly, it can correspond to multiple second categories.
[0081] In some embodiments, the time attribute can include year, month, day, etc. information, which can also include time zone, current adoption of summer time or winter time, etc. information, and the third category can adopt any of the above-mentioned time attribute categories; similar to the first category and the second category, the picture information of the picture to be classified can carry the above-mentioned multiple latitude time attributes, which can correspond to multiple third categories.
[0082] Further, after performing at least one of the step S101, the step S102 and the step S103, the method further comprises a step S104.
[0083] The step S104 classifies the picture to be classified into the determined at least one picture category.
[0084] The picture to be classified can be classified into the determined picture category for storage; in some embodiments, it can be understood that the picture to be classified has only one storage path in the first terminal, and it can correspond to multiple picture categories, and the user can view the picture to be classified in each corresponding picture category.
[0085] In some embodiments, after the step of obtaining the picture information of the picture to be classified of the first terminal and classifying the picture to be classified into at least one picture category of the first terminal according to the picture information in the step S1, the method further comprises: in response to a category integration instruction, integrating at least part of the picture categories to which the picture to be classified belongs to generate a new picture category; and classifying the picture to be classified into the new picture category. The original picture categories can be reflected in the new picture category in the form of picture category labels, and the category integration instruction can be used to indicate the integration of specific picture categories to which the picture to be classified belongs. Specifically, when the picture to be classified corresponds to multiple picture categories, such as when the multiple picture categories to which the picture to be classified corresponds are determined based on at least two of the steps S101 to S103, a new picture category can also be created, the new picture category created covers the determined picture categories, and the picture to be classified can belong to the newly created picture category after classification.
[0086] Figure 3 A flowchart of another picture processing method provided by the embodiments of the present disclosure. Specifically, the method is based on Figure 1 An embodiment of the method shown in FIG. 1; as Figure 3 The method not only includes the steps S1 to S3, but also includes the steps S105 to S107 after the step S1 of obtaining the picture information of the picture to be classified of the first terminal and classifying the picture to be classified into at least one picture category of the first terminal according to the picture information. Only the steps S105 to S107 will be described in detail below.
[0087] The step S105 receives a classification viewing instruction.
[0088] The category viewing instruction includes category filter information, and the category filter information is used to indicate at least one picture category of the first terminal as a filter condition.
[0089] Specifically, if the category viewing instruction is received in the case of the method shown in the figure, since the first categories corresponding to all the pictures of the first terminal can be different, the second categories can be different, and the third categories can be different, for the picture categories of the first terminal, which include multiple first categories, second categories and third categories, the picture category indicated by the category filter information can be all the first categories, or all the second categories, or all the third categories, of course, the picture category indicated by the category filter information can be one or more specific first categories, or one or more specific second categories, or one or more specific second categories. Figure 2 In some embodiments, the user can determine the picture category as the filter condition through the graphical interaction interface, and thus the corresponding category viewing instruction can be generated.
[0090] Step S106, querying at least one target picture from the pictures under each picture category of the first terminal according to the filter condition indicated by the category filter information.
[0091] Step S107, creating a category viewing window and rendering at least part of the target pictures in the category viewing window.
[0092] In which, the pictures that completely or partially meet the filter condition are selected from the pictures under each picture category of the first terminal as target pictures, and are presented in the category viewing window. Specifically, before rendering, the number of target pictures that need to be rendered can be determined according to the size of the category viewing window, the overall size of the interaction interface and the size of each target picture, all target pictures can be rendered, or there can be cases of partial target image thumbnail display or no display.
[0093]
[0094] Specifically, steps S105 to S107 correspond to picture classification viewing on the first terminal side, and in some embodiments, similarly, correspond to picture classification viewing on the second terminal side. After step S3, for each picture category to be synchronized, the corresponding storage space of the picture category under the synchronization storage location is determined, and the pictures of the first terminal under the picture category are transmitted to the storage space, the method further comprises: receiving a second classification viewing instruction, the second classification viewing instruction comprising category filtering information, the category filtering information being used to indicate at least one picture category as a filtering condition; filtering each storage space under the synchronization storage location of the second terminal according to the filtering condition indicated by the category filtering information, and querying at least one target picture from the filtered storage spaces; creating a classification viewing window, and rendering at least part of the target pictures in the classification viewing window. Wherein, each storage space under the synchronization storage location of the second terminal has a corresponding relationship with the picture category, and the storage space storing the corresponding target picture can be filtered from each storage space according to the filtering condition indicated by the category filtering information.
[0095] Figure 4 A schematic diagram of a relationship table is provided for the embodiments of the present disclosure. As shown in Figure 4 , it shows the case when the picture information of the first terminal is saved and queried based on a database form, the database relationship table comprises a classification table, a property table, and a picture property relationship table, wherein the field name corresponding to the classification table is "t_classifcation", the field name corresponding to the property table is "t_properties", and the field name corresponding to the picture property relationship table is "t_image_properties_relation". In the classification table, it includes a primary key, a picture category name, a target element identifier, a location, a start time, and an end time, and the field names corresponding to the above parameters are "id", "name", "property_id", "position", "start_time", and "end_time" in sequence; in the property table, it includes a primary key and a target element name, and the field names corresponding to the above parameters are "id" and "name" in sequence; in the picture property relationship table, it includes a primary key, a picture name, a picture path, a first category identifier, a second category, and a third category, and the field names corresponding to the above parameters are "id", "image_name", "image_url", "property_id", "position", and "time" in sequence, wherein the first category identifier corresponds to the target element identifier in the classification table, the second category corresponds to the location in the classification table, and the third category corresponds to the start time and the end time in the classification table; Figure 4The above parameters also correspond to data types, including integer (int), string (varchar), and date and time (datetime). When performing the classified viewing, a set of picture category names to be displayed is generated according to the filtering conditions indicated by the category filtering information, and the target element identifier, location, start time, and end time in the classification table; the set of picture category names is traversed, the picture attribute relationship table is queried according to the target element identifier, location, start time, and end time corresponding to each picture category name in the classification table, so as to query the picture name and picture path of the target picture; and the classified viewing window is created according to each picture category name in the set of picture category names, and all target pictures are rendered in each classified viewing window according to the picture name and picture path of the target picture.
[0096] Figure 5 A schematic diagram of a classified viewing window is provided for the embodiments of the present disclosure. As shown in (a), an example is shown in which the filtering condition is a specific first category, and the interface includes six classified viewing windows, each corresponding to a filtering condition of face, text, food, scenery, animal, and expression package. The lower left corner of the classified viewing window shows the filtering condition of the window, and the number of all pictures corresponding to the filtering condition of the window. The lower right corner of the classified viewing window shows the synchronization state of the pictures in the window, and the upper part shows the thumbnail (represented by a filled pattern in the drawing) of the pictures after rendering. Figure 5 Figure 5 As shown in (b), an example is shown in which the filtering condition is a specific second category, and the form of the classified viewing window is similar to that in (a), and each classified viewing window corresponds to a filtering condition of a certain country or a certain city.
[0097] Figure 6 A specific implementation method flowchart is provided for step S3 of the embodiments of the present disclosure. Specifically, the second terminal is a cloud platform server, and the synchronization storage location is a cloud platform storage path. As shown in (a), step S3, for each picture category to be synchronized, determining the storage space corresponding to the picture category under the synchronization storage location, and transmitting the pictures of the first terminal under the picture category to the storage space, includes step S302a. Figure 6
[0098] Step S302a, for each picture category to be synchronized, determining the folder corresponding to the picture category under the cloud platform storage path, and uploading the pictures of the first terminal under the picture category to the folder through an application programming interface.
[0099] The application programming interface (API) is also called application programming interface. The application programming interface is created on the cloud platform, and the use permission of the application programming interface is applied. Thus, the application programming interface can be called to realize synchronization of the pictures to the cloud platform.
[0100] In some embodiments, as shown in FIG. 3a, for each picture category to be synchronized, the step of determining the corresponding folder of the picture category under the cloud platform storage path before the step of uploading the pictures of the first terminal under the picture category to the folder through the application programming interface includes step S301a. Figure 5
[0101] Step S301a, according to the directory structure corresponding to all the picture categories to be synchronized in the first terminal, a directory structure is established and a folder is created under the cloud platform storage path through the application programming interface.
[0102] According to the directory structure of the first terminal, the same directory structure is established under the cloud platform storage path, so that more intuitive and convenient picture classification synchronization can be realized, and the picture classification display and presentation mode can be the same in the first terminal and the cloud platform, which can enhance the synchronization of picture display.
[0103] Figure 7 Another specific implementation method flow chart of step S3 of the embodiment of the present disclosure. Specifically, the second terminal is a computer device, and the synchronization storage location is a computer storage path; as shown in FIG. 3b, for each picture category to be synchronized, the step of determining the corresponding storage space of the picture category under the synchronization storage location and transmitting the pictures of the first terminal under the picture category to the storage space includes step S302b. Figure 8
[0104] Step S302b, for each picture category to be synchronized, the corresponding folder of the picture category under the computer storage path is determined, and the pictures of the first terminal under the picture category are transmitted to the folder through a preset protocol.
[0105] In some embodiments, the first terminal is a mobile terminal, and the second terminal is a computer device (such as a personal computer). A connection is established based on a mobile terminal program and a computer client program. The storage path of the picture is confirmed on the computer end through the computer client program, and directory query, creation, folder query, creation and other operations are performed. Then, the picture is transmitted through a preset protocol.
[0106] In some embodiments, the computer storage path belongs to an internal memory of the computer device; the preset protocol comprises at least one of a wireless network broadcast (Wifi Broadcast) protocol, a socket-based communication protocol, and a file transfer protocol (FTP).
[0107] Alternatively, in some embodiments, the computer storage path belongs to an external memory of the computer device; and the step of transmitting, for each picture category to be synchronized, the pictures of the first terminal under the picture category to the folder corresponding to the picture category under the computer storage path through the preset protocol comprises the following steps: determining, for each picture category to be synchronized, a folder corresponding to the picture category under the storage path of the external memory, and copying the pictures of the first terminal under the picture category to the folder through an interface protocol corresponding to the external memory, wherein the external memory can be a universal serial bus (USB) storage device or the like.
[0108] In some embodiments, as shown in FIG. 3b, before the step of determining, for each picture category to be synchronized, a folder corresponding to the picture category under the computer storage path and transmitting, through the preset protocol, the pictures of the first terminal under the picture category to the folder, the method further comprises the following step S301b. Figure 7
[0109] The step S301b comprises the following steps: establishing a directory structure under the computer storage path according to a directory structure corresponding to all the picture categories to be synchronized in the first terminal, and creating a folder.
[0110] In the step S301b, the same directory structure is established under the computer storage path according to the directory structure of the first terminal, so that more intuitive and convenient picture classification synchronization can be achieved, and the picture classification display and presentation can be the same on the first terminal and the computer terminal, thereby enhancing the synchronization of picture display.
[0111] The graphical processing method provided by the embodiments of the present disclosure will be described in detail below in combination with actual applications.
[0112] Specifically, the first terminal is a mobile terminal. For the picture to be classified in the first terminal, a target element in the picture to be classified is recognized, a first category of the picture to be classified is determined according to the target element, a second category of the picture to be classified is determined according to a geographical position attribute of the picture to be classified, and a third category of the picture to be classified is determined according to a time attribute of the picture to be classified. The picture to be classified is classified into the determined first category, second category, and third category, respectively.
[0113] In an embodiment, the second terminal is a cloud platform server. The cloud platform is registered as a developer in advance, a cloud platform application is created, an application program interface permission corresponding to a personal cloud storage service is opened, and an application program interface mark and key are recorded. Thereafter, a dependent package corresponding to the mobile terminal is downloaded and integrated in the cloud platform application. After a user uses the mobile terminal to connect to the cloud platform application through the mobile terminal program and logs in to the cloud platform, an access token is obtained. Thereafter, the picture can be uploaded through the opened application program interface. When the picture is synchronized, the name of each picture category to be synchronized is obtained through the mobile terminal program, and the corresponding directory structure in the mobile terminal is obtained. According to the directory structure, a directory structure is established and a folder is created under the cloud platform storage path through the application program interface. For each picture category to be synchronized of the mobile terminal, the folder corresponding to the picture category under the cloud platform storage path is determined, the storage path of the picture under the picture category in the mobile terminal is determined, and the picture under the picture category is uploaded to the folder corresponding to the cloud platform terminal through the application program interface.
[0114] In another embodiment, the second terminal is a computer device. A corresponding client program is installed in the computer device, and the mobile terminal program of the mobile terminal and the computer client program can be connected. When the picture is synchronized, the name of each picture category to be synchronized is obtained through the mobile terminal program, and the corresponding directory structure in the mobile terminal is obtained. According to the directory structure, a directory structure is established and a folder is created under the computer storage path through the computer client program. For each picture category to be synchronized of the mobile terminal, the folder corresponding to the picture category under the computer storage path is determined, the storage path of the picture under the picture category in the mobile terminal is determined, and the picture under the picture category is transmitted to the folder of the computer terminal through the preset protocol.
[0115] Figure 8 A composition block diagram of an electronic device is provided for the embodiments of the present disclosure. As shown in Figure 8 the electronic device includes:
[0116] one or more processors 101;
[0117] a memory 102, on which one or more programs are stored, when the one or more programs are executed by the one or more processors, the one or more processors 101 implement the picture processing method of any of the above embodiments;
[0118] one or more I / O interfaces 103 connected between the processor and the memory, configured to realize information interaction of the processor and the memory.
[0119] The processor 101 is a device with data processing capability, including but not limited to a central processing unit (CPU) and the like; the memory 102 is a device with data storage capability, including but not limited to a random access memory (RAM, more specifically SDRAM, DDR, etc.), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory (FLASH), and the like; the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus) and the like.
[0120] In some embodiments, the processor 101, the memory 102 and the I / O interface 103 are connected to each other through the bus 104, and further connected to other components of the computing device.
[0121] In some embodiments, the plurality of processors 101 includes a plurality of graphic processors (GPUs), which are combined to form a graphic processor array.
[0122] Figure 9 A constituent block diagram of a non-transitory computer-readable storage medium provided by an embodiment of the present disclosure is provided. The computer-readable medium stores a computer program, wherein the computer program, when executed by a processor, implements the picture processing method of any of the above embodiments.
[0123] Those of ordinary skill in the art will realize and understand that all or some of the steps in the methods disclosed above and the functional modules / units in the apparatuses can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be performed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer-readable media, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, it is common knowledge to those of ordinary skill in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
[0124] Example embodiments have been disclosed herein and, although the use of specific terms is expressly used herein, they are intended in a generic sense only and are not intended to limit the scope of the present disclosure. In some instances, it will be apparent to those skilled in the art that features, characteristics or / and elements described in connection with a particular embodiment can be used in conjunction with other embodiments unless otherwise explicitly stated. As such, those skilled in the art will appreciate that various changes can be made in form and detail without departing from the scope of the disclosure as set forth in the appended claims.
Claims
1. An image processing method, wherein, include: The image information of the image to be classified in the first terminal is obtained, and the image to be classified is classified into at least one image category of the first terminal according to the image information; the image to be classified has only one storage path in the first terminal, and the image to be classified corresponds to multiple image categories; In response to the satisfaction of preset synchronization conditions, the synchronization storage location of the second terminal is obtained, and at least one image category to be synchronized on the first terminal is determined; For each image category to be synchronized, determine the storage space corresponding to that image category under the synchronization storage location, and transfer the images of the first terminal under that image category to that storage space; Receive a second category viewing instruction, the second category viewing instruction including category filtering information, the category filtering information being used to indicate that at least one of the image categories is used as a filtering condition; According to the filtering conditions indicated by the category filtering information, each of the storage spaces under the synchronous storage location of the second terminal is filtered, and at least one target image is obtained from the filtered storage space; Create a category view window and render at least a portion of the target image in the category view window.
2. The image processing method according to claim 1, wherein, The image information includes at least one of the following: the target element in the image to be classified, the geographic location attribute of the image to be classified, and the time attribute of the image to be classified. The image categories include: a first category corresponding to the target element, a second category corresponding to the geographic location attribute, and a third category corresponding to the time attribute; The step of obtaining image information of the image to be classified from the first terminal, and classifying the image to be classified into at least one image category of the first terminal based on the image information, includes: Perform at least one of the following steps: identify the target element in the image to be classified; determine the first category of the image to be classified based on the target element; determine the second category of the image to be classified based on the geographic location attribute of the image to be classified; and determine the third category of the image to be classified based on the time attribute of the image to be classified. The images to be classified are assigned to at least one of the determined image categories.
3. The image processing method according to claim 1, wherein, After obtaining image information of the image to be classified from the first terminal and classifying the image to be classified into at least one image category of the first terminal based on the image information, the method further includes: Receive a first category viewing instruction, the first category viewing instruction including category filtering information, the category filtering information being used to indicate that at least one of the image categories is used as a filtering condition; Based on the filtering conditions indicated by the category filtering information, at least one target image is obtained from the images under each of the image categories of the first terminal; Create a category view window and render at least a portion of the target image in the category view window.
4. The image processing method according to claim 1, wherein, After obtaining image information of the image to be classified from the first terminal and classifying the image to be classified into at least one image category of the first terminal based on the image information, the method further includes: In response to a category integration instruction, a new image category is generated by integrating at least a portion of the image categories to which the image to be classified belongs; The image to be classified is then assigned to this new image category.
5. The image processing method according to claim 1, wherein, The preset synchronization conditions include at least one of the following: A preset time interval has been elapsed between the current moment and the last time the image was synchronized; Receives an image synchronization command from the first terminal or the second terminal; The user interaction event to be triggered is detected by the first terminal or the second terminal.
6. The image processing method according to claim 1, wherein, The second terminal is a cloud platform server, and the synchronized storage location is a cloud platform storage path; For each image category to be synchronized, determining the storage space corresponding to that image category at the synchronization storage location, and transferring the images of that image category from the first terminal to that storage space, includes: For each image category to be synchronized, determine the folder corresponding to that image category under the cloud platform storage path, and upload the images of that image category from the first terminal to that folder through the application programming interface.
7. The image processing method according to claim 6, wherein, Before determining the folder corresponding to each image category under the cloud platform storage path for each image category to be synchronized, and uploading the images of that image category from the first terminal to that folder via the application programming interface, the method further includes: Based on the directory structure corresponding to all the image categories to be synchronized in the first terminal, the directory structure is established and folders are created under the cloud platform storage path through the application programming interface.
8. The image processing method according to claim 1, wherein, The second terminal is a computer device, and the synchronized storage location is a computer storage path; For each image category to be synchronized, determining the storage space corresponding to that image category at the synchronization storage location, and transferring the images of that image category from the first terminal to that storage space, includes: For each image category to be synchronized, the folder corresponding to that image category under the computer's storage path is determined, and the images of that image category from the first terminal are transferred to that folder using a preset protocol.
9. The image processing method according to claim 8, wherein, Before determining the folder corresponding to each image category under the computer storage path for each image category to be synchronized, and transferring the images of the first terminal under that image category to the folder via a preset protocol, the method further includes: Based on the directory structure corresponding to all the image categories to be synchronized in the first terminal, a directory structure is established and folders are created under the computer storage path.
10. The image processing method according to claim 8, wherein, The computer storage path belongs to the internal memory of the computer device; The preset protocol includes at least one of the following: wireless network broadcast protocol, socket-based communication protocol, and file transfer protocol.
11. The image processing method according to claim 8, wherein, The computer storage path belongs to the external storage of the computer device; For each image category to be synchronized, determining the folder corresponding to that image category under the computer storage path, and transferring the images of that image category from the first terminal to that folder using a preset protocol includes: For each image category to be synchronized, determine the folder corresponding to that image category under the storage path of the external storage, and copy the images of that image category from the first terminal to that folder through the interface protocol corresponding to the external storage.
12. An electronic device comprising: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described in any one of claims 1-11.
13. A non-transient computer-readable storage medium having a computer program stored thereon, wherein, When the program is executed, it implements the steps in the image processing method as described in any one of claims 1-11.
Citation Information
Patent Citations
Folder write-in monitoring based synchronous file storage method
CN102622392A
Picture classification method and device
CN104077312A
Image processing method and device, computer equipment and computer readable storage medium
CN107977431A
Data synchronization method and device, terminal and storage medium
CN112416883A