Image generation method and device, storage medium and electronic equipment

By identifying the sound type, direction and intensity of the target terminal, unique image textures are automatically generated, which solves the problem of low image generation efficiency in the prior art and realizes efficient generation of personalized virtual cards.

CN120259454APending Publication Date: 2025-07-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410015926.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-04
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The image generation method in the prior art is inefficient, and users need to spend a lot of time manually adding elements to increase the discrimination of card images, resulting in high operational complexity.

Method used

By identifying the target sound type, direction and intensity collected by the target terminal, determining the target base elements, and displaying textures on the preset image according to the target extension direction and quantity, a unique image is automatically generated.

Benefits of technology

It improves the efficiency of image generation, reduces user operation process, generates unique and personalized virtual card images, and increases the distinction between cards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259454A_ABST
    Figure CN120259454A_ABST
Patent Text Reader

Abstract

The invention discloses an image generation method and device, a storage medium and electronic equipment. The method comprises the following steps: determining a target sound type of a target sound collected by a target terminal, and determining a target basic element corresponding to the target sound type; the target direction where the target sound is located is determined, the target extension direction corresponding to the target direction is determined, the target extension direction is the extension direction of the target texture, the target texture is the texture obtained by arranging a group of target basic elements into a predetermined shape according to the extension direction, and the target extension direction changes along with the change of the target direction; determining the target sound intensity of the target sound, and determining a target number corresponding to the target sound intensity; and displaying the target texture on a preset first image according to the target extension direction and the target number to obtain a second image. According to the invention, the technical problem of low efficiency in the image generation process in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to an image generation method, an apparatus, a storage medium, and an electronic device. Background Art

[0002] Currently, more and more third-party platforms and video platforms produce idol stars, anime characters, etc. in the form of physical cards or virtual cards, and users obtain cards carrying their favorite target images by purchasing.

[0003] However, the patterns and sizes on the physical cards obtained by purchasing in the above manner are relatively uniform, and the distinguishability between card images is small. However, in actual application scenarios, each user has different degrees of preference for different idols or anime characters, and users also expect there to be a large difference between the physical cards they own and those owned by other users.

[0004] In order to increase the distinguishability between card images, users will spend a lot of time collecting their favorite elements, and through image processing technology, add the target elements they like to the above-mentioned card images to generate new images. That is to say, using the image generation method in the related technology requires a lot of time, increases the complexity of user operations, and causes the technical problem of low efficiency in the image generation process.

[0005] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention

[0006] Embodiments of this application provide an image generation method, an apparatus, a storage medium, and an electronic device to at least solve the technical problem of low efficiency in the image generation process.

[0007] According to one aspect of the embodiments of this application, an image generation method is provided, including: determining a target sound type of a target sound collected by a target terminal, and determining a target basic element corresponding to the target sound type; determining a target direction where the target sound is located, and determining a target extension direction corresponding to the target direction, where the target extension direction is the extension direction of a target texture, and the target texture is a texture obtained by arranging a group of target basic elements in a predetermined shape according to the extension direction, and the target extension direction changes with the change of the target direction; determining a target sound intensity of the target sound, and determining a target quantity corresponding to the target sound intensity, where the target quantity is the number of target basic elements included in a group of target basic elements, and the target quantity changes with the change of the target sound intensity; and displaying the target texture on a preset first image according to the target extension direction and the target quantity to obtain a second image.

[0008] Optionally, determining the target sound type of the target sound collected by the target terminal includes: performing speech recognition on the target sound to obtain the target object that emits the target sound and the target keyword corresponding to the target sound, where the target object and the target keyword jointly represent the target sound type.

[0009] Optionally, determining the target basic element corresponding to the target sound type includes: determining the target basic element corresponding to the target object and the target keyword in a preset basic element set, where the basic element set includes multiple basic elements, the multiple basic elements include the target basic element, and each basic element in the multiple basic elements corresponds to an object and one or a group of keywords.

[0010] Optionally, determining the target direction where the target sound is located includes: obtaining an initial vector determined by an audio acquisition component on the target terminal, where the initial vector is used to represent the direction where the target sound is located in a first coordinate system, the first coordinate system is a two-dimensional coordinate system established with the audio acquisition component as the coordinate origin, the gravity direction as the longitudinal coordinate axis, and the target direction as the transverse coordinate axis, the target direction is the direction perpendicular to the gravity direction in the target cross-section of the target terminal, and the target sound is the sound collected by the audio acquisition component; determining a target vector according to the rotation angle between the first coordinate system and the second coordinate system and the initial vector, where when the target cross-section is rectangular, the second coordinate system is a two-dimensional coordinate system established with a point on the target cross-section of the target terminal as the coordinate origin, the long side of the target cross-section as the longitudinal coordinate axis, and the short side of the target cross-section as the transverse coordinate axis, and the target vector is used to represent the direction where the target sound is located in the second coordinate system.

[0011] Optionally, determining the target vector according to the rotation angle between the first coordinate system and the second coordinate system and the initial vector includes: in the case where the rotation angle is 0 degrees, determining the target vector according to the initial vector, the horizontal coordinate offset, and the vertical coordinate offset, where the horizontal coordinate offset is the difference between the horizontal coordinate of the coordinate origin of the first coordinate system and the horizontal coordinate of the coordinate origin of the second coordinate system, and the vertical coordinate offset is the difference between the vertical coordinate of the coordinate origin of the first coordinate system and the vertical coordinate of the coordinate origin of the second coordinate system; or in the case where the rotation angle is 0 degrees, determining the target vector to be equal to the initial vector; or in the case where the rotation angle is c degrees, determining the target vector according to the initial vector, the horizontal coordinate offset, the vertical coordinate offset, and the rotation angle, where c is greater than or equal to 0 and less than or equal to 360; or in the case where the rotation angle is c degrees, determining the target vector to be equal to the product of the initial vector and the angle coefficient, and the angle coefficient is positively correlated with the rotation angle, where c is greater than or equal to 0 and less than or equal to 360.

[0012] Optionally, determining the target extension direction corresponding to the target direction includes: determining the target extension direction as the target direction; or determining the target extension direction as including a set of parallel directions, where the set of parallel directions includes the target direction; or determining the target extension direction as including a set of directions, where the set of directions includes the target direction and the set of directions is distributed in a fan shape.

[0013] Optionally, the above method further includes: determining an intersection point between the target extension direction and the image display area in the target terminal for displaying the first image when the target extension direction reaches the target terminal; determining, according to the intersection point, a starting display position of the target texture, where the starting display position is a position on the side of the first image; and displaying the target texture on the preset first image according to the target extension direction and the target quantity to obtain a generated second image, including: starting from the starting display position on the first image, displaying the target texture according to the target extension direction and the target quantity to obtain the second image.

[0014] Optionally, determining the starting display position of the target texture according to the intersection point includes one of the following: determining the starting display position as including the intersection point; determining the starting display position as including a first set of positions on the first side where the intersection point is located, where the first set of positions includes the intersection point and the first side is the side of the first image; or determining the starting display position as including a first set of positions on the first side where the intersection point is located and a second set of positions on the second side perpendicular to the first side, where the first set of positions includes the intersection point and the first side and the second side are the sides of the first image.

[0015] Optionally, determining the target quantity corresponding to the target sound intensity includes: determining, according to a preset mapping relationship between the sound intensity and the quantity, the target quantity corresponding to the target sound intensity, where the target quantity is positively correlated with the target sound intensity.

[0016] Optionally, the above method further includes: determining a target density corresponding to the target sound intensity, where the target density is used to represent the number of target basic elements displayed per unit area; and displaying the target texture on the preset first image according to the target extension direction and the target quantity to obtain a second image, including: displaying the target texture on the first image according to the target extension direction, the target quantity, and the target density to obtain the second image.

[0017] Optionally, the above method further includes: determining a target transparency change parameter corresponding to the target sound intensity, where the target transparency change parameter is used to represent that the transparency of the target basic elements displayed according to the target extension direction changes from large to small; and displaying the target texture on the preset first image according to the target extension direction and the target quantity to obtain a second image, including: displaying the target texture on the first image according to the target extension direction, the target quantity, and the target transparency change parameter to obtain the second image.

[0018] Optionally, the above-mentioned step of displaying the target texture on the preset first image according to the target extension direction and the target quantity to obtain the second image includes: displaying the static target texture on the first image according to the target extension direction and the target quantity to obtain the second image; or displaying the dynamic target texture on the first image according to the target extension direction and the target quantity to obtain the second image.

[0019] Optionally, the above method further includes: when N images are stored, in response to a search instruction, obtaining the j-th image corresponding to the j-th moment from the stored N images, where the i-th image among the N images is an image obtained by displaying the i-th texture among the N textures on the first image, the i-th texture is a texture determined according to the sound type of the i-th sound among the N sounds, the direction where the i-th sound is located, and the sound intensity of the i-th sound, the N sounds are the sounds collected by the target terminal at N moments, the N images include the second image, the N sounds include the target sound, the N textures include the target texture, N is a positive integer greater than or equal to 2, i is a positive integer greater than or equal to 1 and less than or equal to N, the N images and the N moments have a one-to-one correspondence, the N images include the j-th moment, and the search instruction is used to search for the j-th image corresponding to the j-th moment.

[0020] According to another aspect of the embodiments of the present application, there is also provided an image generation device, including: a first processing unit, configured to determine the target sound type of the target sound collected by the target terminal, and determine the target basic element corresponding to the target sound type; a second processing unit, configured to determine the target direction where the target sound is located, and determine the target extension direction corresponding to the target direction, where the target extension direction is the extension direction of the target texture, and the target texture is a texture obtained by arranging a group of target basic elements into a predetermined shape according to the extension direction, and the target extension direction changes with the change of the target direction; a third processing unit, configured to determine the target sound intensity of the target sound, and determine the target quantity corresponding to the target sound intensity, where the target quantity is the number of target basic elements included in a group of target basic elements, and the target quantity changes with the change of the target sound intensity; a first display unit, configured to display the target texture on the preset first image according to the target extension direction and the target quantity to obtain the second image.

[0021] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is used to execute the above image generation method when being run by an electronic device.

[0022] According to another aspect of the embodiments of the present application, there is also provided a computer program product, including a computer program, where the steps of the above method are implemented when the computer program is executed by a processor.

[0023] According to another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the above image generation method through the computer program.

[0024] Through the above embodiments provided by the present application, according to the target sound in the surrounding environment collected by the target terminal, the target basic element corresponding to the target sound is determined, and the target texture obtained by arranging the target basic elements into a predetermined shape according to the target extension direction and the target quantity determined by the target sound is displayed on the first image, so as to obtain the second image. In other words, by identifying the sound type, the source direction and the sound intensity of the environmental sound, the environmental sound is converted into an image texture, thereby automatically generating the second image, saving time, reducing the user operation process, and achieving the technical effect of improving the efficiency of the image generation method. Description of the Drawings

[0025] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application.

[0026] Figure 1 is a schematic diagram of an application scenario of an optional image generation method according to an embodiment of the present application;

[0027] Figure 2 is a flowchart of an optional image generation method according to an embodiment of the present application;

[0028] Figure 3 is a schematic diagram of the overall structure of an optional image generation method according to an embodiment of the present application;

[0029] Figure 4 is a schematic diagram of an optional determination of the sound type of the target sound and the corresponding target basic element according to an embodiment of the present application;

[0030] Figure 5 is a specific embodiment of an optional image generation method according to an embodiment of the present application;

[0031] Figure 6 is a schematic diagram of an optional determination of the target direction where the target sound is located according to an embodiment of the present application;

[0032] Figure 7 is a schematic diagram of another optional determination of the target direction where the target sound is located according to an embodiment of the present application;

[0033] Figure 8It is a schematic diagram of another optional method for determining the target direction where the target sound is located according to an embodiment of the present application;

[0034] Figure 9 It is a schematic diagram of an optional method for determining the corresponding target extension direction according to the target direction where the target sound is located according to an embodiment of the present application;

[0035] Figure 10 It is a schematic diagram of an optional method for determining the starting display position of the target texture according to an embodiment of the present application;

[0036] Figure 11 It is a schematic diagram of an optional method for determining the number of target basic elements according to the target sound intensity according to an embodiment of the present application;

[0037] Figure 12 It is a schematic diagram of an optional method for storing and searching for images according to an embodiment of the present application;

[0038] Figure 13 It is a schematic diagram of the structure of an optional image generation device according to an embodiment of the present application;

[0039] Figure 14 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. Detailed implementation manners

[0040] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0042] The technical solutions in the embodiments of this application will comply with legal regulations during implementation. When operating according to the technical solutions in the embodiments, the data used will not involve user privacy. While ensuring that the operation process is compliant and legal, the security of the data is guaranteed.

[0043] In addition, when the above embodiments of this application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with the relevant regulations and standards of the relevant country or region.

[0044] Glossary:

[0045] Voice recognition: The device listens to the sounds around the device through a microphone, without restricting human voices. After collecting the sounds, they are identified, assigned, and matched through artificial intelligence (AI) algorithms, and finally the type and accurate definition of the sounds are confirmed.

[0046] Virtual card: A non-physical product combined with IP (Intellectual Property). It is defined conceptually in the shape and size of a card. This solution is not limited to "cards", but also covers pictures, posters, covers, etc., and images in virtual JPG, PNG and other formats. This solution uses "virtual card" as an example for elaboration.

[0047] Image texture: A random replication of a single element determined according to a certain algorithm formula, and finally forms an ordered, shaped, and regular texture, which is an image format.

[0048] Card embryo: The original (initialized) graphic setting of the virtual card, which is determined by product design and is not limited to graphic styles and graphic elements, mainly based on a jpg background image.

[0049] Cultivation: It means that users can obtain card embryos and cultivate them into random results through time and function usage. As time goes by, the card embryos grow into personalized card products with strong user exclusivity.

[0050] Physical card: A physical card manufactured through printing procedures such as printers and printing press.

[0051] Backtracking: Through blockchain technology, the cards cultivated by users are divided into each second and stored, and users can retrieve the card styles at a certain minute and second as needed.

[0052] Blockchain technology: A chain composed of one block after another. Each block stores certain information, and they are connected into a chain according to the chronological order of their generation. This chain is stored in all servers. As long as one server in the entire system can work, the entire blockchain is secure;

[0053] IP: A popular internet term, literally translated as "intellectual property", which has been extended in the internet community.

[0054] According to one aspect of the embodiments of the present application, an image generation method is provided. As an alternative implementation, the above image generation method can be, but is not limited to, applied to an application scenario as Figure 1 shown. In the application scenario as Figure 1 shown, the target terminal 102 can be, but is not limited to, communicating with the server 106 through the network 104. The server 106 can be, but is not limited to, performing operations on the database 108, such as write data operations or read data operations. The above target terminal 102 can include, but is not limited to, a human-computer interaction screen, a processor, and a memory. The above human-computer interaction screen can be, but is not limited to, used for displaying the first image, the target basic element, and the second image, etc. on the target terminal 102. The above processor can be, but is not limited to, used for responding to the above human-computer interaction operation, performing corresponding operations, or generating corresponding instructions, and sending the generated instructions to the server 106. The above memory is used for storing relevant processing data, such as the target sound, the target basic element, and the target sound intensity, etc.

[0055] Optionally, in this embodiment, the above target terminal can be a terminal configured with a target client, and can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptop computers, tablet computers, handheld computers, MIDs (Mobile Internet Devices), PADs, desktop computers, smart TVs, etc. The target client can be a video client, an instant messaging client, a browser client, an education client, etc. The above network can include, but is not limited to: wired networks, wireless networks, where the wired network includes: local area networks, metropolitan area networks, and wide area networks, and the wireless network includes: Bluetooth, WIFI, and other networks that implement wireless communication. The above server can be a single server, a server cluster composed of multiple servers, or a cloud server.

[0056] The technical solutions in the embodiments of the present application can be, but are not limited to, applied to third-party platforms and video platforms. It is mainly based on various virtual card blanks displayed on the activity pages or function pages of various platforms. The card blanks include, but are not limited to, the IP main image, a simple border, and a background, etc. After the user selects a target card blank, they can pay virtual assets or physical assets to use it as their personal virtual asset.

[0057] Based on the card embryo of the above virtual card, the user can turn on AI voice recognition to capture the ambient sound around the target terminal (for example, but not limited to the above mobile phone, tablet computer, etc.), and use the preset algorithm in the embodiments of the present application to generate relevant image textures, and then attach the image textures to the card embryo of the virtual card purchased by the user to form an uncopyable and unique virtual card.

[0058] To solve the problem of low efficiency in the above image generation process, an image generation method is proposed in the embodiments of the present application. Figure 2 It is a flowchart of the image generation method according to the embodiments of the present application, and this process includes the following steps S202 to step S208.

[0059] It should be noted that the image generation method shown in steps S202 to step S208 can be but not limited to being executed by an electronic device, where the electronic device can be but not limited to the Figure 1 target terminal or server shown. In the embodiments of the present application, the case where this method is executed by the target terminal is taken as an example for explanation.

[0060] Step S202, determine the target sound type of the target sound collected by the target terminal, and determine the target basic element corresponding to the target sound type;

[0061] Step S204, determine the target direction where the target sound is located, and determine the target extension direction corresponding to the target direction, where the target extension direction is the extension direction of the target texture, and the target texture is the texture obtained by arranging a group of target basic elements in a predetermined shape according to the extension direction, and the target extension direction changes with the change of the target direction;

[0062] Step S206, determine the target sound intensity of the target sound, and determine the target quantity corresponding to the target sound intensity, where the target quantity is the number of target basic elements included in a group of target basic elements, and the target quantity changes with the change of the target sound intensity;

[0063] Step S208, display the target texture on the preset first image according to the target extension direction and the target quantity to obtain a second image.

[0064] To facilitate the understanding of the above image generation method, in the embodiments of the present application, the mobile phone is taken as an example of the target terminal to explain the above image generation method.

[0065] First, the Figure 3 overall schematic diagram shown is used to introduce the basic process of the above image generation method.

[0066] (1) Determine the sound type

[0067] As shown Figure 3 in the figure, the target terminal collects various sounds in the surrounding environment and uploads the collected sounds to the sound management background. For example, it uploads to the AI in the cloud, uses the AI to identify the sound types of various sounds, and translates them into keywords according to the sound types. Here, the keywords include but are not limited to two parts: nouns and adjectives.

[0068] As an optional example, the above-mentioned determination of the target sound type of the target sound collected by the target terminal includes:

[0069] Performing speech recognition on the target sound to obtain the target object that emits the target sound and the target keyword corresponding to the target sound, where the target object and the target keyword together represent the target sound type.

[0070] After the user enables this function on the mobile phone, the sound is determined through the microphone, and then the AI is used to identify the type of the sound and output the corresponding keywords. Among them, the microphone (audio acquisition component) will collect a series of sounds, and each sound is included in the corresponding keyword library.

[0071] In this embodiment, it is necessary to use sound recognition technology to distinguish the sound types, the number of sounds, and extract them separately for analysis and processing in the noisy sound.

[0072] For example, assume that the AI recognizes that the type of Sound 1 is the sound of the wind and translates Sound 1 into keyword type 1: wind, quiet, cool, etc.; recognizes that the type of Sound 2 is the sound of a person and translates Sound 2 into keyword type 2: person, human voice, speaking, singing, etc.; recognizes that the type of Sound 3 is the sound of a bird singing and translates Sound 3 into keyword type 3: bird singing, flapping sound, etc.

[0073] After determining the target keyword corresponding to the target sound, it is also necessary to determine the target basic element corresponding to each target sound type, specifically including:

[0074] Determining the target basic element corresponding to the target object and the target keyword in the preset basic element set, where the basic element set includes multiple basic elements, the multiple basic elements include the target basic element, and each basic element in the multiple basic elements corresponds to an object and one or a group of keywords.

[0075] For example, as Figure 4 shown in the figure, assume that the basic element corresponding to the sound of the wind is a circle, the basic element corresponding to the sound of a person is a pentagram, the basic element corresponding to the sound of a bird singing is a triangle, etc.

[0076] Obviously, Figure 4The target basic element corresponding to each group of keywords shown is only an example and is not limited thereto. For example, a group of keywords can also correspond to two or more target basic elements.

[0077] According to a preset algorithm, a texture formed by the above-mentioned target basic elements is displayed on the card blank of the virtual card in a preset direction and a preset shape. Among them, the textures generated by different sound types are different. The texture is composed of different types of basic elements and forms different shapes through different parameters. As Figure 4 shown, the basic elements include different symbols or patterns, etc. The above-mentioned preset algorithm will be described in detail in combination with specific embodiments.

[0078] It should be noted that the basic elements and algorithm parameters of the above texture can both be uploaded and defined through the background.

[0079] (2) Determine the direction of the sound

[0080] Through the microphone and weight sensor of the target terminal (such as a mobile phone), determine the current up-down, left-right, front-back directions of the target terminal. Among them, the center of the target terminal is defaulted as the coordinate center, and coordinate axes are extended up and down. For specific details, reference can be made to the detailed description in the following embodiments.

[0081] For example, as Figure 8 shown, assuming that the direction source of the bird call is the front left of the target terminal (mobile phone), then a direction coordinate will be marked for this sound, and at the same time, the direction of the bird call will be mapped to the target extension direction on the virtual card, and then the texture will be displayed dynamically or statically according to the target extension direction.

[0082] Among them, the texture can, but is not limited to, be obtained by arranging a group of basic elements in the above-mentioned target extension direction into a preset shape.

[0083] Combined with the description of the above embodiments, it can be known that in the embodiments of the present application, the target sound can, but is not limited to, include one sound, or include two or more sounds. For the number of sound categories included in the target sound, the above-mentioned group of target basic elements is explained.

[0084] (1) When the target sound only includes the first sound and the sound type of this sound corresponds to the first target basic element (for example, a five-pointed star), determine the first preset number of the first target basic elements according to the sound intensity of the target sound. The above-mentioned group of target basic elements includes the first preset number of the first target basic elements; or

[0085] When the target sound only includes the first type of sound, and the sound type of the first type of sound corresponds to the first type of target basic element (e.g., pentagram) and the second type of target basic element (e.g., square), determine the first preset number of the first type of target basic elements and the second preset number of the second type of target basic elements according to the sound intensity of the target sound. The above set of target basic elements includes the first preset number of the first type of target basic elements and the second preset number of the second type of target basic elements.

[0086] (2) When the target sound includes two types of sounds, and the sound types of the two types of sounds respectively correspond to the third type of target basic element (e.g., triangle) and the fourth type of target basic element (e.g., circle), determine the third preset number of the third type of target basic elements according to the first sound intensity of the first type of sound in the target sound, and determine the fourth preset number of the fourth type of target basic elements according to the second sound intensity of the second type of sound in the target sound. The above set of target basic elements includes the third preset number of the third type of target basic elements and the fourth preset number of the fourth type of target basic elements.

[0087] For the case where the target sound includes 3 or more types of sounds, the content included in the above set of target basic elements can refer to the above situation and will not be elaborated here.

[0088] (III) Determine the sound intensity

[0089] Determine the intensity of the sound based on the detected volume. For example, among the collected sounds, the volume of the bird call is the largest, the volume of the human voice is the second largest, and the volume of the stone is the smallest. Sort the volumes and determine the direction sources of these sounds.

[0090] Determine the number of basic elements corresponding to the above different types of sounds according to the sound intensity corresponding to different types of sound intensities, and this number changes with the change of the sound intensity.

[0091] (IV) Generate the target image

[0092] Display the target texture on the card blank of the virtual card according to the above target extension direction and the number of basic elements, and obtain the target image.

[0093] As an optional example, the above-mentioned displaying the target texture on the preset first image according to the target extension direction and the target number to obtain the second image includes:

[0094] Display the static target texture on the first image according to the target extension direction and the target number to obtain the second image; or

[0095] Display the dynamic target texture on the first image according to the target extension direction and the target number to obtain the second image.

[0096] In a specific embodiment, the target sound in the surrounding environment is collected by the audio acquisition component of the target terminal, and the source direction of the target sound is as Figure 5 shown in the target direction. According to the target direction, the extension direction of the target texture on the virtual card is determined, as Figure 5 shown in (a) below. Among them, the target extension direction can be the target direction or a set of directions corresponding to the target direction.

[0097] According to the target sound intensity of the target sound, the target quantity of the corresponding target basic element is determined. For example, as Figure 4 shown, assuming that the basic element corresponding to the wind sound is a circle and the sound intensity of the wind sound is the largest, then the target quantity corresponding to the circle is S1; assuming that the basic element corresponding to the human voice is a pentagram and the sound intensity corresponding to the human voice is less than the sound intensity corresponding to the wind sound, then the target quantity corresponding to the pentagram is S2, and S1 > S2.

[0098] According to the above method, on the blank of the virtual card as Figure 5 shown in (a) below, the target texture is displayed according to the above extension direction and the quantity of each basic element, and the cultivated virtual card as Figure 5 shown in (b) below is obtained. Among them, the second image is included in the cultivated virtual card. The second image can be, but is not limited to, an image obtained by superimposing the target texture on the main image in the blank.

[0099] Among them, the blank of the virtual card can be, but is not limited to, understood as the original (initialized) graphic setting of the virtual card, which is determined by product design, not limited to graphic styles and graphic elements, and is mainly a jpg background image; cultivation can be, but is not limited to, that the user can obtain the blank and cultivate the blank into a random result through time and function use. As time goes by, the blank grows into a personalized card product with strong user exclusivity.

[0100] Through the above method, according to the target sound in the surrounding environment collected by the target terminal, the target basic element corresponding to the target sound is determined, and the target texture obtained by arranging the target basic elements into a predetermined shape according to the target extension direction and the target quantity determined by the target sound is displayed on the first image, and the second image is obtained. In other words, by identifying the sound type, the source direction and the sound intensity of the environmental sound, the environmental sound is converted into image texture, so as to automatically generate the second image, saving time, reducing the user operation process, and achieving the technical effect of improving the efficiency of the image generation method.

[0101] As an optional example, the determination of the target direction where the target sound is located includes:

[0102] Obtain the initial vector determined by the audio acquisition component on the target terminal, where the initial vector is used to represent the direction of the target sound in the first coordinate system. The first coordinate system is a two-dimensional coordinate system established with the audio acquisition component as the coordinate origin, the gravity direction as the longitudinal coordinate axis, and the target direction as the transverse coordinate axis. The target direction is the direction perpendicular to the gravity direction in the target cross-section of the target terminal, and the target sound is the sound collected by the audio acquisition component;

[0103] Determine the target vector according to the rotation angle between the first coordinate system and the second coordinate system and the initial vector. When the target cross-section is rectangular, the second coordinate system is a two-dimensional coordinate system established with a point on the target cross-section of the target terminal as the coordinate origin, the long side of the target cross-section as the longitudinal coordinate axis, and the short side of the target cross-section as the transverse coordinate axis. The target vector is used to represent the direction of the target sound in the second coordinate system.

[0104] As Figure 6 Shown in (a) below, assume the target terminal is a mobile phone. Ignore the thickness of the mobile phone itself and virtualize the mobile phone microphone as a point A. Then establish the first coordinate system where the microphone is located with point A as the coordinate origin; then establish the second coordinate system where the mobile phone is located with the center of gravity B of the mobile phone as another coordinate origin.

[0105] During the process of establishing the above second coordinate system, first, through the built-in gravity sensor of the mobile phone (for example, gyroscope), determine the current up-down, front-back position of the mobile phone, then determine whether the mobile phone is upright, inverted, or at other angles, and at the same time mark the center of gravity of the target terminal as the upper coordinate origin B(0, 0).

[0106] Through the gravity sensor, when the inclination angle of the mobile phone is 0, starting from the coordinate origin B, extend the coordinate axes up, down, left, and right, where directly above is X+, directly below is X-, directly left is Y-, and directly right is Y+.

[0107] Through the position where the microphone is located, a first coordinate system with the point A(0, 0) where the microphone is located as the coordinate origin can also be extended, and then the direction of the sound source can be judged through the microphone.

[0108] For example, assume the microphone collects sound signals every 1 s. Connect a straight line between the sound source and point A, and a function y = wx can be obtained. Then a straight line corresponding to this function is the initial vector f1. Then determine the target vector according to the rotation angle c between the first coordinate system and the second coordinate system and the initial vector f1, where the sound source can be but is not limited to a function containing a direction vector, and w is a constant.

[0109] In this embodiment, the thickness of the target terminal (which can also be understood as a mobile phone) itself is ignored, and a second coordinate system is established with a point on a cross-section of the mobile phone as the coordinate origin, the long side of the target cross-section as the vertical coordinate axis, and the short side of the target interface as the horizontal coordinate axis.

[0110] As an alternative implementation, determining the target vector according to the rotation angle and the initial vector between the first coordinate system and the second coordinate system includes:

[0111] When the rotation angle is 0 degrees, determining the target vector according to the initial vector, the horizontal coordinate offset, and the vertical coordinate offset, where the horizontal coordinate offset is the difference between the abscissa of the coordinate origin of the first coordinate system and the abscissa of the coordinate origin of the second coordinate system, and the vertical coordinate offset is the difference between the ordinate of the coordinate origin of the first coordinate system and the ordinate of the coordinate origin of the second coordinate system; or

[0112] When the rotation angle is 0 degrees, determining the target vector to be equal to the initial vector; or

[0113] When the rotation angle is c degrees, determining the target vector according to the initial vector, the horizontal coordinate offset, the vertical coordinate offset, and the rotation angle, where c is greater than or equal to 0 and less than or equal to 360; or

[0114] When the rotation angle is c degrees, determining the target vector to be equal to the product of the initial vector and the angle coefficient, where the angle coefficient is positively correlated with the rotation angle, and c is greater than or equal to 0 and less than or equal to 360.

[0115] In the embodiment of the present application, the rotation angle between the first coordinate system and the second coordinate system can be, but is not limited to, understood as the included angle between the vertical axes of the first coordinate system and the second coordinate system.

[0116] As Figure 6 shown in (a) and (b) below, assuming the rotation angle is 0, then the initial vector can be directly determined as the target vector in the second coordinate system; or the horizontal coordinate offset can be determined according to the difference a between the abscissa of the coordinate origin A of the first coordinate system and the abscissa of the coordinate origin B of the second coordinate system, and the vertical coordinate offset can be determined according to the difference b between the ordinate of the coordinate origin of the first coordinate system and the ordinate of the coordinate origin of the second coordinate system. Finally, the target vector can be determined according to y = wx + a or according to y + b = w(x - a). For example, the initial vector is translated from the first coordinate system to the second coordinate system to obtain the target vector F1.

[0117] As Figure 7 shown, when the rotation angle is c, the angle coefficient k is determined according to the rotation angle c. For example, when c = 60°, k = 0.6; when c = 50°, k = 0.5, etc.

[0118] Assume that the initial vector corresponding to the sound source is determined by the mobile phone microphone as f2, and the initial vector f2 passes through (x2, y2) on the first coordinate system. Then, using the angle coefficient k, map (x2, y2) to a point (x2*k, y2*k) on the second coordinate system, and determine the connection line between the point (x2*k, y2*k) and the coordinate origin B as the target vector F2; or determine the target vector according to the initial vector f2, the abscissa offset, the ordinate offset, and the angle coefficient k.

[0119] That is to say, first use the microphone to determine the direction (initial vector) of the target sound in the first coordinate system, and then map the initial vector to the direction (target vector) of the target sound in the second coordinate system, so as to determine the display position of the target texture, thereby converting the environmental sound into an image texture and generating an image related to the environmental sound, realizing the personalized display of the image of the virtual card and increasing the distinction between images.

[0120] As an optional implementation manner, the above determination of the target extension direction corresponding to the target direction includes:

[0121] Determine the target extension direction as the target direction; or

[0122] Determine the target extension direction as including a set of parallel directions, and a set of parallel directions includes the target direction; or

[0123] Determine the target extension direction as including a set of directions, a set of directions includes the target direction, and a set of directions is distributed in a fan shape.

[0124] As Figure 8 shown, in the embodiment of the present application, it can be but is not limited to determining the direction in which the visual texture enters the virtual card according to the source direction of the target sound, and determining the extension direction of the target texture according to the direction in which the target sound is located in the second coordinate system, that is, determining the extension direction of the target texture obtained by arranging the target basic elements corresponding to different sound types in a preset direction and a preset shape.

[0125] As Figure 9 shown in (a), according to the target direction 1, determine a set of parallel directions, where the set of parallel directions includes the target direction 1 and a set of directions parallel to the target direction 1; or directly determine the target direction 2 as the target extension direction 2.

[0126] For another example, as Figure 9 shown in (b), according to the target direction 1, determine a set of parallel directions, and the parallel directions are distributed in a fan shape, so that the target basic elements can be arranged in a fan shape according to the target extension direction 3, and obtain as Figure 10The target texture in the shape of a sector as shown; according to the target direction 2, determine a set of parallel directions, which includes the target direction 2 and a set of directions parallel to the target direction 1, and determine this set of parallel directions as the target extension direction 4.

[0127] By using the direction of the target sound in the second coordinate system where the mobile phone is located, determine the extension direction of the target texture, so that the target basic elements are arranged into images of different shapes according to the target extension direction, increasing the diversity of the images.

[0128] As an optional example, the above method further includes:

[0129] Determine the intersection point of the target extension direction and the image display area in the target terminal for displaying the first image when the target extension direction reaches the target terminal; according to the intersection point, determine the starting display position of the target texture, where the starting display position is a position on the edge of the first image;

[0130] Display the target texture on the preset first image according to the target extension direction and the target quantity to obtain the generated second image, including: starting from the starting display position on the first image, display the target texture according to the target extension direction and the target quantity to obtain the second image.

[0131] Assume that the virtual card is the same as the mobile phone in terms of size, rotation angle, coordinate origin, coordinate orientation, etc., then determine the intersection point of the target extension direction and the image display area in the mobile phone for displaying the first image (the main image of the card blank) as the starting display position of the target texture.

[0132] For example, assume that the intersection point of the target extension direction 3 and the image display area in the mobile phone for displaying the first image is as shown in Figure 9 in (b), then take this set of intersection points as the starting display position, and arrange the target basic elements according to the target extension direction and the target quantity into a sector as shown in Figure 10 to obtain the target texture. Superimpose the sector pattern corresponding to the target texture on the first image to obtain the second image.

[0133] As an optional example, the above determining the starting display position of the target texture according to the intersection point includes one of the following:

[0134] Determine the starting display position as including the intersection point;

[0135] Determine the starting display position as including the first set of positions on the first side where the intersection point is located, where the first set of positions includes the intersection point, and the first side is the edge of the first image;

[0136] Determine the starting display position to include a first set of positions on the first side where the intersection point is located and a second set of positions on the second side perpendicular to the first side, where the first set of positions includes the intersection point, and the first side and the second side are sides of the first image.

[0137] As Figure 9 shown in (b) therein, assuming there are 8 intersection points between the target extension direction 3 and the two sides of the virtual card, then according to these 8 intersection points, the method for determining the starting display position of the target texture includes at least one of the following:

[0138] (1) As Figure 10 shown, directly use the 8 intersection points as the starting display position;

[0139] (2) Determine the 4 intersection points on the first side of the first image as the starting display position, that is, determine the first set of positions as the starting display position;

[0140] Among them, the first set of positions is only one example and is not limited thereto. For example, the first set of positions may include, in addition to the 4 intersection points on the first side, other 2 points, 3 points, etc. on the first side.

[0141] (3) Determine the 4 intersection points on the second side of the first image as the starting display position, that is, determine the second set of positions as the starting display position;

[0142] Similarly, the second set of positions is also only one example and is not limited thereto. For example, the second set of positions may include, in addition to the 4 intersection points on the second side, other 2 points, 3 points, etc. on the second side.

[0143] (4) Determine all the points in the above first set of positions and second set of positions as the starting display position.

[0144] As an optional implementation manner, the above determination of the target quantity corresponding to the target sound intensity includes:

[0145] Determine the target quantity corresponding to the target sound intensity according to the preset mapping relationship between the sound intensity and the quantity, where the target quantity is positively correlated with the target sound intensity.

[0146] After detecting that the target sound is mapped to the target extension direction of the virtual card and determining the starting display position of the texture of the target sound, further determine the target quantity corresponding to the target basic element according to the sound intensity of the target sound (i.e., the amplitude size of the target sound), where the greater the sound intensity, the more the target quantity; the smaller the sound intensity, the fewer the target quantity.

[0147] For example, as Figure 11As shown, the sound intensity of sound 1 is high, and the number of target basic elements in the corresponding target texture (visual texture) is large, that is; conversely, the sound intensity of sound 2 is low, and the number of target basic elements in the corresponding target texture (visual texture) is small.

[0148] As another optional implementation method, the above method further includes:

[0149] Determine the target density corresponding to the target sound intensity, where the target density is used to represent the number of target basic elements displayed per unit area;

[0150] Display the target texture on the preset first image according to the target extension direction and the target number to obtain a second image, including: Display the target texture on the first image according to the target extension direction, the target number, and the target density to obtain a second image.

[0151] For example, the greater the sound intensity of the target sound, the more target basic elements are displayed per unit area in the corresponding target texture (visual texture), that is, the greater the density; conversely, the fewer target basic elements are displayed per unit area.

[0152] Display the target texture according to the above target extension direction, target number, and target density to obtain a second image.

[0153] Obviously, it is easy to understand that when determining the number of target basic elements according to the target sound intensity, the target textures formed by the same number of target basic elements with and without considering the target density are different in visual effects.

[0154] As yet another optional implementation method, the above method further includes:

[0155] Determine the target transparency change parameter corresponding to the target sound intensity, where the target transparency change parameter is used to represent that the transparency of the target basic elements displayed according to the target extension direction changes from large to small;

[0156] Display the target texture on the preset first image according to the target extension direction and the target number to obtain a second image, including: Display the target texture on the first image according to the target extension direction, the target number, and the target transparency change parameter to obtain a second image.

[0157] Specifically, as Figure 11 shown, since the sound intensity of sound 1 is greater than that of sound 2, the transparency of basic element 1 in texture 1 is less than the transparency of basic element 2 in texture 2, that is, the visibility of basic element 1 is greater than that of basic element 2.

[0158] Display a target texture on a first image according to a target extension direction, a target quantity, and a target transparency change parameter to obtain a second image.

[0159] In addition, it is also possible to display a target texture on the first image according to a target extension direction, a target quantity, a target transparency change parameter, and a target density to obtain a second image.

[0160] Combined with the descriptions in the above embodiments, it can be seen that the display of the target texture is jointly determined by the target extension direction, the target transparency change parameter, and the target quantity. Among them, the target transparency change parameter and the target quantity are determined according to the sound intensity of the target sound, and the target extension direction is determined according to the target direction where the target sound is located in the first coordinate system.

[0161] In addition, the materials (target basic elements) at the texture level are superimposed on the card blank materials (first image) in a preset format (for example, the.png format). The materials at the texture level are dynamically changing, while the card blank materials are statically presented.

[0162] Using the above parameters, target textures with different shapes and different transparencies can be displayed on the first image, thereby generating different second images, improving the flexibility of the image generation method and achieving the improvement of the image generation efficiency.

[0163] As an optional implementation manner, the above method further includes:

[0164] When N images are stored, in response to a search instruction, obtain the jth image corresponding to the jth moment among the stored N images. Among them, the ith image among the N images is an image obtained by displaying the ith texture among the N textures on the first image. The ith texture is a texture determined according to the sound type of the ith sound among the N sounds, the direction where the ith sound is located, and the sound intensity of the ith sound. The N sounds are the sounds collected by the target terminal at N moments. The N images include the second image. The N sounds include the target sound. The N textures include the target texture. N is a positive integer greater than or equal to 2. i is a positive integer greater than or equal to 1 and less than or equal to N. The N images have a one-to-one correspondence with the N moments. The N images include the jth moment. The search instruction is used to search for the jth image corresponding to the jth moment.

[0165] Specifically, each sound collected by the target terminal within a preset time will carry corresponding display parameters and be visually presented on the virtual card of the target terminal.

[0166] For example, the target terminal collects the sound signals in the surrounding environment once every 1 s, and a total of 3 times are collected within 3 s. Then, according to the above image generation method, a total of 3 images corresponding to 3 moments are generated.

[0167] As shown Figure 12 in the figure, using blockchain technology, record the change results of the card embryo + texture layer corresponding to each moment, and integrate the jpg images as the storage form. In the front-end interface, users can input accurate information such as year, month, day, hour, minute, and second through the retrospective function to find the virtual card style corresponding to the moment, save it to the album, or make it into a physical card. Among them, the virtual card obtained by adopting the above-mentioned virtual card saving method cannot be artificially modified in its card style.

[0168] That is to say, on the target terminal, users can see the real-time changes of their virtual cards, with different and new textures added, covering the original card embryo, forming a card style that is different every moment. Then, through blockchain technology, save the changing forms of the cards every minute, save them in the form of images, and retrieve the card images by inputting the corresponding time points and save them.

[0169] The technical solutions in the above embodiments have at least the following beneficial effects:

[0170] (1) It is possible to parse the sounds in the surrounding environment collected by the target terminal, convert them into image data, and combine them with the virtual images on the existing virtual cards to generate unique image styles, improving the distinguishability between the virtual images of the virtual cards, enhancing the enthusiasm of users to cultivate the cards they hold, and increasing the enterprise benefits;

[0171] (2) The technical solution of this application combines the Internet and technology to meet the personalized needs of each fan or user for cards and even other IP peripherals. At the same time, combined with the concept of "cultivating cards with technology", it enables each fan to invest emotions and time in their own cards, prolonging the emotional duration of users for this IP, and enabling users to have a deeper connection and interactivity with this IP;

[0172] (3) For the cultivated cards, users can show off and print them into physical cards, highlighting the personalized features and improving the user experience;

[0173] (4) The technical solution of this application realizes the product goal of converting sound into image texture through technologies such as AI voice recognition, orientation mapping between the target terminal and the card, and application of texture algorithms.

[0174] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0175] According to another aspect of the embodiments of the present application, there is also provided an image generation device as shown in Figure 13 which includes:

[0176] A first processing unit 1302, configured to determine the target sound type of the target sound collected by the target terminal, and determine the target basic element corresponding to the target sound type;

[0177] A second processing unit 1304, configured to determine the target direction where the target sound is located, and determine the target extension direction corresponding to the target direction, where the target extension direction is the extension direction of the target texture, and the target texture is a texture obtained by arranging a group of target basic elements in a predetermined shape according to the extension direction, and the target extension direction changes with the change of the target direction;

[0178] A third processing unit 1306, configured to determine the target sound intensity of the target sound, and determine the target quantity corresponding to the target sound intensity, where the target quantity is the number of target basic elements included in a group of target basic elements, and the target quantity changes with the change of the target sound intensity;

[0179] A first display unit 1308, configured to display the target texture on a preset first image according to the target extension direction and the target quantity to obtain a second image.

[0180] Optionally, the above-mentioned first processing unit 1302 includes:

[0181] A first processing module, configured to perform speech recognition on the target sound to obtain the target object that emits the target sound and the target keyword corresponding to the target sound, where the target object and the target keyword together represent the target sound type.

[0182] Optionally, the above-mentioned first processing module includes:

[0183] A first processing sub-module, configured to determine the target basic element corresponding to the target object and the target keyword in a preset basic element set, where the basic element set includes multiple basic elements, the multiple basic elements include the target basic element, and each basic element in the multiple basic elements corresponds to an object and one or a group of keywords.

[0184] Optionally, the above-mentioned second processing unit 1304 includes:

[0185] A first acquisition module, configured to acquire an initial vector determined by an audio acquisition component on a target terminal, where the initial vector is used to represent the direction of a target sound in a first coordinate system. The first coordinate system is a two-dimensional coordinate system established with the audio acquisition component as the coordinate origin, the gravity direction as the longitudinal coordinate axis, and the target direction as the transverse coordinate axis. The target direction is a direction perpendicular to the gravity direction in a target cross-section of the target terminal, and the target sound is the sound collected by the audio acquisition component;

[0186] A second processing module, configured to determine a target vector according to a rotation angle between the first coordinate system and a second coordinate system and the initial vector. When the target cross-section is a rectangle, the second coordinate system is a two-dimensional coordinate system established with a point on the target cross-section of the target terminal as the coordinate origin, the long side of the target cross-section as the longitudinal coordinate axis, and the short side of the target cross-section as the transverse coordinate axis. The target vector is used to represent the direction of the target sound in the second coordinate system.

[0187] Optionally, the above-mentioned second processing module includes:

[0188] A second processing sub-module, configured to, when the rotation angle is 0 degrees, determine the target vector according to the initial vector, the horizontal coordinate offset, and the vertical coordinate offset. The horizontal coordinate offset is the difference between the horizontal coordinate of the coordinate origin of the first coordinate system and the horizontal coordinate of the coordinate origin of the second coordinate system, and the vertical coordinate offset is the difference between the vertical coordinate of the coordinate origin of the first coordinate system and the vertical coordinate of the coordinate origin of the second coordinate system; or

[0189] When the rotation angle is 0 degrees, determine the target vector to be equal to the initial vector; or

[0190] When the rotation angle is c degrees, determine the target vector according to the initial vector, the horizontal coordinate offset, the vertical coordinate offset, and the rotation angle, where c is greater than or equal to 0 and less than or equal to 360; or

[0191] When the rotation angle is c degrees, determine the target vector to be equal to the product of the initial vector and an angle coefficient, and the angle coefficient is positively correlated with the rotation angle, where c is greater than or equal to 0 and less than or equal to 360.

[0192] Optionally, the above-mentioned second processing unit 1304 includes:

[0193] A third processing module, configured to determine the target extension direction as the target direction; or

[0194] Determine the target extension direction as including a set of parallel directions, and the set of parallel directions includes the target direction; or

[0195] Determine the target extension direction to include a set of directions, where the set of directions includes the target direction and the set of directions is fan-shaped.

[0196] Optionally, the above device further includes:

[0197] A fourth processing unit, configured to determine the intersection of the target extension direction and the image display area in the target terminal for displaying the first image when the target extension direction reaches the target terminal; according to the intersection, determine the starting display position of the target texture, where the starting display position is a position on the edge of the first image.

[0198] The above first display unit 1308 includes:

[0199] A first display module, configured to display the target texture on the first image starting from the starting display position according to the target extension direction and the target quantity, to obtain a second image.

[0200] Optionally, the above first display module includes:

[0201] A third processing sub-module, configured to perform one of the following:

[0202] Determine the starting display position to include the intersection;

[0203] Determine the starting display position to include a first set of positions on the first edge where the intersection is located, where the first set of positions includes the intersection and the first edge is an edge of the first image;

[0204] Determine the starting display position to include a first set of positions on the first edge where the intersection is located and a second set of positions on the second edge perpendicular to the first edge, where the first set of positions includes the intersection and the first edge and the second edge are edges of the first image.

[0205] Optionally, the above third processing unit 1306 includes:

[0206] A fourth processing module, configured to determine the target quantity corresponding to the target sound intensity according to a preset mapping relationship between the sound intensity and the quantity, where the target quantity is positively correlated with the target sound intensity.

[0207] Optionally, the above device further includes:

[0208] A fifth processing unit, configured to determine the target density corresponding to the target sound intensity, where the target density is used to represent the number of target basic elements displayed per unit area;

[0209] The above first display unit 1308 includes:

[0210] A second display module, configured to display the target texture on the first image according to the target extension direction, the target quantity, and the target density, to obtain a second image.

[0211] Optionally, the above-mentioned device further includes:

[0212] A sixth processing unit, configured to determine a target transparency change parameter corresponding to a target sound intensity, where the target transparency change parameter is used to represent that the transparency of a target basic element controlled to be displayed in a target extension direction changes from large to small.

[0213] The above-mentioned first display unit 1308 includes:

[0214] A third display module, configured to display a target texture on a first image in a target extension direction, a target quantity, and a target transparency change parameter to obtain a second image.

[0215] Optionally, the above-mentioned first display unit 1308 includes:

[0216] A fourth display module, configured to display a static target texture on a first image in a target extension direction and a target quantity to obtain a second image; or

[0217] Display a dynamic target texture on a first image in a target extension direction and a target quantity to obtain a second image.

[0218] Optionally, the above-mentioned device further includes:

[0219] A sixth processing unit, configured to, when N images are stored, in response to a search instruction, obtain the j-th image corresponding to the j-th moment from the stored N images, where the i-th image among the N images is an image obtained by displaying the i-th texture among the N textures on a first image, the i-th texture is a texture determined according to the sound type of the i-th sound among the N sounds, the direction where the i-th sound is located, and the sound intensity of the i-th sound, the N sounds are sounds collected by a target terminal at N moments, the N images include the second image, the N sounds include the target sound, the N textures include the target texture, N is a positive integer greater than or equal to 2, i is a positive integer greater than or equal to 1 and less than or equal to N, the N images and the N moments have a one-to-one correspondence relationship, the N images include the j-th moment, and the search instruction is used to search for the j-th image corresponding to the j-th moment.

[0220] By applying the above device to the target sound in the surrounding environment collected according to the target terminal, determining the target basic element corresponding to the target sound, and displaying the target basic elements arranged in a predetermined shape on the first image according to the target extension direction and the target quantity determined by the target sound to obtain the target texture, a second image is obtained. In other words, by identifying the sound type, the source direction, and the sound intensity of the environmental sound, the environmental sound is converted into an image texture, thereby automatically generating a second image, saving time, reducing the user operation process, and achieving the technical effect of improving the efficiency of the image generation method.

[0221] It should be noted that the embodiments of the image generation device here can refer to the embodiments of the above image generation method and will not be elaborated here.

[0222] According to another aspect of the embodiments of the present application, an electronic device for implementing the above image generation method is further provided. The electronic device may be Figure 1 the target terminal or server shown. In this embodiment, the electronic device is taken as the target terminal as an example for illustration. As Figure 14 shown, the electronic device includes a memory 1402 and a processor 1404. A computer program is stored in the memory 1402, and the processor 1404 is configured to execute the steps in any one of the above method embodiments through the computer program.

[0223] Optionally, in this embodiment, the above electronic device may be at least one network device among multiple network devices in a computer network.

[0224] Optionally, in this embodiment, the above processor may be configured to execute the steps in the embodiments of the present application through the computer program.

[0225] Optionally, those of ordinary skill in the art can understand that Figure 14 the structure shown Figure 14 is only schematic, Figure 14 and it does not limit the structure of the above electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, etc.) than those shown Figure 14 or have a different configuration from that shown.

[0226] Among them, the memory 1402 can be used to store software programs and modules, such as the program instructions / modules corresponding to the image generation method and device in the embodiments of the present application. The processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, that is, implements the above-mentioned image generation method. The memory 1402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 1402 may further include a memory remotely disposed relative to the processor 1404, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof. Among them, the memory 1402 can specifically but not limitedly be used to store N accounts, game start instructions, game screens, etc. As an example, such as Figure 14 As shown, the above memory 1402 may include, but is not limited to, the first processing unit 1302, the second processing unit 1304, the third processing unit 1306, and the first display unit 1308 in the above image generation device. In addition, it may also include, but is not limited to, other module units in the above image generation device, which will not be elaborated in this example.

[0227] Optionally, the above transmission device 1406 is used to receive or send data via a network. Specific examples of the above network may include a wired network and a wireless network. In one instance, the transmission device 1406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable, so as to communicate with the Internet or a local area network. In one instance, the transmission device 1406 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0228] In addition, the above electronic device further includes: a display 1408, which is used to display the above first image and second image; and a connection bus 1410, which is used to connect each module component in the above electronic device.

[0229] In other embodiments, the above target terminal or server may be a node in a distributed system. Among them, the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes can form a point-to-point network, and any form of computing device, such as electronic devices like servers and target terminals, can become a node in the blockchain system by joining the point-to-point network.

[0230] According to another aspect of the present application, there is provided a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the image generation method provided in various optional implementations such as the above-mentioned server verification process. Among them, the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0231] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps in the embodiments of the present application.

[0232] Optionally, in the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the function of the module or unit.

[0233] Optionally, in this embodiment, those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing the relevant hardware of the target terminal. The program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, etc.

[0234] The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0235] If the integrated unit in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above-mentioned computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.

[0236] In the above embodiments of the present application, the descriptions of the various embodiments each have their own focuses. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0237] In several embodiments provided by the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. 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 displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.

[0238] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0239] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0240] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. An image generation method, characterized in that, Including: Determine the target sound type of the target sound collected by the target terminal, and determine the target basic element corresponding to the target sound type; Determine the target direction where the target sound is located, and determine the target extension direction corresponding to the target direction. Among them, the target extension direction is the extension direction of the target texture, and the target texture is the texture obtained by arranging a group of the target basic elements in the extension direction into a predetermined shape, and the target extension direction changes with the change of the target direction; Determine the target sound intensity of the target sound, and determine the target quantity corresponding to the target sound intensity. Among them, the target quantity is the quantity of the target basic elements included in a group of the target basic elements, and the target quantity changes with the change of the target sound intensity; Display the target texture on the preset first image according to the target extension direction and the target quantity to obtain a second image.

2. The method according to claim 1, characterized in that, The determining the target sound type of the target sound collected by the target terminal includes: Perform speech recognition on the target sound to obtain the target object that emits the target sound and the target keyword corresponding to the target sound. Among them, the target object and the target keyword jointly represent the target sound type.

3. The method according to claim 2, wherein The determining the target basic element corresponding to the target sound type includes: Determine the target basic element corresponding to the target object and the target keyword in the preset basic element set. Among them, the basic element set includes multiple basic elements, the multiple basic elements include the target basic element, and each basic element in the multiple basic elements corresponds to an object and one or a group of keywords.

4. The method according to claim 1, wherein The determining the target direction where the target sound is located includes: Obtain the initial vector determined by the audio acquisition component on the target terminal. Among them, the initial vector is used to represent the direction where the target sound is located in the first coordinate system. The first coordinate system is a two-dimensional coordinate system established with the audio acquisition component as the coordinate origin, the gravity direction as the longitudinal coordinate axis, and the target direction as the transverse coordinate axis. The target direction is the direction perpendicular to the gravity direction in the target cross-section of the target terminal, and the target sound is the sound collected by the audio acquisition component; Determine the target vector according to the rotation angle between the first coordinate system and the second coordinate system and the initial vector. When the target cross-section is rectangular, the second coordinate system is a two-dimensional coordinate system established with a point on the target cross-section of the target terminal as the coordinate origin, the long side of the target cross-section as the longitudinal coordinate axis, and the short side of the target cross-section as the transverse coordinate axis. The target vector is used to represent the direction where the target sound is located in the second coordinate system.

5. The method according to claim 4, characterized in that, The determining the target vector according to the rotation angle between the first coordinate system and the second coordinate system and the initial vector includes: When the rotation angle is 0 degrees, determine the target vector according to the initial vector, the abscissa offset, and the ordinate offset, where the abscissa offset is the difference between the abscissa of the coordinate origin of the first coordinate system and the abscissa of the coordinate origin of the second coordinate system, and the ordinate offset is the difference between the ordinate of the coordinate origin of the first coordinate system and the ordinate of the coordinate origin of the second coordinate system; or When the rotation angle is 0 degrees, determine the target vector to be equal to the initial vector; or When the rotation angle is c degrees, determine the target vector according to the initial vector, the abscissa offset, the ordinate offset, and the rotation angle, where c is greater than or equal to 0 and less than or equal to 360; or When the rotation angle is c degrees, determine the target vector to be equal to the product of the initial vector and an angle coefficient, where the angle coefficient is positively correlated with the rotation angle, and c is greater than or equal to 0 and less than or equal to 360.

6. The method according to claim 1, wherein The determining the target extension direction corresponding to the target direction includes:[[]] Determine the target extension direction as the target direction; or Determine the target extension direction as including a set of parallel directions, where the set of parallel directions includes the target direction; or Determine the target extension direction as including a set of directions, where the set of directions includes the target direction and the set of directions is distributed in a fan shape.

7. The method according to claim 1, wherein The method further includes: determining an intersection point of the target extension direction and an image display area in the target terminal for displaying the first image when the target extension direction reaches the target terminal; and determining a starting display position of the target texture according to the intersection point, where the starting display position is a position on the edge of the first image; Displaying the target texture on a preset first image according to the target extension direction and the target quantity to obtain a generated second image, including: starting from the starting display position on the first image, displaying the target texture according to the target extension direction and the target quantity to obtain the second image.

8. The method according to claim 7, wherein The determining the starting display position of the target texture according to the intersection point includes one of the following:[[]] Determine the starting display position as including the intersection point; Determine the starting display position as including a first set of positions on a first edge where the intersection point is located, where the first set of positions includes the intersection point and the first edge is an edge of the first image; Determine the starting display position as including the first set of positions on a first edge where the intersection point is located and a second set of positions on a second edge perpendicular to the first edge, where the first set of positions includes the intersection point and the first edge and the second edge are edges of the first image.

9. The method according to claim 1, wherein The determining the target quantity corresponding to the target sound intensity includes:[[]] Determine the target quantity corresponding to the target sound intensity according to a preset mapping relationship between sound intensity and quantity, where the target quantity is positively correlated with the target sound intensity.

10. The method according to claim 1, wherein: The method further includes: determining a target density corresponding to the target sound intensity, where the target density is used to represent the number of the target basic elements displayed per unit area; Displaying the target texture on a preset first image according to the target extension direction and the target quantity to obtain a second image, including: displaying the target texture on the first image according to the target extension direction, the target quantity, and the target density to obtain the second image.

11. The method according to claim 1, wherein: The method further includes: determining a target transparency change parameter corresponding to the target sound intensity, where the target transparency change parameter is used to represent that the transparency of the target basic elements displayed according to the target extension direction changes from large to small; Displaying the target texture on a preset first image according to the target extension direction and the target quantity to obtain a second image, including: displaying the target texture on the first image according to the target extension direction, the target quantity, and the target transparency change parameter to obtain the second image.

12. The method according to any one of claims 1 to 11, characterized in that, The displaying the target texture on a preset first image according to the target extension direction and the target quantity to obtain a second image includes: Displaying the static target texture on the first image according to the target extension direction and the target quantity to obtain the second image; or Displaying the dynamic target texture on the first image according to the target extension direction and the target quantity to obtain the second image.

13. The method according to any one of claims 1 to 11, characterized in that, The method further includes: When N images are stored, in response to a search instruction, obtaining the j-th image corresponding to the j-th moment from the stored N images, where the i-th image among the N images is an image obtained by displaying the i-th texture among the N textures on the first image, the i-th texture is a texture determined according to the sound type of the i-th sound among the N sounds, the direction where the i-th sound is located, and the sound intensity of the i-th sound, the N sounds are the sounds collected by the target terminal at N moments, the N images include the second image, the N sounds include the target sound, the N textures include the target texture, N is a positive integer greater than or equal to 2, i is a positive integer greater than or equal to 1 and less than or equal to N, the N images have a one-to-one correspondence with the N moments, the N images include the j-th moment, and the search instruction is used to search for the j-th image corresponding to the j-th moment.

14. An image generation device, characterized in that, Including: A first processing unit, configured to determine the target sound type of the target sound collected by the target terminal, and determine the target basic element corresponding to the target sound type; A second processing unit, configured to determine a target direction where the target sound is located, and determine a target extension direction corresponding to the target direction, where the target extension direction is an extension direction of a target texture, and the target texture is a texture obtained by arranging a group of the target basic elements into a predetermined shape according to the extension direction, and the target extension direction changes as the target direction changes; A third processing unit, configured to determine a target sound intensity of the target sound, and determine a target quantity corresponding to the target sound intensity, where the target quantity is the quantity of the target basic elements included in a group of the target basic elements, and the target quantity changes as the target sound intensity changes; A first display unit, configured to display the target texture on a preset first image according to the target extension direction and the target quantity, to obtain a second image.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, where the computer program, when being run by an electronic device, is configured to execute the method according to any one of claims 1 to 13.

16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

17. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 13 through the computer program.