Image selection method and electronic device
By acquiring and filtering images in electronic devices and displaying target images in a reasonable distribution according to time sequence, the problem of low user satisfaction caused by unreasonable image selection is solved, and the user experience of video generation is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2026-03-31
AI Technical Summary
Inappropriate image selection during video generation by electronic devices can lead to low user satisfaction with the generated video.
By acquiring multiple first candidate images distributed across non-overlapping time periods, multiple first target images are determined and displayed in chronological order to ensure the temporal continuity of the images. Target duration, target ratio, and a filtering mechanism are used to select appropriate target images.
It improves the user experience, enhances the temporal coherence of images in the video and the progression of the storyline, and increases user satisfaction with the generated video.
Smart Images

Figure CN120448568B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more specifically, to an image selection method and an electronic device. Background Technology
[0002] Video is one of the main mediums for people to obtain information and enjoy entertainment in daily life. With the improvement of electronic device hardware performance and the continuous advancement of data processing technology, the demand for quickly generating videos through electronic devices is increasing day by day.
[0003] Many electronic devices are equipped with cameras, allowing users to take photos and videos. These devices also have communication capabilities, enabling them to download images or videos from the internet or receive images or videos sent by other electronic devices. Electronic devices can edit stored images and / or videos to generate videos based on portions of those images and / or videos.
[0004] If the selected images are not appropriate during the video generation process of electronic devices, the user's satisfaction with the generated video may be low. Summary of the Invention
[0005] This application provides an image selection method and an electronic device that, when displaying images to a user in chronological order, enhances the temporal continuity of multiple first target images displayed to the user, thereby improving the user experience.
[0006] In a first aspect, a method is provided for acquiring multiple first candidate images, the multiple first candidate images being distributed across multiple first distribution time periods, the multiple first distribution time periods not overlapping; determining multiple first target images from the multiple first candidate images, the multiple images being distributed across the multiple first distribution time periods, the multiple first target images being used to display to the user in chronological order of the images.
[0007] The method provided in this application selects multiple first target images from multiple first candidate images. The time period of the distribution of the multiple first target images is the same as the time period of the distribution of the multiple first candidate images. That is, the first target images are selected in each first distribution time period of the distribution of the multiple first candidate images. When the images are displayed to the user in the order of the images, the time continuity of the multiple first target images displayed to the user is stronger, which improves the user experience.
[0008] The lengths of these multiple first distribution time periods may be equal or unequal.
[0009] In one possible implementation, the method further includes: determining a target duration based on the time span of the plurality of first candidate images, wherein the target duration is positively correlated with the time span, and the target duration is the length of each of the plurality of first distribution time periods.
[0010] The length of each first distribution time period is positively correlated with the time span of multiple first candidate images. The division of the first distribution time periods is more reasonable, thus the target images selected based on the first distribution time periods are more reasonable, improving the user experience.
[0011] In one possible implementation, the number of targets corresponding to each of the plurality of first distribution time periods is positively correlated with the target ratio corresponding to the first distribution time period. The number of targets corresponding to each first distribution time period represents the number of first target images belonging to the first distribution time period, and the target ratio corresponding to each first distribution time period is the ratio of the number of first candidate images belonging to the first distribution time period to the number of the plurality of first candidate images.
[0012] The number of first target images in each first distribution time period is determined by the proportion of the number of first candidate images in each first distribution time period to the total number of first candidate images, i.e., the target ratio corresponding to that first distribution time period. The number of first target images in each first distribution time period is positively correlated with the target ratio corresponding to that first distribution time period. This allows for the selection of more first target images in first distribution time periods with a large number of first candidate images and fewer first target images in first distribution time periods with a small number of first candidate images. These multiple first target images are more representative of the multiple first candidate images, making the determined multiple first target images more reasonable and improving the user experience.
[0013] In one possible implementation, determining a plurality of first target images from the plurality of first candidate images includes: determining a plurality of second candidate images from the plurality of first candidate images, wherein the number of second images corresponding to each first distribution time period in the plurality of first distribution time periods is positively correlated with the target ratio corresponding to the first distribution time period, the number of second images corresponding to each first distribution time period represents the number of second candidate images belonging to the first distribution time period, and the number of the plurality of second candidate images is less than or equal to a first preset number; filtering the plurality of second candidate images to obtain a plurality of third candidate images; and determining the plurality of first target images from the plurality of third candidate images, wherein the number of the plurality of first target images is less than or equal to the first preset number.
[0014] When multiple target images are obtained through screening, setting a first preset number to limit the number of images to be screened can reduce the computational resource consumption of screening and improve processing efficiency.
[0015] In one possible implementation, the method further includes: determining the number of time periods corresponding to each first distribution time period based on the target ratio corresponding to each first distribution time period and the second preset number, wherein the number of time periods corresponding to each first distribution time period is positively correlated with the target ratio corresponding to the first distribution time period, and the sum of the number of time periods corresponding to the plurality of distribution time periods is the second preset number; determining the plurality of first target images among the plurality of third candidate images includes: determining a second preset number of first target images among the plurality of third candidate images when the number of third images corresponding to each first distribution time period is greater than or equal to the number of time periods corresponding to the first distribution time period, wherein the number of third images corresponding to each first distribution time period represents the number of third candidate images belonging to the first distribution time period, and the target number corresponding to each first distribution time period is the number of time periods corresponding to the first distribution time period.
[0016] Multiple third candidate images are obtained by filtering multiple second candidate images, and the number of third candidate images may be less than the number of second candidate images. When it is necessary to determine a second preset number of first target images, after filtering, it can be determined whether the third candidate images in each first distribution time period meet the requirement for the number of first target images selected. If the determination result is that the requirement is met, multiple first target images are determined from the multiple third candidate images. The requirement for the number of first target images selected can be that the number of third images corresponding to each first distribution time period is greater than or equal to the number of time periods corresponding to that first distribution time period.
[0017] In one possible implementation, determining the plurality of first target images for displaying to the user in chronological order from the plurality of first candidate images further includes: if there is a supplementary selection time period in the plurality of first distribution time periods, determining at least one second candidate image belonging to the supplementary selection time period again from the plurality of first candidate images other than the plurality of second candidate images, wherein the number of third images corresponding to the supplementary selection time period is less than the number of time periods corresponding to the supplementary selection time period; performing the filtering on the at least one second candidate image determined again to obtain the plurality of updated third candidate images; determining the plurality of first target images from the plurality of third candidate images includes: determining the plurality of first target images from the updated plurality of third candidate images.
[0018] If the number of first target images selected does not meet the requirement, i.e., there is a supplementary selection period within the multiple first distribution time periods, at least one second candidate image belonging to the supplementary selection period can be determined again from the multiple first candidate images other than the multiple second candidate images. After determining at least one second candidate image belonging to the supplementary selection period again, the at least one second candidate image in the newly determined supplementary selection period can be filtered to obtain an updated third candidate image. Thus, multiple first target images can be determined from the updated multiple third candidate images.
[0019] In one possible implementation, determining the plurality of first target images among the plurality of third candidate images includes: determining the existence of the supplementary selection time period when the number of the plurality of third candidate images is less than the second preset number; determining at least one second candidate image belonging to the supplementary selection time period again among the plurality of first candidate images other than the plurality of second candidate images includes: determining a plurality of second candidate images again among the plurality of first candidate images other than the plurality of second candidate images, wherein the plurality of second candidate images determined again are distributed in the plurality of first distribution time periods; determining the plurality of first target images among the plurality of third candidate images further includes: comparing the number of third images corresponding to each first distribution time period with the number of time periods corresponding to the first distribution time period when the number of the plurality of third candidate images is greater than or equal to the second preset number to determine whether the supplementary selection time period exists; determining at least one second candidate image belonging to the supplementary selection time period again among the plurality of first candidate images other than the plurality of second candidate images includes: determining at least one second candidate image belonging to the supplementary selection time period again among the plurality of first candidate images other than the plurality of second candidate images and belonging to the supplementary selection time period when the number of the plurality of third candidate images is greater than or equal to the second preset number.
[0020] When the number of multiple third candidate images is less than the second preset number, there may be a large number of supplementary selection time periods. In this case, it is no longer necessary to compare the number of third images with the number of time periods for each first distribution time period. When the number of multiple third candidate images is less than the second preset number, multiple second candidate images distributed across multiple first distribution time periods can be determined again from multiple first candidate images other than the multiple second candidate images, thereby reducing the processing resources and processing time required to determine whether there are supplementary selection time periods.
[0021] If the number of multiple third candidate images is greater than or equal to the second preset number, the supplementary selection time period can be determined by comparing the number of third images with the number of time periods for each first distribution time period. Therefore, when determining the second candidate image again, the second candidate image can be selected within this supplementary selection time period.
[0022] In one possible implementation, when the number of the plurality of third candidate images is less than the second preset number, the number of the plurality of second candidate images determined again belonging to each first distribution time period is positively correlated with the target ratio corresponding to the first distribution time period.
[0023] The multiple second candidate images that are re-determined are more representative of the multiple first candidate images, thereby making the multiple first target images more representative of the multiple first candidate images, making the multiple first target images more reasonable, and improving the user experience.
[0024] In one possible implementation, determining the plurality of first target images from the plurality of third candidate images further includes: if there is a supplementary selection time period in the plurality of first distribution time periods, and there are no images other than the second candidate images in the first candidate images belonging to the supplementary selection time period, then if the plurality of third candidate images are distributed in the plurality of first distribution time periods, the plurality of first target images are determined from the plurality of third candidate images.
[0025] In one possible implementation, the method further includes: if there is a supplementary selection time period in the plurality of first distribution time periods, and there is no image other than the second candidate image in the first candidate image belonging to the supplementary selection time period, if the plurality of third candidate images are distributed in the plurality of second distribution time periods, then a plurality of second target images are determined in the plurality of third candidate images, wherein the plurality of second distribution time periods are part of the plurality of first distribution time periods, the plurality of second target images are distributed in the plurality of second distribution time periods, and the plurality of second target images are used to display to the user in the chronological order of the images.
[0026] If, during a certain supplementary selection time period, no first candidate image other than the second candidate image exists for the first candidate image, and none of the selected third candidate images belong to that specific supplementary selection time period, then multiple second target images can be determined from these third candidate images. These second target images are distributed across various second distribution time periods outside of the specific supplementary selection time period. Alternatively, if the third candidate images are distributed only within a portion of the multiple first distribution time periods, then second target images can be determined from these third candidate images. These second target images can be distributed within that portion of the time period, thus maximizing the similarity between the time periods of the second target images and the time periods of the first candidate images. This results in stronger temporal continuity of the images displayed to the user when presenting the second target images in chronological order, thereby improving the user experience.
[0027] In one possible implementation, filtering the plurality of second candidate images to obtain a plurality of third candidate images includes: filtering based on the similarity between the plurality of second candidate images, wherein the similarity between the plurality of third candidate images is less than or equal to a preset similarity threshold; the filtering of the at least one second candidate image determined again to obtain updated plurality of third candidate images further includes: filtering the plurality of second candidate images after addition processing to obtain the updated plurality of third candidate images, wherein the addition processing is obtained by adding the third candidate images to the at least one second candidate image determined again, and the similarity between the updated plurality of third candidate images is less than or equal to the preset similarity threshold.
[0028] During the similarity-based filtering of the reselected candidate images, the influence of the previous filtering results is considered to ensure that no images similar to those in the previous filtering results are included in the reselected candidate images. This effectively avoids the occurrence of similar images among multiple first target images, improving the effectiveness of the filtering.
[0029] Furthermore, the third candidate image is an image that has already been filtered. Compared to adding an unfiltered second candidate image to the at least one second candidate image that has been determined again, adding the third candidate image to the at least one second candidate image that has been determined again, and filtering the multiple second candidate images after the addition process, improves processing efficiency.
[0030] In one possible implementation, the plurality of first candidate images are images whose similarity to the conditional information is greater than or equal to a preset similarity threshold, and the plurality of first candidate images have different similarities to the conditional information; the plurality of second candidate images are the plurality of images among the plurality of first candidate images that have the highest similarity to the conditional information.
[0031] In other words, multiple second candidate images can be determined from multiple first candidate head images in order of decreasing similarity. This method ensures that the second candidate images better match the conditional information, thereby improving the accuracy of the determined target images.
[0032] In one possible implementation, if the plurality of first candidate images are images that meet the condition information, and the condition information is time and / or location, the plurality of second candidate images are a plurality of images randomly selected from the plurality of first candidate images.
[0033] Since the conditional information only includes time and / or location, the first candidate images with the same time or location may be clustered together in the sorting of multiple first candidate images. By randomly selecting multiple second candidate images from the multiple first candidate images, the multiple second candidate images are made more representative of the multiple first candidate images, thereby making the multiple first target images more representative of the multiple first candidate images, the determined multiple first target images more reasonable, and improving the user experience.
[0034] In one possible implementation, the method further includes generating a target video based on the plurality of first target images in chronological order.
[0035] Secondly, an image selection apparatus is provided, including a unit for performing the method of the first aspect. This apparatus may be a terminal device or a chip within the terminal device.
[0036] Thirdly, an electronic device is provided, including one or more processors and a memory; the memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to cause the electronic device to perform the method of the first aspect.
[0037] Fourthly, a chip system is provided, the chip system being applied to an electronic device, the chip system including one or more processors, the one or more processors being configured to invoke computer instructions to cause the electronic device to perform the method of the first aspect.
[0038] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method of the first aspect.
[0039] In a sixth aspect, a computer program product is provided that, when the computer program product is run on an electronic device, causes the electronic device to perform the method of the first aspect. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of a hardware system for an electronic device applicable to this application;
[0041] Figure 2 This is a schematic diagram of a software system applicable to the apparatus of this application;
[0042] Figure 3 This is a schematic diagram of the graphical user interface provided in the embodiments of this application;
[0043] Figure 4 This is a schematic flowchart illustrating an image selection method provided in an embodiment of this application;
[0044] Figure 5 This is a schematic flowchart of another image selection method provided in the embodiments of this application;
[0045] Figure 6 This application provides a method for determining a time period in an image selection method.
[0046] Figure 7 This is a schematic diagram of the image data provided in the application embodiment;
[0047] Figure 8 This is a schematic flowchart of a video generation method provided in an embodiment of this application;
[0048] Figure 9 This is another graphical user interface diagram provided in the embodiments of this application;
[0049] Figure 10 This is a schematic structural diagram of an image selection device provided in this application. Detailed Implementation
[0050] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0051] This application provides a method for adjusting video duration, which can be applied to electronic devices such as tablets, mobile phones, wearable devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application does not limit the specific type of electronic device.
[0052] Figure 1 A schematic diagram of an electronic device is shown. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0053] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0054] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, processor 110 is used to execute the image selection method in the embodiments of this application.
[0055] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0056] Internal memory 121 can be used to store computer executable program code, including instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function (such as image playback). Touch sensor 180K, also called a "touch panel," can be disposed on display screen 194. Touch sensor 180K and display screen 194 together form a touch screen, also called a "touch screen." Touch sensor 180K is used to detect touch operations applied to or near it. Touch sensor can transmit the detected touch operation to application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be disposed on the surface of electronic device 100, in a different location than display screen 194.
[0057] The electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU performs mathematical and geometric calculations and is used for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information. For example, in this embodiment, the process of displaying a target video can be implemented using a GPU.
[0058] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a minimized display, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1. For example, in the embodiments of this application... Figure 3 (a) or Figure 3 The interfaces shown in (b) are all displayed on the monitor.
[0059] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.
[0060] Figure 2 This is a software structure block diagram of an electronic device 100 according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the system libraries of the Android runtime, and the kernel layer. The application layer may include a series of application packages.
[0061] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, and creative assistant.
[0062] The creative assistant can obtain the user's video generation instructions, which include conditional information. Conditional information can be understood as keywords within the video generation instructions. This video generation instructions can also be natural language speech. These instructions are used to guide the video generation process according to the conditional information.
[0063] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0064] The application framework layer may include a window manager, content providers, a view system, a phone manager, a resource manager, and a notification manager. The window manager manages window programs. It can obtain the screen size, determine the presence of a status bar, lock the screen, and capture the screen. The content provider stores and retrieves data, making this data accessible to applications. The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. The display interface can consist of one or more views; for example, a display interface including a text notification icon may include views for displaying text and views for displaying images. The phone manager provides communication functionality for the electronic device 100. The resource manager provides various resources for the application. The notification manager allows the application to display notification information in the status bar.
[0065] The application framework layer may also include a media processing platform, a search module, a quick app engine, and lightweight editing services.
[0066] The search module can search the initial image based on the condition information to identify images that match the condition information.
[0067] The media processing platform determines a preset number of target images from images that meet the specified criteria.
[0068] The Quick App Engine can send cards to the Creator Assistant, which can then use the cards to display the target image.
[0069] The lightweight editing service can generate target videos based on target images.
[0070] The creative assistant can also display the target video.
[0071] The Android runtime consists of core libraries and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.
[0072] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0073] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0074] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library, 2D graphics engine, etc.
[0075] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0076] The media library supports playback and recording of various commonly used audio and video formats, as well as still image files.
[0077] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0078] A 2D graphics engine is a graphics engine for 2D drawing.
[0079] The kernel layer is the layer between hardware and software. It can include driver modules such as display drivers, camera drivers, audio drivers, and sensor drivers.
[0080] This application does not specifically limit the structure of the execution subject of the image selection method. As long as the image processing can be performed according to the image selection method provided by this application by running the code that records the image selection method of this application, the execution subject of the image selection method provided by this application can be an electronic device, a functional module in an electronic device that can call and execute a program, or a physical device applied in an electronic device, such as a chip.
[0081] Currently, many electronic devices are equipped with cameras, allowing users to take photos and videos. These devices also have communication capabilities, enabling them to download images or videos from the internet or receive images or videos sent by other electronic devices. Furthermore, electronic devices can select and edit stored images and / or videos to create entirely new videos.
[0082] The following is a schematic diagram of a scenario for the image selection method provided in the embodiments of this application, which uses the voice assistant of an electronic device as an example to call a video editing application.
[0083] Reference Figure 3As shown in (a), the user speaks "yoyo" within the voice detection range of the electronic device to activate its voice assistant. After detecting the "yoyo" voice, the electronic device responds with the voice message "I'm listening, please speak," and simultaneously displays... Figure 3 The interface shown in (a) is shown in the image. Figure 3 In the interface shown in (a), a voice assistant window 21 is displayed, which includes the text message "I'm listening, please speak." The purpose of this voice response and text message is to notify the user that the voice assistant has been activated and to prompt the user to speak a voice command. In practical applications, other voice response content and text message content can be set as needed to achieve the same reminder effect.
[0084] Based on the voice response "I'm listening, please speak" and / or the text message "I'm listening, please speak," the user speaks within the voice monitoring range of the electronic device to "generate a video reviewing last year." For example... Figure 3 As shown in (b), after the electronic device detects the voice message "Generate a video reviewing last year," it displays the user's voice message "Generate a video reviewing last year" in the voice assistant window 21. It then generates a video based on images and videos stored in the electronic device that belong to the previous year. The materials used to generate the video can be images and / or videos from a photo library application. After successfully generating the video, it issues the voice message "A video reviewing last year has been generated for you," and simultaneously displays the text "A video reviewing last year has been generated for you" and a video icon 22 in the voice assistant window. In practical applications, the user can click the video icon 22 to trigger the electronic device to play the video; this application will not use illustrations to illustrate this further.
[0085] If the selected images are inappropriate during the process of generating video based on the user's voice, the user may have a low level of satisfaction with the generated video.
[0086] To improve user satisfaction with the generated video, embodiments of this application provide an image selection method and an electronic device.
[0087] The following is combined Figure 4 The image selection method provided in the embodiments of this application will be described in detail. The execution subject of the method provided in this application can be an electronic device, or a software / hardware module in an electronic device capable of image selection. For ease of explanation, the following embodiments will use an electronic device as an example.
[0088] Figure 4 This is a schematic flowchart of an image selection method provided in an embodiment of this application. Figure 4 The method shown includes steps S410 and S420.
[0089] Step S410: Obtain multiple first candidate images, which are distributed across multiple first distribution time periods and do not overlap.
[0090] The methods for acquiring multiple first candidate images can be as follows: receiving first candidate images sent by other electronic devices or modules, reading first candidate images from a storage unit such as a memory, or determining the first candidate image from multiple images.
[0091] The first candidate image can be the execution Figure 4 The images shown in the method can be all or part of the images stored in the electronic device, or all or part of the images stored on the server by the user of the electronic device. Different users can correspond to different accounts.
[0092] For example, conditional information may be obtained before step S410. The conditional information may include one or more of time, location, people, events, scenes, etc.
[0093] The multiple first candidate images can be images that meet the condition information.
[0094] Alternatively, the multiple first candidate images can be images obtained by filtering the images that meet the criteria. Image filtering can include removing low-resolution images (resolution below a preset resolution threshold), removing images containing bloody or violent scenes, and removing duplicates based on similarity, among other things.
[0095] For example, the multiple first candidate images can be images that meet the criteria information determined from multiple initial images. The multiple initial images can include a single static image or multiple frames of images from a video.
[0096] Step S420: Determine multiple first target images from the multiple first candidate images. The multiple images are distributed in the multiple first distribution time periods. The multiple first target images are used to display to the user in the chronological order of the images.
[0097] The first target image can be understood as a representative image among multiple first candidate images. When the first target image is displayed to the user in chronological order, at least one first target image is selected in each time period of the multiple first candidate images. This makes the temporal continuity of the images displayed to the user stronger. The multiple first target images enable the recorded content to unfold from far to near in time, with the effect of a gradually advancing storyline, thus improving the user experience.
[0098] The durations of multiple first distribution time periods can be equal or unequal. When the durations of multiple first distribution time periods are equal, this duration can be determined based on the time span of the multiple first candidate images. The duration of each first distribution time period can be a target duration. The target duration can be positively correlated with the time span of the multiple first candidate images. Therefore, the number of first distribution time periods is more reasonable, the division of the first distribution time periods is more rational, and the user experience is improved.
[0099] The number of the multiple first target images can be a preset fixed value, or it can be determined based on the number of multiple first candidate images. For example, the number of the multiple first target images can be positively correlated with the number of multiple first candidate images.
[0100] The number of the multiple first target images can be a second preset number, and the target duration can be negatively correlated with the second preset number.
[0101] In the plurality of first target images, the number distributed in each first distribution time period can be equal, or it can be randomly determined based on a second preset number.
[0102] Alternatively, the number of first target images distributed across each first distribution time period can be determined based on the number of first candidate images belonging to that first distribution time period and the total number of first candidate images. The number of targets corresponding to each first distribution time period can be positively correlated with the target ratio corresponding to that first distribution time period. The number of targets corresponding to each first distribution time period represents the number of first target images belonging to that first distribution time period, and the target ratio corresponding to each first distribution time period is the ratio of the number of first candidate images belonging to that first distribution time period to the total number of first candidate images.
[0103] In other words, the target ratio corresponding to each first distribution time period can represent the percentage of the first candidate images belonging to that first distribution time period out of all first candidate images.
[0104] The number of first candidate images belonging to a certain first distribution time period can also be called the number of first images corresponding to that first distribution time period.
[0105] If the ratio between the number of first images corresponding to a certain first distribution time period and the representative value of the number of multiple first images is greater than or equal to a preset ratio threshold, the number of first images corresponding to that certain first distribution time period can be suppressed.
[0106] Suppressing the number of first images corresponding to a certain first distribution time period can be achieved by multiplying the number of first images corresponding to the first distribution time period by a suppression ratio to obtain the suppressed number of first images corresponding to the first distribution time period. The suppression ratio is less than 1.
[0107] The suppression ratio can be a preset fixed value. Alternatively, for different first distribution time periods, the suppression ratio can be determined based on the difference between the ratio of the number of first images corresponding to that first distribution time period to the representative value of the number of multiple first images and a preset ratio threshold. The suppression ratio can be negatively correlated with the difference between the ratio of the number of first images corresponding to the first distribution time period to the representative value of the number of multiple first images and a preset ratio threshold.
[0108] Based on the number of suppressed first images corresponding to the first distribution time period where suppression was performed, and the number of first images corresponding to other first distribution time periods, the correction target ratio for each first distribution time period can be obtained. For the unsuppressed first distribution time period, the correction target ratio for each first distribution time period can be the ratio of the number of first images corresponding to that first distribution time period to the number of corrected images. For the suppressed first distribution time period, the correction target ratio for each first distribution time period can be the ratio of the number of suppressed first images corresponding to that first distribution time period to the number of corrected images. The number of corrected images is the sum of the number of suppressed first images corresponding to the suppressed first distribution time period and the number of first images corresponding to the unsuppressed first distribution time period.
[0109] For example, the number of targets corresponding to each first distribution time period can be proportional to the ratio of the corrected targets corresponding to that first distribution time period.
[0110] The number of first target images in each first distribution time period is determined by the proportion of the number of first candidate images in each first distribution time period to the total number of first candidate images, i.e., the target ratio corresponding to that first distribution time period. The number of first target images in each first distribution time period is positively correlated with the target ratio corresponding to that first distribution time period. This allows for the selection of more first target images in first distribution time periods with a large number of first candidate images and fewer first target images in first distribution time periods with a small number of first candidate images. These multiple first target images are more representative of the multiple first candidate images, making the determined multiple first target images more reasonable and improving the user experience.
[0111] When there are a large number of first candidate images, filtering them is computationally intensive. To reduce computation, multiple second candidate images can be identified from the first candidate images. These second candidate images are then filtered, and based on the filtering results, multiple first target images are determined. The filtering results may include multiple third candidate images, from which the first target images are determined.
[0112] The number of multiple second candidate images is less than or equal to the first preset number. If the number of multiple first candidate images is greater than or equal to the first preset number, the number of multiple second candidate images can be the first preset number. If the number of multiple first candidate images is less than the first preset number, the number of multiple second candidate images can be the number of multiple first candidate images. In other words, if the number of multiple first candidate images is small, less than the first preset number, all first candidate images can be used as second candidate images.
[0113] By limiting the number of second candidate images, the computational load of the screening can be reduced, processing efficiency can be improved, and the time required to determine the first target image can be shortened.
[0114] When the number of first target images in each first distribution time period is positively correlated with the target ratio corresponding to that first distribution time period, in the process of selecting second candidate images, the number of second images corresponding to each first distribution time period can be positively correlated with the target ratio corresponding to the first distribution time period. The number of second images corresponding to each first distribution time period represents the number of second candidate images belonging to that first distribution time period.
[0115] For example, the number of second candidate images belonging to each first distribution time period can be proportional to the corrected target ratio corresponding to that first distribution time period.
[0116] Therefore, in a first distribution period with a large number of first candidate images, a larger number of second candidate images are selected, and then a larger number of first target images are selected from these multiple second candidate images; conversely, in a first distribution period with a smaller number of first candidate images, a smaller number of second candidate images are selected, and then a smaller number of first target images are selected from these multiple second candidate images. These multiple second candidate images are more representative of the multiple first candidate images, thus making the resulting multiple first target images more representative of the multiple first candidate images, resulting in a more reasonable selection of multiple first target images and improving the user experience.
[0117] Multiple third candidate images are obtained by filtering multiple second candidate images, and the number of third candidate images may be less than the number of second candidate images. When it is necessary to determine a second preset number of first target images, after filtering, it can be determined whether the third candidate images in each first distribution time period meet the requirement of the number of first target images to be selected, and if the determination result is that the requirement is met, multiple first target images are determined from the multiple third candidate images.
[0118] The number of time periods corresponding to each first distribution time period can be determined based on the target ratio and the second preset quantity. The number of time periods corresponding to each first distribution time period is positively correlated with the target ratio corresponding to that first distribution time period, and the sum of the number of time periods corresponding to the multiple distribution time periods is the second preset quantity.
[0119] For example, the number of time periods belonging to each first distribution time period can be proportional to the corrected target ratio corresponding to that first distribution time period.
[0120] The requirement for selecting the first target image is that the number of third images corresponding to each first distribution time period is greater than or equal to the number of time periods corresponding to that first distribution time period. The number of third images corresponding to each first distribution time period represents the number of third candidate images belonging to the first distribution time period.
[0121] If the number of third images corresponding to each first distribution time period is greater than or equal to the number of time periods corresponding to that first distribution time period, that is, if the number of first target images meets the requirement for selection, a second preset number of first target images can be determined from multiple third candidate images.
[0122] In the first target images of a certain second preset number, the number of targets corresponding to each first distribution time period, that is, the number of first target images belonging to the first distribution time period, can be the number of time periods corresponding to the first distribution time period.
[0123] If the number of first target images selected does not meet the requirement, i.e., there is a supplementary selection time period within the multiple first distribution time periods, at least one second candidate image belonging to the supplementary selection time period can be determined again from the multiple first candidate images other than the multiple second candidate images. The supplementary selection time period can be a first distribution time period in which the number of corresponding third images is less than the number of corresponding time periods.
[0124] After identifying at least one second candidate image belonging to the replacement time period again, the at least one second candidate image in the newly identified replacement time period can be filtered to obtain an updated third candidate image. Thus, multiple first target images can be identified from the updated multiple third candidate images. In other words, the updated multiple third candidate images can serve as multiple third candidate images.
[0125] To determine whether there is a replacement time period among multiple first distribution time periods, the number of third images corresponding to each first distribution time period can be compared with the number of time periods corresponding to that first distribution time period. If the number of third images corresponding to a certain first distribution time period is less than the number of time periods corresponding to that first distribution time period, then that first distribution time period is the replacement time period.
[0126] When a replacement time period is determined, at least one second candidate image belonging to the replacement time period can be determined again from among multiple first candidate images that are outside of multiple second candidate images and belong to the replacement time period.
[0127] When there are multiple supplementary selection time periods, determining at least one second candidate image belonging to each of these supplementary selection time periods can be done by re-determining at least one second candidate image belonging to each of the multiple supplementary selection time periods. After re-determining at least one second candidate image belonging to each of the multiple supplementary selection time periods, the re-determined second candidate images belonging to the multiple supplementary selection time periods can be filtered.
[0128] However, comparing the number of third images corresponding to each first distribution time period with the number of time periods corresponding to that first distribution time period requires a significant amount of computational resources.
[0129] To reduce computational resource consumption, before comparing the number of third images corresponding to each first distribution time period with the number of time periods corresponding to that first distribution time period, the number of multiple third candidate images can be compared with a second preset number. If the number of multiple third candidate images is less than the second preset number, it is determined that a supplementary selection time period exists, and multiple second candidate images are determined again from the multiple first candidate images other than the multiple second candidate images. The multiple second candidate images determined again are distributed in the multiple first distribution time periods. That is, the multiple second candidate images determined again include the second candidate images from the supplementary selection time period.
[0130] When the number of multiple third candidate images is less than the second preset number, there may be a large number of supplementary selection time periods. In this case, it is no longer necessary to compare the number of third images with the number of time periods for each first distribution time period. Instead, multiple second candidate images are determined again from the multiple first candidate images in addition to the multiple second candidate images, thereby reducing the processing resources and processing time required to determine whether there are supplementary selection time periods.
[0131] The number of images belonging to each of the multiple first distribution time periods in the re-determined multiple second candidate images can be equal or unequal. For example, the number of re-determined second candidate images belonging to each first distribution time period can be positively correlated with the target ratio corresponding to that first distribution time period. Therefore, the re-determined multiple second candidate images are more representative of the multiple first candidate images, making the resulting multiple first target images more representative of the multiple first candidate images, resulting in a more reasonable selection of multiple first target images and improved user experience.
[0132] For example, the number of re-identified second candidate images belonging to each first distribution time period can be proportional to the correction target ratio corresponding to that first distribution time period.
[0133] If there is a replacement time period in the plurality of first distribution time periods, but there is no image other than the second candidate image in the first candidate image belonging to the replacement time period, if the plurality of third candidate images are distributed in the plurality of first distribution time periods, then the plurality of first target images distributed in the plurality of third candidate images in the plurality of first distribution time periods can be determined.
[0134] Multiple third candidate images distributed across multiple first distribution time periods can be either updated third candidate images or unupdated third candidate images.
[0135] In the case where there is a replacement time period in the plurality of first distribution time periods, but there is no image other than the second candidate image in the first candidate image belonging to the replacement time period, the number of first target images belonging to the replacement time period is less than the number of time periods corresponding to the replacement time period.
[0136] The number of first target images belonging to a certain first distribution time period outside the supplementary selection time period can be equal to the number of time periods corresponding to that first distribution time period. In other words, the number of multiple first target images can be less than the second preset number.
[0137] Alternatively, the number of first target images belonging to one or more first distribution time periods outside the supplementary selection time period can be greater than the number of time periods corresponding to the first distribution time period, so that the number of multiple first target images is a second preset number.
[0138] If there is a supplementary selection time period in multiple first distribution time periods, and there are no images other than second candidate images in the first candidate images belonging to the supplementary selection time period, then if multiple third candidate images are distributed in multiple second distribution time periods, then multiple second target images are determined in the multiple third candidate images.
[0139] The plurality of second distribution time periods are partial time periods within the plurality of first distribution time periods. That is, the plurality of first distribution time periods include the plurality of second distribution time periods, and the number of the plurality of first distribution time periods is greater than the number of the plurality of second distribution time periods.
[0140] Multiple second target images can be distributed across multiple second distribution time periods, and these multiple second target images are used to display to the user in chronological order.
[0141] In other words, if there are no first candidate images other than the second candidate images in a certain supplementary selection time period, and none of the selected third candidate images belong to that specific supplementary selection time period, then multiple second target images can be determined from these third candidate images. This ensures that the second target images are distributed across various second distribution time periods outside of the specific supplementary selection time period. If the third candidate images are only distributed across a portion of the multiple first distribution time periods, then second target images can be determined from these third candidate images. These second target images can be distributed across that portion of the time period, thus making the distribution time periods of the multiple second target images as close as possible to the distribution time periods of the multiple first candidate images. This results in stronger temporal continuity of the images displayed to the user when the second target images are shown in chronological order, improving the user experience.
[0142] The filtering of multiple second candidate images may include removing images with a resolution lower than a preset resolution threshold, removing images that record bloody or violent scenes, and removing duplicates based on similarity.
[0143] The filtering of at least one second candidate image that has been re-determined can be performed on only the at least one second candidate image that has been re-determined.
[0144] Alternatively, when filtering multiple second candidate images includes filtering based on the similarity between the multiple second candidate images so that the similarity between the resulting multiple third candidate images is less than or equal to a preset similarity threshold, filtering at least one second candidate image that has been determined again may be filtering multiple second candidate images after the addition processing.
[0145] The addition process can be obtained by adding multiple third candidate images to at least one second candidate image that has been re-determined, or by adding multiple second candidate images to at least one second candidate image that has been re-determined.
[0146] During the similarity-based filtering of the reselected candidate images, the influence of the previous filtering results is considered, ensuring that the reselected candidate images do not contain any images similar to those in the previous filtering results. This effectively avoids the occurrence of two similar target images.
[0147] The process of adding multiple third candidate images to at least one re-determined second candidate image may involve adding all or part of the multiple third candidate images to the at least one re-determined second candidate image. After determining multiple third candidate images, target images belonging to other first distribution time periods outside the supplementary selection time period may be determined. The addition process may include adding the target images belonging to the other first distribution time periods to the at least one re-determined second candidate image. If there are third candidate images belonging to the supplementary selection time period, the addition process may include adding the target images belonging to the other first distribution time period and the third candidate images belonging to the supplementary selection time period to the at least one re-determined second candidate image to obtain multiple second candidate images after addition.
[0148] The third candidate image is an image that has already been filtered. Compared to adding an unfiltered second candidate image to the at least one second candidate image that has been determined again, adding the third candidate image to the at least one second candidate image that has been determined again, and filtering the multiple second candidate images after the addition process, improves processing efficiency.
[0149] The process of re-determining the second candidate image can be performed once or multiple times. Each time the second candidate image is re-determined, the resulting updated multiple third candidate images can be used as multiple third candidate images.
[0150] When the number of multiple third candidate images is greater than or equal to the second preset number, the second candidate image determined again can be the first candidate image belonging to the supplementary selection time period. With the second preset number already determined, if the value of the first preset number is set reasonably, the sum of the number of third candidate images belonging to the supplementary selection time period and the number of target images belonging to other first distribution time periods outside the supplementary selection time period will have a small difference from the number of the multiple third candidate images. Adding multiple third candidate images to the determined second candidate images to obtain multiple second candidate images after the addition process can make the screening results of the multiple second candidate images after the addition process more comprehensive and accurate with almost no increase in computational load.
[0151] The target image belonging to the other first distribution time period can be an image among multiple first target images or multiple second target images.
[0152] In the process of determining the second subsequent image from multiple first candidate images, the selection can be random or in a certain order.
[0153] If multiple first candidate images are images whose matching degree with the condition information is greater than or equal to a preset matching degree threshold, and the matching degree of multiple first candidate images is different, multiple second candidate images can be determined from multiple first candidate avatars in order of gradually decreasing matching degree.
[0154] In other words, multiple second candidate images include at least one first candidate image that has the highest matching degree in each first distribution time period.
[0155] In the process of re-determining the second candidate image, the second candidate image can also be determined again from the first candidate images in order of gradually decreasing matching degree.
[0156] In the process of determining multiple target images from multiple third candidate images, multiple target images can also be determined from multiple third candidate images in order of gradually decreasing matching degree.
[0157] For example, among the acquired multiple first candidate images, these multiple first candidate images can be arranged in order of decreasing matching degree. Then, in the process of determining multiple second candidate images from the multiple first candidate images, the multiple second candidate images can be selected according to the arrangement order of the multiple first candidate images.
[0158] The multiple second candidate images can also be arranged in the same sequential order as the multiple first candidate images. That is, the order of any two second candidate images in the multiple second candidate images is the same as the order of any two second candidate images in the multiple first candidate images.
[0159] Furthermore, the multiple third candidate images can also be arranged in the same sequential order as the multiple third candidate images. That is, the order of any two third candidate images in the multiple third candidate images is the same as the order of the two third candidate images in the multiple first candidate images.
[0160] Therefore, when multiple target images are identified from multiple third candidate images, the target images can be selected in each first distribution time period according to the order of the multiple third candidate images. Thus, the multiple target images include one or more images that have the highest matching degree with the conditional information in each first distribution time period.
[0161] Multiple first candidate images are those whose matching degree with the conditional information is greater than or equal to a preset matching degree threshold; multiple first candidate images are images that match the conditional information to a high degree. The matching degree of an image with the conditional information can also be understood as the degree to which an image conforms to the conditional information, or it can be called the similarity between an image and the conditional information.
[0162] When the conditional information includes information other than time and location, the similarity of multiple first candidate images determined based on the conditional information is not equal to that of the conditional information.
[0163] Multiple second candidate images are selected from multiple first candidate head images in order of decreasing similarity. This makes the second candidate images more consistent with the conditional information, thereby improving the consistency between the selected multiple target images and the conditional information, and making the selected target images more accurate. These multiple target images can be either multiple first target images or multiple second target images.
[0164] When the conditional information only includes time and / or location, the multiple first candidate images determined based on the conditional information have equal similarity to the conditional information. When the conditional information only includes time and / or location, the similarity between the multiple first candidate images and the conditional information can all be 100%. When the conditional information only includes time and / or location, the multiple second candidate images are images randomly selected from the multiple first candidate images.
[0165] For example, after acquiring multiple first candidate images, these multiple first candidate images can be randomly sorted. Thus, in the process of determining multiple second candidate images from the multiple first candidate images, the multiple second candidate images can be selected according to the sorting order of the multiple first candidate images, so that the multiple second candidate images are multiple random images from the multiple first candidate images.
[0166] Since the conditional information only includes time and / or location, the first candidate images with the same time or location may be clustered together in the sorting of multiple first candidate images. By randomly selecting multiple second candidate images from the multiple first candidate images, the multiple second candidate images are made more representative of the multiple first candidate images, thereby making the multiple first target images more representative of the multiple first candidate images, the determined multiple first target images more reasonable, and improving the user experience.
[0167] When the conditional information only includes time and / or location, in the process of determining multiple target images from multiple third candidate images, multiple target images can be randomly selected from multiple third candidate images. Alternatively, the multiple third candidate images with the highest image scores can be selected as multiple target images in a gradually decreasing order.
[0168] The image score for each third candidate image can be determined based on one or more of its aesthetic score, scene score, and interaction score. The image score can be the average or weighted average of the aesthetic score, scene score, and interaction score of the third candidate images, or it can be determined based on the ranking of the aesthetic score, scene score, and interaction score of the third candidate image among the multiple third candidate images.
[0169] The aesthetic score for each third candidate image can be obtained by performing an aesthetic scoring on that third candidate image.
[0170] Multiple scene types correspond to multiple scene scores. The scene score corresponding to the scene type to which the third candidate image belongs can be used as the scene score of the third candidate image. These multiple scene types can include multiple scene types such as party, parent-child, children's fun, travel, sports, people, Chinese architecture, other architecture, night scene, food, cute pets, etc.
[0171] The interaction score for each third candidate image can be obtained based on one or more of the following: the number of times the user interacts with the third candidate image, the number of times the user interacts with an image that records objects in the third candidate image.
[0172] It should be understood that conditional information can also be obtained before proceeding to step S420. If the conditional information is time and / or location, multiple second candidate images can be randomly selected from multiple first candidate images. If the conditional information includes information other than time and location, multiple second candidate images can be selected in order of decreasing similarity between the images and the conditional information.
[0173] After identifying multiple target images, these images are displayed to the user in chronological order. These multiple target images can be either multiple first target images or multiple second target images.
[0174] For example, after determining multiple target images, a target video can be generated based on these target images in chronological order. In the target video, target images that appear earlier in time can be displayed in earlier frames, and target images that appear later in time can be displayed in later frames.
[0175] The method provided in this application selects multiple first target images from multiple first candidate images. The time period in which the multiple first target images are distributed is the same as the time period in which the multiple first candidate images are distributed. That is, a first target image is selected in each time period in which the multiple first candidate images are distributed. This makes the time continuity of the images displayed to the user stronger when the images are displayed to the user in the order of the images, thus improving the user experience.
[0176] The following is combined Figures 5 to 9 The image selection method provided in the embodiments of this application will be described in detail. In some embodiments, the first candidate image may be... Figure 5 The candidate image in the method shown, the second candidate image can be Figure 5 In the method shown, the selected image, the third candidate image can be... Figure 5 The method shown uses a filtered image. In other embodiments, the first candidate image may also be... Figure 5 The second or third candidate image in the method shown.
[0177] Figure 5 This is a schematic flowchart of an image selection method provided in an embodiment of this application. Figure 5 The image selection method shown includes steps S501 to S519.
[0178] Step S501: Obtain condition information.
[0179] The conditional information can be obtained by receiving it from other modules or by determining it based on the user's video generation instructions. The user's video generation instructions can be semantic information obtained from user speech recognition or text input by the user. The video generation instructions include conditional information.
[0180] For example, the semantics of the user's voice representation, i.e., the user's video generation instruction, is "Generate a video reviewing last year," and the conditional information could be "last year." The video generation instruction is used to instruct the generation of the video.
[0181] Step S502: Send condition information to the search module.
[0182] The search module can determine candidate images that meet the condition information. For example, the search module can search among multiple initial images to determine candidate images that meet the condition information. It should be understood that searching among multiple initial images is different from... Figure 5 The method shown can be implemented in the same or different electronic devices.
[0183] Step S503: Receive image information sent by the search module. The image information includes at least one candidate image with a transmission identifier and matching condition information.
[0184] implement Figure 5 The module and the search module in the method shown reside in different processes. Considering memory limitations, the search module can include no more than a preset number of candidate images or more than a preset space requirement, along with a transmission identifier, in each transmitted image message. The transmission identifier indicates whether the transmission is complete.
[0185] For example, the transmission identifier can be a flag. That is, the transmission identifier can use "0" and "1" to indicate whether the transmission is complete. For example, a transmission identifier of "0" can indicate that the transmission is not complete, and a transmission identifier of "1" can indicate that the transmission is complete.
[0186] The search module transfers all candidate images that meet the criteria from the initial image to the execution module. Figure 5 In the last image message of the module shown in the method, the transmission identifier can indicate that the transmission is complete. In the other image messages before the last one, the transmission identifier can indicate that the transmission is not complete.
[0187] In at least one image message sent by the search module, candidate images can be sorted according to their matching degree with the condition information. A candidate image that matches the condition information can be understood as an image in the initial image set whose matching degree with the condition information is greater than or equal to a preset matching degree threshold. Matching degree can also be understood as the degree of similarity.
[0188] The method provided in this application embodiment will be described below by taking as an example that multiple candidate images in the at least one image information are arranged in order of gradually decreasing matching degree.
[0189] Step S504: Determine whether the transmission identifier in the image information indicates that the transmission is complete.
[0190] If the image information transmission flag indicates that the transmission is not complete, S503 and S504 are performed again.
[0191] When the image information transmission identifier indicates that the transmission is complete, proceed to step S505.
[0192] The number of candidate images that meet the conditions, i.e. the total number of candidate images received after transmission is completed, can be N.
[0193] Step S505: Determine the time span of the received N candidate images.
[0194] N candidate images can be understood as all the candidate images received.
[0195] The time span of N candidate images can be understood as the length of the time range of N candidate images.
[0196] Each candidate image can correspond to a time point. The time length between the earliest and latest time points among the N candidate images.
[0197] Step S506: Divide the time range of the N candidate images according to the time span to obtain multiple time periods.
[0198] The lengths of these multiple time periods can be equal. Furthermore, the length of a time period can be positively correlated with the time span.
[0199] For example, in step S506, it can be based on Figure 6 The time period determination method shown divides the time range of N candidate images into multiple time periods.
[0200] In step S601, it is determined whether the time span is greater than 2 years.
[0201] If the time span is greater than 2 years, step S602 can be performed. If the time span is less than or equal to 2 years, step S603 can be performed.
[0202] Step S602: Divide the time range of the N candidate images into multiple time periods based on the year.
[0203] Step S603: Determine whether the time span is greater than 1 month.
[0204] If the time span is greater than one month, step S604 can be performed. If the time span is less than or equal to one month, step S605 can be performed.
[0205] In step S604, the time range of the N candidate images is divided according to the month to obtain multiple time periods.
[0206] In step S605, the time range of the N candidate images is divided according to the day to obtain multiple time periods.
[0207] After step S602, step S604 or step S605, step S606 can also be performed.
[0208] Step S606: Determine the time period to which each candidate image belongs.
[0209] Using days, months, and years as the lengths of time periods, candidate images are determined for each time period. This can also be understood as clustering candidate images according to days, months, and years respectively.
[0210] The time period to which each candidate image belongs can be considered the time period to which that candidate image belongs.
[0211] After determining multiple time periods and candidate images belonging to each time period, step S507 can be performed.
[0212] Step S507: Calculate the target ratio.
[0213] The target proportion is calculated based on the number of first images of candidate images in each of the multiple time periods. The number of first images of candidate images in each time period can also be understood as the number of first images corresponding to that time period.
[0214] The target ratio can be the ratio between the number of first images of candidate images in each of the multiple time periods.
[0215] For example, if there are 3 time periods, and the number of first images corresponding to these 3 time periods are 10, 20 and 30 respectively, then the target ratio can be a ratio of 10, 20 and 30, and the target ratio can be expressed as 1:2:3.
[0216] In some cases, the number of candidate images is large in a particular time period, potentially differing from the number of candidate images in other time periods by at least an order of magnitude. Selecting images according to the target proportion may result in the selected images being mainly concentrated in that particular time period.
[0217] To avoid the selected images in step S510 being too concentrated in one or a few, the number of first images corresponding to one or a few time periods can be suppressed during the target ratio calculation process.
[0218] For example, if the ratio between the number of first images corresponding to a certain time period and the representative value of the number of multiple first images is greater than or equal to a preset ratio threshold, the number of first images corresponding to that certain time period can be suppressed.
[0219] The preset ratio threshold is greater than 1, for example, it can be 5 or 10.
[0220] The representative value of the multiple first image counts can be the representative value of the first image counts corresponding to other time periods outside of the specified time period, or it can be the representative value of the multiple first image counts corresponding to multiple time periods including the specified time period. The representative value of the multiple first image counts can be the minimum, median, or mode, etc. The representative value of the multiple first image counts can represent the central tendency of the data set.
[0221] One way to suppress the number of candidate images within a certain time period is to multiply the number of candidate images within that time period by a suppression ratio during the calculation of the target ratio, thus obtaining the number of suppressed first images for that time period. The suppression ratio is greater than 0 and less than 1. Therefore, during the calculation of the target ratio, for time periods with a corresponding number of suppressed first images, the target ratio is calculated using that number of suppressed first images.
[0222] The suppression ratio can be preset. For example, it can be 0.5, 0.3, or other values.
[0223] Alternatively, the ratio between the number of first images corresponding to a certain time period and the representative values of the number of first images corresponding to multiple time periods can have a negative correlation with the suppression ratio corresponding to a certain time period. In other words, the number of suppressed first images corresponding to a certain time period can be the product of the number of first images corresponding to that time period and the suppression ratio corresponding to that time period.
[0224] For example, if there are three time periods, and the number of first images corresponding to these three time periods are 10, 20, and 300 respectively, the number of first images corresponding to the third time period can be suppressed. The suppression ratio can be preset, for example, it can be 0.5, then the number of suppressed first images corresponding to the third time period is 300 × 0.5 = 150. Therefore, the target ratio can be the ratio of the number of first images corresponding to the first and second time periods, and the number of suppressed first images corresponding to the third time period, that is, the target ratio can be 10:20:150 = 1:2:15.
[0225] Step S508: Determine if the condition information includes only information related to time and / or location.
[0226] If the conditional information only includes information related to time and / or location, the N candidate images have an equal degree of matching with the conditional information.
[0227] Image information can carry the degree of matching between each candidate image and the conditional information. Alternatively, execute... Figure 5The module of the method shown can determine that N candidate images have an equal degree of matching with the condition information, provided that the condition information only includes information related to time and / or location.
[0228] If the condition information only includes information related to time and / or location, step S509 can be performed.
[0229] If the condition information does not only include information related to time and / or location, steps S510 to S514 can be performed.
[0230] Step S509: Shuffle the order of the N candidate images.
[0231] In image information, N candidate images can be arranged according to their matching degree. The order of the N candidate images in the image information can be used as the order of the N candidate images.
[0232] When multiple image information is received, the matching degree of candidate images in earlier received image information is greater than or equal to the matching degree of candidate images in later received image information. In each image information, multiple candidate images can be arranged in descending order of matching degree.
[0233] When the condition information only includes information related to time and / or location, since the N candidate images have equal matching degree with the condition information, the order of the N candidate images may be arranged according to information such as time or location. If the images are selected in step S510 according to the order of the N candidate images, the selected images may be concentrated in one or more locations or a certain period of time, resulting in an overly concentrated distribution of the selected images and an unreasonable distribution in time and / or location.
[0234] For example, if the semantics of the user's voice representation is "generate a video reviewing last year," the conditional information could be "last year." In the image information, the N candidate images can be arranged in chronological order. The time span for the N candidate images determined based on the conditional information "last year" could be one year, depending on... Figure 6 The method shown can determine a time period of one month. Therefore, in step S510, if images are selected from each time period in the order of the N candidate images, the selected images for each month may be concentrated in the first few days of the month, or even the first few hours.
[0235] When the matching degree between the N candidate images and the condition information is equal, that is, when the condition information only includes time and / or location information, the distribution of the selected images in time and space can be made more uniform by randomly shuffling the order of the N candidate images.
[0236] After step S509, steps S510 to S514 can be performed.
[0237] Step S510: Select M images from the candidate images that were not selected as selection images, according to the target ratio and the order of the N candidate images.
[0238] For example, such as Figure 7 As shown, according to Figure 6 The method shown can determine four time periods: 2021, 2022, 2023, and 2024. Of the N candidate images, the number of candidate images belonging to the first time period (2021) can be N1, the number of candidate images belonging to the second time period (2022) can be N2, the number of candidate images belonging to the third time period (2023) can be N3, and the number of candidate images belonging to the fourth time period (2024) can be N4.
[0239] The number M of selected images can be determined based on a first preset number n1. This first preset number can be, for example, 80, 100, 150, 200, or other values. The sum of the second number of images selected across multiple time periods is M.
[0240] Any integer greater than 0 and less than or equal to the number of time periods can be used as i. If, for each i, the number of candidate images not selected as selected images is greater than or equal to n1×Ni / N, then the number Mi of selected images belonging to the i-th time period can be n1×Ni / N. The ratio between the number of second images selected in each time period is equal to the target ratio. The number n1×Ni / N can be understood as the planned number of images in the i-th time period.
[0241] For a given i, if the number of candidate images that are not selected as selected images is less than n1×Ni / N, then the number Mi of selected images belonging to the i-th time period can be Ni. It should be understood that Mi≤Ni.
[0242] For each i-th time period, the candidate image selected as the selected image can be the top Mi candidate images among the candidate images that were not selected as the selected image in that i-th time period.
[0243] When step S510 is performed for the first time after step S508 or step S509, for the i-th time period, the number of candidate images that are not selected as selected images is Ni.
[0244] like Figure 7 As shown, after step S508 or step S509, after the first step S510, the number of images selected can be M, and the number of images selected in the i-th time period can be Mi.
[0245] For a given image i, if the number of first images in the i-th time period is small, such that the number n1×Ni / N is less than or equal to 1, then one candidate image can be selected as the selected image in that i-th time period. In other time periods where n1×Ni / N is greater than 1, the selected image is chosen according to the number (n1-q1)×Ni / N, where q1 represents the number of time periods where the number n1×Ni / N is less than or equal to 1.
[0246] Step S511: Filter the multiple selected images to obtain P filtered images.
[0247] Filtering multiple selected images can include removing images with a resolution lower than a preset resolution threshold, removing images that record bloody or violent scenes, and removing duplicates based on similarity.
[0248] For example, deduplication based on similarity of multiple selected images can be understood as determining whether there exists at least one group by calculating the similarity between the multiple selected images. Each group includes multiple selected images with a similarity greater than or equal to a preset similarity. If at least one group exists, each of the one or more images in that group is removed, so that only one selected image from that group is retained in the deduplication result. The retained selected image in the group can be the image that appears first in the order of the multiple selected images.
[0249] When step S511 is performed for the first time after step S508 or step S509, the number of the multiple selected images is M.
[0250] like Figure 7 As shown, among the P filtered images, the filtered image belonging to the i-th time period is denoted as Pi. For the i-th time period, Mi ≥ Pi.
[0251] Step S512: Sort the P selected images.
[0252] When the condition information includes information other than time and location, the P filter images can be ordered according to their order in at least one image information. For example, the order of the P filter images in at least one image information can be the order in which the P filter images are ordered.
[0253] When the conditional information only includes time and / or location, the order of the P filtered images can be random.
[0254] Alternatively, if the conditional information only includes time and / or location, the order of the P filter images can be determined based on their scene scores. The scene score of a filter image can be determined based on the scene type of the scene recorded in the filter image. Different scene types can correspond to different scene scores. The scene score of the filter image can be the scene score corresponding to the scene type of the scene recorded in the filter image order. The P filter images can be arranged according to the size of the scene scores corresponding to the scene types of the recorded scenes.
[0255] Alternatively, the order of the P filter images can be determined according to their image scores. These image scores can be determined based on one or more of the following: aesthetic score, scene score, interaction score, matching score, etc.
[0256] The aesthetic score of the selected image can be obtained by giving the selected image an aesthetic rating.
[0257] The interaction score for filtered images can be derived from the number of times the user interacts with the filtered images, or the number of times the user interacts with images containing objects from the filtered images. The number of interactions with filtered images can be determined by the number of times the user browses, shares, edits, or performs other operations on the filtered images.
[0258] The matching score of the selected image can be determined based on the degree of matching between the selected image and the condition information. The image information can include the degree of matching between each candidate image and the condition information.
[0259] When the condition information includes information other than time and location, the matching score of the selected images can be determined based on the order of each selected image in at least one set of image information. For example, the matching score of the selected images can be determined by the sequence number of each selected image in at least one set of image information; or, P selected images can be sorted according to the order of the selected images in at least one set of image information, and the matching score of the selected images can be determined based on the sequence number of each selected image in the P selected images.
[0260] Step S513: Divide the sorted P filtered images according to their respective time periods.
[0261] like Figure 7 As shown, after sorting in step S512, the selected image belonging to the i-th time period among multiple time periods in the sorting result is Pi. That is, step S512 does not change the number of selected images.
[0262] It should be understood that the filtering in step S511 can be performed on the selected M images, and the sorting in step S512 can be performed on the P filtered images. After step S512, the P filtered images can be located in the same queue.
[0263] In the segmentation results of step S513, different time periods correspond to different queues. The filtered images in the queue corresponding to each time period are arranged in the order of the sorting results in step S512.
[0264] Step S514: Determine whether the number P of the images to be filtered is greater than or equal to the second preset number n2.
[0265] The second preset quantity n2 can be 5, 10, 20, 30, 40, or other integer values. The first preset quantity n1 is greater than the second preset quantity n2. The first preset quantity n1 can be determined based on the execution... Figure 5 The data processing capabilities of the electronic device shown are determined.
[0266] The second preset quantity n2 can be understood as the number of images displayed to the user. The second preset quantity n2 can be determined based on the user's satisfaction with the number of images displayed. Different display methods may affect the second preset quantity n2. For example, due to the limitations of the screen size of the electronic device used to display images to the user, the second preset quantity n2 can be set to a smaller value when multiple images are stitched together into one image; while when images are displayed to the user sequentially via video, the second preset quantity can be set to a larger value.
[0267] When the second preset quantity n2 is less than or equal to 30, according to Figure 6 The method shown determines the length of the time period, allowing candidate images to be selected for each time period, thus ensuring that there are images to be displayed to the user at each time stage. The image time is recorded in the format of year, month, and day. Dividing the time period by year, month, and day makes it easier to determine the time period to which each image belongs.
[0268] When the second preset quantity n2 has different values, the length of the time period can also be different for multiple time spans with the same first time. The ratio of the length of the time period to the length of the multiple time spans with the same first time can be greater than or equal to 1.
[0269] If the number of images P to be filtered is less than the second preset number n2, proceed to step S515.
[0270] Step S515: Select P filtered images as the selected images.
[0271] If the number of images P to be filtered is less than the second preset number n2, steps S510 to S514 can be performed after step S515.
[0272] In step S511, which follows step S515, the number of selected images can be the sum of the number of selected images selected again and the number P of filtered images used as selected images.
[0273] If in step S514 it is determined that the number of images to be filtered, P, is greater than or equal to the second preset number, n2, then proceed to step S516.
[0274] Step S516: Determine if there is a replacement time period.
[0275] The number of filtered images belonging to the supplementary selection time period is less than the number of time periods corresponding to that supplementary selection time period. Multiple time periods include the supplementary selection time period.
[0276] In other words, in step S516, it can be determined whether the number of filtered images belonging to each time period is greater than or equal to the number of time periods corresponding to that time period.
[0277] The ratio between the number of time periods corresponding to multiple time periods is equal to the ratio between the number of first images belonging to each of those multiple time periods. The sum of the number of time periods corresponding to these multiple time periods is a second preset number n2. That is, the number of time periods corresponding to the i-th time period can be expressed as n2×Ni / N.
[0278] If the number of filtered images belonging to each time period is not greater than or equal to the number of time periods corresponding to that time period, that is, if the number of filtered images belonging to a certain time period is less than the number of time periods corresponding to that time period, and there is a time period to be supplemented, proceed to step S517.
[0279] Step S517: Determine whether there are candidate images that have not been selected as selected images during the supplementary selection time period.
[0280] If there are candidate images that are not selected as selected images during the supplementary selection period, step S515 can be performed, and step S518 can be performed after step S515.
[0281] Step S518: Select the image from the candidate images that were not selected during the supplementary selection time period.
[0282] After step S518, steps S512 to S514 can be performed.
[0283] If it is determined in step S516 that there is no replacement time period, or if it is determined in step S517 that there is no candidate image in the replacement time period and it is not selected as the selected image, then step S519 can be performed.
[0284] Step S519: Determine a second preset number of target images n2 from the P selected images.
[0285] If the number of images P to be selected is less than the second preset number n2, a supplementary selection period is guaranteed to exist, and the number of supplementary selection periods may be relatively large. Furthermore, determining whether the number of images P to be selected is less than the second preset number n2 is relatively simple and requires minimal computational resources. Therefore, if the number of images P to be selected is less than the second preset number n2, images can be reselected for each time unit.
[0286] If the number of images to be selected, P, is greater than or equal to the second preset number, n², the supplementary selection time period may not exist. Therefore, it can be determined whether the supplementary selection time period exists, and if it does, the selected images are selected again.
[0287] When the number of images to be selected, P, is greater than or equal to the second preset number, n², and there are supplementary selection time periods, the number of supplementary selection time periods is generally small. If the selected images in each time period are reselected, the subsequent filtering and sorting processes will involve a large amount of data, resulting in high consumption of storage and computing resources. Therefore, it is advisable to reselect the selected images only within the supplementary selection time periods.
[0288] If it is determined in step S516 that there is no replacement time period, the number of target images selected in multiple time periods can be determined according to the target ratio. The number of target images belonging to the i-th time period can be n2×Ni / N.
[0289] For a given image i, if the number of images in the i-th time period is small, such that the number n2×Ni / N is less than or equal to 1, then one image can be selected as the target image in that i-th time period. In other time periods where n2×Ni / N is greater than 1, the target image is selected according to the number (n1-q2)×Ni / N, where q2 represents the number of time periods where the number n2×Ni / N is less than or equal to 1.
[0290] The selection of target images within each time period can be based on the order in which the images were filtered within that time period. The target images selected within each time period can be one or more images that appear first in the filtered images within that time period.
[0291] Therefore, the sorting of the P selected images in step S512 affects the determination of the target image. Thus, the sorting of the P selected images in step S512 can also be understood as a process of refining the P selected images.
[0292] When the condition information only includes time and / or location, the order of the candidate images is shuffled before the first selection of the selected image in step S510. Therefore, for the same condition information provided by the user at different times, the selected images may be different, thus the determined target image can be different, increasing the randomness of the target image and improving the user experience.
[0293] The method provided in this application embodiment, when an electronic device stores a large number of images, first selects a first preset number of images for processing. If the number of images selected in the first selection does not meet the second preset number, the image selection and processing are performed again, thereby reducing the number of images to be processed and improving processing efficiency.
[0294] The image selection method provided in this application embodiment can be applied to... Figure 8 The video generation method shown. Figure 5 The module of the method shown can be Figure 8 The creative assistant in the game.
[0295] Figure 8 This is a schematic flowchart of a video generation method provided in an embodiment of this application. Figure 8 The method shown is applied to an electronic device that includes a creation assistant, a media processing platform, a search module, a quick app engine, and a light editing service. The creation assistant, media processing platform, search module, quick app engine, and light editing service can be different processes within the electronic device.
[0296] Figure 8 The method shown includes steps S801 to S814.
[0297] Step S801: The creative assistant obtains the user's video generation instruction information, which includes condition information.
[0298] Conditional information may include one or more of the following: time, location, people, events, etc.
[0299] The video generation instructions can be semantics obtained from user speech recognition or text input by the user. A creative assistant could be, for example, a voice assistant.
[0300] Conditional information can be keywords in the video generation instruction information. In other words, conditional information can be one or more pieces of information in the video generation instruction information that are related to time, location, people, events, etc.
[0301] In the case of video generation based on recognized voice or user-inputted text, the voice or text can serve as video generation instruction information.
[0302] For example, in an electronic device displaying such as Figure 3 In the case of the interface shown in (a), the user's voice is detected, and video generation instruction information is determined based on the user's voice.
[0303] For example, the semantics of a user's voice expression is "generate a video reviewing last year," and the conditional information could be "last year."
[0304] In step S802, the creative assistant sends conditional information to the media processing platform.
[0305] In step S803, the media processing platform sends condition information to the search module.
[0306] In step S804, the search module sends multiple candidate images to the media processing platform.
[0307] These multiple candidate images are images that meet the condition information.
[0308] The search module can search among multiple initial images stored in the electronic device to obtain multiple candidate images that meet the criteria information.
[0309] The search module can send at least one image information to the media processing platform, which includes multiple candidate images.
[0310] The number of candidate images in each image information can be preset. Each image information can also include a transmission identifier. The transmission identifier is used to indicate whether the search module has completed the transmission of the multiple candidate images.
[0311] Therefore, the media processing platform can, through methods such as Figure 5 The steps S503 to S504 shown involve receiving the plurality of candidate images.
[0312] In step S805, the media processing platform determines the target image from multiple candidate images.
[0313] The media processing platform can perform Figure 5 The steps S505 to S519 shown are used to determine the target image from multiple candidate images.
[0314] It should be understood that during the image processing process in the media processing platform, the images used can be downsampled images obtained by downsampling the original images. Therefore, the media processing platform requires fewer processing resources to determine the target image.
[0315] In other words, the multiple first candidate images sent by the search module to the media processing platform in step S804 can all be downsampled images. Alternatively, the search module can search for downsampled images of multiple initial images to obtain multiple first candidate images that meet the condition information.
[0316] In step S806, the media processing platform sends the multiple target images to the creative assistant.
[0317] Alternatively, the media processing platform can send the image identifiers of the multiple target images to the creative assistant, which can then identify the multiple target images based on these identifiers.
[0318] Step S807: The creation assistant determines whether the electronic device stores a card.
[0319] The card is used as a design pattern; it is a container for displaying information. In this embodiment, the card can be used to hold an image.
[0320] If the electronic device stores a card, proceed to step S810. If the electronic device does not store a card, proceed to step S808.
[0321] In step S808, the creation assistant sends a card request message to the Quick App Engine.
[0322] Image request information is used to request cards.
[0323] In step S809, the Quick App Engine sends a card to the Creator Assistant.
[0324] In step S810, the creative assistant uses cards to display the target image to the user.
[0325] The number of target images that the creative assistant displays to the user using cards can be less than or equal to the number of multiple target images received. For example, the creative assistant can display a third preset number of target images to the user.
[0326] Electronic devices can display such as Figure 9 The interface shown is used to display a third preset number of target images to the user. In this interface, the voice assistant window 21 can be used to display card 23, which records the third preset number of target images. The third preset number could be, for example, nine.
[0327] In step S811, upon receiving confirmation from the user, the creative assistant sends a request for finished footage to the media processing platform.
[0328] Figure 9The interface shown may also include a confirmation icon 24. When the user clicks the confirmation icon 24, the creative assistant obtains the user's confirmation instruction and sends multiple target images to the light editing service.
[0329] or, Figure 9 The confirmation icon 24 on the interface shown can also display a countdown. If no opposite action from the user is detected before the countdown ends in time, the creative assistant can obtain the user's confirmation instruction and send multiple target images to the light editing service.
[0330] In step S812, the media processing platform sends a finished product request to the light editing service.
[0331] The final image request includes these multiple target images.
[0332] The lightweight editing service can generate target videos based on multiple target images.
[0333] The target video may include multiple target images, and the multiple target images are located in the target video in chronological order.
[0334] Step S813: The light editing service sends the target video to the media processing platform.
[0335] In step S814, the media processing platform sends the target video to the creative assistant.
[0336] When the creative assistant receives the target video sent by the light editing service, the electronic device can display something like this. Figure 3 The interface shown in (b) is shown in the image.
[0337] It should be understood that the above examples are provided to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific values or scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of this application.
[0338] The above text combined Figure 9 The image selection method of the embodiments of this application is described in detail below. Figure 10 The following describes in detail the device embodiments of this application. It should be understood that the image selection device in the embodiments of this application can execute the various image selection methods described in the foregoing embodiments of this application. That is, the specific working processes of the various products described below can be referred to the corresponding processes in the foregoing method embodiments.
[0339] Figure 10 This is a schematic diagram of the image selection device provided in the embodiments of this application.
[0340] The image selection device 1000 includes an acquisition unit 1010 and a processing unit 1020. The image selection device 1000 can perform... Figure 9 The image selection method shown.
[0341] The acquisition unit 1010 is used to acquire multiple first candidate images, which are distributed in multiple first distribution time periods and do not overlap.
[0342] The processing unit 1020 is configured to determine a plurality of first target images from the plurality of first candidate images, the plurality of images being distributed in the plurality of first distribution time periods, and the plurality of first target images being used to display to the user in chronological order of the images.
[0343] Optionally, the processing unit 1020 is further configured to determine a target duration based on the time span of the plurality of first candidate images, wherein the target duration is positively correlated with the time span and the target duration is the length of each of the plurality of first distribution time periods.
[0344] Optionally, the number of targets corresponding to each of the plurality of first distribution time periods is positively correlated with the target ratio corresponding to the first distribution time period. The number of targets corresponding to each first distribution time period represents the number of first target images belonging to the first distribution time period, and the target ratio corresponding to each first distribution time period is the ratio of the number of first candidate images belonging to the first distribution time period to the number of the plurality of first candidate images.
[0345] Optionally, the processing unit 1020 is further configured to determine a plurality of second candidate images among a plurality of first candidate images, wherein the number of second images corresponding to each first distribution time period in the plurality of first distribution time periods is positively correlated with the target ratio corresponding to the first distribution time period, the number of second images corresponding to each first distribution time period represents the number of second candidate images belonging to the first distribution time period, and the number of the plurality of second candidate images is less than or equal to the first preset number.
[0346] The processing unit 1020 is further configured to filter the plurality of second candidate images to obtain a plurality of third candidate images.
[0347] The processing unit 1020 is further configured to determine the plurality of first target images among the plurality of third candidate images, wherein the number of the plurality of first target images is less than or equal to the first preset number.
[0348] Optionally, the processing unit 1020 is further configured to determine the number of time periods corresponding to the first distribution time period based on the target ratio corresponding to each first distribution time period and the second preset number, wherein the number of time periods corresponding to each first distribution time period is positively correlated with the target ratio corresponding to the first distribution time period, and the sum of the number of time periods corresponding to the plurality of distribution time periods is the second preset number.
[0349] The processing unit 1020 is further configured to, when the number of third images corresponding to each first distribution time period in the plurality of first distribution time periods is greater than or equal to the number of time periods corresponding to the first distribution time period, determine a second preset number of first target images among the plurality of third candidate images, wherein the number of third images corresponding to each first distribution time period represents the number of third candidate images belonging to the first distribution time period, and the number of targets corresponding to each first distribution time period is the number of time periods corresponding to the first distribution time period.
[0350] Optionally, the processing unit 1020 is further configured to, in the case that there is a supplementary selection time period in the plurality of first distribution time periods, determine again at least one second candidate image belonging to the supplementary selection time period from the plurality of first candidate images other than the plurality of second candidate images, wherein the number of third images corresponding to the supplementary selection time period is less than the number of time periods corresponding to the supplementary selection time period.
[0351] The processing unit 1020 is further configured to perform the filtering on the at least one second candidate image that has been re-determined to obtain a plurality of updated third candidate images.
[0352] The processing unit 1020 is further configured to determine the plurality of first target images among the updated plurality of third candidate images.
[0353] Optionally, the processing unit 1020 is further configured to determine the existence of the supplementary selection time period when the number of the plurality of third candidate images is less than the second preset number.
[0354] The processing unit 1020 is further configured to determine a plurality of second candidate images again from a plurality of first candidate images other than the plurality of second candidate images, the plurality of second candidate images being distributed in the plurality of first distribution time periods.
[0355] The processing unit 1020 is further configured to, when the number of the plurality of third candidate images is greater than or equal to the second preset number, compare the number of third images corresponding to each first distribution time period with the number of time periods corresponding to the first distribution time period to determine whether there is a supplementary selection time period.
[0356] The processing unit 1020 is further configured to, when the number of the plurality of third candidate images is greater than or equal to the second preset number, determine again at least one second candidate image belonging to the supplementary selection time period from among the plurality of first candidate images outside the plurality of second candidate images and belonging to the supplementary selection time period.
[0357] Optionally, if the number of the plurality of third candidate images is less than the second preset number, the number of re-determined plurality of second candidate images belonging to each first distribution time period is positively correlated with the target ratio corresponding to the first distribution time period.
[0358] Optionally, the processing unit 1020 is further configured to, in the case that there is a supplementary selection time period in the plurality of first distribution time periods, and there is no image other than the second candidate image in the first candidate image belonging to the supplementary selection time period, if the plurality of third candidate images are distributed in the plurality of first distribution time periods, then determine the plurality of first target images in the plurality of third candidate images.
[0359] Optionally, the processing unit 1020 is further configured to, when there is a supplementary selection time period in the plurality of first distribution time periods, and there is no image other than the second candidate image in the first candidate image belonging to the supplementary selection time period, if the plurality of third candidate images are distributed in the plurality of second distribution time periods, determine a plurality of second target images in the plurality of third candidate images, wherein the plurality of second distribution time periods are part of the plurality of first distribution time periods, the plurality of second target images are distributed in the plurality of second distribution time periods, and the plurality of second target images are used to display to the user in the chronological order of the images.
[0360] Optionally, the processing unit 1020 is further configured to filter based on the similarity between the plurality of second candidate images, wherein the similarity between the plurality of third candidate images is less than or equal to a preset similarity threshold.
[0361] The processing unit 1020 is further configured to filter the plurality of second candidate images after the addition processing to obtain the plurality of updated third candidate images, wherein the addition processing is obtained by adding the third candidate images to the at least one second candidate image that has been determined again, and the similarity between the plurality of updated third candidate images is less than or equal to the preset similarity threshold.
[0362] Optionally, the plurality of first candidate images are images whose similarity to the condition information is greater than or equal to a preset similarity threshold, and the plurality of first candidate images have different similarities to the condition information; the plurality of second candidate images are the plurality of images among the plurality of first candidate images that have the highest similarity to the condition information.
[0363] Optionally, if the plurality of first candidate images are images that meet the condition information, and the condition information is time and / or location, the plurality of second candidate images are a plurality of images randomly selected from the plurality of first candidate images.
[0364] Optionally, the processing unit 1020 is further configured to generate a target video based on the plurality of first target images in chronological order.
[0365] It should be noted that the image selection device 1000 described above is embodied in the form of a functional unit. The term "unit" here can be implemented in software and / or hardware, and there is no specific limitation on this.
[0366] For example, a "unit" can be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application-specific integrated circuit (ASIC), electronic circuitry, a processor (e.g., a shared processor, a proprietary processor, or a group processor) and memory for executing one or more software or firmware programs, integrated logic circuitry, and / or other suitable components that support the described functions.
[0367] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0368] This application also provides a chip, which includes a data interface and one or more processors. When the one or more processors execute instructions, they read instructions stored in a memory through the data interface to implement the image selection method described in the above method embodiments.
[0369] The one or more processors can be general-purpose processors or special-purpose processors. For example, the one or more processors can be central processing units (CPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, such as discrete gate, transistor logic devices, or discrete hardware components.
[0370] The chip can be used as a component of a terminal device or other electronic device. For example, the chip can be located in electronic device 100.
[0371] Processors and memory can be configured separately or integrated together. For example, processors and memory can be integrated onto a system-on-a-chip (SoC) in a terminal device. That is, the chip can also include memory.
[0372] The memory may store a program, which can be run by a processor to generate instructions, causing the processor to execute the image selection method described in the above method embodiments according to the instructions.
[0373] Optionally, the memory may also store data. Optionally, the processor may also read data stored in the memory, which may be stored at the same memory address as the program, or the data may be stored at a different memory address than the program.
[0374] For example, the memory can be used to store the relevant program of the image selection method provided in the embodiments of this application, and the processor can be used to call the relevant program of the image selection method stored in the memory to implement the image selection method of the embodiments of this application.
[0375] For example, the processor can be used to acquire multiple first candidate images, which are distributed across multiple first distribution time periods and do not overlap; and to determine multiple first target images from the multiple first candidate images, which are distributed across the multiple first distribution time periods, and the multiple first target images are used to display to the user in chronological order.
[0376] This chip can be installed in electronic devices.
[0377] This application also provides a computer program product that, when executed by a processor, implements the image selection method described in any of the method embodiments of this application.
[0378] The computer program product can be stored in memory, for example, it is a program. The program is eventually converted into an executable object file that can be executed by the processor after processes such as preprocessing, compilation, assembly and linking.
[0379] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, implements the image selection method described in any of the method embodiments of this application. The computer program may be a high-level language program or an executable object program.
[0380] The computer-readable storage medium is, for example, memory. Memory can be volatile or non-volatile, or it can include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0381] The embodiments of this application may involve the use of user data. In practical applications, user-specific personal data may be used in the scheme described herein within the scope permitted by applicable laws and regulations, provided that it complies with the applicable laws and regulations of the country (e.g., with the user's explicit consent, with the user being properly notified, etc.).
[0382] In the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance, or a specific order or sequence. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0383] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, and c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0384] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0385] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0386] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0387] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and other division methods may exist in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0388] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0389] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0390] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An image selection method, characterized by, The method comprises: obtaining a plurality of first candidate images, the plurality of first candidate images being distributed in a plurality of first distribution time periods, the plurality of first distribution time periods not overlapping; determining a plurality of first target images in the plurality of first candidate images, the plurality of images being distributed in the plurality of first distribution time periods, the plurality of first target images being used to show a user in a time sequence of images, a target quantity corresponding to each of the plurality of first distribution time periods being positively correlated with a target ratio corresponding to the first distribution time period, the target quantity corresponding to each of the plurality of first distribution time periods representing a number of the first target images belonging to the first distribution time period, and the target ratio corresponding to each of the plurality of first distribution time periods being a ratio of a number of first candidate images belonging to the first distribution time period to a number of the plurality of first candidate images; the determining of the plurality of first target images in the plurality of first candidate images comprises: determining a plurality of second candidate images in the plurality of first candidate images, a second image quantity corresponding to each of the plurality of first distribution time periods being positively correlated with the target ratio corresponding to the first distribution time period, the second image quantity corresponding to each of the plurality of first distribution time periods representing a number of the second candidate images belonging to the first distribution time period, and a number of the plurality of second candidate images being less than or equal to a first preset number; screening the plurality of second candidate images to obtain a plurality of third candidate images; determining the plurality of first target images in the plurality of third candidate images, a number of the plurality of first target images being less than or equal to the first preset number.
2. The method of claim 1, wherein, The method further comprises: determining a target length according to a time span of the plurality of first candidate images, the target length being positively correlated with the time span, and the target length being a length of each of the plurality of first distribution time periods.
3. The method according to claim 1 or 2, characterized in that, The method further comprises: determining a target quantity corresponding to each of the plurality of first distribution time periods according to the target ratio corresponding to each of the first distribution time periods and a second preset number, a sum of a plurality of the target quantities corresponding to the plurality of distribution time periods being the second preset number; the determining of the plurality of first target images in the plurality of third candidate images comprises: in a case where a third image quantity corresponding to each of the plurality of first distribution time periods is greater than or equal to the target quantity corresponding to the first distribution time period, determining the first target images of the second preset number in the plurality of third candidate images, the third image quantity corresponding to each of the plurality of first distribution time periods representing a number of the third candidate images belonging to the first distribution time period.
4. The method of claim 3, wherein, The determining of the plurality of first target images in the plurality of first candidate images further comprises: in a case where there is a supplementary time period in the plurality of first distribution time periods, determining at least one second candidate image belonging to the supplementary time period again in the plurality of first candidate images other than the plurality of second candidate images, the third image quantity corresponding to the supplementary time period being less than the target quantity corresponding to the supplementary time period; screening the at least one second candidate image determined again to obtain an updated plurality of third candidate images; determining the plurality of first target images in the plurality of third candidate images comprises determining the plurality of first target images in the updated plurality of third candidate images.
5. The method of claim 4, wherein, determining the plurality of first target images in the plurality of third candidate images comprises determining that the supplement selection time period exists in a case where a number of the plurality of third candidate images is less than the second preset number. the at least one second candidate image belonging to the supplement selection time period is determined again in the plurality of first candidate images other than the plurality of second candidate images, comprising: in a case where the number of the plurality of third candidate images is less than the second preset number, the plurality of second candidate images is determined again in the plurality of first candidate images other than the plurality of second candidate images, and the plurality of second candidate images determined again is distributed in the plurality of first distribution time periods; determining the plurality of first target images in the plurality of third candidate images further comprises: in a case where the number of the plurality of third candidate images is greater than or equal to the second preset number, comparing a number of third images corresponding to each first distribution time period with a target number corresponding to the first distribution time period to determine whether the supplement selection time period exists; the at least one second candidate image belonging to the supplement selection time period is determined again in the plurality of first candidate images other than the plurality of second candidate images, comprising: in a case where the number of the plurality of third candidate images is greater than or equal to the second preset number, the at least one second candidate image belonging to the supplement selection time period is determined again in the plurality of first candidate images other than the plurality of second candidate images and belonging to the supplement selection time period.
6. The method of claim 5, wherein, in a case where the number of the plurality of third candidate images is less than the second preset number, the number of the second candidate images determined again belonging to each first distribution time period is positively correlated with a target ratio of the first distribution time period.
7. The method of claim 3, wherein, determining the plurality of first target images in the plurality of third candidate images further comprises: in a case where the supplement selection time period exists in the plurality of first distribution time periods and there is no image other than the second candidate image in the first candidate image belonging to the supplement selection time period, if the plurality of third candidate images is distributed in the plurality of first distribution time periods, the plurality of first target images is determined in the plurality of third candidate images.
8. The method of claim 7, wherein, The method further comprises: in the case that there is a supplementary time period in the plurality of first distribution time periods, and there is no image in the first candidate images belonging to the supplementary time period except the second candidate image, if the plurality of third candidate images are distributed in a plurality of second distribution time periods, determining a plurality of second target images in the plurality of third candidate images, the plurality of second distribution time periods are part of the plurality of first distribution time periods, the plurality of second target images are distributed in the plurality of second distribution time periods, and the plurality of second target images are used to show the user in the time order of the images.
9. The method according to any one of claims 4-8, characterized in that, The screening of the plurality of second candidate images to obtain a plurality of third candidate images comprises screening according to the similarity between the plurality of second candidate images, and the similarity between the plurality of third candidate images is less than or equal to a preset similarity threshold. The screening of the at least one second candidate image determined again to obtain the updated plurality of third candidate images further comprises screening the plurality of second candidate images after the adding processing to obtain the updated plurality of third candidate images, the adding processing is adding the third candidate image in the at least one second candidate image determined again, and the similarity between the updated plurality of third candidate images is less than or equal to the preset similarity threshold.
10. The method of claim 1 or 2, wherein, The plurality of first candidate images are images with a similarity to the condition information greater than or equal to a preset similarity threshold, and the similarity of the plurality of first candidate images to the condition information is different; and the plurality of second candidate images are a plurality of images with the highest similarity to the condition information in the plurality of first candidate images.
11. The method of claim 1 or 2, wherein, In the case that the plurality of first candidate images are images meeting the condition information, and the condition information is time and / or place, the plurality of second candidate images are a plurality of images randomly selected from the plurality of first candidate images.
12. The method of claim 1 or 2, wherein, The method further comprises: generating a target video according to the plurality of first target images in the time order of the images.
13. An electronic device, comprising: The electronic device comprises one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, the computer program codes comprise computer instructions, and the one or more processors invoke the computer instructions to make the electronic device execute the method in any one of claims 1 to 12.
14. A chip system, characterized by The chip system is applied to an electronic device, and the chip system comprises one or more processors, and the one or more processors are used to invoke computer instructions to make the electronic device execute the method in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises instructions, when the instructions run on an electronic device, make the electronic device execute the method in any one of claims 1 to 12.
Citation Information
Patent Citations
Generation of a digest video
US20160286072A1