Image selection method and electronic equipment

By obtaining and filtering candidate images of non-overlapping time periods in electronic devices, selecting target images and displaying them in chronological order, the problem of low video satisfaction caused by unreasonable image selection is solved, and stronger time coherence and user experience improvement is achieved.

CN120448568AActive Publication Date: 2025-08-08HONOR DEVICE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410135195.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-30
Publication Date
2025-08-08
Estimated Expiration
2044-01-30

AI Technical Summary

Technical Problem

During the video generation process of electronic devices, the selected images are unreasonable, resulting in low user satisfaction with the generated video.

Method used

By acquiring a plurality of first candidate images, distribute them in a non-overlapping time period, selecting a plurality of first target images, and displaying them in chronological order, ensuring the time consistency of the image, determining the number of images using the target duration and the target ratio, considering similarity and condition information during the filtering process, and optimizing image selection.

Benefits of technology

Improve user experience, and through reasonable image selection methods, the time coherence of videos and the logic of content presentation are enhanced, and users' satisfaction with the generated videos are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448568A_ABST
    Figure CN120448568A_ABST
Patent Text Reader

Abstract

The embodiment of the invention is applied to the field of image processing, and provides an image selection method and electronic equipment. The method comprises the steps that a plurality of first candidate images are acquired, the plurality of first candidate images are distributed in a plurality of first distribution time periods, and the plurality of first distribution time periods do not coincide with one another; multiple first target images are determined in the multiple first candidate images, the multiple images are distributed in multiple first distribution time periods, and the multiple first target images are used for being displayed to a user according to the time sequence of the images. Based on the technical method provided by the invention, the time distribution of the target image is more reasonable, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and more specifically, to an image selection method and electronic device. Background Art

[0002] Video is one of the primary ways people obtain information and enjoy entertainment in their daily lives. With the improvement of electronic device hardware performance and the continuous advancement of data processing technology, the demand for rapid video generation through electronic devices is increasing.

[0003] Many electronic devices are equipped with cameras, allowing users to take photos and videos. Electronic devices also have communication capabilities, allowing users to download images and videos from the internet or retrieve images and videos sent by other electronic devices. Electronic devices can edit stored images and / or videos to generate videos based on portions of these images and / or videos.

[0004] During the process of video generation by an electronic device, if the selected images are unreasonable, the user may be less satisfied with the generated video. Summary of the Invention

[0005] The present application provides an image selection method and electronic device, which can make the time coherence of multiple first target images displayed to the user stronger while displaying images to the user in the order of images, thereby improving the user experience.

[0006] In a first aspect, a method is provided for obtaining a plurality of first candidate images, wherein the plurality of first candidate images are distributed in a plurality of first distribution time periods, and the plurality of first distribution time periods do not overlap with each other; and a plurality of first target images are determined among the plurality of first candidate images, wherein the plurality of images are distributed in the plurality of first distribution time periods, and the plurality of first target images are used to be displayed to a user in a time sequence of the images.

[0007] The method provided in the embodiment of the present 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, the first target image is selected in each first distribution time period of the multiple first candidate images. When the images are displayed to the user in the order of the images, the time coherence of the multiple first target images displayed to the user is stronger, thereby improving the user experience.

[0008] The lengths of the plurality of 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 multiple first candidate images, the target duration being positively correlated with the time span, and the target duration being the length of each first distribution time period in the multiple 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 period is more reasonable, so that the target image selected according to the first distribution time period is more reasonable, thereby improving user experience.

[0011] In one possible implementation, the target number corresponding to each first distribution time period in the multiple first distribution time periods is positively correlated with the target ratio corresponding to the first distribution time period, the target number corresponding to each first distribution time period represents the number of the 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 multiple first candidate images.

[0012] The number of first target images in each first distribution time period is determined based on the ratio of the number of first candidate images in each first distribution time period to the total number of first candidate images, that is, the target ratio corresponding to the 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 the first distribution time period. Therefore, more first target images are selected in the first distribution time period where there are more first candidate images, and fewer first target images are selected in the first distribution time period where there are fewer first candidate images. The multiple first target images are more representative of the multiple first candidate images, so that the determined multiple first target images are more reasonable, thereby improving user experience.

[0013] In one possible implementation, determining multiple first target images from the multiple first candidate images includes: determining multiple second candidate images from the multiple first candidate images, the number of second images corresponding to each first distribution time period in the multiple 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 multiple second candidate images is less than or equal to the first preset number; screening the multiple second candidate images to obtain multiple third candidate images; determining the multiple first target images from the multiple third candidate images, and the number of the multiple first target images is less than or equal to the first preset number.

[0014] In the case where multiple target images are obtained through screening, by setting a first preset number to limit the number of images to be screened, the occupation of computing resources by screening can be reduced and processing efficiency can be improved.

[0015] In a possible implementation, the method further includes: determining the corresponding time period number of the first distribution time period based on the corresponding target ratio of each first distribution time period and the second preset number, the corresponding time period number of each first distribution time period is positively correlated with the corresponding target ratio of the first distribution time period, and the sum of the multiple time period numbers corresponding to the multiple distribution time periods is the second preset number; determining the multiple first target images among the multiple third candidate images includes: when the corresponding third image number of each first distribution time period in the multiple first distribution time periods is greater than or equal to the corresponding time period number of the first distribution time period, determining the second preset number of the first target images among the multiple third candidate images, the corresponding third image number of each first distribution time period represents the number of the third candidate images belonging to the first distribution time period, and the target number corresponding to each first distribution time period is the time period number corresponding to the first distribution time period.

[0016] The plurality of third candidate images is obtained by screening the plurality of second candidate images. The number of the plurality of third candidate images may be less than the number of the plurality of second candidate images. When it is necessary to determine a second preset number of first target images, after screening, it is possible to determine whether the third candidate images in each first distribution time period meet the quantitative requirement for selecting the first target images. If the determination result is that the third candidate images meet the requirement, the plurality of first target images are determined from the plurality of third candidate images. The quantitative requirement for selecting the first target images may 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 the first distribution time period.

[0017] In one possible implementation, the determining of a plurality of first target images for display to the user in chronological order from among a plurality of first candidate images further includes: when there is a supplementary selection time period among the plurality of first distribution time periods, re-determining at least one second candidate image belonging to the supplementary selection time period from among the plurality of first candidate images other than the plurality of second candidate images, the number of the third images corresponding to the supplementary selection time period being less than the number of time periods corresponding to the supplementary selection time period; performing the screening on the at least one second candidate image re-determined to obtain an updated plurality of third candidate images; and determining the plurality of first target images from among the plurality of third candidate images includes: determining the plurality of first target images from among the updated plurality of third candidate images.

[0018] If the number requirement for selecting the first target image is not met, that is, if a supplementary selection time period exists within the multiple first distribution time periods, at least one second candidate image belonging to the supplementary selection time period can be re-identified from the multiple first candidate images outside the multiple second candidate images. After re-identifying the at least one second candidate image belonging to the supplementary selection time period, the at least one second candidate image for the re-identified supplementary selection time period can be screened to obtain an updated third candidate image. Thus, multiple first target images can be determined from the updated multiple third candidate images.

[0019] In a possible implementation, determining the multiple first target images from the multiple third candidate images includes: if the number of the multiple third candidate images is less than the second preset number, determining that the supplementary selection time period exists; re-determining at least one second candidate image belonging to the supplementary selection time period from the multiple first candidate images other than the multiple second candidate images includes: re-determining multiple second candidate images from the multiple first candidate images other than the multiple second candidate images, wherein the re-determined multiple second candidate images are distributed within the multiple first distribution time periods; determining the multiple first target images from the multiple third candidate images also includes: if the number of the multiple third candidate images is greater than or equal to the second preset number, 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 to determine whether the supplementary selection time period exists; re-determining at least one second candidate image belonging to the supplementary selection time period from the multiple first candidate images other than the multiple second candidate images includes: if the number of the multiple third candidate images is greater than or equal to the second preset number, re-determining at least one second candidate image belonging to the supplementary selection time period from the multiple first candidate images other than the multiple second candidate images and belonging to the supplementary selection time period.

[0020] If the number of third candidate images is less than the second preset number, there may be more supplementary selection time periods. In this case, it is not necessary to compare the number of third images with the number of time periods for each first distribution time period. If the number of third candidate images is less than the second preset number, multiple second candidate images distributed within multiple first distribution time periods can be identified again from the multiple first candidate images other than the multiple second candidate images, thereby reducing the processing resources and time required to determine whether a supplementary selection time period exists.

[0021] If the number of the 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 in each first distribution time period. Thus, when the second candidate image is determined again, the second candidate image can be selected in the supplementary selection time period.

[0022] In one possible implementation, when the number of the multiple third candidate images is less than the second preset number, the number of images of the re-determined multiple second candidate images 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 determined again are more representative of the multiple first candidate images, so that the obtained multiple first target images are more representative of the multiple first candidate images, and the determined multiple first target images are more reasonable, thereby improving user experience.

[0024] In one possible implementation, determining the multiple first target images among the multiple third candidate images further includes: when there is a supplementary selection time period in the multiple first distribution time periods, and there is no image other than the second candidate image among the first candidate images belonging to the supplementary selection time period, if the multiple third candidate images are distributed in the multiple first distribution time periods, then determining the multiple first target images among the multiple third candidate images.

[0025] In one possible implementation, the method further includes: when there is a supplementary selection time period in the multiple first distribution time periods, and there is no image other than the second candidate image in the first candidate images belonging to the supplementary selection time period, if the multiple third candidate images are distributed in multiple second distribution time periods, then determining multiple second target images in the multiple third candidate images, the multiple second distribution time periods are partial time periods in the multiple first distribution time periods, the multiple second target images are distributed in the multiple second distribution time periods, and the multiple second target images are used to be displayed to the user in chronological order of the images.

[0026] If there is no first candidate image other than the second candidate image in a certain supplementary selection time period among the first candidate images, and there is no third candidate image belonging to the certain supplementary selection time period among the multiple third candidate images obtained by screening, then multiple second target images can be determined among the multiple third candidate images so that the second target images are distributed in each second distribution time period outside the certain supplementary selection time period. If the third candidate image is distributed in only part of the multiple first distribution time periods, then the second target image can be determined among the multiple third candidate images, and the second target image can be distributed in this part of the time period, so that the time period in which the multiple second target images are distributed is as close as possible to the time period in which the multiple first candidate images are distributed. When the second target image is displayed to the user in the order of the images, the temporal coherence of the images displayed to the user is stronger, thereby improving the user experience.

[0027] In one possible implementation, the screening of the multiple second candidate images to obtain multiple third candidate images includes: screening based on the similarity between the multiple second candidate images, the similarity between the multiple third candidate images being less than or equal to a preset similarity threshold; the screening of the at least one second candidate image that has been re-determined to obtain the updated multiple third candidate images also includes: screening the multiple second candidate images that have been added to obtain the updated multiple third candidate images, the adding processing being obtained by adding the third candidate image to the at least one second candidate image that has been re-determined, and the similarity between the multiple third candidate images that have been updated is less than or equal to the preset similarity threshold.

[0028] During the similarity-based screening of the reselected candidate images, the influence of the previous screening results is taken into account, ensuring that no images similar to those in the previous screening results are included in the reselected candidate images. This effectively avoids the occurrence of similar images among the multiple first target images, improving the effectiveness of the screening.

[0029] Moreover, the third candidate image is an image that has been screened. Compared with adding the unscreened second candidate image to the at least one second candidate image that has been re-determined, the third candidate image is added to the at least one second candidate image that has been re-determined, and the multiple second candidate images after addition are screened to improve processing efficiency.

[0030] In one possible implementation, the multiple first candidate images are images whose similarity to the condition information is greater than or equal to a preset similarity threshold, and the multiple first candidate images have different similarities to the condition information; the multiple second candidate images are the multiple images with the highest similarity to the condition information among the multiple first candidate images.

[0031] That is, multiple second candidate images can be determined from multiple first candidate profile pictures in order of gradually decreasing similarity. By determining multiple second candidate images from multiple first candidate profile pictures in order of gradually decreasing similarity, the second candidate images are more consistent with the condition information, thereby improving the degree of consistency between the multiple determined target images and the condition information and making the determined target image more accurate.

[0032] In a possible implementation, when the multiple first candidate images are images that meet condition information, and the condition information is time and / or location, the multiple second candidate images are multiple images randomly selected from the multiple first candidate images.

[0033] Because the conditional information only includes time and / or location, the ranking of the multiple first candidate images obtained may be concentrated among first candidate images with the same time or location. 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 resulting multiple first target images more representative of the multiple first candidate images, and the determined multiple first target images more reasonable, thereby improving the user experience.

[0034] In a possible implementation, the method further includes: generating a target video based on the multiple first target images in a time sequence of the images.

[0035] In a second aspect, an image selection device is provided, comprising a unit for executing the method of the first aspect. The device may be a terminal device or a chip within the terminal device.

[0036] In a third aspect, an electronic device is provided, comprising 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 comprising computer instructions, the one or more processors calling the computer instructions to enable the electronic device to execute the method of the first aspect.

[0037] In a fourth aspect, a chip system is provided, which is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the method of the first aspect.

[0038] In a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes instructions, and when the instructions are executed on an electronic device, the electronic device executes the method of the first aspect.

[0039] According to a sixth aspect, a computer program product is provided. When the computer program product is run on an electronic device, the electronic device executes the method according to the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a schematic diagram of a hardware system of an electronic device applicable to the present application;

[0041] Figure 2 is a schematic diagram of a software system suitable for the device of the present application;

[0042] Figure 3 is a schematic diagram of a graphical user interface provided in an embodiment of the present application;

[0043] Figure 4 is a schematic flow chart of an image selection method provided in an embodiment of the present application;

[0044] Figure 5 is a schematic flow chart of another image selection method provided in an embodiment of the present application;

[0045] Figure 6 This is a method for determining a time period applied in an image selection method provided in an embodiment of the present application;

[0046] Figure 7 is a schematic diagram of image data provided by an application embodiment;

[0047] Figure 8 is a schematic flow chart of a video generation method provided in an embodiment of the present application;

[0048] Figure 9 This is another graphical user interface diagram provided in an embodiment of the present application;

[0049] Figure 10 This is a schematic structural diagram of an image selection device provided in this application. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0051] The present invention provides a method for adjusting the duration of a video. The method can be applied to electronic devices, such as tablet computers, mobile phones, wearable devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). The present invention does not limit the specific type of electronic device.

[0052] Figure 1 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, an antenna 1, an 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light 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 should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0054] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. For example, the processor 110 is used to execute the image selection method in the embodiment of the present application.

[0055] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0056] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and an application required for at least one function (such as an image playback function, etc.). The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0057] The electronic device 100 implements display functions through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information. For example, the process of displaying a target video in the embodiments of the present application can be implemented by the GPU.

[0058] The display screen 194 is used to display images, videos, etc. The 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. For example, in the embodiments of the present application, Figure 3 (a) or Figure 3 The interfaces shown in (b) are all displayed by the display.

[0059] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0060] Figure 2 This is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the system library 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, short message and creation assistant.

[0062] The creation assistant can obtain video generation instruction information from the user. The video generation instruction information includes condition information. The condition information can be understood as keywords in the video generation instruction information. The video generation instruction information can be natural speech information. The video generation instruction information is used to instruct the generation of a video according to the condition information.

[0063] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0064] The application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like. The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, and the like. The content provider is used to store and obtain data and make the data accessible to applications. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and the like. The view system can be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures. The phone manager is used to provide communication functions for the electronic device 100. The resource manager provides various resources for applications. The notification manager enables applications to display notification information in the status bar.

[0065] The application framework layer can also include a media processing middle platform, a search module, a quick application engine, and light editing services.

[0066] The search module can search the initial images according to the condition information to determine images that meet the condition information.

[0067] The media processing center determines a preset number of target images from the images that meet the condition information.

[0068] The quick application engine can send a card to the authoring assistant, so that the authoring assistant can use the card to display the target image.

[0069] The light editing service can generate a target video based on the target image.

[0070] The creative assistant can also display the target video.

[0071] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.

[0072] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0073] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0074] The system library can include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library, 2D graphics engine, etc.

[0075] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0076] The media library supports playback and recording of a variety of common audio and video formats, as well as static 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 drawing engine for 2D drawings.

[0079] The kernel layer is the layer between hardware and software. The kernel layer can include driver modules such as display driver, camera driver, audio driver, and sensor driver.

[0080] The embodiments of the present application do not particularly limit the specific structure of the execution subject of the image selection method. As long as the code recording the image selection method of the embodiments of the present application can be run to perform image processing according to the image selection method provided by the embodiments of the present application. For example, the execution subject of the image selection method provided by the embodiments of the present application can be an electronic device, or a functional module in the electronic device that can call and execute a program, or a physical device used in the electronic device, such as a chip.

[0081] Currently, many electronic devices are equipped with cameras, allowing users to take photos and videos. Electronic devices also have communication capabilities, allowing users to download images and videos from the internet or receive images and videos sent by other electronic devices. Electronic devices can select and edit stored images and / or videos to generate new videos.

[0082] The following first describes a scenario diagram of the image selection method provided in an embodiment of the present application. The diagram uses the voice assistant of an electronic device as an example to call a video editing application.

[0083] Reference Figure 3As shown in (a) of the figure, the user speaks the voice "yoyo" within the voice detection range of the electronic device to wake up the voice assistant of the electronic device. After the electronic device detects the voice "yoyo", it responds with a voice "I am listening, please speak" and displays Figure 3 The interface shown in (a) in the 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." Of course, the purpose of this voice response and text message is to remind the user that the voice assistant has been awakened and to ask the user to speak the voice command. In actual applications, other voice response content and text message content can also be set according to the situation to serve the same reminder function.

[0084] The user responds to the voice message "I'm listening, please speak" and / or the text message "I'm listening, please speak", and says "generate a video review of last year" within the voice monitoring range of the electronic device. Figure 3 As shown in (b), after the electronic device detects the voice "Generate a video of last year's annual review", the user's voice message "Generate a video of last year's annual review" is displayed in the voice assistant window 21, and the video is generated based on the pictures and videos belonging to last year stored in the electronic device. The material for generating the video can be pictures and / or videos in the gallery application. After the video is successfully generated, a voice "A video of last year's annual review has been generated for you" is issued. At the same time, the text content "A video of last year's annual review has been generated for you" and the video icon 22 are displayed in the voice assistant window. In actual application, the user can click on the video icon 22 to trigger the electronic device to play the video. This application will no longer use diagrams as examples.

[0085] In the process of generating a video based on the user's voice, if the selected images are unreasonable, the user may be less satisfied with the generated video.

[0086] In order to improve user satisfaction with the generated video, an embodiment of the present application provides an image selection method and an electronic device.

[0087] The following combination Figure 4 The image selection method provided in the embodiments of the present application is described in detail. The execution subject of the method provided in the present application can be an electronic device or a software / hardware module in the electronic device that can perform image selection. For ease of description, the following embodiments are described using an electronic device as an example.

[0088] Figure 4 This is a schematic flowchart of an image selection method provided in an embodiment of the present application. Figure 4 The method shown includes step S410 and step S420.

[0089] Step S410 : Acquire a plurality of first candidate images, where the plurality of first candidate images are distributed in a plurality of first distribution time periods, and the plurality of first distribution time periods do not overlap.

[0090] The method of obtaining multiple first candidate images may be to receive first candidate images sent by other electronic devices or modules, to read first candidate images from a storage unit such as a memory, or to determine the first candidate image from multiple images.

[0091] The first candidate image may be an execution Figure 4 The whole or part of the images stored in the electronic device of the method shown may also be the whole or part of the images stored in the server of the user of the electronic device. Different users may correspond to different accounts.

[0092] For example, before step S410, condition information may be acquired, which may include one or more of time, place, person, event, scene, etc.

[0093] The plurality of first candidate images may be images that meet the condition information.

[0094] Alternatively, the plurality of first candidate images may be images obtained by screening the images that meet the condition information. The screening of images may include one or more of removing low-resolution images (resolution below a preset resolution threshold), removing images containing gory or violent scenes, and deduplication based on similarity.

[0095] For example, the multiple first candidate images may be images that meet the condition information determined from the multiple initial images. The multiple initial images may include a single static image or multiple frames of images in a video.

[0096] Step S420 , determining a plurality of first target images from the plurality of first candidate images, wherein the plurality of images are distributed in the plurality of first distribution time periods, and the plurality of first target images are used to be displayed to the user in a time sequence of the images.

[0097] The first target image can be understood as a representative image of multiple first candidate images. When displaying the first target images to the user in sequential order, at least one first target image is selected from each time period within the multiple first candidate images. This enhances the temporal coherence of the images displayed to the user. These multiple first target images enable the recorded content to unfold from distant to recent events, creating a gradually advancing storyline and improving the user experience.

[0098] The lengths of the multiple first distribution time periods can be equal or unequal. If the lengths of the multiple first distribution time periods are equal, the lengths can be determined based on the time spans of the multiple first candidate images. The length of each first distribution time period can be a target length. The target length can be positively correlated with the time spans of the multiple first candidate images. This makes the number of first distribution time periods more reasonable, and the division of the first distribution time periods more rational, thereby improving the user experience.

[0099] The number of the plurality of first target images may be a preset fixed value, or may be determined according to the number of the plurality of first candidate images. For example, the number of the plurality of first target images may be positively correlated with the number of the plurality of first candidate images.

[0100] The number of the plurality of first target images may be a second preset number, and the target duration may be negatively correlated with the second preset number.

[0101] Among the multiple first target images, the number distributed in each first distribution time period may be equal, or may be randomly determined based on the second preset number.

[0102] Alternatively, the number of first target images distributed in each first distribution time period can be determined based on the number of first candidate images belonging to the first distribution time period and the number of the plurality 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 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 among the plurality of first candidate images to the number of the plurality of first candidate images.

[0103] That is, the target ratio corresponding to each first distribution time period may represent the percentage of the first candidate images belonging to the first distribution time period to all the first candidate images.

[0104] The number of first candidate images belonging to a first distribution time period may also be referred to as the number of first images corresponding to the first distribution time period.

[0105] When the ratio between the number of first images corresponding to a certain first distribution time period and a representative value of multiple first image numbers is greater than or equal to a preset ratio threshold, the number of first images corresponding to the certain first distribution time period can be suppressed.

[0106] Suppressing the number of first images corresponding to a first distribution time period may be performed 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 may be a preset fixed value. Alternatively, for different first distribution time periods, the suppression ratio may be determined based on the difference between the ratio of the number of first images corresponding to the first distribution time period to a representative value of the plurality of first image numbers and a preset ratio threshold. The suppression ratio may be negatively correlated with the difference between the ratio of the number of first images corresponding to the first distribution time period to a representative value of the plurality of first image numbers and a preset ratio threshold.

[0108] Based on the number of suppressed first images corresponding to the suppressed first distribution time period and the number of first images corresponding to other first distribution time periods, a corrected target ratio can be obtained for each first distribution time period. For first distribution time periods that are not suppressed, the corrected 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 first distribution time periods that are suppressed, the corrected 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] Exemplarily, the target quantity corresponding to each first distribution time period may be proportional to the modified target ratio corresponding to the first distribution time period.

[0110] The number of first target images in each first distribution time period is determined based on the ratio of the number of first candidate images in each first distribution time period to the total number of first candidate images, that is, the target ratio corresponding to the 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 the first distribution time period. Therefore, more first target images are selected in the first distribution time period where there are more first candidate images, and fewer first target images are selected in the first distribution time period where there are fewer first candidate images. The multiple first target images are more representative of the multiple first candidate images, so that the determined multiple first target images are more reasonable, thereby improving user experience.

[0111] When the number of first candidate images is large, screening the first candidate images results in a large computational load. To reduce the computational load, multiple second candidate images can be determined from the first candidate images, the multiple second candidate images can be screened, and the multiple first target images can be determined based on the screening results. The screening results can include multiple third candidate images, and the multiple first target images can be determined from the multiple third candidate images.

[0112] The number of the plurality of second candidate images is less than or equal to a first preset number. If the number of the plurality of first candidate images is greater than or equal to the first preset number, the number of the plurality of second candidate images may be the first preset number. If the number of the plurality of first candidate images is less than the first preset number, the number of the plurality of second candidate images may be the number of the plurality of first candidate images. In other words, if the number of the plurality of first candidate images is small, less than the first preset number, all of the first candidate images may be used as second candidate images.

[0113] By limiting the number of second candidate images, the amount of screening calculations can be reduced, processing efficiency can be improved, and the time required to determine the first target image can be reduced.

[0114] When the number of first target images in each first distribution time period is positively correlated with the target ratio corresponding to the first distribution time period, in the process of selecting the second candidate image, 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, and 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.

[0115] Exemplarily, the number of second candidate images belonging to each first distribution time period may be proportional to the correction target ratio corresponding to the first distribution time period.

[0116] Thus, in the first distribution time period when there are many first candidate images, more second candidate images are selected, and then more first target images are selected from these many second candidate images; in the first distribution time period when there are few first candidate images, fewer second candidate images are selected, and then fewer first target images are selected from these many second candidate images. These many second candidate images are more representative of the many first candidate images, so that the obtained many first target images are more representative of the many first candidate images, and the determined many first target images are more reasonable, thereby improving the user experience.

[0117] The plurality of third candidate images is obtained by screening the plurality of second candidate images. The number of the plurality of third candidate images may be smaller than the number of the plurality of second candidate images. In the case where a second preset number of first target images needs to be determined, after screening, it can be determined whether the third candidate images in each first distribution time period meet the number requirement for selecting the first target images. If the determination result is that the number of third candidate images meets the requirement, the plurality of first target images are determined from the plurality of third candidate images.

[0118] The number of time periods corresponding to each first distribution time period can be determined based on the target ratio corresponding to each first distribution time period and the second preset number. 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 multiple distribution time periods is the second preset number.

[0119] Exemplarily, the number of time periods corresponding to each first distribution time period may be proportional to the corrected target ratio corresponding to the first distribution time period.

[0120] The number requirement for selecting the first target images may 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 the 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] 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, that is, the number requirements for selecting the first target image are met, a second preset number of first target images can be determined from multiple third candidate images.

[0122] Among the determined second preset number of first target images, the target number corresponding to each first distribution time period, that is, the number of first target images belonging to the first distribution time period, may be the number of time periods corresponding to the first distribution time period.

[0123] If the number requirement for selecting the first target images is not met, that is, if a supplementary selection time period exists in the multiple first distribution time periods, at least one second candidate image belonging to the supplementary selection time period may be determined again from the multiple first candidate images other than the multiple second candidate images. The supplementary selection time period may be a first distribution time period in which the number of corresponding third images is less than the number of corresponding time periods in the multiple first distribution time periods.

[0124] After re-determining at least one second candidate image belonging to the supplementary selection time period, the at least one second candidate image for the re-determined supplementary selection time period can be screened to obtain an updated third candidate image. Thus, multiple first target images can be determined from the updated plurality of third candidate images. In other words, the updated plurality of third candidate images can be used as the plurality of third candidate images.

[0125] To determine whether a supplementary selection period exists within the 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 the first distribution time period. If the number of third images corresponding to a first distribution time period is less than the number of time periods corresponding to the first distribution time period, the first distribution time period is a supplementary selection period.

[0126] When the supplementary selection time period is determined, at least one second candidate image belonging to the supplementary selection time period may be determined again from among the plurality of first candidate images other than the plurality of second candidate images and belonging to the supplementary selection time period.

[0127] When there are multiple supplementary selection time periods, re-determining the at least one second candidate image belonging to the supplementary selection time period may include re-determining at least one second candidate image belonging to the multiple supplementary selection time periods. After re-determining the 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 may be screened.

[0128] However, 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 requires more computing resources.

[0129] To reduce computing resource usage, the number of multiple third candidate images can be compared with a second preset number before 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. If the number of multiple third candidate images is less than the second preset number, a supplementary selection time period is determined to exist, and multiple second candidate images are again determined from the multiple first candidate images other than the multiple second candidate images. The multiple second candidate images thus determined are distributed within the multiple first distribution time periods. In other words, the multiple second candidate images thus determined include the second candidate images within the supplementary selection time period.

[0130] If the number of third candidate images is less than the second preset number, there may be more supplementary selection time periods. In this case, it is not 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 first candidate images other than the second candidate images, thereby reducing the processing resources and time required to determine whether a supplementary selection time period exists.

[0131] The number of images in the re-determined plurality of second candidate images that respectively belong to the plurality of first distribution time periods may be equal or unequal. For example, the number of images in the re-determined plurality of second candidate images that belong to each first distribution time period may be positively correlated with the target ratio corresponding to the first distribution time period. Thus, the re-determined plurality of second candidate images are more representative of the plurality of first candidate images, making the resulting plurality of first target images more representative of the plurality of first candidate images, and the determined plurality of first target images more reasonable, thereby improving the user experience.

[0132] Exemplarily, the number of images of the re-determined plurality of second candidate images belonging to each first distribution time period may be proportional to the correction target ratio corresponding to the first distribution time period.

[0133] In the case where there is a supplementary selection time period in the multiple first distribution time periods, but no image other than the second candidate image exists in the first candidate images belonging to the supplementary selection time period, if multiple third candidate images are distributed in multiple first distribution time periods, multiple first target images distributed in the multiple first distribution time periods can be determined in the multiple third candidate images.

[0134] The plurality of third candidate images distributed in the plurality of first distribution time periods may be a plurality of updated third candidate images, or may be a plurality of unupdated third candidate images.

[0135] Among the multiple first target images determined when there is a supplementary selection time period in the multiple first distribution time periods but there is no image other than the second candidate image among the first candidate images belonging to the supplementary selection time period, the number of first target images belonging to the supplementary selection time period is less than the number of time periods corresponding to the supplementary selection time period.

[0136] The number of first target images belonging to a first distribution time period outside the supplementary selection time period may be equal to the number of time periods corresponding to the first distribution time period. In other words, the number of the plurality of first target images may 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 may be greater than the number of time periods corresponding to the first distribution time period, so that the number of the plurality of first target images is a second preset number.

[0138] In the case where there is a supplementary selection time period among multiple first distribution time periods, and there is no image other than the second candidate image among the first candidate images belonging to the supplementary selection time period, if multiple third candidate images are distributed in multiple second distribution time periods, then multiple second target images are determined among the multiple third candidate images.

[0139] The plurality of second distributed time periods are partial time periods of the plurality of first distributed time periods. That is, the plurality of first distributed time periods include the plurality of second distributed time periods, and the number of the plurality of first distributed time periods is greater than the number of the plurality of second distributed time periods.

[0140] The plurality of second target images may be distributed in the plurality of second distribution time periods, and the plurality of second target images are used to be displayed to the user in a time sequence of the images.

[0141] That is to say, if there is no first candidate image other than the second candidate image in a certain supplementary selection time period among the first candidate images, and there is no third candidate image belonging to the certain supplementary selection time period among the multiple third candidate images obtained by screening, then multiple second target images can be determined among the multiple third candidate images so that the second target images are distributed in each second distribution time period outside the certain supplementary selection time period. If the third candidate image is only distributed in part of the multiple first distribution time periods, then the second target image can be determined among the multiple third candidate images, and the second target image can be distributed in this part of the time period, so that the time period in which the multiple second target images are distributed is as close as possible to the time period in which the multiple first candidate images are distributed. When the second target image is displayed to the user in the order of the images, the temporal coherence of the images displayed to the user is stronger, thereby improving the user experience.

[0142] Screening of multiple second candidate images may include one or more of removing images with resolutions lower than a preset resolution threshold, removing images recording bloody or violent scenes, and deduplication based on similarity.

[0143] The screening of the at least one re-determined second candidate image may be performed only on the at least one re-determined second candidate image.

[0144] Alternatively, when the screening of multiple second candidate images includes screening according to the similarity between the multiple second candidate images so that the similarity between the obtained multiple third candidate images is less than or equal to a preset similarity threshold, the screening of at least one second candidate image determined again may be screening of the multiple second candidate images after the additional processing.

[0145] The adding process may be performed by adding a plurality of third candidate images to the at least one second candidate image that is determined again, or by adding a plurality of second candidate images to the at least one second candidate image that is determined again.

[0146] When reselecting candidate images based on similarity, the influence of the previous screening results is taken into account, so that there are no images in the reselected candidate images that are similar to the images in the previous screening results. This effectively avoids the situation where two target images are similar.

[0147] The adding process of adding multiple third candidate images to the at least one second candidate image that has been re-determined may be to add all or part of the multiple third candidate images to the at least one second candidate image that has been re-determined. After determining the multiple third candidate images, target images belonging to other first distribution time periods outside the supplementary selection time period may be determined. The adding process may include adding the target images belonging to the other first distribution time periods to the at least one second candidate image that has been re-determined. In the event that there is a third candidate image belonging to the supplementary selection time period, the adding process may include adding the target images belonging to the other first distribution time periods and the third candidate images belonging to the supplementary selection time period to the at least one second candidate image that has been re-determined, so as to obtain the multiple added second candidate images.

[0148] The third candidate image is an image that has been screened. Compared with adding the unscreened second candidate image to the at least one re-determined second candidate image, the third candidate image is added to the at least one re-determined second candidate image, and the multiple second candidate images after addition are screened to improve processing efficiency.

[0149] The re-determination of the second candidate image may be performed once or multiple times. The updated multiple third candidate images obtained after each re-determination of the second candidate image may be used as the multiple third candidate images.

[0150] If the number of the multiple third candidate images is greater than or equal to the second preset number, the re-determined second candidate images may be the first candidate images belonging to the supplementary selection time period. If the second preset number has already been determined, and if the value of the first preset number is set appropriately, 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 is relatively close to the number of the multiple third candidate images. Adding the multiple third candidate images to the re-determined second candidate images to obtain the added multiple second candidate images can make the screening results of the added multiple second candidate images more comprehensive and accurate, with virtually no increase in computational effort.

[0151] The target images belonging to the other first distribution time period may be images in the plurality of first target images or the plurality of second target images.

[0152] In the process of determining the second subsequent image from the plurality of first candidate images, the second subsequent image may be selected randomly or in a certain order.

[0153] When 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 degrees of the multiple first candidate images are different, multiple second candidate images can be determined from the multiple first candidate profile pictures in order of gradually decreasing matching degrees.

[0154] That is, the plurality of second candidate images include at least one first candidate image with the highest matching degree belonging to each first distribution time period.

[0155] In the process of re-determining the second candidate image, the second candidate image may also be re-determined from the first candidate images in the order of gradually decreasing matching degree.

[0156] In the process of determining the multiple target images from the multiple third candidate images, the multiple target images may also be determined from the multiple third candidate images in an order of gradually decreasing matching degrees.

[0157] For example, the acquired plurality of first candidate images may be arranged in order of decreasing matching degree. Then, in determining the plurality of second candidate images from the plurality of first candidate images, the plurality of second candidate images may be selected according to the order in which the plurality of first candidate images are arranged.

[0158] The plurality of second candidate images may also be arranged in the same order as the plurality of first candidate images. That is, the order of any two second candidate images in the plurality of second candidate images is the same as the order of the two second candidate images in the plurality of first candidate images.

[0159] Furthermore, the plurality of third candidate images may also be arranged in the same order as the plurality of third candidate images. That is, the order of any two third candidate images in the plurality of third candidate images is the same as the order of the two third candidate images in the plurality of first candidate images.

[0160] Therefore, when multiple target images are determined from the multiple third candidate images, the target image 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 degree of match with the condition information in each first distribution time period.

[0161] The first candidate images have a matching degree with the condition information that is greater than or equal to a preset matching degree threshold. The first candidate images are images that have a high degree of conformity with the condition information. The matching degree of an image with the condition information can also be understood as the degree of conformity between the image and the condition information, or the similarity between the image and the condition information.

[0162] In the case where the condition information includes other information besides time and place, the similarities between the plurality of first candidate images determined according to the condition information and the condition information are not equal.

[0163] Multiple second candidate images are determined from the multiple first candidate profile pictures in order of decreasing similarity, so that the second candidate images are more consistent with the condition information, thereby improving the degree of consistency between the multiple determined target images and the condition information and making the determined target images more accurate. The multiple target images may be multiple first target images or multiple second target images.

[0164] If the conditional information only includes time and / or location, the multiple first candidate images determined based on the conditional information have the same similarity to the conditional information. If the conditional information only includes time and / or location, the multiple first candidate images can all have a similarity of 100% to the conditional information. If the conditional information only includes time and / or location, the multiple second candidate images are randomly selected from the multiple first candidate images.

[0165] For example, after obtaining the plurality of first candidate images, the plurality of first candidate images may be randomly sorted. Thus, in the process of determining the plurality of second candidate images from the plurality of first candidate images, the plurality of second candidate images may be selected according to the order in which the plurality of first candidate images are arranged, so that the plurality of second candidate images are random images from the plurality of first candidate images.

[0166] Because the conditional information only includes time and / or location, the ranking of the multiple first candidate images obtained may be concentrated among first candidate images with the same time or location. 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 resulting multiple first target images more representative of the multiple first candidate images, and the determined multiple first target images more reasonable, thereby improving the user experience.

[0167] When the condition information only includes time and / or location, the target images may be randomly selected from the plurality of third candidate images during the process of determining the plurality of target images. The plurality of third candidate images with the highest image scores may be selected from the plurality of third candidate images in descending order as the target images.

[0168] The image score of each third candidate image may be determined based on one or more of the aesthetic score, scene score, and interaction score of the third candidate image. The image score may be an average or weighted average of the aesthetic scores, scene scores, and interaction scores of the third candidate images, or may be determined based on the ranking of the aesthetic scores, scene scores, and interaction scores of the third candidate images among the plurality of third candidate images.

[0169] The aesthetic score of each third candidate image can be obtained by performing aesthetic scoring on the 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. The multiple scene types may include multiple scene types such as parties, parent-child, children's play, travel, sports, people, Chinese architecture, other architecture, night scenes, food, and cute pets.

[0171] The interaction score of each third candidate image may be obtained according to one or more of the number of interactions between the user and the third candidate image, the number of interactions between the user and an image recording the object in the third candidate image, and the like.

[0172] It should be understood that conditional information may also be obtained before performing step S420. When the conditional information includes time and / or location, multiple second candidate images may be randomly selected from the multiple first candidate images. When the conditional information includes information other than time and location, the multiple second candidate images may be selected in order of decreasing similarity between the image and the conditional information.

[0173] After determining a plurality of target images, the plurality of target images are displayed to the user in a time sequence of the images. The plurality of target images may be a plurality of first target images or a plurality of second target images.

[0174] For example, after determining multiple target images, a target video may be generated based on the multiple target images in chronological order. In the target video, target images that are earlier in time may be displayed in earlier frames in the target video, and target images that are later in time may be displayed in later frames in the target video.

[0175] The method provided in the embodiment of the present application selects multiple first target images from multiple first candidate images, and 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, the first target image is selected in each time period in which the multiple first candidate images are distributed, so that when the images are displayed to the user in the order of the images, the time coherence of the images displayed to the user is stronger, thereby improving the user experience.

[0176] The following combination Figures 5 to 9 , the image selection method provided by the embodiment of the present application is described in detail. In some embodiments, the first candidate image can be Figure 5 The candidate image in the method shown, the second candidate image can be Figure 5 In the selected image of the method shown, the third candidate image can be Figure 5 In some other embodiments, the first candidate image may also be Figure 5 The second candidate image or the 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 the present application. Figure 5 The image selection method shown includes steps S501 to S519.

[0178] Step S501: Acquire condition information.

[0179] Condition information can be obtained by receiving condition information sent by other modules or by determining it based on the user's video generation instruction information. The user's video generation instruction information can be semantic information obtained by recognizing the user's voice or text input by the user. The video generation instruction information includes condition information.

[0180] For example, if the semantics expressed by the user's voice, ie, the user's video generation instruction information, is "generate a video reviewing last year", the condition information may be "last year". The video generation instruction information is used to instruct the generation of a video.

[0181] Step S502: Send condition information to the search module.

[0182] The search module can determine the candidate images that meet the condition information based on the condition information. For example, the search module can search in multiple initial images to determine the candidate images that meet the condition information. It should be understood that the search in multiple initial images is Figure 5 The methods shown may be implemented in the same or different electronic devices.

[0183] Step S503: receiving image information sent by the search module, where the image information includes a transmission identifier and at least one candidate image that meets the condition information.

[0184] implement Figure 5 The module of the illustrated method and the search module are located in different processes. Considering memory limitations, the search module can include no more than a preset number of candidate images or a preset amount of space occupied by candidate images, as well as a transmission flag in each image message sent. The transmission flag is used to indicate whether the transmission is complete.

[0185] Exemplarily, the transmission flag may be a flag. That is, the transmission flag may indicate whether the transmission is complete by "0" or "1." For example, a transmission flag of "0" may indicate that the transmission is incomplete, and a transmission flag of "1" may indicate that the transmission is complete.

[0186] In the search module, all candidate images that meet the conditions in the initial image are transmitted to the execution Figure 5 In the last image information of the module of the method shown, the transmission mark may indicate that the transmission is complete. In other image information before the last one, the transmission mark may indicate that the transmission is not complete.

[0187] In the at least one image information sent by the search module, the candidate images may be sorted by their degree of match with the condition information. A candidate image meeting the condition information may be understood as an initial image whose degree of match with the condition information is greater than or equal to a preset match threshold. The match degree may also be understood as the degree of conformity.

[0188] The method provided in the embodiment of the present application is described below by taking as an example the arrangement of multiple candidate images in the at least one image information in an order of gradually decreasing matching degree.

[0189] Step S504: determine whether the transmission identifier in the image information indicates that the transmission is completed.

[0190] When the transmission flag of the image information indicates that the transmission is not completed, S503 and S504 are performed again.

[0191] When the transmission flag of the image information indicates that the transmission is completed, step S505 is performed.

[0192] The number of candidate images that meet the condition information, that is, the total number of candidate images received when the transmission is completed, can be N.

[0193] Step S505 : determining the time span of the received N candidate images.

[0194] The N candidate images may be understood as all received candidate images.

[0195] The time span of the N candidate images can be understood as the length of the time range of the N candidate images.

[0196] Each candidate image may correspond to a time point, and the time length between the earliest time point corresponding to the N candidate images and the latest time point corresponding to the N candidate images.

[0197] Step S506 : dividing the time range of the N candidate images according to the time span to obtain multiple time periods.

[0198] The lengths of the multiple time periods may be equal, and the lengths of the time periods may be positively correlated with the time span.

[0199] For example, in step S506, 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 may be performed. If the time span is less than or equal to 2 years, step S603 may be performed.

[0202] Step S602 : dividing the time range of the N candidate images into years to obtain multiple time periods.

[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 may be performed. If the time span is less than or equal to one month, step S605 may be performed.

[0205] In step S604, the time range of the N candidate images is divided into months to obtain multiple time periods.

[0206] In step S605 , the time range of the N candidate images is divided into days to obtain multiple time periods.

[0207] After step S602, step S604 or step S605, step S606 may be performed.

[0208] Step S606: Determine the time period to which each candidate image belongs.

[0209] Taking the day, month, and year as the length of the time period, respectively, to determine the candidate images in each time period can also be understood as clustering the candidate images according to the day, month, and year.

[0210] The time period to which the time point corresponding to each candidate image belongs may be used as the time period to which the candidate image belongs.

[0211] After determining multiple time periods and candidate images belonging to each time period, step S507 may be performed.

[0212] Step S507: Calculate the target ratio.

[0213] The target ratio is calculated based on the number of first images of the candidate images in each of the multiple time periods. The number of first images of the candidate images in each time period can also be understood as the number of first images corresponding to the time period.

[0214] The target ratio may be a ratio between the numbers of first images of the candidate images in each of the plurality of time periods.

[0215] For example, if the number of the multiple time periods is 3, and the numbers of first images corresponding to the three time periods are 10, 20, and 30 respectively, the target ratio may be a ratio of 10, 20, and 30, and the target ratio may be expressed as 1:2:3.

[0216] In some cases, the number of candidate images in one or more time periods is relatively large, and may differ from the number of candidate images in other time periods by at least one order of magnitude. Selecting images according to the target ratio may result in the selected images being mainly concentrated in the one or more time periods.

[0217] In order to prevent the selected images in step S510 from being excessively concentrated in one or several time periods, the number of first images corresponding to the one or several time periods may be suppressed during the target ratio calculation process.

[0218] Exemplarily, when the ratio between the number of first images corresponding to a certain time period and a representative value of multiple numbers of first images is greater than or equal to a preset ratio threshold, the number of first images corresponding to the certain time period may be suppressed.

[0219] The preset ratio threshold is greater than 1, for example, may be 5 or 10.

[0220] The representative value of the number of first images may be a representative value of the number of first images corresponding to time periods other than the time period, or a representative value of the number of first images corresponding to multiple time periods including the time period. The representative value of the number of first images may be the minimum value, median, or mode of the number of first images. The representative value of the number of first images may represent a data concentration trend of the number of first images.

[0221] The number of candidate images for a certain time period may be suppressed by multiplying the number of candidate images for the certain time period by the suppression ratio during calculation of the target ratio to obtain the number of suppressed first images corresponding to the certain time period. The suppression ratio is greater than 0 and less than 1. Thus, during calculation of the target ratio, for time periods with corresponding numbers of suppressed first images, the target ratio is calculated using the suppressed numbers of first images.

[0222] The inhibition ratio may be preset, for example, 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 numbers of first images corresponding to multiple time periods may have a negative correlation with the suppression ratio corresponding to the certain time period. In other words, the number of suppressed first images corresponding to a certain time period may be the product of the number of first images corresponding to the time period and the suppression ratio corresponding to the time period.

[0224] For example, if there are three time periods, and the numbers 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, such as 0.5, so the number of first images corresponding to the third time period after suppression is 300 × 0.5 = 150. Therefore, the target ratio can be the ratio of the numbers of first images corresponding to the first and second time periods, respectively, to the number of first images corresponding to the third time period after suppression, i.e., the target ratio can be 10:20:150 = 1:2:15.

[0225] Step S508: determine whether the condition information only includes information related to time and / or location.

[0226] In the case where the condition information only includes information related to time and / or location, the matching degrees of the N candidate images and the condition information are equal.

[0227] The image information can carry the matching degree of each candidate image with the condition information. Alternatively, perform Figure 5The module of the illustrated method may determine that the matching degrees of the N candidate images and the condition information are equal when the condition information only includes information related to time and / or location.

[0228] In the case that the condition information only includes information related to time and / or place, step S509 may be performed.

[0229] In the case where the condition information does not include only information related to time and / or place, steps S510 to S514 may be performed.

[0230] Step S509: disrupt the order of the N candidate images.

[0231] In the image information, the N candidate images may be arranged according to the degree of matching. The order of the N candidate images in the image information may be used as the order of the N candidate images.

[0232] In the case of receiving multiple image information, the matching degree of the candidate image in the image information received earlier is greater than or equal to the matching degree of the candidate image in the image information received later. In each image information, the multiple candidate images can be arranged in descending order of matching degree.

[0233] In the case where the condition information only includes information related to time and / or location, since the N candidate images have equal matching degrees 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 within a certain period of time, resulting in an overly concentrated distribution of the selected images and an unreasonable distribution in terms of time and / or location.

[0234] For example, when the semantics of the user voice expression is "generate a video review of last year", the condition information can be "last year". In the image information, the N candidate images can be arranged in chronological order. The time span of the N candidate images determined based on the condition information "last year" can be 1 year. Figure 6 The length of the time period determined by the method shown may be one month. Then, in step S510, if the images to be selected in each time period are selected in the order of the N candidate images, the images to be selected in each month may be concentrated in the first few days of the month, or even in the first few hours of the month.

[0235] When the matching degree between the N candidate images and the condition information is equal, that is, the condition information only includes time and / or location information, the order of the N candidate images can be randomly disrupted to make the distribution of the selected images more uniform in time and space.

[0236] After step S509 , steps S510 to S514 may be performed.

[0237] Step S510 , selecting M selection images from the candidate images that have not been selected as selection images according to the target ratio and the order of the N candidate images.

[0238] For example, Figure 7 As shown, according to Figure 6 The method shown may determine four time periods, namely 2021, 2022, 2023, and 2024. Of the N candidate images, the number of candidate images belonging to the first time period, 2021, may be N1, the number of candidate images belonging to the second time period, 2022, may be N2, the number of candidate images belonging to the third time period, 2023, may be N3, and the number of candidate images belonging to the fourth time period, 2024, may be N4.

[0239] The number M of selected images may be determined based on a first preset number n1. The first preset number may be, for example, 80, 100, 150, 200, or other values. The sum of the number of second images selected in 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 that were 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 in each time period is equal to the target ratio. The number n1×Ni / N can be understood as the planned number of images for the i-th time period.

[0241] For a certain i, if the number of candidate images that are not selected as selected images is less than n1×Ni / N, the number Mi of selected images belonging to the i-th time period may be Ni. It should be understood that Mi≤Ni.

[0242] For each i-th time period, the candidate images selected as the selected images may be the top Mi candidate images among the candidate images that have not been selected as the selected images in the 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 the selected images is Ni.

[0244] like Figure 7 As shown, after step S510 is performed for the first time after step S508 or step S509, the number of selected images may be M, and the number of selected images belonging to the i-th time period may be Mi.

[0245] For a certain i, if the number of first images corresponding to the i-th time period is small, such that the number n1×Ni / N is less than or equal to 1, one candidate image can be selected as the selected image in the i-th time period. For other time periods where n1×Ni / N is greater than 1, the selected image is selected 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 , screening the multiple selected images to obtain P screened images.

[0247] The screening of the plurality of selected images may include removing images with a resolution lower than a preset resolution threshold, removing images recording bloody or violent scenes, and deduplication based on similarity.

[0248] For example, similarity-based deduplication of multiple selected images can be understood as determining whether there is at least one group based on the calculated similarity between the multiple selected images, each group including multiple selected images having a similarity greater than or equal to a preset similarity, and removing each one or more images if at least one group exists, so that only one selected image from the group is retained in the deduplication result. The retained selected image in the group can be the image that is the 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 plurality of 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 among the multiple time periods is Pi. For the i-th time period, Mi≥Pi.

[0251] Step S512: sort the P screened images.

[0252] When the condition information includes other information besides time and location information, the P screening images may be sorted according to the order in which they appear in the at least one image information. For example, the order in which the P screening images appear in the at least one image information may be the order in which the P screening images appear.

[0253] In the case where the condition information only includes time and / or place, the order of the P screening images may be random.

[0254] Alternatively, if the conditional information only includes time and / or location, the order of the P screening images can be determined based on the scene scores of the screening images. The scene scores of the screening images can be determined based on the scene types of the scenes recorded in the screening images. Different scene types can correspond to different scene scores. The scene scores of the screening images can be the scene scores corresponding to the scene types of the scenes recorded in the order of the screening images. The P screening images can be arranged according to the scene scores corresponding to the scene types of the recorded scenes.

[0255] Alternatively, the order of the P filtered images may be determined according to the image scores of the filtered images, which may be determined based on one or more of an aesthetic score, a scene score, an interaction score, a matching score, etc. of the filtered images.

[0256] The aesthetic score of the screening image can be obtained by performing aesthetic scoring on the screening image.

[0257] The interaction score of a filtered image can be determined based on the number of user interactions with the filtered image, the number of user interactions with images containing objects in the filtered image, and the like. The number of interactions with the filtered image can be determined based on the number of times a user browses, shares, or edits the filtered image.

[0258] The matching score of the screening image may be determined based on the matching degree between the screening image and the condition information. The image information may include the matching degree between each candidate image and the condition information.

[0259] If the conditional information includes information other than time and location, the matching score of the filtered images can be determined based on the order of each filtered image in the at least one image information. For example, the matching score of each filtered image can be determined based on its sequence number in the at least one image information; or, the P filtered images can be sorted according to their order in the at least one image information, and the matching score of each filtered image can be determined based on its sequence number in the P filtered images.

[0260] Step S513: Divide the sorted P screening images according to the time periods to which they belong.

[0261] like Figure 7 As shown, after the sorting in step S512, the number of filtered images belonging to the i-th time period in the sorting result is Pi. That is, step S512 does not change the number of filtered images.

[0262] It should be understood that the screening in step S511 may be performed on the M selected images, and the sorting in step S512 may be performed on the P screened images obtained by screening. After step S512, the P screened images may be placed in the same queue.

[0263] In the division result 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 filtered images in the sorting result of step S512.

[0264] Step S514 , determining whether the number P of the filtered images is greater than or equal to a second preset number n2 .

[0265] The second preset number n2 can be 5, 10, 20, 30, 40 or other integer values. The first preset number n1 is greater than the second preset number n2. The first preset number n1 can be based on the execution Figure 5 The data processing capabilities of the electronic devices shown are determined.

[0266] The second preset number n2 can be understood as the number of images displayed to the user. The second preset number n2 can be determined based on the user's satisfaction with the number of images displayed. Different display methods may affect the second preset number n2. For example, due to the limited display size of the electronic device used to display images to the user, the second preset number n2 may be set to a smaller value when multiple images are stitched together into a single image for display. However, when images are displayed sequentially to the user via video, the second preset number n2 may be set to a larger value.

[0267] When the second preset number n2 is less than or equal to 30, Figure 6 The method shown here determines the length of a time period, allowing candidate images to be selected for each time period, ensuring that images are presented to the user at each time period as much as possible. Image times are recorded in year-month-day format, and dividing time periods by year, month, and day simplifies determining the time period to which each image belongs.

[0268] When the second preset number n2 is different, the lengths of the time periods may also be different for the multiple time spans with the same first time. The ratio of the multiple time spans with the same first time to the length of the time period may be greater than or equal to 1.

[0269] When the number P of the screened images is less than the second preset number n2, step S515 is performed.

[0270] Step S515: Use the P screened images as selected images.

[0271] When the number P of the screened images is less than the second preset number n2, after step S515 is performed, steps S510 to S514 may be performed.

[0272] In the process of step S511 performed after step S515, the number of the plurality of selected images may be the sum of the number of re-selected selected images and the number P of filtered images serving as the selected images.

[0273] If it is determined in step S514 that the number P of the filtered images is greater than or equal to the second preset number n2, step S516 is performed.

[0274] Step S516: Determine whether there is a by-election 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 the supplementary selection time period. The plurality of time periods includes the supplementary selection time period.

[0276] That is, in step S516 , it may 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 the time period.

[0277] The ratio of the number of time periods corresponding to the multiple time periods is equal to the ratio of the number of first images of the candidate images belonging to the multiple time periods. The sum of the number of time periods corresponding to the multiple time periods is a second preset number n2. In other words, 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 the time period, that is, the number of filtered images belonging to a certain time period is less than the number of time periods corresponding to the time period, and there is a supplementary time period, step S517 is performed.

[0279] Step S517 , determining whether there is a candidate image in the supplementary selection time period that has not been selected as the selected image.

[0280] In the case that there is a candidate image that has not been selected as the selected image during the supplementary selection period, step S515 may be performed, and step S518 may be performed after step S515.

[0281] Step S518 , selecting a selection image from the candidate images that are not selected as the selection image and belong to the supplementary selection time period.

[0282] After step S518, steps S512 to S514 may be performed.

[0283] If it is determined in step S516 that there is no supplementary selection period, or if it is determined in step S517 that there is no candidate image in the supplementary selection period and no candidate image is selected as the selected image, step S519 may be performed.

[0284] Step S519: determining a second preset number n2 of target images from the P screening images.

[0285] If the number of filtered images P is less than the second preset number n2, additional time periods must exist, and the number of additional time periods may be relatively large. Furthermore, determining whether the number of filtered images P is less than the second preset number n2 is relatively simple and requires relatively few computing resources. Therefore, if the number of filtered images P is less than the second preset number n2, images can be reselected for each time unit.

[0286] When the number P of the screened images is greater than or equal to the second preset number n2, the supplementary selection period may not exist. Therefore, it can be determined whether the supplementary selection period exists, and only when the supplementary selection period exists, the selected images are reselected.

[0287] When the number P of screened images is greater than or equal to the second preset number n2 and additional time periods exist, the number of additional time periods is generally small. If the selected images for each time period are reselected, the subsequent screening and sorting processes will result in a large amount of data to be processed, which will consume a large amount of storage and computing resources. Therefore, it is possible to reselect only the selected images for the additional time periods.

[0288] If it is determined in step S516 that there is no supplementary time period, the number of target images selected from multiple time periods may be determined according to the target ratio. The number of target images belonging to the i-th time period may be n2×Ni / N.

[0289] For a certain i, if the number of first images corresponding to the i-th time period is small, such that the number n2×Ni / N is less than or equal to 1, one screening image can be selected as the target image in the i-th time period. For other time periods where n2×Ni / N is greater than 1, target images are 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 target images in each time period may be selected according to the order of the filtered images in each time period. The target images selected in each time period may be one or more images ranked highest among the filtered images in the time period.

[0291] Therefore, the sorting of the P screened images in step S512 affects the determination of the target image. Therefore, the sorting of the P screened images in step S512 can also be understood as a selection process of the P screened 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 selection images in step S510. Thus, for the same condition information provided by the user at different time points, the selected selection images may be different, and thus the determined target images may be different, thereby increasing the randomness of the target images and improving the user experience.

[0293] The method provided in the embodiment of the present application first selects a first preset number of images for processing when a large number of images are stored in an electronic device. If the images selected the first time do not meet the second preset number, the images are selected and processed again, thereby reducing the number of images to be processed and improving processing efficiency.

[0294] The image selection method provided in the embodiment of the present application can be applied to Figure 8 In the video generation method shown. Figure 5 The modules of the method shown can be Figure 8 The creative assistant in .

[0295] Figure 8 This is a schematic flowchart of a video generation method provided in an embodiment of the present application. Figure 8 The method shown is applied to an electronic device that includes an authoring assistant, a media processing platform, a search module, a quick application engine, and a light editing service. The authoring assistant, the media processing platform, the search module, the quick application engine, and the light editing service can be different processes in the electronic device.

[0296] Figure 8 The method shown includes steps S801 to S814.

[0297] Step S801: The creation assistant obtains the user's video generation instruction information, where the video generation instruction information includes condition information.

[0298] The condition information may include one or more of time, place, person, event, etc.

[0299] The video generation instruction information can be semantics obtained by recognizing the user's voice, or text input by the user. The creation assistant can be, for example, a voice assistant.

[0300] The condition information may be a keyword in the video generation instruction information. In other words, the condition information may be information related to one or more of time, place, person, event, etc. in the video generation instruction information.

[0301] In the case where the recognized voice or the text input by the user indicates video generation, the voice or text can be used as video generation instruction information.

[0302] For example, the electronic device displays Figure 3 In the case of the interface shown in (a), the user's voice is detected and the video generation instruction information is determined based on the user's voice.

[0303] For example, the semantics expressed by the user voice is "generate a video reviewing last year", and the conditional information may be "last year".

[0304] Step S802: The creation assistant sends condition information to the media processing center.

[0305] Step S803: The media processing center sends condition information to the search module.

[0306] Step S804: The search module sends multiple candidate images to the media processing center.

[0307] The plurality of candidate images are images that meet the condition information.

[0308] The search module can search among the multiple initial images stored in the electronic device to obtain multiple candidate images that meet the condition information among the multiple initial images.

[0309] The search module may send at least one piece of image information to the media processing center, where the at least one piece of image information includes a plurality of candidate images.

[0310] The number of candidate images in each image information may be preset. Each image information may also include a transmission flag. The transmission flag is used to indicate whether the search module has completed the transmission of the multiple candidate images.

[0311] Thus, the media processing platform can Figure 5 In steps S503 to S504 , the multiple candidate images are received.

[0312] In step S805 , the media processing center determines a target image from multiple candidate images.

[0313] The media processing center can Figure 5 Steps S505 to S519 are shown, thereby determining a target image from a plurality of candidate images.

[0314] It should be understood that when the media processing station processes an image, the image used can be a downsampled image obtained by downsampling the original image. Therefore, the processing resources occupied by the media processing station in determining the target image are relatively small.

[0315] That is, the multiple first candidate images sent by the search module to the media processing center in step S804 may all be downsampled images. The search module may also search for downsampled images of multiple initial images to obtain multiple first candidate images that meet the condition information.

[0316] Step S806: The media processing center sends the multiple target images to the creation assistant.

[0317] Alternatively, the media processing center may also send the image identifiers of the multiple target images to the creative assistant, and the creative assistant may determine the multiple target images based on the image identifiers of the multiple target images.

[0318] In step S807, the creation assistant determines whether the card is stored in the electronic device.

[0319] Card is used as a design pattern, which is a container for displaying information. In the embodiment of the present application, the card can be used to carry an image.

[0320] If the electronic device has a card stored therein, the process proceeds to step S810 . If the electronic device has no card stored therein, the process proceeds to step S808 .

[0321] Step S808: The authoring assistant sends a card request message to the quick application engine.

[0322] The image request message is used to request a card.

[0323] Step S809: The quick application engine sends the card to the authoring assistant.

[0324] Step S810: The creation assistant uses the card to display the target image to the user.

[0325] The number of target images displayed to the user by the creation assistant using the cards may be less than or equal to the number of the received multiple target images. For example, the creation assistant may display a third preset number of target images to the user.

[0326] Electronic devices can display Figure 9 The interface shown in FIG. 1 shows a third preset number of target images to the user. In this interface, the voice assistant window 21 can be used to display a card 23, which records a third preset number of target images. The third preset number can be, for example, 9.

[0327] Step S811: After obtaining the user's confirmation instruction, the creative assistant sends a material film-making request to the media processing center.

[0328] Figure 9The interface shown may further include a confirmation icon 24. When detecting that 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 A countdown can also be displayed in the confirmation icon 24 of the shown interface. Before the countdown ends in time, if no opposite operation of the user is detected, the creative assistant can obtain the user's confirmation indication and send multiple target images to the light editing service.

[0330] In step S812, the media processing center sends a completion request to the light editing service.

[0331] The slice request includes the plurality of target images.

[0332] The light editing service can generate a target video based on multiple target images.

[0333] The target video may include multiple target images, and along the time sequence of the target video, the multiple target images are located in the target video in a time sequence.

[0334] Step S813: The light editing service sends the target video to the media processing center.

[0335] Step S814: The media processing center sends the target video to the creation assistant.

[0336] When the creative assistant obtains the target video sent by the light editing service, the electronic device can display the following Figure 3 The interface shown in (b) in the figure.

[0337] It should be understood that the above examples are intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific numerical values or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or variations based on the above examples, and such modifications or variations also fall within the scope of the embodiments of the present application.

[0338] Combined with the above Figure 9 , describes in detail the image selection method of the embodiment of the present application, and will be combined with Figure 10 , describing the device embodiments of the present application in detail. It should be understood that the image selection device in the embodiments of the present application can execute the various image selection methods in the aforementioned embodiments of the present application, that is, the specific working processes of the various products below can refer to the corresponding processes in the aforementioned method embodiments.

[0339] Figure 10 Schematic diagram of an image selection device provided in an embodiment of the present application.

[0340] The image selection device 1000 includes an acquisition unit 1010 and a processing unit 1020. The image selection device 1000 can execute Figure 9 The image selection method shown.

[0341] The acquisition unit 1010 is configured to acquire a plurality of first candidate images, where the plurality of first candidate images are distributed in a plurality of first distribution time periods, and the plurality of first distribution time periods do not overlap with each other.

[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 configured to be displayed to the user in a time sequence of the images.

[0343] Optionally, the processing unit 1020 is further used to determine a target duration based on the time span of the multiple first candidate images, where the target duration is positively correlated with the time span, and the target duration is the length of each first distribution time period in the multiple first distribution time periods.

[0344] Optionally, the target number corresponding to each first distribution time period in the multiple first distribution time periods is positively correlated with the target ratio corresponding to the first distribution time period, the target number corresponding to each first distribution time period represents the number of the 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 multiple first candidate images.

[0345] Optionally, the processing unit 1020 is also used to determine multiple second candidate images from multiple first candidate images, the number of second images corresponding to each first distribution time period in the multiple 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 multiple second candidate images is less than or equal to the first preset number.

[0346] The processing unit 1020 is further configured to screen 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 from the plurality of third candidate images, where 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 also used to determine the corresponding time period number of the first distribution time period based on the corresponding target ratio of each first distribution time period and the second preset number, the corresponding time period number of each first distribution time period is positively correlated with the corresponding target ratio of the first distribution time period, and the sum of the multiple time period numbers corresponding to the multiple distribution time periods is the second preset number.

[0349] The processing unit 1020 is also used to determine a second preset number of the first target images among the multiple third candidate images when the number of third images corresponding to each first distribution time period in the multiple first distribution time periods is greater than or equal to the number of time periods corresponding to the first distribution time period, the number of third images corresponding to each first distribution time period represents the number of the 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.

[0350] Optionally, the processing unit 1020 is also used to, when there is a supplementary selection time period among the multiple first distribution time periods, again determine at least one second candidate image belonging to the supplementary selection time period among the multiple first candidate images outside the multiple second candidate images, and 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 screening on the at least one second candidate image determined again 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 from the updated plurality of third candidate images.

[0353] Optionally, the processing unit 1020 is further configured to, when the number of the plurality of third candidate images is less than the second preset number, determine that the supplementary selection time period exists.

[0354] The processing unit 1020 is further configured to re-determine a plurality of second candidate images from the plurality of first candidate images other than the plurality of second candidate images, wherein the re-determined plurality of second candidate images are distributed in the plurality of first distribution time periods.

[0355] The processing unit 1020 is also used to 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 when the number of the multiple third candidate images is greater than or equal to the second preset number, so as to determine whether the supplementary selection time period exists.

[0356] The processing unit 1020 is also used to, when the number of the multiple third candidate images is greater than or equal to the second preset number, again determine at least one second candidate image belonging to the supplementary selection time period among the multiple first candidate images that are outside the multiple second candidate images and belong to the supplementary selection time period.

[0357] Optionally, when the number of the multiple third candidate images is less than the second preset number, the number of images of the re-determined multiple 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 also used to determine the multiple first target images among the multiple third candidate images if there is a supplementary selection time period among the multiple first distribution time periods and there is no image other than the second candidate image among the first candidate images belonging to the supplementary selection time period, if the multiple third candidate images are distributed in the multiple first distribution time periods.

[0359] Optionally, the processing unit 1020 is also used to, when there is a supplementary selection time period in the multiple first distribution time periods and there is no image other than the second candidate image in the first candidate images belonging to the supplementary selection time period, determine multiple second target images in the multiple third candidate images if the multiple third candidate images are distributed in multiple second distribution time periods, the multiple second distribution time periods are partial time periods in the multiple first distribution time periods, the multiple second target images are distributed in the multiple second distribution time periods, and the multiple second target images are used to be displayed to the user in the chronological order of the images.

[0360] Optionally, the processing unit 1020 is further configured to perform screening according to the similarities between the plurality of second candidate images, and the similarities between the plurality of third candidate images are less than or equal to a preset similarity threshold.

[0361] The processing unit 1020 is also used to screen the multiple second candidate images after the addition processing to obtain the updated multiple third candidate images, and the addition processing is obtained by adding the third candidate image to the at least one second candidate image determined again, and the similarity between the updated multiple third candidate images is less than or equal to the preset similarity threshold.

[0362] Optionally, the multiple first candidate images are images whose similarity to the condition information is greater than or equal to a preset similarity threshold, and the multiple first candidate images have different similarities to the condition information; the multiple second candidate images are the multiple images with the highest similarity to the condition information among the multiple first candidate images.

[0363] Optionally, when the multiple first candidate images are images that meet condition information, and the condition information is time and / or place, the multiple second candidate images are multiple images randomly selected from the multiple first candidate images.

[0364] Optionally, the processing unit 1020 is further configured to generate a target video based on the multiple first target images in a time sequence of the images.

[0365] It should be noted that the image selection device 1000 is implemented in the form of a functional unit. The term "unit" here can be implemented in the form of software and / or hardware, and is not specifically limited to this.

[0366] For example, a "unit" may be a software program, a hardware circuit, or a combination of the two that implements the aforementioned functionality. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (e.g., a shared processor, a dedicated processor, or a group processor) and memory for executing one or more software or firmware programs, combined logic circuits, and / or other suitable components that support the described functionality.

[0367] Therefore, the units of each example described in the embodiments of this application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians 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] The present application also provides a chip, comprising a data interface and one or more processors. When the one or more processors execute instructions, the one or more processors read instructions stored in a memory through the data interface to implement the image selection method described in the above method embodiment.

[0369] The one or more processors may be general-purpose processors or special-purpose processors. For example, the one or more processors may be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices such as discrete gates, transistor logic devices, or discrete hardware components.

[0370] The chip can be used as a component of a terminal device or other electronic devices. For example, the chip can be located in the electronic device 100.

[0371] The processor and memory can be provided separately or integrated together. For example, the processor and memory can be integrated on a system-on-chip (SOC) of a terminal device. In other words, the chip can also include memory.

[0372] The memory may store a program, which may be executed by the processor to generate instructions, so that the processor executes the image selection method described in the above method embodiment according to the instructions.

[0373] Optionally, data may be stored in the memory. Optionally, the processor may read data stored in the memory, which may be stored at the same storage address as the program or at a different storage address than the program.

[0374] Exemplarily, the memory can be used to store the relevant programs of the image selection method provided in the embodiment of the present application, and the processor can be used to call the relevant programs of the image selection method stored in the memory to implement the image selection method of the embodiment of the present application.

[0375] For example, the processor can be used to obtain multiple first candidate images, and the multiple first candidate images are distributed in multiple first distribution time periods, and the multiple first distribution time periods do not overlap; determine multiple first target images among the multiple first candidate images, and the multiple images are distributed in the multiple first distribution time periods, and the multiple first target images are used to display to the user in the time order of the images.

[0376] The chip can be provided in an electronic device.

[0377] The present application also provides a computer program product, which, when executed by a processor, implements the image selection method described in any method embodiment of the present application.

[0378] The computer program product may be stored in a memory, for example, a program, which is converted into an executable target file that can be executed by a processor after undergoing processes such as preprocessing, compilation, assembly, and linking.

[0379] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the image selection method described in any method embodiment of the present application. The computer program can be a high-level language program or an executable target program.

[0380] The computer-readable storage medium is, for example, a memory. The memory may be a volatile memory or a non-volatile memory, or the memory may include both volatile memory and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link 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 actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).

[0382] In the description of this application, the terms "first," "second," etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance, or a specific order or precedence. Those skilled in the art will understand the specific meanings of the above terms in this application based on the specific circumstances.

[0383] In this application, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural 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 plural.

[0384] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean 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 the present application.

[0385] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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 clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0387] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for example, the division of the units is merely a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection of some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0388] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0389] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0390] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. An image selection method, characterized in that: The method comprises: Acquire a plurality of first candidate images, where the plurality of first candidate images are distributed in a plurality of first distribution time periods, and the plurality of first distribution time periods do not overlap; A plurality of first target images are determined from the plurality of first candidate images, the plurality of images are distributed in the plurality of first distribution time periods, and the plurality of first target images are used to be displayed to the user in a time sequence of the images.

2. The method according to claim 1, characterized in that The method further includes: determining a target duration according to the time spans of the multiple first candidate images, wherein the target duration is positively correlated with the time span and is the length of each first distribution time period in the multiple first distribution time periods.

3. The method according to claim 1 or 2, characterized in that The target number corresponding to each first distribution time period in the multiple first distribution time periods is positively correlated with the target ratio corresponding to the first distribution time period. The target number corresponding to each first distribution time period represents the number of the first target images belonging to the first distribution time period. 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 multiple first candidate images.

4. The method according to claim 3, characterized in that The determining of a plurality of first target images from the plurality of first candidate images comprises: 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 the 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; screening the plurality of second candidate images to obtain a plurality of third candidate images; The plurality of first target images are determined from the plurality of third candidate images, where the number of the plurality of first target images is less than or equal to the first preset number.

5. The method according to claim 4, characterized in that The method further comprises: Determining the number of time periods corresponding to the first distribution time period according to 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 multiple distribution time periods is the second preset number; The determining of the plurality of first target images from the plurality of third candidate images comprises: When the number of third images corresponding to each first distribution time period in the multiple first distribution time periods is greater than or equal to the number of time periods corresponding to the first distribution time period, a second preset number of first target images is determined among the multiple third candidate images, 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.

6. The method according to claim 5, characterized in that The step of determining a plurality of first target images from the plurality of first candidate images for display to the user in chronological order further includes: When a supplementary selection time period exists in the plurality of first distribution time periods, at least one second candidate image belonging to the supplementary selection time period is again determined from the plurality of first candidate images other than the plurality of second candidate images, and the number of the 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 screening on the at least one second candidate image determined again to obtain a plurality of updated third candidate images; The determining the plurality of first target images from the plurality of third candidate images includes: determining the plurality of first target images from the plurality of updated third candidate images.

7. The method according to claim 6, characterized in that The determining of the plurality of first target images from the plurality of third candidate images includes: determining that the supplementary selection time period exists when the number of the plurality of third candidate images is less than the second preset number; The re-determining 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 comprises: if the number of the plurality of third candidate images is less than the second preset number, re-determining a plurality of second candidate images from the plurality of first candidate images other than the plurality of second candidate images, wherein the re-determined plurality of second candidate images are distributed in the plurality of first distribution time periods; The determining of the plurality of first target images from the plurality of third candidate images further comprises: when the number of the plurality of third candidate images is greater than or equal to the second preset number, 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 to determine whether the supplementary selection time period exists; The re-determining of at least one second candidate image belonging to the supplementary selection time period from the multiple first candidate images outside the multiple second candidate images includes: when the number of the multiple third candidate images is greater than or equal to the second preset number, re-determining at least one second candidate image belonging to the supplementary selection time period from the multiple first candidate images outside the multiple second candidate images and belonging to the supplementary selection time period.

8. The method according to claim 7, characterized in that When the number of the plurality of third candidate images is less than the second preset number, the number of images of the 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.

9. The method according to any one of claims 5 to 8, characterized in that The determining of the plurality of first target images from the plurality of third candidate images further comprises: In the case where there is a supplementary selection time period in the multiple first distribution time periods, and there is no image other than the second candidate image in the first candidate images belonging to the supplementary selection time period, if the multiple third candidate images are distributed in the multiple first distribution time periods, the multiple first target images are determined among the multiple third candidate images.

10. The method according to claim 9, characterized in that The method also includes: when there is a supplementary selection time period in the multiple first distribution time periods and there is no image other than the second candidate image in the first candidate images belonging to the supplementary selection time period, if the 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, the multiple second distribution time periods are partial time periods in the multiple first distribution time periods, the multiple second target images are distributed in the multiple second distribution time periods, and the multiple second target images are used to be displayed to the user in chronological order of the images.

11. The method according to any one of claims 6 to 10, characterized in that The screening of the plurality of second candidate images to obtain a plurality of third candidate images includes: screening according to similarities between the plurality of second candidate images, wherein the similarities between the plurality of third candidate images are less than or equal to a preset similarity threshold; The screening of the at least one second candidate image that has been re-determined to obtain the updated multiple third candidate images also includes: screening the multiple second candidate images that have been added to obtain the updated multiple third candidate images, wherein the adding process is performed by adding the third candidate image to the at least one second candidate image that has been re-determined, and the similarity between the updated multiple third candidate images is less than or equal to the preset similarity threshold.

12. The method according to any one of claims 4 to 11, characterized in that The multiple first candidate images are images whose similarity to the condition information is greater than or equal to a preset similarity threshold, and the multiple first candidate images have different similarities to the condition information; the multiple second candidate images are the multiple images with the highest similarity to the condition information among the multiple first candidate images.

13. The method according to any one of claims 4 to 12, characterized in that When the plurality of first candidate images are images meeting 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.

14. The method according to any one of claims 1 to 13, characterized in that The method further comprises: A target video is generated based on the multiple first target images in a time sequence of the images.

15. An electronic device, characterized in that: The electronic device includes: 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 code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 14.

16. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the method as described in any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that The computer-readable storage medium comprises instructions, which, when executed on an electronic device, cause the electronic device to perform the method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Method and apparatus for generating video slides

    CN105376651A

  • Image processing method and device, equipment and storage medium

    CN113269035A

  • Video generation method and electronic equipment

    CN116347009A

  • Image display device, image display method and program

    JP2009116403A

  • Device, system, and method for providing screenshot

    KR1020150014722A