Disclosure of Invention
In order to solve the problem that when the service scenes are realized, development personnel are often required to carry out custom development, and when the display requirement changes, the iteration of the requirement cannot be responded quickly, the invention provides a three-dimensional model display interaction method based on a multi-dimensional variable expression, which comprises the following steps:
The data set queries the three-dimensional model storage address required by the current service scene from the rear end according to the data set query condition, wherein the data set query condition binds the context variable;
And triggering the three-dimensional model display interaction component bound with the data set to reload the display when the storage address of the data set query changes.
Optionally, when the storage address of the data set query changes, triggering the three-dimensional model exhibition interaction component bound with the data set to reload the exhibition, including:
the three-dimensional display controller of the three-dimensional model display interaction assembly binds the attribute and the context variable through a multi-dimensional variable expression, and when the context variable changes, the attribute change is triggered, and the three-dimensional model display effect is refreshed;
the attributes comprise camera coordinates and a viewing angle.
Optionally, the method further comprises the steps of monitoring a mouse event and updating the context variable set when the three-dimensional model exhibition interaction component is created in the page.
Optionally, when the three-dimensional model exhibition interaction component is created in the page, monitoring a mouse event, and updating the context variable set, including:
when the mouse clicks the object in the three-dimensional model, the business data information associated with the clicked object is updated to the global context variable set after being calculated according to the configured multidimensional variable expression.
Optionally, the data sets comprise data sets associated with various charts and data sets of three-dimensional model storage paths.
Optionally, the data set queries the three-dimensional model storage address required by the current service scene from the back end according to the data set query condition, including:
When the data query conditions change, triggering the data set to query the three-dimensional model storage address required by the current service scene from the back end again.
In still another aspect, the present invention further provides a three-dimensional model exhibition interaction system based on a multidimensional variable expression, including:
The address query module is used for querying the three-dimensional model storage address required by the current service scene from the rear end by the data set according to the data set query condition, wherein the data set query condition binds the context variable;
and the display module is used for triggering the three-dimensional model display interaction component bound with the data set to reload and display when the storage address of the data set query changes.
Optionally, the display module is specifically configured to:
the three-dimensional display controller of the three-dimensional model display interaction assembly binds the attribute and the context variable through a multi-dimensional variable expression, and when the context variable changes, the attribute change is triggered, and the three-dimensional model display effect is refreshed;
the attributes comprise camera coordinates and a viewing angle.
Optionally, the system further comprises a variable updating module for monitoring a mouse event and updating the context variable set when the three-dimensional model exhibition interaction component is created in the page.
Optionally, the variable updating module is specifically configured to update the business data information associated with the clicked object to the global context variable set after calculating the business data information associated with the clicked object according to the configured multidimensional variable expression when the mouse clicks the object in the three-dimensional model.
Optionally, the data sets comprise data sets associated with various charts and data sets of three-dimensional model storage paths.
Optionally, the address query module is specifically configured to:
When the data query conditions change, triggering the data set to query the three-dimensional model storage address required by the current service scene from the back end again.
In still another aspect, the application also provides an electronic device comprising at least one processor and a memory, wherein the memory and the processor are connected through a bus;
the memory is used for storing one or more programs;
When the one or more programs are executed by the at least one processor, a three-dimensional model presentation interaction method based on a multi-dimensional variable expression as described above is implemented.
In still another aspect, the present application further provides a readable storage medium, on which an execution program is stored, where the execution program is executed to implement a three-dimensional model presentation interaction method based on a multi-dimensional variable expression as described above.
Compared with the prior art, the invention has the beneficial effects that:
The invention provides a three-dimensional model display interaction method based on a multidimensional variable expression, which comprises the steps that a data set queries a three-dimensional model storage address required by a current service scene from the rear end according to a data set query condition, wherein the data set query condition binds a context variable, and when the storage address queried by the data set changes, a three-dimensional model display interaction component bound with the data set is triggered to reload and display. According to the method, the definition of the bidirectional binding relation between the data and the three-dimensional model and between the three-dimensional model and the context variable can be realized through page configuration, and the automatic triggering execution of the bidirectional binding relation of the configuration is realized through the expression execution engine, so that the online configuration building of the three-dimensional model display scene can be realized without the participation of a research and development personnel and the user demand can be responded flexibly and swiftly.
Detailed Description
Based on the data linkage method, device, equipment and medium with the authorization number of CN114428823B and the name of multidimensional variable expression, the invention designs a flexibly configurable three-dimensional model data display and interaction technology and device by utilizing the multidimensional variable expression technology, can realize the online configuration capability of the three-dimensional model data display without customized coding development and the interaction linkage with other chart components of a large screen/cockpit interface, can greatly improve the realization speed of similar service scenes, reduce the technical requirements and realize the quick response of user demands.
For a better understanding of the present invention, reference is made to the following description, drawings and examples.
Example 1:
A three-dimensional model exhibition interaction method based on a multidimensional variable expression, as shown in FIG. 1, comprises the following steps:
Step 1, a data set queries a three-dimensional model storage address required by a current service scene from the rear end according to a data set query condition, wherein the data set query condition binds a context variable;
And 2, triggering the three-dimensional model display interaction component bound with the data set to reload the display when the storage address of the data set query changes.
The steps are further described as follows:
Step 1, a data set queries a three-dimensional model storage address required by a current service scene from the rear end according to a data set query condition, wherein the data set query condition binds a context variable and comprises the following steps:
When the data query conditions change, triggering the data set to query the three-dimensional model storage address required by the current service scene from the back end again.
The specific steps of the step 1 are as follows:
1) In the invention, a three-dimensional model loading display technology based on a data set is firstly constructed, wherein the data set is responsible for inquiring a three-dimensional model storage address required by a current service scene from the rear end, the inquiring condition can depend on a context variable, when the context variable changes, the data set is triggered to inquire data again, wherein a three-dimensional model display interaction component is responsible for loading display of the three-dimensional model, the component binds with a three-dimensional model storage address column of the data set, and when the address data changes, the three-dimensional model reloading display is triggered. And the three-dimensional display controller of the three-dimensional model display interaction assembly realizes the binding of the attributes such as camera coordinates, visual angles and the like and the context variables through the multidimensional variable expression, and when the context variables change, the attribute change of the camera can be automatically triggered, and the refreshing of the three-dimensional model display effect is realized through the controller.
The method further comprises the following steps before the step 2:
2) When the three-dimensional model display interaction assembly is created in a cockpit page, a mouse event is monitored, and when a mouse clicks an object in the three-dimensional model, service data information related to the clicked object is calculated according to a configured multidimensional variable expression and then updated into a global context variable set.
And 2, triggering a three-dimensional model display interaction component bound with the data set to reload and display when the storage address of the data set query changes, wherein the method comprises the following steps:
the three-dimensional display controller of the three-dimensional model display interaction assembly binds the attribute and the context variable through a multi-dimensional variable expression, and when the context variable changes, the attribute change is triggered, and the three-dimensional model display effect is refreshed;
the attributes comprise camera coordinates and a viewing angle.
The specific implementation steps of the step 2 are shown in fig. 2:
3) The data set in the current cockpit page (including the data set related to various charts and the data set of the three-dimensional model storage path) can be a multi-dimensional variable expression containing a context variable, and can be bound with the context variable at the moment, and when 2) the value of the bound context variable is changed, the multi-dimensional variable expression recalculation is triggered, the data set is triggered to be queried again, the data change of the data set is triggered, and the related chart or the three-dimensional model reloading construction rendering is triggered.
The graphic display style (color, line type, font, etc.) in the current cockpit page can bind the context variables through the multidimensional variable expression, and when 2) the value of the bound context variables changes, the multidimensional variable expression recalculation is triggered, and the display effect refreshing of the graphic is triggered.
According to the invention, the customized business linkage logic which is realized by the original coding is introduced by the multidimensional variable expression technology, the definition of the bidirectional binding relation between the data and the three-dimensional model and the definition of the bidirectional binding relation between the three-dimensional model and the context variable are realized by page configuration, and the automatic triggering execution of the configured bidirectional binding relation is realized by the expression execution engine, so that the online configuration building of the three-dimensional model display scene can be realized without the participation of a research and development personnel, and the user requirements can be responded flexibly and swiftly.
In large screen presentation scenarios, the need to present a three-dimensional model and be able to interact with a user is becoming more and more common. In addition, in some BI tools, the loading rendering function of the customized three-dimensional model is also encapsulated, but the capability of the model dynamic switching or the interaction configuration of the three-dimensional object in the model and other chart items of a large screen is poor, the flexibility is generally lacking, and the on-demand configuration and the dynamic change are difficult to realize.
The invention realizes the dynamic loading of the three-dimensional model and the flexible and configurable bidirectional dynamic linkage effect of the internal object of the model and the large screen/cockpit chart based on the flexible binding and triggering mechanism of the multidimensional variable expression.
A three-dimensional model interactive display technology and device based on a multidimensional variable expression comprise a three-dimensional model based on data set dynamic loading display, a three-dimensional model controller and a dynamic interactive model of a context variable, and an interactive model of two-way linkage of a three-dimensional model graphic object and the context variable/other charts.
(1) The three-dimensional model display interaction component is used for loading and displaying the three-dimensional display controller and the three-dimensional model based on the multi-dimensional variable expression technology;
(2) The three-dimensional model shows an interaction model of the controller and the context variable based on a multidimensional variable expression technology;
(3) The three-dimensional model graphic object is based on an interactive model of a multidimensional variable expression technology through a context variable;
(4) The three-dimensional model graphic object and other charts pass through an interactive model based on a multi-dimensional variable expression technology.
Compared with the prior art, the invention has the advantages that the dynamic binding of the linkage relation among the business data, the context variable, the three-dimensional model display effect and the interactive control can be realized through the multidimensional variable expression, so that the flexible dynamic linkage between the three-dimensional model display and the business data and the context variable based on the multidimensional variable expression can be realized only through configuration without custom development (coding) in the display scene such as a cockpit, a large screen and the like.
Example 2
The invention further provides a three-dimensional model display interaction system based on the multi-dimensional variable expression, which comprises the following components:
The address query module is used for querying the three-dimensional model storage address required by the current service scene from the rear end by the data set according to the data set query condition, wherein the data set query condition binds the context variable;
and the display module is used for triggering the three-dimensional model display interaction component bound with the data set to reload and display when the storage address of the data set query changes.
Optionally, the display module is specifically configured to:
the three-dimensional display controller of the three-dimensional model display interaction assembly binds the attribute and the context variable through a multi-dimensional variable expression, and when the context variable changes, the attribute change is triggered, and the three-dimensional model display effect is refreshed;
the attributes comprise camera coordinates and a viewing angle.
Optionally, the system further comprises a variable updating module for monitoring a mouse event and updating the context variable set when the three-dimensional model exhibition interaction component is created in the page.
Optionally, the variable updating module is specifically configured to update the business data information associated with the clicked object to the global context variable set after calculating the business data information associated with the clicked object according to the configured multidimensional variable expression when the mouse clicks the object in the three-dimensional model.
Optionally, the data sets comprise data sets associated with various charts and data sets of three-dimensional model storage paths.
Optionally, the address query module is specifically configured to:
When the data query conditions change, triggering the data set to query the three-dimensional model storage address required by the current service scene from the back end again.
Example 3
Step 1, a data set queries a three-dimensional model storage address required by a current service scene from the rear end according to a data set query condition, wherein the data set query condition binds a context variable, and the specific implementation mode is as follows:
Determining the type and characteristic attribute of the required three-dimensional model according to the service scene to form a data set query condition;
Binding the query condition of the data set with the context variable to ensure that the query condition can dynamically adapt to different service scene requirements;
Searching the matched three-dimensional model record in a back-end database according to the data set query condition to acquire model information meeting the condition;
and filtering and sequencing the retrieved three-dimensional model records, and preferentially selecting the model with the highest correlation with the current service scene.
And extracting storage address information in the three-dimensional model record, and checking the address format and the validity.
And correlating the acquired three-dimensional model storage address with corresponding model attribute information to form complete model acquisition result data.
And returning the model acquisition result data to the front end for use in rendering and displaying the three-dimensional model of the service scene.
And determining the required three-dimensional model type and characteristic attribute according to the service scene to form a data set query condition.
For example, in a smart city management scenario, a three-dimensional model of a city infrastructure such as a building, a road, a greening, etc. needs to be acquired, and the model needs to contain attribute information such as a name, a type, a size, a coordinate position, etc.
The system dynamically generates database query statements by binding these conditions with context variables (e.g., current city, region, time, etc.).
And the back-end database searches the matched three-dimensional model record according to the query statement, and adopts algorithms such as inverted index, boolean model and the like to rapidly acquire the model information meeting the conditions.
And then filtering and sequencing the search results, comprehensively considering the factors such as the relevance, the integrity, the updating time and the like of the models, calculating the comprehensive score of each model by using a weighted average algorithm, and preferentially selecting the model with the highest score.
And then extracting the storage address information in the model record, and checking the address format through the regular expression to ensure that the address accords with the URL specification.
And finally, associating the model address with the model attribute information, and generating JSoN-format result data to return to the front end.
The front end selects a proper three-dimensional rendering engine and a proper technical frame according to the service scene requirement, and loads and displays the acquired model data to realize the visualization and interactive operation of the three-dimensional scene.
Through the series of processes, a complete link from a service scene to a three-dimensional model is obtained and displayed, and the management and application efficiency of three-dimensional data are improved.
And 2, triggering the reloading and displaying of the three-dimensional model display interaction component bound with the data set when the storage address of the data set query changes, wherein the method comprises the following specific implementation steps of:
Acquiring a storage address of data set inquiry, judging whether the address is changed, and if so, triggering reloading of a three-dimensional model display interaction assembly associated with the data set;
acquiring a three-dimensional display controller of a three-dimensional model display interaction assembly, and binding attributes such as camera coordinates, visual angles and the like with context variables through a multidimensional variable expression;
Monitoring the change of the context variable, if the change is detected, triggering the change of the attributes such as the camera coordinate, the visual angle and the like, and transmitting the changed attribute value to the three-dimensional display controller;
and the three-dimensional display controller adjusts the display effect of the three-dimensional model according to the received change values of the attributes such as the camera coordinates and the visual angles, and the like, so that the refreshing of the three-dimensional model display is realized.
And training the historical display effect data of the three-dimensional model by adopting a support vector machine algorithm to obtain an optimal combination of camera coordinates and visual angle parameters for optimizing the display effect of the follow-up three-dimensional model.
And analyzing the interactive behavior data of the users through a clustering algorithm to obtain interactive preferences of different user groups, dynamically adjusting the display effect of the three-dimensional model according to the interactive preferences, and providing personalized three-dimensional model display service.
An evaluation model of the three-dimensional model display effect is built, the three-dimensional model display effect is evaluated by adopting a decision tree algorithm, and the attributes such as camera coordinates, visual angles and the like are dynamically optimized according to the evaluation result, so that the quality and the user experience of the three-dimensional model display are continuously improved.
First, the system will obtain the storage address of the dataset query, e.g., by accessing the metadata table in the database, and obtain the storage path of the dataset as "/data/dataset/model_data".
The system then compares the currently acquired memory address with the last stored address and if a change in address is found, triggers a reload of the three-dimensional model presentation interaction component associated with the dataset.
Next, the system obtains a three-dimensional presentation controller of the three-dimensional model presentation interactive component, and binds attributes such as camera coordinates (x, y, z) and viewing angles (yaw, pitch, roll) with context variables (e.g., user ID, timestamp, etc.) through a multi-dimensional variable expression.
The system monitors the change of the context variable in real time, for example, when the user A accesses the system at 2023-05-20:30:00, the generated context variable is { userID: "A", timestamp: "2023-05-20:30:00" }, once the change of the context variable is monitored, the change of the attributes such as the coordinates and the visual angle of the camera is triggered, and the changed attribute values such as (15,28,12) and (45 degrees, 60 degrees and 30 degrees) are transmitted to the three-dimensional display controller.
And the three-dimensional display controller adjusts vertex coordinates and rendering parameters of the three-dimensional model through algorithms such as matrix transformation and the like according to the received change values of the attributes such as the camera coordinates and the visual angles, so that refreshing of the three-dimensional model display is realized.
Meanwhile, the system also adopts a Support Vector Machine (SVM) algorithm to train the historical display effect data of the three-dimensional model.
By selecting a Gaussian kernel function, setting a penalty coefficient C=0, training 10000 sample data, and obtaining the optimal combination of camera coordinates (13,17,6) and view angle parameters (60 degrees, 45 degrees and 25 degrees) for optimizing the display effect of the follow-up three-dimensional model.
In addition, the system analyzes the interactive behavior data (such as clicking times, access time length and the like) of 5000 users through a K-means clustering algorithm, divides the users into 3 groups, respectively acquires the interactive preference (such as group A preference overlooking angle, group B preference horizontal viewing angle and the like) of each group, dynamically adjusts the display effect of the three-dimensional model according to the interactive preference, and provides personalized three-dimensional model display service.
Finally, the system also builds an evaluation model of the three-dimensional model display effect, adopts a CART decision tree algorithm, and generates a decision tree model by analyzing the characteristics (such as frame rate, loading time and the like) of 1000 three-dimensional model display effect samples and user scores.
And evaluating the new three-dimensional model display effect according to the decision tree model to obtain a score of 2 minutes (full score of 5 minutes), and dynamically optimizing the attributes such as camera coordinates and visual angles according to the evaluation result, for example, adjusting the camera coordinates to be (18,12,11), and adjusting the visual angles to be (55 degrees, 50 degrees and 20 degrees), so that the quality and the user experience of the three-dimensional model display are continuously improved.
Example 4
As shown in fig. 3, the present invention further provides an electronic device, which may be a computer device, a single-chip device, an intelligent mobile device, or the like. The electronic device in this embodiment may include a processor, a memory, a transceiver component, and the like. The memory, the processor, and the transceiver component are coupled by a bus, the memory is operable to store an execution program, and an exemplary execution program may include instructions, and the processor is operable to execute the instructions stored by the memory. The memory may also be used to store data that may be invoked and/or modified when executing instructions.
The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processor, digital signal processor (DIGITAL SIGNAL Processor, DSP), application specific integrated circuit (Application SpecificIntegrated Circuit, ASIC), off-the-shelf Programmable gate array (Field-Programmable GATEARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc., which are the computational core and control core of the terminal adapted to implement one or more instructions, in particular to load and execute one or more instructions in a storage medium to implement the corresponding method flow or corresponding functions, to implement the steps of a three-dimensional model-based interactive method of the above embodiment.
Example 5
Based on the same inventive concept, the invention also provides a readable storage medium, in particular an electronic device readable storage medium (Memory), wherein the electronic device readable storage medium is a Memory device in the electronic device and is used for storing programs and data. It is understood that the storage medium herein may include a built-in storage medium in the electronic device, and may include an extended storage medium supported by the electronic device. The storage medium provides a storage space that stores an operating system of the terminal. Also stored in the memory space are one or more instructions, which may be one or more execution programs (including program code), adapted to be loaded and executed by the processor. The storage medium may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The steps of the three-dimensional model exhibition interaction method based on the multidimensional variable expression in the above embodiment can be realized by loading and executing one or more instructions stored in a storage medium by a processor.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is illustrative of the present invention and is not to be construed as limiting thereof, but rather as providing for the use of additional embodiments within the spirit and scope of the present invention.