Video generation method, electronic device, storage medium and program product
By generating vector data and text data, combining animation generation and video synthesis technology, the problems of high communication costs and poor image quality in existing video production solutions are solved, and high-quality and low-cost video generation is achieved.
Patent Information
- Application Number
- CN202411975801.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-08
AI Technical Summary
The existing video production solutions require image modification through third parties, which increases communication costs, and image quality and accuracy are difficult to meet the requirements of the business party.
By generating vector data and text data of spatial objects, multiple animations are generated based on these data, and videos are synthesized to describe changes in spatial layout of spatial objects.
It improves the accuracy and quality of the video, reduces time and money costs, and better presents the transformation effect of the business plan.
Smart Images

Figure CN119788939A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of video production, and in particular to a video generation method, an electronic device, a readable storage medium, and a computer program product. Background Art
[0002] Business parties sometimes need to make videos of some business plans for promotion, replying to customers or other purposes. Business plans may involve changes in product status, so the video produced also needs to reflect the product before and after the change, so as to describe the product status and changes.
[0003] At present, the common video production scheme is to send the business data including images and text to a third party, and then the third party will modify the business images and use the modified images to produce videos. This method will increase the communication cost, and the image quality and accuracy of the video will not meet the requirements of the business party. Summary of the invention
[0004] The present disclosure provides a video generation method, an electronic device, a storage medium, and a program product.
[0005] The first aspect of the present disclosure proposes a video generation method, including: generating vector data of a spatial object and generating text data of the spatial object, wherein the spatial object includes multiple object objects, the text data is used to describe the spatial state of the spatial object, the spatial state includes a first spatial state before the layout of the object object changes and a second spatial state after the layout changes, and the vector data can represent the layout of the multiple object objects in the spatial object under different spatial states through images; generating multiple animations based on the vector data and the text data, the multiple animations are used to represent the layout of at least part of the object objects in the spatial object under different spatial states; and synthesizing the multiple animations to obtain a video for describing the spatial layout change of the spatial object.
[0006] According to some embodiments of the present disclosure, obtaining vector data of a spatial object includes: obtaining first existing vector data and second existing vector data of the spatial object, wherein the first existing vector data is used to represent the layout of multiple object objects in the spatial object in a first spatial state, and the second existing vector data is used to represent the layout of multiple object objects in the spatial object in a second spatial state; and fusing the first existing vector data and the second existing vector data to obtain the vector data of the spatial object.
[0007] According to some embodiments of the present disclosure, the difference between the first spatial state and the second spatial state is represented by a change in one or more of the following parameters: a display state of the object, a position of the object.
[0008] According to some embodiments of the present disclosure, the difference between the first spatial state and the second spatial state is also represented by the display state of a designated area, and the designated area covers at least one of the object objects whose layout changes between the different spatial states.
[0009] According to some embodiments of the present disclosure, obtaining the text data of the spatial object includes: obtaining existing description text of the spatial object and converting the existing description text into the text data of the spatial object; or in response to receiving input information, generating the text data of the spatial object according to the input information, wherein the input information is text input information or voice input information.
[0010] According to some embodiments of the present disclosure, the text data includes at least one first text item and at least one second text item, the first text item is used to describe the first spatial state of the spatial object, and the second text item is used to describe the second spatial state of the spatial object.
[0011] According to some implementations of the present disclosure, there is a specified arrangement order between the text items contained in the text data, and the multiple animations are generated and synthesized according to the arrangement order.
[0012] According to some embodiments of the present disclosure, multiple animations are generated based on the vector data and the text data, including: generating a spatial object image corresponding to the text item according to the arrangement order and the vector data; and adding animation effects to the corresponding spatial object images based on the text item to obtain multiple animations.
[0013] According to some embodiments of the present disclosure, the animation effect includes one or more of the following: multiple switching of the display state of the object, multiple switching of the display state of the area covering part of the object, position movement of the object, and scaling of the field of view.
[0014] According to some embodiments of the present disclosure, the text data corresponds to at least one hierarchical category, and the at least one hierarchical category includes a first level and a second level subordinate to the first level, the first level is used to distinguish the text data corresponding to different types of the spatial states, and the second level is used to distinguish the text data corresponding to different transformation items under the same spatial state.
[0015] According to some embodiments of the present disclosure, the at least one hierarchical category also includes an intermediate level, the intermediate level is subordinate to the first level, the second level is subordinate to the intermediate level, the intermediate level is used to distinguish different area ranges under the same spatial state, and the second level is used to distinguish text data corresponding to different transformation items in the same area range under the same spatial state.
[0016] According to some embodiments of the present disclosure, text content corresponding to the spatial state is displayed in the video, and the displayed text content is obtained through the text data.
[0017] According to some embodiments of the present disclosure, the text content is added to the video during the process of synthesizing the video.
[0018] According to some embodiments of the present disclosure, a voice corresponding to the text content in the spatial state is played in the video, and the played voice is obtained by converting the text data.
[0019] According to some embodiments of the present disclosure, the speech begins to be generated during the process of generating the multiple animations.
[0020] A second aspect of the present disclosure proposes an electronic device, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the method described in any one of the above embodiments.
[0021] A third aspect of the present disclosure provides a readable storage medium, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the method described in any of the above embodiments.
[0022] A fourth aspect of the present disclosure provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it is used to implement the method described in any of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0024] Figure 1 A schematic diagram showing application scenarios of the video generation method according to some embodiments of the present disclosure is shown.
[0025] Figure 2 A schematic diagram showing the overall flow of a video generating method M100 according to some embodiments of the present disclosure is shown.
[0026] Figure 3 A vector diagram of a house layout before renovation according to some embodiments of the present disclosure is shown.
[0027] Figure 4 A vector diagram of a house layout after a house renovation according to some embodiments of the present disclosure is shown.
[0028] Figure 5 Shows Figure 3 Schematic diagram of the location of the selected local area.
[0029] Figure 6 Shows Figure 4 Schematic diagram of the location of the selected local area.
[0030] Figure 7-Figure 8 A schematic diagram showing the overall flow of a video generating method M100 according to some other embodiments of the present disclosure is shown.
[0031] Fig. 9 It is a schematic block diagram of the structure of a video generating device according to an embodiment of the present disclosure.
[0032] Fig.10 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0034] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0035] Unless otherwise specified, the exemplary embodiments / embodiments shown will be understood as providing exemplary features of various details of some ways in which the technical concept of the present disclosure can be implemented in practice. Therefore, unless otherwise specified, the features of the various embodiments / embodiments can be combined, separated, interchanged and / or rearranged without departing from the technical concept of the present disclosure.
[0036] The terms used herein are for the purpose of describing specific embodiments, rather than being restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, assemblies and / or their groups, but it is not excluded that there are or add one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values and / or provided values that will be recognized by those of ordinary skill in the art.
[0037] Taking house renovation as an example, the business party may be a real estate company, and the video produced may be an explanation video of the house renovation plan. The video describes the renovation plan and the changes in the house during the renovation process by showing the state of the house before and after the renovation, and provides the video to the C-end (Client) so that the customer can understand the house renovation plan.
[0038] At present, the business personnel of real estate enterprises usually send the floor plan before the house renovation to the third-party video producers. The floor plan can be in png (Portable Network Graphics) format or jpeg (Joint Photographic Experts Group) format or other formats. In addition, the business personnel also need to communicate with the video producers about the specific renovation plan of the house, so that the producers can know what modifications need to be made to the floor plan and how to describe the state of the house before and after the renovation in the generated video. This communication process is time-consuming, usually taking about two days, with high time and money costs. And because the producers modify the image through conventional image processing software (such as Photoshop) to obtain images used to describe different states of the house, the accuracy of the modified image may be difficult to guarantee, for example, the length of the newly added wall partition in the image may not be accurate, and the laying position of the pipeline in the image may not be accurate, etc. This will make it difficult for the accuracy of the video content and the quality of the video image in the generated video to meet the requirements of the business party.
[0039] To this end, the present disclosure proposes a video generation method.
[0040] Figure 1The schematic diagram of the application scenario of the video generation method of some embodiments of the present disclosure is shown. In this application scenario, a user end 10 and a server end 20 may be included.
[0041] The client 10 can communicate with the server 20 to send and receive data or instructions. In the present disclosure, the client 10 and the server 20 each include at least one processor and at least one memory.
[0042] For example, the user terminal 10 can be a desktop computer, a laptop computer, or other electronic devices of different types, and the server terminal 20 can be a server or a cloud server with a physical form. The present disclosure does not limit the type of the server terminal. The server terminal 20 can obtain the text data and the drawn image input by the operator through the user terminal 10, and generate animations and synthesized videos according to the instructions sent by the user terminal 10.
[0043] Figure 2 FIG. 2 is a schematic diagram showing the overall flow of a video generation method M100 in some embodiments of the present disclosure. Figure 2 The method shown includes step S110 , step S120 , and step S130 .
[0044] S110, obtaining vector data of a spatial object and obtaining text data of the spatial object. The spatial object includes multiple object objects. The text data is used to describe the spatial state of the spatial object. The spatial state includes a first spatial state before the layout of the object object changes and a second spatial state after the layout changes. The vector data can represent the layout of multiple object objects in the spatial object under different spatial states through images.
[0045] A spatial object is a physical object with a certain spatial area, such as a house, a mechanical structure, a residential area, etc. Accordingly, an object can be furniture, walls, and pipes in a house, multiple parts in a mechanical structure, or buildings, street lights, roads, and green belts in a residential area. The following uses a house as a spatial object for illustration.
[0046] The vector data of a house may include the vector data of the furniture and walls in the house. The vector data may include the geometric information (such as lines) of objects such as furniture and walls, and may also include information such as the location, size, material, and color of the objects. Vector data may be an existing file pre-stored on a server or a designated storage location, which can be directly obtained by the ID of the house; vector data may also be generated by a script or program. When a file containing vector data is opened by some drawing software, an image of the house can be displayed. The image may be a vector image, such as an SVG (Scalable Vector Graphics) image.
[0047] Figure 3 The schematic diagram of the house type vector diagram before the house renovation is shown. Figure 4 The schematic diagram of the house floor plan after the house renovation is shown. Figure 3 and Figure 4 , F represents the house as a spatial object, K represents the kitchen, L represents the living room, W represents the bathroom before the renovation, and B represents the bedroom. a1 is the operating table in the kitchen K before the renovation, a2 and a3 are the dining table and sofa in the living room L respectively, a4 and a5 are the washbasin and toilet in the bathroom respectively, and a6 is the double bed in the bedroom B. Figure 3 Also shown are the walls of each room (indicated by bold lines) and the doors leading to each room (indicated by dotted line segments), wherein q1 represents the wall between the kitchen K and the living room L before the renovation. Figure 3 The floor plan vector diagram shown has the following three main problems to be overcome: 1. The kitchen operating area is crowded; 2. The living room lacks storage space; 3. The bathroom functions are too concentrated (no dry and wet separation).
[0048] Figure 4 As the floor plan after the apartment renovation, and Figure 3 The main difference lies in overcoming the above three problems: 1. Changing the workbench a1 in the kitchen K to an L-shaped workbench a1' solves the problem of crowded kitchen operation area; 2. Changing the wall q1 of the living room L to an L-shaped wall q1', and embedding the storage cabinet a7 on the living room side of the wall q1' to solve the problem of lack of storage space in the living room; 3. Building a wall q2 between the washbasin a4 and the toilet a5 in the bathroom W, dividing the original bathroom W into a dry area W1 and a wet area W2, solving the problem of the bathroom not being separated into dry and wet areas. It can be seen from this that Figure 3 and Figure 4 The houses shown have different spatial states, e.g. Figure 3 The furniture, walls and other objects and their layout patterns contained in the structure can correspond to the first spatial state of the house. Figure 4 The furniture, walls and other objects and their layout patterns contained therein may correspond to the second spatial state of the house.
[0049] Figure 3 and Figure 4 It can be obtained from the same vector data, where Figure 3 and Figure 4 The difference can be reflected by changing the parameters, attributes or states of the object, that is, the same vector data can show two different house space states (house types) when the parameters, attributes or states of the object are different.
[0050] In step S110, text data of the house is also generated. The text data may be obtained by processing existing text information for describing the state of the house before and after the renovation. The first spatial state and the second spatial state of the house are described by text. The text describing the first spatial state may include: "The kitchen operating area is crowded", "The living room lacks storage space" and "The bathroom functions are concentrated". The text describing the second spatial state may include: "Change the operating table in the kitchen to an L-shaped operating table to increase the storage space in the living room", "Change the wall of the living room to an L-shaped wall and embed a storage cabinet in the wall to increase the storage space in the living room" and "Build a wall between the washbasin and the toilet in the bathroom to achieve dry and wet separation in the bathroom".
[0051] The generated text data and the generated vector data can correspond to each other. The text data can include a first text and a second text. The vector data can be represented as a first vector diagram and a second vector diagram. The first text and the first vector diagram are used to describe the spatial state of the house before renovation, and the second text and the second vector diagram are used to describe the spatial state of the house after renovation.
[0052] It can be understood that, in step S110, the order of generating the vector data of the spatial object and generating the text data of the spatial object can be arbitrary.
[0053] S120, generating multiple animation segments according to the vector data and the text data, wherein the multiple animation segments are used to represent the layout of at least part of the objects in the spatial object under different spatial states.
[0054] The operation of generating animation can be automatically executed and implemented through a preset script or program. For example, the vector data generated in step S110 is only one kind, and the script or program can be used to perform semantic recognition on the text data and identify the object objects in the vector data, and operate the corresponding object objects in the same vector data according to the results of the semantic recognition, so as to generate an animation corresponding to the semantics through the vector map obtained after the operation, and obtain multiple animations. For another example, the vector data generated in step S110 is multiple, each representing a spatial state of a house. The script or program can perform semantic recognition on the text data and identify the spatial state corresponding to each vector data, and determine the corresponding vector map according to the semantic recognition results, so as to generate an animation corresponding to the semantics through the determined vector map, and obtain multiple animations.
[0055] The generated multiple animation segments may include a first animation and a second animation. The first animation may be one or more animation segments, and the second animation may also be one or more animation segments. The number of animation segments included in the first animation may be equal to or different from the number of animation segments included in the second animation. The vector diagram and text data of house F are used as an example for explanation.
[0056] The first animation and the second animation may each include only one animation segment, generating two animation segments in total. Figure 3 The content of the first animation is to show the layout of all objects in the house in the first spatial state, and the first text can be expressed in the form of text display or voice playback in this animation. The first animation can show the layout of the house F before the renovation and the problems to be overcome. Figure 4 The content of the second space state is displayed, that is, the layout of all objects in the house is displayed, and the second text can be expressed in the form of text display or voice playback in this animation. The second animation can show the layout of the house F after the transformation and the effect after the transformation.
[0057] The first animation and the second animation may each include 3 animation segments, generating 6 animation segments in total. Figure 5 Shows Figure 3 Schematic diagram of the location of the selected local area. Figure 6 Shows Figure 4 Schematic diagram of the location of the selected local area. Figure 5 and Figure 6 The reference numerals of the objects and the doors represented by the dashed line segments are not shown. Figure 5 and Figure 6 , R1 (rectangular dashed box) is a local area covering the kitchen and part of the living room, and area R1 corresponds to the first and second problems to be overcome. R2 (rectangular dashed box) is a local area covering the bathroom, and area R2 corresponds to the third problem to be overcome. In the first animation, the three animations include one animation showing the entire area of house F (the layout of all objects) in the first spatial state, one animation showing only area R1, and one animation showing only area R2. In the second animation, the three animations include one animation showing the entire area of house F (the layout of all objects) in the second spatial state, one animation showing only area R1, and one animation showing only area R2.
[0058] It is understandable that the number of segments of the generated animation can be any number greater than 1, and the content displayed in each segment of the animation can also be set as needed, and this application does not impose any restrictions on this.
[0059] S130, synthesizing the above-mentioned multiple animations to obtain a video for describing the spatial layout change of the spatial object.
[0060] The animation synthesis process can be to input multiple animations into the video editing software in the order of generation, so as to obtain a video file. It is understandable that the video synthesis in step S130 and the animation generation in step S120 can be implemented through the same platform or through different platforms.
[0061] If the first animation and the second animation each contain only one animation, then in the synthesized video, the three problems to be overcome of house F before renovation are first shown by displaying the global area of house F in the first spatial state, and then the renovation effect of house F after renovation (the method of overcoming these three problems) is shown by displaying the global area of house F in the first spatial state.
[0062] If the first animation and the second animation each contain 3 animations, the synthesized video includes the display of the problems of house F before the renovation and the display of the solutions after the renovation. The process of displaying the problems is to first display the 3 problems to be overcome of house F before the renovation by displaying the global area of house F in the first spatial state, then focus on displaying the first and second problems to be overcome by displaying the local area R1 of house F in the first spatial state, and then focus on displaying the third problem to be overcome by displaying the local area R2 of house F in the first spatial state. The process of displaying the solutions is to first display the house effect of house F after the renovation (how to overcome the 3 problems to be overcome) by displaying the global area of house F in the second spatial state, then focus on displaying how the first and second problems to be overcome are overcome by displaying the local area R1 of house F in the second spatial state, and then focus on displaying how the third problem to be overcome is overcome by displaying the local area R2 of house F in the second spatial state.
[0063] The multiple animations obtained in step S120 may also be other cases besides the above two examples. The synthesized videos in other cases can be deduced accordingly and will not be elaborated here.
[0064] According to the video generation method proposed in the embodiment of the present invention, a vector diagram is obtained and an animation is generated through vector data. With the help of the feature that each geometric element representing an object in the vector data can be directly edited, the layout of objects in different spatial states including before and after the transformation can be expressed through the same vector data, so that the obtained video has high accuracy and quality, and will not lose image precision when generating the animation, so that the household transformation plan can be better presented to the client user in the form of video; and the video can be automatically generated through a script or program, without the need for multi-party communication on the transformation plan, saving time and money costs.
[0065] Figure 7 FIG. 1 is a schematic diagram showing the overall flow of a video generation method M100 in some other embodiments of the present disclosure. Figure 7 In step S110, the method of generating vector data of the spatial object may include step S111 and step S112.
[0066] S111, obtaining first existing vector data and second existing vector data of a spatial object, wherein the first existing vector data is used to represent the layout of multiple objects in the spatial object in a first spatial state, and the second existing vector data is used to represent the layout of multiple objects in the spatial object in a second spatial state.
[0067] Since the layout of the house before and after the renovation is known, that is, the first spatial state and the second spatial state are known, the vector data in these two spatial states can also be existing. For example, the designer can design the corresponding SVG images in the design stage. These images are the existing vector data, which can be stored in the server. In the process of generating the house renovation video, the corresponding file can be obtained from the server according to the ID of the house, so as to obtain the first existing vector data and the second existing vector data, that is, to obtain Figure 3 and Figure 4 image data.
[0068] S112: Merge the first existing vector data and the second existing vector data to obtain vector data of the spatial object.
[0069] by Figure 3 and Figure 4 For example, the first existing vector data includes the operation board a1 but does not include the operation board a2, and the second existing vector data includes the operation board a2 but does not include the operation board a1. In order to be able to display the operation board a1 in part of the animations and to display the operation board a2 in at least part of the remaining animations in the subsequent generation of multiple animations, the first existing vector data including the operation board a1 and the second existing vector data including the operation board a2 are merged.
[0070] The fusion method can be to superimpose and deduplicate image content based on object objects in the image, for example, to identify the object objects contained in the first existing vector data and the second existing vector data, and determine the object objects respectively contained in the first existing vector data and the second existing vector data.
[0071] If the same object is not included in both the first existing vector data and the second existing vector data, the object is formed in the fused image through fusion.
[0072] If the same object exists in both the first existing vector data and the second existing vector data and the vector data of the object object are different, an object object corresponding to different vector data at different times is formed in the fused image through fusion. The object object corresponding to different vector data can be represented by switching the vector data of the object object to express different vector data of the same object object (for example, the color before and after the switching is different), or it can be represented by switching the display of the two object objects to express different vector data of the same object object (for example, the position and shape before and after the switching are different).
[0073] If the same object is included in both the first existing vector data and the second existing vector data, and the vector data of the same object in the first existing vector data and the second existing vector data are the same, only one of the object is retained in the fused image through deduplication.
[0074] It is understandable that the same object object refers to the corresponding object object before and after the transformation, and the same object object in different existing vector data can be represented by the same ID. Each object object included in the fused image exists in at least one of the first existing vector data and the second existing vector data. The fused image can be generated in a blank new image, or in an image of one of the first existing vector data and the second existing vector data.
[0075] The fusion method can also be to superimpose layers based on images, for example, placing the first existing vector data and the second existing vector data in different layers, and the fused image can display different spatial states by displaying different layers, adjusting the transparency of different layers, etc.
[0076] Through steps S111 and S112, the existing vector data can be used for automatic processing to obtain the required vector data, and the required vector data can be used to provide all images in the subsequent animation generation, thereby reducing storage space usage and improving image processing efficiency in the animation generation. In addition, since the vector data of the spatial object is obtained, the vector data of the spatial object can be enlarged without distortion when the animation is generated later.
[0077] Exemplarily, the difference between the first spatial state and the second spatial state can be represented by changes in one or more of the following parameters: the display state of the object, the position of the object. For example, the fused vector data contains both console a1 and console a2, and the display states of console a1 and console a2 can be changed through operation. The display state is used to indicate whether the object is displayed. When the first animation is generated by step S120, console a1 can be displayed and console a2 can be hidden, and when the second animation is generated by step S120, console a2 can be displayed and console a1 can be hidden.
[0078] The same is true for walls q1 and q1' and for wall q2. When generating the first animation, wall q1 can be displayed and walls q1' and q2 can be hidden. When generating the second animation, walls q1' and q2 can be displayed and wall q1 can be hidden.
[0079] In step S120, the object whose display state is to be changed is determined by semantic analysis of the text data, and then a corresponding animation is generated. The change of the display state can be executed by a script or a program.
[0080] For the same object, if the shape and size of the object in different spatial states are the same, and only the position is different, the position change of the object before and after the transformation can be expressed by changing the display state, or by changing the position. If the position change is expressed by changing the display state, the vector data obtained in step S112 contains two of the object objects, one is located at the position before the transformation, and the other is located at the position after the transformation. When the first animation and the second animation are generated, the layout before and after the transformation is reflected by displaying one of them and hiding the other. If the position change is expressed by changing the position, the vector data obtained in step S112 contains only one of the object objects. When the first animation and the second animation are generated, its position is changed by changing the position parameters to reflect the layout before and after the transformation.
[0081] The object is represented in different spatial states by displaying the state and position, so as to obtain the required house layout image when generating animation later.
[0082] Exemplarily, the difference between the first spatial state and the second spatial state may also be indicated by the display state of a designated area. The designated area covers at least one of the objects whose layouts vary between the different spatial states.
[0083] by Figure 5 and Figure 6For example, area R2 can be a designated area. In the process of generating the first animation and the second animation, the area range of area R2 in the vector diagram can be filled with color blocks, and the color blocks can be set to have a flashing effect. Therefore, when introducing the layout of the house before the renovation in the video, the color blocks of area R2 can be flashed to achieve a highlight effect, thereby attracting the viewer's attention to the bathroom to indicate that the bathroom functions are concentrated; and when introducing the layout of the house after the renovation in the video, the color blocks of area R2 can be flashed to achieve a highlight effect, thereby attracting the viewer's attention to the bathroom to indicate that the bathroom has achieved dry and wet separation.
[0084] Continue reading Figure 7 In step S110, the method of generating text data of the spatial object may include step S113a or step S113b. Step S113a and step S113b may be performed selectively.
[0085] S113a, obtaining existing description text of the spatial object and converting the existing description text into text data of the spatial object.
[0086] S113b, in response to receiving the input information, generating text data of the spatial object according to the input information, wherein the input information is text input information or voice input information.
[0087] The existing description text may be written by the designer when designing the renovation plan and stored in the server in advance. The existing description text may be a paragraph of text, which describes the layout of the house before and after the renovation and the renovation effect. The existing description text can be obtained by the house ID in step S113a. In the existing description text, all the renovation points may be combined together for description, so the existing description text can be converted into text data through a language model or other semantic parsing tools. In the converted text data, the description text before the renovation and the description text after the renovation can each exist as a separate text item.
[0088] The input information is obtained by the operator inputting text on the web page. The input information is not pre-stored information but is input by the operator before the video generation starts. The operator can open the browser and log in to the platform. After logging in, multiple text boxes will be displayed on the page. Different text boxes are used to input description texts before and after the transformation. If the input information is text information, it can be directly used as text data. If the input information is voice information, the voice information can be converted into text data.
[0089] Step S133a and step S133b can provide a variety of text data acquisition methods, which facilitates the generation of text data.
[0090] The text data may include at least one first text item and at least one second text item. The first text item may be used to describe a first spatial state of the spatial object, and the second text item may be used to describe a second spatial state of the spatial object.
[0091] If the existing description text is a whole paragraph of text, the existing description text can be converted into two paragraphs of text, and the two paragraphs of text are text data describing the state before the transformation (the first spatial state) and after the transformation (the second spatial state). Two text boxes can also be set on the web page for receiving input information, which are used to input text data describing the state before the transformation (the first spatial state) and after the transformation (the second spatial state).
[0092] It is understandable that the text of the same spatial state can be further subdivided into multiple text items according to the transformation items (or transformation points), and each transformation item in the same spatial state can correspond to one text item. Different transformation items correspond to different transformation methods and transformation features. For example, House F can correspond to 6 text items, of which 3 text items correspond to 3 problems to be overcome before the transformation, and the other 3 text items correspond to 3 transformation effects after the transformation.
[0093] Separating the text data before and after the transformation is helpful for displaying it to users in the video and comparing the effects before and after the transformation.
[0094] There may be a specified arrangement order between the text items contained in the text data. The above-mentioned multiple animations are generated and synthesized in the arrangement order. For example, in step S110, the three text items corresponding to the text items before the transformation and the three text items corresponding to the text items after the transformation are sorted in sequence, and the three text items corresponding to the text items before the transformation and the three text items corresponding to the text items after the transformation can all be sorted according to the transformation items. In step S120, the vector data will be operated according to the semantics of the six text items, and six animations will be generated in sequence.
[0095] Figure 8 FIG. 1 is a schematic diagram showing the overall flow of a video generation method M100 in some other embodiments of the present disclosure. Figure 8 In step S120, the method of generating multiple animations based on vector data and text data may include the following steps S121 and S122.
[0096] S121, generating a spatial object image corresponding to the text item according to the arrangement order and vector data.
[0097] The spatial object image is a script or program that changes the display state and position of the vector data according to the semantics of the text item, thereby adjusting the vector map of the vector data to an image that matches the spatial state represented by the semantics, thereby obtaining the spatial object image. For example, if the content of the first text item is "the kitchen operation area is crowded", the vector data is operated to make the operation table a1 displayed and the operation table a2 hidden; if the content of the fourth text item is "change the operation table in the kitchen to an L-shaped operation table to increase the storage space in the living room", the vector data is operated to make the operation table a2 displayed and the operation table a1 hidden. The same can be said for other text items.
[0098] When generating animations, the animations may be generated one by one in the order in which the text items are arranged until all the text items are traversed to obtain multiple animations; or animations may be generated for multiple text items simultaneously without following the order in which they are arranged until all the text items are animated to obtain multiple animations.
[0099] S122, adding animation effects to the corresponding spatial object image according to the text item to obtain multiple animations. The animation effects may include one or more of the following: multiple switching of the display state of the object, multiple switching of the display state of the area covering part of the object, position movement of the object, and zooming of the field of view.
[0100] Animation effects enable each animation to dynamically display content, so that the image in the video changes dynamically, thereby highlighting the transformation items and transformation focus. Animation effects can be applied to objects or to areas.
[0101] by Figure 3-Figure 6 For example, in an animation of a bathroom before renovation, the semantic analysis of the corresponding text item determines that the renovated objects include the wash basin a4 and the toilet a5. Therefore, a4 and a5 can be set to switch between display and hiding multiple times in this animation to achieve a flickering effect of a4 and a5, thereby indicating that the bathroom has a defect of concentrated functions before renovation; at the same time, the field of view can be scaled to make area R2 fill the animation screen and the center of area R2 is used as the center of the screen, so as to attract the viewer's attention with the flickering effect. In an animation of a bathroom after renovation, the semantic analysis of the corresponding text item determines that the renovated objects include the wall q2. Therefore, q2 can be set to switch between display and hiding multiple times in this animation to achieve a flickering effect of q2, thereby indicating that the bathroom has achieved a dry and wet separation renovation after renovation; at the same time, the field of view can be scaled to make area R2 fill the animation screen and the center of area R2 is used as the center of the screen, so as to attract the viewer's attention with the flickering effect.
[0102] The multiple switching of the display state of the area covering part of the object is similar to the multiple switching of the display state of the object, which attracts the viewer's attention by achieving a flashing effect of the area. The covered object is the object affected by the transformation.
[0103] The position movement of an object refers to moving the transformed object from one position to another to achieve the movement effect of the object.
[0104] The text data may correspond to at least one hierarchical category. The at least one hierarchical category may include a first level and a second level subordinate to the first level. The first level may be used to distinguish text data corresponding to different types of spatial states, and the second level may be used to distinguish text data corresponding to different transformation items under the same spatial state.
[0105] Through the first level, a text data can be divided into a first text and a second text, the first text corresponds to the description under the first spatial state, and the second text corresponds to the description under the second spatial state, thereby distinguishing the description texts of the first spatial state and the second spatial state. Through the second level, different transformation items of different objects or areas can be distinguished. Different transformation items indicate that at least one of the transformed objects or transformation methods (such as adding partitions, pasting wallpaper, installing pipes, etc.) is different.
[0106] The first text and the second text can be further divided according to the problems to be overcome. For example, the first text includes three parts, which correspond to the description of the problems before the kitchen renovation, the description of the problems before the living room renovation, and the description of the problems before the bathroom renovation. The second text can also include three parts, which correspond to the description of the effect after the kitchen renovation, the description of the effect after the living room renovation, and the description of the effect after the bathroom renovation.
[0107] When text data is generated by inputting text information on the page, different text boxes correspond to different second levels under different first levels. For example, text box t1 is used to input the kitchen layout status (corresponding to the second level) before the renovation (corresponding to the first level), text box t2 is used to input the living room layout status (corresponding to the second level) before the renovation (corresponding to the first level), and text box t3 is used to input the bathroom layout status (corresponding to the second level) before the renovation (corresponding to the first level). Text box t4 is used to input the kitchen layout status after the renovation (corresponding to the first level), text box t5 is used to input the living room layout status after the renovation (corresponding to the first level), and text box t6 is used to input the bathroom layout status after the renovation (corresponding to the first level).
[0108] The at least one hierarchical category may further include an intermediate level. The intermediate level may be subordinate to the first level, and the second level may be subordinate to the intermediate level. The intermediate level is used to distinguish different area ranges under the same spatial state. The second level is used to distinguish text data corresponding to different transformation items in the same area range under the same spatial state.
[0109] The middle level is located between the first level and the second level, and is used to distinguish renovation items that occur in different rooms (such as bathrooms) or different areas (such as area R1).
[0110] The hierarchy can be represented by directories. When inputting text information, the operator can create two first-level directories (corresponding to the first level), and the two first-level directories are before and after the transformation. Three second-level directories (corresponding to the middle level) can be created under each first-level directory, and the three second-level directories are kitchen, living room and bathroom. A third-level directory (corresponding to the second level) can be created under each second-level directory, forming six third-level directories. The six third-level directories correspond to three problems to be overcome and three transformation effects.
[0111] The video may display text content in the corresponding spatial state. The displayed text content may be obtained through text data. The text content may be added to the video during the synthesis process. In the synthesized video, text may be displayed therein, and the transformation effect may be displayed through text combined with animation effects. The video may be divided into multiple video segments, one video segment corresponds to an animation, and the text content in the video corresponds to the corresponding animation. For example, in the part of the video segment showing the kitchen before the transformation, the text displayed is the text used to describe the kitchen before the transformation.
[0112] The video can play voices with text content in the corresponding spatial state. The played voice can be obtained by converting text data. The voice can be generated in the process of generating the above-mentioned multiple animations. For example, the video can simultaneously display the effect of house renovation by displaying the floor plan, text and playing voice. The voice can be obtained by directly converting the text data into text-to-speech (TTS), or by first optimizing the text data and then converting the optimized text into text-to-speech. When starting to generate an animation, you can start to convert the text corresponding to the animation into TTS.
[0113] Based on any of the above implementations, the present disclosure also provides a video generating device. Fig. 9 FIG. 1 is a schematic block diagram of the structure of a video generating device according to an embodiment of the present disclosure. Fig. 9As shown, the video generation device includes a data acquisition module 1002, an animation generation module 1004 and a video synthesis module 1006. The above video generation device can be in the form of computer software, and the above modules can be implemented by computer program modules.
[0114] The data acquisition module 1002 is used to acquire vector data of a spatial object and to acquire text data of the spatial object, wherein the spatial object includes multiple object objects, and the text data is used to describe the spatial state of the spatial object, wherein the spatial state includes a first spatial state before the layout of the object object changes and a second spatial state after the layout changes, and the vector data can represent the layout of multiple object objects in the spatial object under different spatial states through images.
[0115] The animation generation module 1004 is used to generate multiple animation segments according to the vector data and the text data, wherein the multiple animation segments are used to represent the layout of at least part of the object in the spatial object under different spatial states.
[0116] The video synthesis module 1006 is used to synthesize the above-mentioned multiple animations to obtain a video for describing the spatial layout changes of the spatial objects.
[0117] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0118] The execution subject of the video synthesis method in the specific implementation manner of the present disclosure may be an electronic device such as a mobile phone, a tablet computer, a desktop computer, etc.
[0119] Therefore, based on any of the above embodiments, the present disclosure further provides an electronic device, which can execute the video synthesis method of any of the above embodiments of the present disclosure, and the video synthesis device of any of the above embodiments can be configured on the electronic device.
[0120] Fig.10 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure.
[0121] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0122] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0123] The processor 1200 may be a central processing unit (CPU). The processor 1200 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0124] The memory 1300 can be used as a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions of the computer program in the embodiment of the present disclosure. The processor 1200 implements the video synthesis method by running the non-transitory software programs, instructions and modules stored in the memory 1300.
[0125] The memory 1300 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created by the processor 1200, such as structural data, model data, sample data, stiffness evaluation results, etc. of the bridge. In addition, the memory 1300 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1300 may optionally include a memory remotely arranged relative to the processor 1200, and these remote memories may be connected to the processor 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0126] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0127] The present disclosure also provides a computer program product, and the method of the present disclosure can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM or other programmable device.
[0128] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0129] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0133] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0134] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0135] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A video generation method, characterized in that: include: Acquire vector data of a spatial object and acquire text data of the spatial object, wherein the spatial object includes a plurality of object objects, the text data is used to describe a spatial state of the spatial object, the spatial state includes a first spatial state before a layout change of the object objects and a second spatial state after the layout change, and the vector data can represent the layout of the plurality of object objects in the spatial object under different spatial states through images; Generate multiple animations according to the vector data and the text data, wherein the multiple animations are used to represent the layout of at least part of the object objects in the spatial object under different spatial states; as well as The multiple animations are synthesized to obtain a video for describing the spatial layout change of the spatial object.
2. The video generation method according to claim 1, characterized in that: Get the vector data of the spatial object, including: Acquire first existing vector data and second existing vector data of the spatial object, wherein the first existing vector data is used to represent the layout of multiple object objects in the spatial object in a first spatial state, and the second existing vector data is used to represent the layout of multiple object objects in the spatial object in a second spatial state; and The first existing vector data and the second existing vector data are merged to obtain vector data of the spatial object.
3. The video generation method according to claim 1 or 2, characterized in that: The difference between the first spatial state and the second spatial state is represented by a change in one or more of the following parameters: a display state of the object, a position of the object.
4. The video generation method according to claim 3, characterized in that: The difference between the first spatial state and the second spatial state is also represented by the display state of a designated area, and the designated area covers at least one of the object having a layout change between different spatial states.
5. The video generation method according to claim 1, characterized in that: Acquiring text data of the spatial object includes: Acquire an existing description text of the spatial object and convert the existing description text into text data of the spatial object; or In response to receiving input information, text data of the spatial object is generated according to the input information, where the input information is text input information or voice input information.
6. The video generation method according to claim 1 or 5, characterized in that: The text data includes at least one first text item and at least one second text item, the first text item is used to describe the first spatial state of the spatial object, and the second text item is used to describe the second spatial state of the spatial object.
7. The video generation method according to claim 6, characterized in that: There is a specified arrangement order between the text items contained in the text data, and the multiple animations are generated and synthesized according to the arrangement order.
8. The video generation method according to claim 7, characterized in that: Generating multiple animations according to the vector data and the text data, including: Generate a spatial object image corresponding to the text item according to the arrangement order and the vector data; Animation effects are added to the corresponding spatial object images according to the text items to obtain multiple animations.
9. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory so that the processor executes the method according to any one of claims 1 to 8.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program is used to implement the method according to any one of claims 1 to 8.