Method and apparatus for generating scenario, and electronic device and storage medium
By obtaining user intention and environment status information, determining user tags, and using preset scene generation models to generate personalized scene files, the problems of low efficiency and poor user experience in the existing technology are solved, and efficient personalized scene generation is achieved.
Patent Information
- Application Number
- PCT/CN2024/143801
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-29
- Filing Date
- 2024-12-30
- Publication Date
- 2025-08-07
AI Technical Summary
The prior art generates scenarios inefficiently and cannot design targeted scenarios for different users, and has poor user experience.
By obtaining user intentions, user portraits and environment status information, user tags are determined, and a personalized scene file is generated using the preset scene generation model.
It improves the efficiency of scene generation, can generate targeted scenarios for different users, meet personalized needs, and improve user experience.
Smart Images

Figure CN2024143801_07082025_PF_FP_ABST
Abstract
Description
Method, device, electronic device and storage medium for generating scene CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to Chinese patent application No. 2024101252342 filed on January 29, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to the field of information processing, and in particular to a method, device, electronic device, and storage medium for generating a scene. Background Art
[0003] In related technologies, the following method is typically used to generate a scenario file corresponding to a specific scenario: first, manually design the execution conditions and actions within the scenario, and then convert these into a scenario file that can be recognized by the scenario engine according to the preset scenario framework and specifications. However, this method has the following drawbacks: the efficiency of scenario generation is extremely low, and it is impossible to design targeted scenarios for different users, resulting in a poor user experience. Summary of the Invention
[0004] The present disclosure provides a method, device, electronic device and storage medium for generating scenes, which can not only improve the efficiency of scene generation, but also generate targeted scenes for different users to meet the personalized needs of different users.
[0005] According to the first aspect of the present disclosure, a method for generating a scene is provided, including: obtaining a scene generation request; determining the user intent and target user in the scene generation request, wherein the user intent is used to describe the target scene for the target user; obtaining a user portrait corresponding to the target user and environmental status information of the target user's current environment; determining a user tag of the target user based on the user intent, the user portrait, and the environmental status information; and generating a scene file corresponding to the target scene through a preset scene generation model based on the user tag.
[0006] According to the second aspect of the present disclosure, a device for generating a scene is provided, including: a first acquisition module for obtaining a scene generation request; a first determination module for determining the user intention and target user in the scene generation request, wherein the user intention is used to describe the target scene for the target user; a second acquisition module for obtaining a user portrait corresponding to the target user and environmental status information of the target user's current environment; a second determination module for determining a user tag of the target user based on the user intention, the user portrait and the environmental status information; and a generation module for generating a scene file corresponding to the target scene through a preset scene generation model based on the user tag.
[0007] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; wherein the executable instructions, when executed by the processor, prompt the processor to implement a method for generating a scene as described in the first aspect above.
[0008] According to a fourth aspect of the present disclosure, a non-temporary computer-readable storage medium is provided, comprising a computer program stored thereon, which, when executed by a processor of an electronic device, enables the electronic device to execute a method for generating a scene as described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, a brief introduction will be given below to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0010] FIG1 is a flow chart of a method for generating a scene according to some embodiments of the present disclosure;
[0011] FIG2 is a schematic diagram of the complete process of a method for generating a scene according to some embodiments of the present disclosure;
[0012] FIG3 is a structural block diagram of an apparatus for generating a scene according to some embodiments of the present disclosure; and
[0013] FIG4 is a schematic structural diagram of an electronic device according to some embodiments of the present disclosure. DETAILED DESCRIPTION
[0014] To make the above-mentioned purposes, features, and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and specific embodiments. It is apparent that the embodiments described are only a portion of the embodiments of the present disclosure, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure without inventive effort are also within the scope of protection of the present disclosure.
[0015] The scene generation method according to some embodiments of the present disclosure can be applied to a scene generation device. The scene generation device can be any type of terminal device with data processing capabilities, including an ordinary computer, a server (an ordinary server or a cloud server, etc.) or other types of data processing equipment. The various embodiments of the present disclosure do not limit the type of scene generation device.
[0016] In some embodiments, the scene generation method can generate not only vehicle-mounted scenes but also non-vehicle-mounted scenes. A scene can also be understood as a situation, atmosphere, or the like. For example, a vehicle-mounted scene can be a scene with various ambient lights turned on. To facilitate the description of the scene generation method disclosed herein, it is specifically noted that the subsequent embodiments are described using a vehicle-mounted scene as an example.
[0017] The following describes in detail a method for generating a scene according to some embodiments of the present disclosure. FIG1 is a flow chart of a method for generating a scene according to some embodiments of the present disclosure. Referring to FIG1 , the method for generating a scene according to some embodiments of the present disclosure may include steps S11 to S15.
[0018] In step S11: a scene generation request is obtained.
[0019] In some embodiments, the scene generation request is used to generate a target scene for the target user. It should be noted that the generated scene described in each embodiment of the present disclosure refers to the scene file corresponding to the generated scene (which can be recognized and run by the scene engine and can display the corresponding scene during runtime).
[0020] In some embodiments, there are at least two ways to obtain a scene generation request: the first way is to obtain the scene generation request through a client (the scene generation device is the server); the second way is to obtain the scene generation request through the target user's operation on the scene generation device.
[0021] For the first method, the scene generation device can receive a scene generation request sent by the client. The client is used to provide a scene generation interface, and the first user can input the scene generation requirements in the scene generation interface. For example, the scene generation requirements can be a text description of the scene to be generated (i.e., the target scene), or various keywords included. The client obtains the scene generation request based on the scene generation requirements input by the first user and sends the request to the scene generation device. The target user may or may not be the first user. The first user is also the requesting user mentioned later.
[0022] In the first approach, the client can be any type of terminal device, such as an in-vehicle computer, a regular computer, a mobile phone, or other devices. The scene generation device acts as a server and provides scene generation services to the client. The scene generation device and the client can communicate using any method, without limitation.
[0023] For the second method, the scene generation device may also provide a scene generation page, on which the first user may input a scene generation requirement. For example, the scene generation requirement may be a text description of the scene to be generated (i.e., the target scene) or keywords included therein. The scene generation device directly obtains a scene generation request based on the scene generation requirement input by the first user.
[0024] In the above two methods, the first user may input the scenario generation requirement by either text input or voice input, and there is no limitation on this.
[0025] In some embodiments, the scene generation request may include not only the scene generation requirements but also the target user, and the first user may specify the target user.
[0026] In some embodiments, because the first user (the requesting user) is located in the target vehicle, the first method is primarily used to obtain a scene generation request. In this case, the target vehicle's on-board computer functions as the client. In some embodiments, the first user can input "Today is Li Si's birthday" as a scene generation request through the target vehicle's on-board computer (Li Si is the target user). The on-board computer then obtains a scene generation request based on the scene generation request and sends the request to the scene generation device.
[0027] In step S12 : the user intention and the target user in the scenario generation request are determined. The user intention is used to describe the target scenario for the target user.
[0028] In some embodiments, step S12 may include: determining the user intention and target user in the scene generation request according to the scene generation requirements in the request.
[0029] In some embodiments, since the scene generation request is initiated by the first user, the scene generation device analyzes the scene generation request to determine the user intention and target user of the first user.
[0030] In some embodiments, since the scenario generation request may include a target user, the target user can be directly extracted from the scenario generation request. For example, if the scenario generation requirement is "Today is Zhang San's birthday," and a scenario generation request is generated based on this scenario generation requirement, the target user, Zhang San, can be directly extracted from the scenario generation request.
[0031] In some embodiments, the user intent is determined based on the scene generation request, which can be determined by the keywords in the scene generation requirement corresponding to the scene generation request. For example, the user intent can represent the scene theme of the target scene that the first user wants to generate, and the scene theme can be represented by multiple keywords. For example, when "Today is Zhang San's birthday" is used as the scene generation requirement, multiple keywords may include "today", "birthday" and "Zhang San". Therefore, the user intent in the request can be represented by a group of keywords "today", "birthday" and "Zhang San".
[0032] In step S13: obtain the user portrait corresponding to the target user and the environmental status information of the target user's current environment.
[0033] In some embodiments, the user portrait of the target user may be obtained from a user portrait library.
[0034] In some embodiments, multiple types of user profiles can be pre-calculated offline via a big data platform and stored in a user profile library. User profiles are constructed using data tags. By analyzing massive amounts of data, the data is abstracted into tags, and these tags are used to concretize the user image, ultimately forming a user profile. User profiles emphasize a group of people, capturing the broader picture of the group and reflecting its commonalities. By using single or combined dimensional identification, the image and characteristics of each individual within the group are downplayed, thereby aggregating the shared characteristics of a group of users.
[0035] In some embodiments, the environmental status data of the target user's current environment includes at least: video data of the target user and vehicle information of the target vehicle in which the target user is located. Vehicle information includes information about passengers within the vehicle, the vehicle's geographic location, the vehicle's external geographic environment, and road conditions at the vehicle's location. It should be understood that the type of vehicle information can be set based on actual needs. Of course, the type of environmental status data of the target user's current environment can also be arbitrarily set based on actual needs, and this is not limited here.
[0036] In some embodiments, video data containing a target user refers to video data containing at least an image of the target user's face. By analyzing video data containing the target user, a wealth of information about the target user can be obtained. For example, analyzing the target user's face can predict the target user's current mental state; or, for another example, analyzing the target user's clothing can predict the target user's current mood.
[0037] Analyzing the target vehicle's information can yield information useful for generating the target scene. For example, analyzing the vehicle's external geographic environment can predict where displaying the generated target scene would create the most atmosphere and enhance the target user's enjoyment. Another example is analyzing the vehicle's road conditions to predict whether the current location is suitable for displaying the generated target scene. Furthermore, analyzing the interior passenger information can predict which ambient lighting display strategy is most appropriate.
[0038] Therefore, by executing step S13 , a variety of information that is helpful for generating a personalized target scene can be obtained.
[0039] In step S14: the user tag of the target user is determined based on the user intention, user portrait and environmental status information.
[0040] In some embodiments, since the user intention, user portrait, and environmental status data contain a lot of content, these data can be analyzed to obtain user tags that can accurately express the characteristics of the target user.
[0041] In some embodiments, the user intention, user portrait, and environmental status data can be analyzed by a preset algorithm to determine the user tag of the target user. The preset algorithm can be selected according to actual needs. The preset algorithm can be to determine the tags corresponding to the user, user portrait, and environmental status data respectively, and then filter out the user tag of the target user from these tags. For example, based on the keywords used to characterize the user intention, the tags corresponding to the keywords are determined. The tags of the group to which the target user belongs can also be determined based on the user portrait, and the environmental status data can be feature extracted to determine the environmental tags. The tags obtained above are rationally verified, and the tags that finally pass the rationality verification are used as the user tags of the target user.
[0042] In other embodiments, user intention, user portrait, and environmental status data can be directly input into a pre-trained model, and the user label of the target user can be obtained through model analysis. The model can be selected according to actual needs, and there is no restriction on the type of model and the method of training the model. Taking the model as a neural network model as an example, the training data set of the neural network model can be determined first. For each set of training data in the training data set, user intention data, user portrait data, environmental status data, and corresponding user labels are included. The neural network is trained based on the training data set. If the accuracy of the model output is greater than the preset value or the number of training iterations of the model reaches the first preset number, it indicates that the model training is completed, and the trained model is used to predict the user label.
[0043] In step S15: based on the user tag, a scene file corresponding to the target scene is generated by a preset scene generation model.
[0044] In some embodiments, after obtaining the user tag, the user tag can be analyzed using a preset scene generation model to obtain a scene file corresponding to the target scene.
[0045] A preset scenario generation model is a pre-designed model used to generate scenario files. It generates at least one scenario element related to a target scenario based on user tags, which serves as the scenario file for the target scenario. For example, if the target scenario is an in-vehicle scenario, the at least one scenario element might include the actions performed in the in-vehicle scenario and the conditions corresponding to each action.
[0046] A preset scene generation model can be selected according to actual needs. For example, the preset scene generation model can be a neural network model. In the training process of the preset generation model, an initial model can be constructed first, such as an initial neural network model. The input of the neural network model can be prompt information corresponding to the user label, and the output of the neural network model can be at least one scene element corresponding to the user label. In order to train the model, a training data set for user model training can be obtained. For each set of training data in the training data set, prompt information corresponding to the user label and at least one scene element corresponding to the user label can be included. The initial neural network model is trained based on the training data set. If the accuracy of the model output reaches the preset accuracy or the number of training iterations of the model reaches a second preset number, it indicates that the model training is completed, and the trained model is used to generate the scene file.
[0047] In some embodiments, by comprehensively analyzing various information, the user tag that is most suitable for the target user in the current state can be accurately obtained, so that the target scene finally generated can better meet the personalized needs of the target user and enhance the user experience.
[0048] In some embodiments, assuming that today is user B's birthday, user A can initiate a request to generate a birthday celebration scene for user B on the target vehicle in advance. The target vehicle's computer will send the request to generate a birthday celebration scene for user B to the scene generation device. After receiving the request, the scene generation device first analyzes the request to determine the user intent in the request, assuming it is "today", "birthday", and "user B". Next, the scene generation device obtains the user portrait corresponding to user B and the environmental status data of the environment in which user B is currently located, and then determines the user tag of user B based on the user intent of user A, the user portrait corresponding to user B, and the environmental status data. Finally, based on the user tag, a scene file corresponding to the target scene is generated by a preset scene generation model. When the scene file is run, it can display a birthday celebration scene for user B.
[0049] According to the method for generating a scene in some embodiments of the present disclosure, a scene generation request is first obtained, and then the scene generation request is analyzed to determine the user intent and target user in the scene generation request. The user intent is used to describe the target scene for the target user. Then, the user portrait corresponding to the target user and the environmental status information of the target user's current environment are obtained, and then the user tag of the target user is determined based on the user intent, user portrait and environmental status information. Finally, based on the user tag, a scene file corresponding to the target scene is generated by a preset scene generation model, and the scene file can display the target scene when it is run. The method according to some embodiments of the present disclosure has the following technical effects:
[0050] First, users only need to add intent information in the scene generation request without entering detailed scene construction parameters, and the scene file corresponding to the target scene can be automatically generated, thereby improving scene generation efficiency.
[0051] Second, by identifying the user intent in the scenario generation request and conducting a comprehensive analysis based on the user portrait corresponding to the target user and the status information of the target user's current environment, we can accurately obtain the user label that best suits the target user, and generate the target scenario for the target user in a targeted manner, meeting the target user's personalized needs and enhancing the user experience.
[0052] Step S15 can be implemented by following the steps S151 to S153.
[0053] In step S151: obtaining prompt information corresponding to the target scene according to the user tag.
[0054] In some embodiments, since the preset scene generation model cannot directly recognize the user tag, it is necessary to first generate prompt information based on the user tag, and the format of the prompt information is a format that can be recognized by the preset scene generation model.
[0055] In step S152 : the prompt information is input into a preset scene generation model to obtain at least one scene element, where the scene element includes an executed action and a condition corresponding to the action.
[0056] After executing step S151 to obtain the prompt information, the prompt information is then input into the preset scene generation model, and the preset scene generation model automatically outputs at least one scene element.
[0057] Scene elements are the various actions involved in the target scene and the conditions corresponding to each action.
[0058] In some embodiments, the output of the preset scenario generation model is: when the target user approaches the car door and unlocks it (condition 1), the exterior welcome lighting turns on (action 1), and the skin speaker plays a welcome sound (action 2). This output includes three scenario elements, two actions (action 1 and action 2), and one condition (condition 1).
[0059] In step S153: a scene file corresponding to the target scene is generated according to at least one scene element.
[0060] In some embodiments, a scene file corresponding to the target scene is generated according to the output result (at least one scene element) of the preset scene generation model in step S153.
[0061] In some embodiments, scene elements can be automatically obtained through a preset scene generation model, while in related technologies, scene elements can only be manually arranged. Therefore, the solutions according to some embodiments of the present disclosure can significantly improve the efficiency of scene generation.
[0062] In some embodiments, prompt information corresponding to the target scene is first obtained based on the user tag, and then the prompt information is input into the preset scene generation model to obtain at least one scene element. Finally, a scene file corresponding to the target scene is generated based on the at least one scene element. Running the scene file can make the final displayed target scene more in line with the personalized needs of the target user and optimize the user experience.
[0063] In some embodiments, step S152 may be implemented by the following steps: obtaining a first vector corresponding to the prompt information; and inputting the first vector into a user item embedding model to obtain a second vector corresponding to at least one scene element.
[0064] In some embodiments, the user-item embedding model is also known as the User-Item Embedding model. User-Item Embedding is a technology that embeds users and items into the same vector space. Each user and item has a corresponding vector representation. By learning the similarities between users and items, the user's preference for the item can be predicted. For example, all the music a user has ever listened to can be input as input, and the user's favorite music genre can be determined based on the output.
[0065] Therefore, the prompt information can be first converted into a vector expression, that is, a first vector is obtained, and then the first vector is input into the user-item embedding model. The output result of the user-item embedding model is a vector expression corresponding to each scene element in at least one scene element. The vector expressions corresponding to all scene elements are collectively referred to as the second vector.
[0066] In some embodiments, after the first vector is input into the user-item embedding model, the output result may be the following three conditional action sequences:
[0067] (1) When the target user approaches the car door and unlocks it (condition), the welcome light effect outside the car is turned on (action 1), and the surface speaker broadcasts the welcome sound effect (action 2).
[0068] (2) After opening the door and getting in the car (condition), the boot animation and welcome message are played (action 1), and the VPA (Vehicle Personal Assistant) throws flowers to welcome the driver (action 2).
[0069] (3) After the driver takes his seat and closes the car door (condition), the car computer automatically changes to a birthday-themed wallpaper (action 1), plays the latest single of the target user's favorite idol (action 2), turns on the red ambient light to sway with the music (action 3), releases rose-scented fragrance (action 4), recommends a birthday cake purchase link (action 5), and provides links to food and movies (action 6) and movies (action 7) at shopping malls the driver frequently visits.
[0070] In the conditional-action sequences of the above three results, each condition and each action are expressed using vectorization.
[0071] In some embodiments, generating a scene file corresponding to a target scene based on at least one scene element may include:
[0072] A scene file corresponding to the target scene is generated according to the preset scene framework, the preset grammar specification and the second vector. The preset scene framework may include preset scene trigger conditions, action execution logic, exit logic, etc. The preset grammar specification may be a descriptive language of the scene framework.
[0073] After the second vector is obtained, the scene elements in the second vector are arranged and constructed using a preset scene framework and a preset grammar specification, that is, a scene file that can be parsed and recognized by the scene engine is generated.
[0074] In some embodiments, a first vector corresponding to the prompt information is first obtained, the first vector is input into the user item embedding model, and a second vector corresponding to at least one scene element is obtained. Then, a scene file corresponding to the target scene is generated according to the preset scene framework, the preset grammar specification and the second vector. Running the scene file can make the target scene finally displayed more in line with the personalized needs of the target user and optimize the user experience.
[0075] In some embodiments, in step S12, determining the user intent in the scenario generation request may include the following steps: determining the requesting user who generates the scenario generation request; obtaining the historical conversation information of the requesting user; and determining the user intent based on the keywords and historical conversation information in the scenario generation request.
[0076] In some embodiments, the purpose of the scene generation device obtaining the historical conversation information of the requesting user (first user) is to determine the first user's intention expression habits. Therefore, by analyzing the keywords in the scene generation request based on the intention expression habits, the user intention of the first user can be more accurately obtained.
[0077] In some embodiments, the historical conversation information includes text conversation information and voice conversation information.
[0078] In some embodiments, the user intent in the scene generation request can be determined by a pre-trained language model. The language model has the function of automatically identifying the matching degree between each keyword and different intents. Therefore, the scene generation request and the historical conversation information of the first user can be input into the pre-trained language model. The language model determines the first user's intention expression habits (a variety of different types of intentions) based on the first user's historical conversation information, and then identifies the matching degree between each keyword in the scene generation request and each intent. Finally, based on the matching degree between each keyword and each intent, a comprehensive matching score for each type of intent is obtained, and finally, the intent with the highest comprehensive matching score is used as the user intent in the scene generation request.
[0079] The type of language model and the training method of the language model can be set according to actual needs and are not restricted here.
[0080] In some embodiments, by analyzing the first user's historical conversation information, the first user's intention expression habits can be accurately understood, and then the user intention in the scene generation request can be accurately determined, ensuring that the generated target scene can better meet the target user's personalized social needs.
[0081] In some embodiments, obtaining prompt information corresponding to the target scene based on user tags can include the following steps: inputting the user tag into a scene prompt builder to obtain prompt information corresponding to the target scene, the scene prompt builder includes multiple scene prompt templates, and the scene prompt builder is used to generate prompt information based on the scene prompt template and the user tag.
[0082] In some embodiments, the user tag is input into the scene prompt builder, and the scene prompt builder can use multiple preset scene prompt templates to output scene prompt information.
[0083] In some embodiments, a prompt message might be: for a 25-year-old single female driver who likes the color red, flowers, music, fragrance, and enjoys food and shopping, a welcome ceremony is held outside the car when she gets in, a romantic birthday-themed atmosphere is created inside the car, and birthday-related entertainment is recommended. Based on this prompt message, the internal information of the scene file for the target scene can be as follows (a)-(c):
[0084] (a) When the target user approaches the car door and unlocks it, the exterior welcome lighting turns on and the surface speaker plays a welcome sound.
[0085] (b) After opening the door and getting in the car, the startup animation and welcome message will play, and the VPA will throw flowers to welcome you.
[0086] (c) After the user is seated and the car door is closed, the car computer automatically changes to a birthday-themed wallpaper and plays the latest single of the target user's favorite idol. At the same time, the red ambient light turns on and sways with the music, releasing a rose-scented fragrance. The computer also recommends a link to purchase a birthday cake, as well as links to food and movies at shopping malls the car owner frequently visits.
[0087] According to the method of generating scenes in some embodiments of the present disclosure, prompt information that more accurately describes the target scene can be obtained to guide the preset scene generation model to accurately generate a scene file corresponding to the target scene that meets the personalized needs of the target user.
[0088] In some embodiments, after step S15, that is, after generating the scene file corresponding to the target scene through the preset scene generation model, the following steps may also be included: sending the scene file to the target terminal, so that the target terminal runs the scene file to display the target scene, and the target terminal is the terminal that sends the scene generation request.
[0089] In some embodiments, the target terminal is a terminal with a client installed. The first user sends a scenario generation request to the scenario generation device through the client. The scenario generation device responds to the scenario generation request, generates a scenario file corresponding to the target scenario, and ultimately sends the scenario file to the target terminal. The target terminal can then run the scenario file to display the target scenario.
[0090] In some embodiments, the target terminal is the vehicle's on-board terminal. After the first user sends a scene generation request through the vehicle's on-board terminal, the scene generation device responds to the scene generation request, generates a scene file corresponding to the target scene, and sends the scene file to the vehicle's on-board terminal. Then, the vehicle's on-board terminal can run the scene file to display the target scene.
[0091] In some embodiments, after generating a scenario file corresponding to a target scenario using a preset scenario generation model, the following steps may be further included: verifying the scenario file according to preset verification rules to obtain a verified scenario file. Then, sending the scenario file to the target terminal may include: sending the verified scenario file to the target terminal.
[0092] In some embodiments, the scene file may be verified using a preset verification rule, and if it is determined after verification that it meets the preset business rules, the scene file is considered to have passed the verification. Then, the scene file that has passed the verification is sent to the target terminal.
[0093] In some embodiments, using preset verification rules to verify the scene file can further ensure the rationality and compliance of the generated scene.
[0094] FIG2 is a schematic diagram of the complete process of the method for generating a scene according to some embodiments of the present disclosure. In FIG2 , the server is a scene generation device. Referring to FIG2 , the client first sends a scene generation request to the server. The server performs the following processing in sequence: (1) determining the user intent and target user in the scene generation request; (2) obtaining the user profile corresponding to the target user and the environmental status information of the target user's current environment; (3) data preprocessing: preprocessing the obtained information. The preprocessing can be to determine the user tag of the target user based on the user intent, user profile and environmental status information. The user profile can be obtained by collecting offline data, and the environmental status information of the current environment can be obtained by collecting real-time data; (4) scene prompt information construction: obtaining the prompt information corresponding to the target scene based on the user tag; (5) scene element generation: inputting the prompt information into the preset scene generation model to obtain at least one scene element. This step can be implemented with the help of the scene atom library; (6) scene file construction: generating a scene file corresponding to the target scene based on at least one scene element; (7) rule verification: verifying the scene file according to the preset verification rules. Afterwards, the client receives the verified scene file sent by the server, and the client can run the scene file at an appropriate time to display the target scene.
[0095] According to the method of generating scenes in some embodiments of the present disclosure, accurate feature input can be provided for the preset scene generation model by obtaining user tags and scene prompts. The preset scene generation model can adopt the User-Item Embedding model, which can effectively improve the accuracy of scene materials through training, and can ensure that the target scene finally generated can better meet the personalized needs of the target users. Finally, the rationality and compliance of the generated scene can be further guaranteed by verifying the scene file using preset verification rules. Compared with the method of manually arranging fixed scenes in related technologies, the present disclosure can not only realize the automatic generation of scene files corresponding to the scene and improve the efficiency of scene generation, but also create differentiated scene service experiences for different users.
[0096] It should be noted that for the method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, as some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the present disclosure.
[0097] Based on the same inventive concept, the present disclosure provides a device 300 for generating a scene. Referring to FIG3 , FIG3 is a block diagram of a device for generating a scene according to some embodiments of the present disclosure. As shown in FIG3 , the device 300 includes:
[0098] A first acquisition module 301 is used to obtain a scene generation request;
[0099] A first determining module 302 is configured to determine a user intent and a target user in the scenario generation request, wherein the user intent is used to describe a target scenario for the target user;
[0100] The second acquisition module 303 is used to obtain the user portrait corresponding to the target user and the environmental status information of the target user's current environment;
[0101] A second determining module 304 is configured to determine a user tag of the target user based on the user intention, the user portrait, and the environmental status information; and
[0102] The generation module 305 is configured to generate a scene file corresponding to the target scene based on the user tag using a preset scene generation model.
[0103] In some embodiments, the generating module 305 includes:
[0104] A first acquisition submodule is configured to acquire prompt information corresponding to the target scene according to the user tag;
[0105] A first input submodule is configured to input the prompt information into the preset scene generation model to obtain at least one scene element, wherein the scene element includes an executed action and a condition corresponding to the action; and
[0106] The first generating submodule is configured to generate a scene file corresponding to the target scene according to the at least one scene element.
[0107] In some embodiments, the first input submodule includes:
[0108] A second acquisition submodule is configured to acquire a first vector corresponding to the prompt information; and
[0109] a second input submodule, configured to input the first vector into a user item embedding model to obtain a second vector corresponding to at least one scene element;
[0110] The first generation submodule includes:
[0111] The second generating submodule is configured to generate a scene file corresponding to the target scene according to a preset scene framework, a preset grammar specification, and the second vector.
[0112] In some embodiments, the first determining module 302 includes:
[0113] A first determining submodule, configured to determine a first user who generates the scene generation request;
[0114] A third acquisition submodule is configured to acquire historical conversation information of the first user; and
[0115] The second determination submodule is configured to determine the user intention based on keywords in the scenario generation request and the historical conversation information.
[0116] In some embodiments, the first acquisition submodule includes:
[0117] The third input submodule is used to input the user tag into the scene prompt builder to obtain the prompt information corresponding to the target scene. The scene prompt builder contains multiple scene prompt templates. The scene prompt builder is used to generate the prompt information according to the scene prompt template and the user tag.
[0118] In some embodiments, the apparatus further comprises:
[0119] The sending module is used to send the scenario file to a target terminal, so that the target terminal runs the scenario file to display the target scenario. The target terminal is the terminal that sends the scenario generation request.
[0120] In some embodiments, the apparatus further comprises:
[0121] A verification module, configured to verify the scene file according to a preset verification rule to obtain a scene file that passes the verification;
[0122] The sending module includes:
[0123] The sending submodule is configured to send the verified qualified scene file to the target terminal.
[0124] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0125] The present disclosure further provides an electronic device. FIG4 is a schematic diagram of the structure of an electronic device according to some embodiments of the present disclosure. Referring to FIG4 , the electronic device 400 includes:
[0126] A processor 401; and a memory 402 for storing processor-executable instructions; when the processor 401 executes the executable instructions, the processor 401 is prompted to implement a method for generating a scene provided by the present disclosure.
[0127] The electronic device can be any type of terminal device with data processing capabilities, including an ordinary computer, a server (an ordinary server or a cloud server, etc.) or other types of data processing devices. There is no restriction on the type of electronic device here.
[0128] The present disclosure also provides a non-transitory computer-readable storage medium, including a computer program stored thereon. When the computer program is executed by a processor of an electronic device, the electronic device is enabled to implement a method for generating a scene provided by the present disclosure.
[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. Furthermore, 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 magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products provided according to the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0131] These computer program instructions may also be stored in a computer-readable memory that can direct 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 a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[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, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0133] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present disclosure.
[0134] Obviously, those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include these modifications and variations.
Claims
1. A method for generating a scene, comprising: Get the scene generation request; Determining a user intent and a target user in the scenario generation request, wherein the user intent is used to describe a target scenario for the target user; Obtaining a user profile corresponding to the target user and environmental status information of the target user's current environment; Determining a user tag of the target user based on the user intention, the user profile, and the environmental status information; as well as Based on the user tag, a scene file corresponding to the target scene is generated through a preset scene generation model.
2. The method according to claim 1, wherein The generating a scene file corresponding to the target scene by using a preset scene generation model based on the user tag includes: Acquire prompt information corresponding to the target scene according to the user tag; Inputting the prompt information into the preset scene generation model to obtain at least one scene element, wherein the scene element includes an executed action and a condition corresponding to the action; and A scene file corresponding to the target scene is generated according to the at least one scene element.
3. The method according to claim 2, wherein: The step of inputting the prompt information into the preset scene generation model to obtain at least one scene element includes: Obtaining a first vector corresponding to the prompt information; and Inputting the first vector into a user-item embedding model to obtain a second vector corresponding to at least one scene element; Generating a scene file corresponding to the target scene according to the at least one scene element includes: A scene file corresponding to the target scene is generated according to a preset scene framework, a preset grammar specification, and the second vector.
4. The method according to claim 1, wherein Determining the user intention in the scenario generation request includes: Determining a requesting user who generates the scenario generation request; Obtaining historical conversation information of the requesting user; and The user intention is determined based on the keywords in the scenario generation request and the historical conversation information.
5. The method according to claim 2, wherein: The acquiring prompt information corresponding to the target scene according to the user tag includes: The user tag is input into a scene prompt builder to obtain prompt information corresponding to the target scene. The scene prompt builder includes multiple scene prompt templates. The scene prompt builder is used to generate the prompt information according to the scene prompt templates and the user tag.
6. The method according to claim 1, further comprising: The scenario file is sent to a target terminal, so that the target terminal runs the scenario file to display the target scenario. The target terminal is the terminal that sends the scenario generation request.
7. The method according to claim 6, further comprising: Verify the scene file according to a preset verification rule to obtain a scene file that passes the verification; The sending the scene file to the target terminal includes: The verified scene file is sent to the target terminal.
8. The method of claim 1, wherein: The obtaining of the scene generation request includes: obtaining a vehicle-mounted scene generation request; The determining of the user intent and target user in the scene generation request, wherein the user intent is used to describe the target scene for the target user, includes: determining the user intent and target user in the vehicle-mounted scene generation request, wherein the user intent is used to describe the target vehicle-mounted scene for the target user.
9. The method of claim 1, wherein: When the scene generation request is a vehicle-mounted scene generation request, the environmental state information of the target user's current environment includes at least: video data of the target user and vehicle information of a target vehicle in which the target user is located; The vehicle information includes: information about passengers inside the vehicle, the geographical environment outside the vehicle, and road conditions at the vehicle's location.
10. The method of claim 2, wherein: When the scene generation request is a vehicle-mounted scene generation request, the at least one scene element includes at least one or more of the following elements: starting the welcome lighting effect outside the vehicle, the surface audio broadcast, playing the boot animation and welcome message, the vehicle personal assistant performing a flower-scattering welcome, the car computer changing the wallpaper, playing the target user's favorite songs, turning on the ambient light, releasing fragrance, and recommending related links corresponding to the target scene.
11. A device for generating a scene, comprising: A first acquisition module is used to obtain a scene generation request; A first determining module is configured to determine a user intent and a target user in the scenario generation request, wherein the user intent is used to describe a target scenario for the target user; The second acquisition module is used to obtain the user portrait corresponding to the target user and the environmental status information of the target user's current environment; A second determination module is configured to determine a user tag of the target user based on the user intention, the user portrait, and the environmental status information; as well as A generation module is used to generate a scene file corresponding to the target scene based on the user tag through a preset scene generation model.
12. An electronic device comprising: processor; a memory for storing instructions executable by the processor; When the executable instructions are executed by the processor, the processor is prompted to implement the method for generating a scene according to any one of claims 1 to 10.
13. A non-transitory computer-readable storage medium comprising a computer program stored thereon, which, when executed by a processor of an electronic device, enables the electronic device to implement the method for generating a scene according to any one of claims 1 to 10.
Citation Information
Patent Citations
Scene service recommendation method and device, equipment and storage medium
CN113901320A
Multi-modal interaction method and device, equipment and storage medium
CN115859219A
Cboth case generation method and device, electronic equipment and storage medium
CN115937853A
Vehicle-mounted scene generation method, device and system
CN116797725A
Scene generation method and device, electronic equipment and storage medium
CN118035539A
Cited By
Wallpaper generation and theme switching method and device, electronic equipment and storage medium
CN121501393A