Scene switching method, device and equipment and computer readable storage medium

By creating data type classes in on-board devices to manage resources, all scenarios obtain the required data from this set of resources, solving the problem of high resource occupancy in the existing technology, and achieving more efficient hard disk usage and better usage effects.

CN119690562APending Publication Date: 2025-03-25AVATR CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411761569.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the prior art, when the vehicle-mounted remote screen and other devices switch scenarios, the resource data occupies a high rate, resulting in a large amount of hard disk occupancy and affecting the use effect.

Method used

All resources are managed by creating a class of data type, and the resources of all scenarios are obtained from this set of resources to realize the display of the scenario. The specific steps include responding to the scene switching instruction, determining the target index, finding the target scene instance, obtaining the target component information, and switching to the target scene based on the information.

Benefits of technology

Reduce the amount of resources, reduce the utilization rate of scene resources on hard disks, and improve the use of on-board equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690562A_ABST
    Figure CN119690562A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of display, and discloses a scene switching method, device and equipment and a computer readable storage medium, the method comprises the following steps: in response to a scene switching instruction, determining a target index, and searching a target scene instance from a preset database SO according to the target index; obtaining target component information of a target scene according to the target scene instance; and switching to the target scene based on the target component information. By applying the technical scheme of the invention, the occupancy rate of scene resources on a hard disk can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of display technology, and in particular to a scene switching method, device, equipment and computer-readable storage medium. Background Art

[0002] The display screen switches between different scenes to show different information to users and enhance the user interaction experience. When configuring the scene, in order to facilitate resource management and scene switching, the resource data corresponding to each scene is packaged to form multiple data packets; when switching scenes, the corresponding data packets are loaded to complete the scene switching.

[0003] However, for example, the in-vehicle remote screen outputs scenes in the form of pictures or videos, which cannot be switched at multiple angles. If more scenes with more effects are required, more resource packages need to be configured. In other words, the more scenes and effects are required, the more data is required, and the more the hard disk is occupied, which affects the use effect of the in-vehicle display. Summary of the invention

[0004] In view of the above problems, the embodiments of the present invention provide a scene switching method, device, equipment and computer-readable storage medium, which are used to solve the problem of resource data packaging management corresponding to each scene in the prior art, resulting in a large occupancy rate of the hard disk by resource data.

[0005] According to one aspect of an embodiment of the present invention, a scene switching method is provided, the method comprising:

[0006] In response to the scene switching instruction, determine the target index, and search for the target scene instance from the preset database SO according to the target index;

[0007] According to the target scene instance, obtaining target component information of the target scene;

[0008] Based on the target component information, switch to the target scene.

[0009] In an optional manner, switching to the target scene based on the target component information includes:

[0010] Based on the target component information, the current component information controlled by the display control module is updated to switch to the target scene under the control of the display control module.

[0011] In an optional manner, the component information includes component attributes and parameters of the component attributes, and updating the current component information controlled by the display control module based on the target component information includes:

[0012] Identify parameters of target component properties;

[0013] If the parameter of the target component attribute is a linear value, the parameter of the corresponding current component attribute is updated based on a linear interpolation algorithm according to the parameter of the target component attribute and the parameter of the corresponding current component attribute;

[0014] If the parameter of the target component attribute is a non-linear value, the corresponding current component attribute is replaced based on the target component attribute.

[0015] In an optional manner, updating the current component information controlled by the display control module based on the target component information includes:

[0016] comparing the target component information with the current component information controlled by the display control module, and determining the changed component information different from the current component information;

[0017] Based on the changed component information, current component information controlled by the display module is updated.

[0018] In an optional manner, obtaining target component information of the target scene according to the target scene instance includes:

[0019] According to the target scenario instance, obtaining first component information and second component configuration information;

[0020] generating a second component according to the second component configuration information, wherein the target scenario instance defines the first component information and the second component configuration;

[0021] Based on the first component information and the second component, the target component information is obtained.

[0022] In an optional manner, the component information includes the component and the attributes of the component, and the method further includes:

[0023] Determine all components and component properties in the scene, wherein the components include one or more of 3D models, special effects, animations, and specific elements, and the properties include one or more of color, position, size, display / non-display, texture, static / animation, color gradient, and gradient color blending;

[0024] defining attributes of a class based on the component and the component attributes;

[0025] Defining parameters of the component attributes, creating a scene instance of the class, and forming a class of data type;

[0026] The database SO is created based on the classes of the data types.

[0027] In an optional manner, the method further includes:

[0028] When receiving a component information adjustment instruction for the current scene, obtain the component information to be adjusted;

[0029] Based on the component information to be adjusted, the component information of the current scene is updated to form a new scene instance;

[0030] The new scene instance is saved in the index of the current scene in the database SO.

[0031] According to another aspect of an embodiment of the present invention, a scene switching device is provided, the device comprising:

[0032] A determination module, configured to determine a target index in response to a scene switching instruction, and search for a target scene instance from a preset database SO according to the target index;

[0033] An acquisition module, used for acquiring target component information of a target scene according to the target scene instance;

[0034] A scene switching module is used to switch to the target scene based on the target component information.

[0035] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0036] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the scene switching method described above.

[0037] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction is configured to execute the above-mentioned scene switching step.

[0038] According to another aspect of the embodiments of the present invention, a computer program product is provided. The computer program product includes at least one executable instruction, and the executable instruction is configured to execute the above-mentioned scene switching step.

[0039] The embodiment of the present invention packages all data resources of the scene to be displayed into a class to form a set of data resources, manages the set of data resources through the class, creates a scene instance, and all scenes obtain the corresponding required data from the set of data resources; when the scene is switched, the corresponding scene instance can be found through the index, and then the component information defined by the scene instance is called, and the scene switching can be realized based on the control of the component information. Multiple scene instances can share data resources, reduce the amount of resources, and thus reduce the occupancy rate of the scene resources on the hard disk.

[0040] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:

[0042] Figure 1 A schematic diagram showing a flow chart of a first embodiment of a scene switching method provided by the present invention;

[0043] Figure 2 A schematic diagram showing a flow chart of a second embodiment of the scene switching method provided by the present invention;

[0044] Figure 3 A schematic flow chart of a third embodiment of a scene switching method provided by the present invention is shown;

[0045] Figure 4 A schematic flow chart of a fourth embodiment of a scene switching method provided by the present invention is shown;

[0046] Figure 5 A schematic structural diagram of a first embodiment of a scene switching device provided by the present invention is shown;

[0047] Figure 6 A schematic structural diagram of an embodiment of an electronic device provided by the present invention is shown. DETAILED DESCRIPTION

[0048] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0049] It should be noted that, in the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements (such as steps in a method or modules in an apparatus, such as a module that can be a part of a circuit, a part of a processor, a part of a program or software, etc.) in the method or apparatus including the element.

[0050] For example, the scene switching method provided by the embodiment of the present invention includes a series of steps, but the scene switching method provided by the embodiment of the present invention is not limited to the steps described in this document. Similarly, the scene switching device provided by the embodiment of the present invention includes a series of modules, but the scene switching device provided by the embodiment of the present invention is not limited to including the modules explicitly described, and may also include modules required to obtain relevant information or perform processing based on the information.

[0051] The embodiment of the present invention first provides a scene switching method. For example, the method can be applied to a vehicle terminal, for example, by displaying scenes and switching scenes on a remote screen of the vehicle terminal. Alternatively, the method can also be applied to a central control screen of a vehicle terminal, or can also be applied to other terminal devices with a display screen, which is not limited by the embodiment of the present invention. The following is an example of application in a vehicle terminal:

[0052] It should be noted that the above-mentioned scene switching method can be implemented by a processor of the vehicle terminal, and the above-mentioned processor can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. The embodiment of the present invention does not limit this.

[0053] Figure 1 A schematic diagram of a flow chart of a scene switching method provided by an embodiment of the present invention, such as Figure 1 As shown, the process may include steps 101 to 103:

[0054] S101, in response to a scene switching instruction, determining a target index, and searching a target scene instance from a preset database SO according to the target index;

[0055] For vehicle-mounted terminals, such as remote screens, scene displays can be provided to users. The scenes can be reflections of vehicle driving scenes, such as geographical location, weather environment, time, climate, etc., or they can be reflections of iconic geographical scenes, which are not limited here.

[0056] In some examples, the remote screen outputs scenes in the form of pictures or videos. The pictures or videos cannot be switched at multiple angles, nor can they be changed in the overall gradient part. If more scenes are required, more resources need to be configured. As the amount of resources increases, the occupancy rate of the hard disk increases, which increases the demand for vehicle-mounted hard disks, increases vehicle-mounted costs, and affects the use effect of the vehicle.

[0057] The embodiment of the present application uses full 3D technology to display the model in the scene, and based on the multi-angle change control of the model in the scene, increases the display effect, thereby meeting the scene requirements for more effects without adding more resources.

[0058] Displaying models in the scene based on 3D technology and controlling the multi-angle changes of objects in the scene increase the difficulty of managing and controlling scene resources. Packaging the resources corresponding to the scene will also increase the resource packages and cannot reduce the resource occupancy rate of the hard disk.

[0059] Based on this, the embodiment of the present application manages all resources (all resources required for the scene) by creating a class of data type. All resources of all scenes are obtained from the resource library under the class of data type, that is, only one set of resources is configured, and each scene obtains the corresponding resources from this set of resources to realize the display of the scene. The resources of the same part of different scenes can be shared, which can reduce the amount of resources; and through class management of resources, more scene instances can be created by defining the properties of components. For example, in combination with 3D technology, different perspectives of different models can be defined to obtain scene instances with various effects, or the properties of the overall gradient part of the component can be defined to obtain a scene instance with partial gradient.

[0060] As an example, the implementation method of creating a data type class to manage all resources of the scene can be:

[0061] First, all components and component properties in the scene are determined. For example, components include 3D models, special effects, animations, and specific elements, etc. Optionally, specific elements include but are not limited to the sky, the ground, mountains, the sea, etc. For example, component properties include one or more of color, position, size, display / non-display, texture, static / animation, color gradient, and gradient color mixing.

[0062] As an example, components that can be dynamically generated in the scene are also determined, such as material balls, models, prefabs, and particle effects.

[0063] Exemplarily, components and component properties in a scene may be identified in the following manner:

[0064] For example, determine whether there are weather effects such as wind, rain, and thunder in the scene, and whether there are differences in color and size depending on the environment; if there are weather effects, whether to control the playback size of the weather effects, etc.; whether there is a color gradient from the ground to the atmosphere, and whether different scenes have different gradient effects, etc.

[0065] It should be noted that the components listed above are components and component attributes in a scene under a model. In other models, other types of components and component attributes may also be included, which are not limited here.

[0066] Then create a class of the data type, define all components and component attributes in the scene as class attributes, define the parameters of the component attributes, and create a scene instance of the class. It should be noted that the combination of different components, the combination of different component attributes and / or the parameter settings of different component attributes can create scene instances of various effects.

[0067] In the exemplary embodiment, the parameter of the component attribute refers to the numerical value of the component attribute. For example, for the color attribute, the corresponding parameter is the RGB value, for the position attribute, the corresponding parameter is the coordinate value, and for the special effect attribute, the corresponding parameter can be the special effect configuration information, etc.

[0068] Furthermore, after completing the components of the class, defining the component attributes, and creating the scene instance, the attributes and behaviors of the scene instance are managed and operated based on the control script (ie, the program of the display control module is set).

[0069] In this embodiment, this class contains the component properties of each component in the scene. According to different components, the relevant property controls are made specifically, including but not limited to the following examples:

[0070] For example, the attributes of the scene 3D object include color, position, size, texture, and texture sampling method, and the control of color, position, size, texture, and texture sampling method is correspondingly produced.

[0071] As an example, the texture and sampling method and whether it is object space sampling / screen space sampling need to be written in a separate script and controlled by this system.

[0072] For example, the properties of the weather effect object include color, whether to play, and the control value of the play size. This corresponds to the control values ​​of the color, whether to play, and the play size of the weather effect. As an example, another script can be written and controlled by the control script of this class.

[0073] Exemplarily, the attributes of the sky gradient include the colors of each gradient layer, and the corresponding attributes control how the colors are mixed and what the mixing ratio is.

[0074] In this example, for the gradient color mixing method, you can select the corresponding screen overlay method according to the desired effect (different overlay methods achieve different effects):

[0075] As an example, the gradient color mixing may adopt additive mixing (Blend One One, additive mixing). Additive mixing refers to adding two colors. For example, for the sky gradient presenting a lighting effect or a luminous effect, the gradient color mixing is realized by additive mixing.

[0076] As an example, gradient color mixing can also use Alpha mixing (Blend SrcAlphaOneMinusSrcAlpha, Alpha mixing). Alpha mixing refers to mixing based on the Alpha value of the source color and the (1-Alpha) value of the target primary color. For example, the sky gradient presents a transparent effect, and Alpha mixing is used to achieve gradient color mixing.

[0077] Exemplarily, the attributes of the ground include ground color or partial color, sampling size, Fresnel color, normal map and normal sampling rate, and the attribute control is partial color, sampling size value, whether Fresnel color changes, whether normal map changes, normal sampling rate value, etc.

[0078] It should be noted that Fresnel color refers to the color effect that changes with the viewing angle. It is implemented in the shader through the Fresnel function, and its parameters can be controlled by scripts to change the Fresnel color; the normal map is used to simulate surface details to make it look more bumpy; the normal sampling rate refers to the frequency at which the normal information in the normal map is sampled to adjust the bumpy detail effect of the surface.

[0079] As an example, for the setting of the control script, you can add, modify or delete some new personalized features according to the needs of independent scenes, limit the parts that need to be controlled separately, such as model special effects, and strip related properties for personalized control. In each class, turn this item on or off or enumerate it and make adjustments as needed.

[0080] After the creation of the above classes is completed, the classes of the above custom data types are created as a local static database SO, that is, a preset database SO.

[0081] The SO database is static and can be adjusted as needed due to scene art design when the system is not running. It can also be adjusted in real time according to the display effect during operation. All operation traces will be permanently retained in the SO database.

[0082] Exemplarily, all the data defined above (including components, component attributes, parameters of component attributes, etc.) are converted into float4 data or enumeration Enum data is defined and stored as a local static database for calling.

[0083] Due to the large number of scene changes and scene effects, the database SO contains a lot of data. In order to facilitate management and quick data call, the database SO is serialized and a corresponding index is generated based on each scene instance. When the remote screen switches scenes, the corresponding scene instance can be queried in the database SO based on the index.

[0084] In this embodiment, the above-established database SO is set in the scene switching device, or in the vehicle terminal, so as to be called by the display screen control device of the vehicle terminal.

[0085] Taking the remote screen of the vehicle terminal as an example, the database SO is added to the hard disk of the vehicle terminal so that the remote screen can call the corresponding data when displaying the scene.

[0086] As an example, configure the remote screen scene switching control, search for the corresponding scene instance based on the scene index, and then call the corresponding scene data when the scene is switched. That is, in this step, the target index refers to the index of the target scene instance. Exemplarily, the scene instance name, scene instance identifier or scene instance ID can be used as the index of the scene instance.

[0087] The scene playback methods of the remote screen include but are not limited to the following two:

[0088] In an optional implementation, the remote screen provides a preview playback scene. In this playback mode, the remote screen switches scenes based on a preset time interval and in a preset order. Therefore, in this playback mode, if the display time of the current scene reaches the preset time interval, the scene switching instruction is automatically triggered. In response to the scene switching instruction, the next scene index of the current scene index is determined based on the preset scene playback order, and the next scene index is the target index.

[0089] In an optional implementation, the remote screen provides a scene playback according to the vehicle driving scene. In this playback mode, the remote screen triggers a scene switching instruction based on the vehicle driving mode, the vehicle environment, climate, time and other driving scene information. And the target index of the next target scene to be played is determined based on the above driving scene information. For example, when the vehicle is in normal driving mode from 12 noon to 2 o'clock, scene 1 is played accordingly. When the vehicle is in normal driving mode from 2 o'clock to 4 o'clock in the afternoon, scene 2 is played accordingly. When the current time reaches 2 o'clock in the afternoon and the vehicle has been in normal driving mode, the scene switching instruction is triggered, and the index of scene 2 is determined as the target index.

[0090] In an optional implementation, the remote screen provides a scene change representation under a fixed model, that is, within a preset time, in the scene fixed mode, the decoration model in the scene changes over time. In this playback mode, the scene switching instruction is triggered based on the set time point, and the target index is determined based on the scene index corresponding to the set time point.

[0091] It should be noted that the scene switching instruction may also be triggered in other ways, such as manual triggering by a user, which is not limited here.

[0092] After the target index is determined, the corresponding target scene instance can be found based on the preset database SO.

[0093] S102, obtaining target component information of the target scene according to the target scene instance;

[0094] In this step, the component information includes components, component attributes, and parameters of component attributes. In the database SO, each scene instance defines the components, component attributes, and parameters of component attributes contained in the scene. Therefore, after finding the target scene instance in the database SO, the target component information required for the target scene can be obtained based on the target scene instance.

[0095] For example, scene 1 includes component 1, component 2, the colors of component 1 and component 2, RGB values ​​of the colors of component 1 and component 2, etc., which are target component information.

[0096] In an optional implementation, in order to reduce the amount of data in the database SO, and based on the fact that components in certain scenarios can be generated in real time, when creating a scenario instance, the parameters corresponding to these components can define the component configuration information, and then set the corresponding generation control. At runtime, the component is dynamically generated based on the configuration information.

[0097] Exemplarily, S102 may include:

[0098] A1: Obtain first component information and first component configuration information according to the target scenario instance;

[0099] A2: Generate a second component according to the second component configuration information, wherein the target scenario instance defines the first component information and the second component configuration;

[0100] A3: Based on the first component information and the second component, obtain the target component information.

[0101] It should be noted that the first component information is pre-configured in the database, such as 3D models, RGB values ​​of the 3D model's colors, position coordinate values, etc. The first component configuration information refers to the configuration information of the component preset in the database, and the system can generate the component according to the component configuration information. For example, for some special effect components, since the characteristics can be dynamically generated in real time, the corresponding special effect component configuration information for the scene is defined in the scene instance. When the scene is running, the special effect component configuration information is called to dynamically generate the special effect component without pre-configuration in the database, so as to avoid excessive data volume in the database, affecting the loading speed and increasing the space occupied by the database.

[0102] After the second component is generated, the first component information and the second component are the target component information corresponding to the target scene. In some examples, the target scene instance is updated based on the target component information and saved in the database. The next time the target scene is run, the updated component information can be directly called to directly display the scene. That is, the same special effect component can be dynamically generated when it is displayed for the first time, and the dynamically generated feature component can be saved to the scene instance corresponding to the database. It can be called repeatedly without generating it every time, which can speed up the scene switching speed.

[0103] Alternatively, in some examples, after the second component is generated, the scene instance in the database is not updated, and the second component is generated each time using the second component configuration information without occupying the database.

[0104] S103: Switch to the target scene based on the target component information.

[0105] In this step, after obtaining the target component information, the remote screen can switch scenes according to the target component information and display the target scene.

[0106] In this embodiment, on the one hand, all data resources of the scene to be displayed are packaged into a class to form a set of data resources, and this set of data resources is managed through the class. All scenes obtain the corresponding required data from this set of data resources to realize the display of the scene. Compared with the resources corresponding to the scene being packaged into data packets, the resources in this embodiment can be shared and the amount of resources can be reduced; on the other hand, data resources are managed based on the class of data type, and data resources can be better deployed and applied; on the other hand, this embodiment uses full 3D technology to display the model in the scene, and the scene display effect can be increased through multi-angle display effects, hierarchical gradients, partial gradients, etc. of the model. That is, without adding components to the scene, the display effect and scene changes can be enriched by adding component attributes or component attribute values.

[0107] Exemplarily, it is applied to certain scene functions of the remote screen to achieve better results. For example, in some scene functions, based on a fixed model, it is required to display the changing performance of the overall scene within a preset time period. In this example, a fixed model refers to a structure that remains unchanged in all scenes, such as a terrain model. Changes in different scenes are achieved by switching the decorative models in the scene. In this scene function, many resources can be shared, and for the decorative model, the scene can be created by creating a scene instance under the class. Not only does the resource data occupy less space on the hard disk, but there are also fewer adjustments to the data when adding scenes. In addition, with the control of multiple time periods, scenes corresponding to time changes can be realized, providing users with visual effects of scenes that match the current time.

[0108] Exemplarily, the embodiments of the present invention control the display of components from multiple angles to further enrich the scene effects. For example, the control of the model in the scene (color, size, texture change), color change, size change and texture change, present different effects. For example, the special effects in the scene (color, size, area, whether to display, color can be switched gradually) are controlled, the animation in the scene is controlled (whether there is animation, whether to play, whether the animation object has size scaling), the sky (color, several layers of gradient, whether there are clouds, whether there is fog) and the mountain model (texture change, color change, whether to hide, whether the size of the bumps is distinguished, whether there are other effects) are controlled separately, not only can it be gradient, but it can also be gradient in multiple layers.

[0109] Figure 2 FIG. 2 is a flow chart showing another embodiment of the scene switching method of the present invention, which is executed by an electronic device. Figure 2 As shown, the method comprises the following steps:

[0110] S201: In response to a scene switching instruction, determine a target index, and search for a target scene instance from a preset database SO according to the target index.

[0111] S202: Obtain target component information of the target scene according to the target scene instance.

[0112] Among them, the specific implementation method of S201 and S202 is the same as above Figure 1 The specific implementation methods of S101 and S202 are the same, and the details may refer to the above embodiments, which will not be described here.

[0113] S203, based on the target component information, updating the current component information controlled by the display control module, so as to switch to the target scene under the control of the display control module.

[0114] In this embodiment, a custom method SetTargetTime(int Index) is created in the control program. By calling this method, the update of the current component information of the control module is implemented according to the passed-in index value. SetTargetTime(int Index) acts as an interface, which implements the switching of scenes according to the passed-in index value without changing or switching the control module (control program) of the scene display. Therefore, when a scene instance is added or modified in the database SO, the control program needs to be modified or updated accordingly. The display control and the scene instance are controlled separately and independently without affecting each other. At the same time, the association between the display control and the scene instance can be realized based on SetTargetTime(int Index).

[0115] As an example, since the target component information includes many types, when updating the current component information, the data update method can also adopt different methods according to different data types, thereby achieving different switching effects. For example, when the scene switches, corresponding to the change of different colors or different positions of the same part, or the change of gradient, the smooth switching effect provides a better visual effect.

[0116] Therefore, illustratively, step S203 further includes:

[0117] B1: parameters that identify the properties of the target component;

[0118] B2: When the parameter of the target component attribute is a linear value, the parameter of the corresponding current component attribute is updated based on the linear interpolation algorithm according to the parameter of the target component attribute and the parameter of the corresponding current component attribute;

[0119] Based on the linear interpolation algorithm, the numerical value of the target scene is inserted into the display control module to achieve smooth processing of the display and improve the scene switching effect.

[0120] B3: If the parameter of the target component attribute is a nonlinear value, the corresponding current component attribute is replaced based on the target component attribute.

[0121] If the parameter type of the target component attribute is a nonlinear value, the current component attribute controlled by the display control module is replaced based on the target component attribute. For nonlinear values, linear interpolation cannot be used, so it is directly replaced to achieve scene switching.

[0122] The following examples illustrate which component properties and values ​​are smoothed based on linear interpolation and which component properties and values ​​are directly replaced:

[0123] When switching from the current scene CurrentIndex to the target scene TargetIndex, the color Color, position Vector3, texture sampling value Value and size Scale of the same model are linear values. For the switching between the target scene's value and the current scene's value, the linear value uses Mathf.Lerp(A,B,Time.deltaTime) and other interpolation to smoothly gradient the values ​​between the two scenes to achieve a smooth gradient effect. During the scene switching process, the smooth gradient switching effect is displayed.

[0124] For nonlinear images and enumerations of the same model, the target image is directly inserted into the corresponding position of the display control module and replaced when switching.

[0125] For the linear unit color, particle size, emission frequency, life cycle and other parameters of the weather system special effects, Mathf.Lerp(A,B,Time.deltaTime) and other interpolation methods are also used to smoothly gradient the values ​​between the two scenes to achieve a smooth gradient effect. During the scene switching process, the weather special effects display a smooth gradient effect.

[0126] For non-linear material maps, masks, dissolve effects, etc., the corresponding preset values ​​are matched and switched, and the particle playback is closed and replayed when switching to achieve a smooth gradient effect.

[0127] For the sky, all the multiple layers of Color are linear colors. Similarly, for the switching between the target scene and the current scene, the values ​​between the two scenes are smoothly gradient processed through interpolation such as Mathf.Lerp(A,B,Time.deltaTime).

[0128] For the cloud Cloud, in addition to the color part, you can do linear gradient and switch according to different superposition methods (for specific superposition methods, refer to the above Figure 1 Example), the Enum part needs to define different blending methods, switching between CurrentIndex and TargetIndex, and black / white clouds and thin / thick cloud effects will appear.

[0129] The ground part is switched and adjusted with the model, different attributes are distinguished, and then different change methods are used to change them.

[0130] In this embodiment, on the one hand, through the custom method SetTargetTime(int Index), it is possible to complete the update of the current component information controlled by the display control module based on the passed-in index value, and realize scene switching without modifying or updating the display control module. In this way, when adding or modifying scenes in the system, there is no need to upgrade the display control module; on the other hand, in the component information update process, different insertion methods are selected according to the parameter type of the component attribute. For parameters that can be smoothly inserted, smooth processing is adopted to make the scene switching effect better. For parameters that cannot be smoothly inserted, replacement is adopted to make the scene switching adapt to the update and insertion of different types of component information.

[0131] Based on the above embodiments, the scene switching method provided by the embodiments of the present invention may further include: Figure 3 The process shown, Figure 3 A flow chart of an embodiment of the present invention for updating the current component information controlled by the display control module based on the target component information is shown in FIG. Figure 3 As shown, the process may include steps S301 to S302:

[0132] S301, comparing the target component information with the current component information controlled by the display control module, and determining the changed component information different from the current component information;

[0133] In the database SO, the component information corresponding to the scene instance stored is all the component information of the scene instance, wherein the component information corresponding to different scene instances may be partially the same. This step determines the corresponding changed component information when switching from the current scene to the target scene by comparing the component information.

[0134] For example, both scene 1 and scene 2 have 3D model 1 and special effect 1. The positions of the 3D models in scene 1 and scene 2 are the same, but the colors are different. Special effect 1 of scene 1 is on, and special effect 1 of scene 2 is off. When switching from scene 1 to scene 2, the component information in the scene 2 example includes 3D model 1, 3D model 1 position A1, 3D model 1 color C2, special effect 1, and special effect 1 off. The current scene (scene 1) displays 3D model 1, 3D model 1 position A1, 3D model 1 color C1, special effect 1, and special effect 1 on. By comparing scene 1 and scene 2, it can be determined that the different component information is the status of the color and special effects of 3D model 1, so it can be determined that the status of the color and special effects of 3D model 1 is the changing component information.

[0135] S302: Based on the changed component information, update the current component information controlled by the display module.

[0136] The changed component information is inserted into the current component information controlled by the display control module. The component information that is the same as the target scene and the current scene remains unchanged, and only the changed component information is updated.

[0137] In this embodiment, when the scenes are switched, the same parts of the current scene and the target scene are kept unchanged, and only the different parts are switched, which can reduce the calling and switching of data.

[0138] Based on all the above embodiments, the scene switching method provided by the embodiment of the present invention may also include: Figure 4 The process shown, Figure 4 A schematic diagram of a process for adjusting component information of a scene during scene switching provided by an embodiment of the present invention, such as Figure 4 As shown, the process may include steps S401 to S403:

[0139] S401, upon receiving a component information adjustment instruction for the current scene, obtaining component information to be adjusted;

[0140] In this step, the adjustment instructions can be created after the above Figure 1 After the database SO of the embodiment is created, it is triggered when the art designer adjusts the scene instance in the database SO, for example, the adjustment instruction includes modifying or adding component attributes or component attribute values, etc. Alternatively, a scene instance may be added.

[0141] Alternatively, the adjustment instruction may be an adjustment triggered when the scene is running. For example, the remote screen provides a scene preview interface, and the scene preview interface provides a scene adjustment control. The user or art designer may trigger the adjustment instruction through the scene adjustment control, and adjust the current scene displayed through the scene adjustment control or the adjustment interface output when the scene adjustment control is triggered.

[0142] The adjustment instruction includes component information to be adjusted, and the component information to be adjusted may be all component information of the scene instance or part of component information of the scene instance.

[0143] S402, updating component information of the current scene based on the component information to be adjusted to form a new scene instance;

[0144] S403, save the new scene instance in the index of the current scene in the database SO.

[0145] After the component information of the scene instance is adjusted, the component information of the scene instance is updated and saved in the database so that it can be directly called and used next time.

[0146] As an example, if all component information in a scene is adjusted, then after all component information in a scene has been adjusted, the scene attribute class of the SO is copied as a whole and saved in the index corresponding to the SO, replaced, and the SO database is updated.

[0147] In this embodiment, since the display control program and the database SO are independent parts, a function for modifying the scene instance of the database SO is provided. The modification of the scene display effect does not affect the display control program, thereby realizing the decoupling of art design and scene display control, increasing the flexibility of scene setting, and allowing adjustments according to different needs at different times to enhance user experience.

[0148] Figure 5 FIG. 2 is a schematic diagram showing a structure of an embodiment of a scene switching device provided by the present invention. Figure 5 As shown, the device 500 includes: a determination module 510, an acquisition module 520 and a scene switching module 530.

[0149] The determination module 510 is used to determine the target index in response to the scene switching instruction, and search for the target scene instance from the preset database SO according to the target index;

[0150] An acquisition module 520, configured to obtain target component information of a target scene according to a target scene instance;

[0151] The scene switching module 530 is used to switch to the target scene based on the target component information.

[0152] In an optional manner, the scene switching module includes an update module and a display control module, wherein the update module is used to correct the current component information controlled by the display control module using the target component information, and the display control module is used to control the display based on the updated current component information after the current component information is updated to display the target scene.

[0153] In an optional manner, the scene switching module also includes an identification module, a linear interpolation module and a replacement module. The identification module is used to identify the parameters of the target component attributes. The linear interpolation module is used to update the corresponding parameters of the current component attributes based on preset interpolation when the parameters of the target component attributes are identified as linear values, and smooth the parameters of the component attributes. The replacement module is used to replace the corresponding current component attributes based on the target component attributes when the parameters of the target component attributes are identified as non-linear values.

[0154] In an optional manner, the scene switching module also includes a comparison module, which is used to compare the target component information and the current component information controlled by the display control module to determine the changed component information that is different from the current component information; the update module is also used to update the current component information controlled by the display control module based on the changed component information.

[0155] In an optional manner, the acquisition module includes a calling module and a generating module. The calling module is used to call the first component information and the second component configuration information according to the target scene instance; the generating module is used to generate the second component according to the second component configuration information, and obtain the target component information based on the first component information and the second component.

[0156] As can be seen from the above, the scene switching device provided by the embodiment of the present invention can not only reduce the occupation rate of scene resources on hardware, but also enrich the scene display effect through multi-angle changes, color gradients, partial color gradients, etc. of 3D models without increasing scene resources. And through the combination of components, component attributes and component attribute values, effects such as seasonal changes, 24-hour changes, and weather changes can be generated.

[0157] Figure 6 The schematic diagram of the structure of an embodiment of the electronic device provided by the present invention is shown, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0158] like Figure 6 As shown, the electronic device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .

[0159] The processor 602, the communication interface 604, and the memory 606 communicate with each other via a communication bus 608. The communication interface 604 is used to communicate with other devices such as a client or other server network elements. The processor 602 is used to execute a program 610, which can specifically execute the relevant steps in the above-mentioned embodiment of the scene switching method.

[0160] Specifically, the program 610 may include program code including computer executable instructions.

[0161] The processor 602 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0162] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0163] An embodiment of the present invention provides a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on an electronic device / scene switching device, the electronic device / scene switching device executes the scene switching method in any of the above method embodiments.

[0164] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.

[0165] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.

[0166] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.

[0167] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim that lists a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. A scene switching method, characterized in that: The method comprises: In response to the scene switching instruction, determine the target index, and search for the target scene instance from the preset database SO according to the target index; According to the target scene instance, obtaining target component information of the target scene; Based on the target component information, switch to the target scene.

2. The method according to claim 1, characterized in that Based on the target component information, switching to the target scene includes: Based on the target component information, the current component information controlled by the display control module is updated to switch to the target scene under the control of the display control module.

3. The method according to claim 2, characterized in that The component information includes component attributes and parameters of the component attributes. The updating of the current component information controlled by the display control module based on the target component information includes: Identify parameters of target component properties; If the parameter of the target component attribute is a linear value, the parameter of the corresponding current component attribute is updated based on a linear interpolation algorithm according to the parameter of the target component attribute and the parameter of the corresponding current component attribute; If the parameter of the target component attribute is a non-linear value, the corresponding current component attribute is replaced based on the target component attribute.

4. The method according to claim 2, characterized in that: The updating of current component information controlled by the display control module based on the target component information includes: Comparing the target component information with the current component information controlled by the display control module, and determining the changed component information different from the current component information; Based on the changed component information, current component information controlled by the display module is updated.

5. The method according to claim 1, characterized in that The step of obtaining target component information of the target scene according to the target scene instance includes: According to the target scenario instance, obtaining first component information and second component configuration information; generating a second component according to the second component configuration information, wherein the target scenario instance defines the first component information and the second component configuration; Based on the first component information and the second component, the target component information is obtained.

6. The method according to any one of claims 1 to 5, characterized in that: The component information includes the component and the properties of the component. The method further includes: Determine all components and component properties in the scene, wherein the components include one or more of 3D models, special effects, animations, and specific elements, and the properties include one or more of color, position, size, display / non-display, texture, static / animation, color gradient, and gradient color blending; defining properties of a class based on the component and the component properties; Defining parameters of the component attributes, creating a scene instance of the class, and forming a class of data type; The database SO is created based on the classes of the data types.

7. The method according to any one of claims 1 to 5, characterized in that: Also includes: When receiving a component information adjustment instruction for the current scene, obtain the component information to be adjusted; Based on the component information to be adjusted, the component information of the current scene is updated to form a new scene instance; The new scene instance is saved in the index of the current scene in the database SO.

8. A scene switching device, characterized in that: The device comprises: A determination module, configured to determine a target index in response to a scene switching instruction, and search for a target scene instance from a preset database SO according to the target index; An acquisition module, used for acquiring target component information of a target scene according to the target scene instance; A scene switching module is used to switch to the target scene based on the target component information.

9. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the scene switching method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on the electronic device / scene switching device, the electronic device / scene switching device performs the operation of the scene switching method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Scene adaptive illumination regulation and control system based on multi-protocol interaction

    CN120916310A

  • A scene adaptive lighting regulation system based on multi-protocol interaction

    CN120916310B