Map data processing method, device, terminal and medium
By using the target rendering tool category and OSG engine on the terminal device, the display and interaction of the three -dimensional map model is realized, and combined with video data and navigation functions, it solves the problem of the number of real -time queue and navigation functions in existing technologies. Efficient three -dimensional map interaction and data processing effect.
Patent Information
- Application Number
- CN202111528378.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2041-12-14
AI Technical Summary
The prior art is difficult to efficiently display and interact with three-dimensional electronic maps on terminal devices, and lacks the integration of real-time queues and navigation functions.
Through the target rendering tool class, the open source 3D rendering engine OSG is used to realize the display and interaction of the 3D map model. Combined with the Android operating system, it provides screen event acquisition, event type judgment and touch event processing functions to realize the amplification and interaction of the 3D map model. Zoom out, rotate and move. At the same time, video data is used to determine the number of people in line and provide three-dimensional navigation and information reporting functions.
It realizes the efficient display and interaction of three-dimensional electronic maps on terminal devices, provides the integration of real-time queue numbers and navigation functions, and improves the user's interactive experience and map data processing efficiency.
Smart Images

Figure CN114237438B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, terminal and medium for processing map data. Background Art
[0002] As a graphic language for recording geographic information, maps not only provide convenience for people's travel, but also promote the development of related technologies such as computer graphics, three-dimensional simulation technology, and virtual reality technology. With the development of related technologies, traditional two-dimensional electronic maps have been injected with new vitality, and three-dimensional electronic maps with more realistic simulation effects have emerged. Three-dimensional electronic maps can vividly and realistically show users their environment through intuitive map real-scene simulation, and provide users with map query, travel navigation and other functions. It can be said that three-dimensional electronic maps have become an important direction for the development of electronic maps. Summary of the invention
[0003] The present application provides a method, device, terminal and medium for processing map data to promote research on three-dimensional electronic maps in related technologies.
[0004] According to a first aspect of an embodiment of the present application, a method for processing map data is provided, which is applied to a terminal, and the method includes:
[0005] Through the target rendering tool class, the 3D map model based on the open source 3D rendering OSG engine is displayed;
[0006] In response to the interactive operation on the three-dimensional map model, the screen touch event corresponding to the interactive operation is obtained through the screen event acquisition function included in the target rendering tool class;
[0007] Determine the event type of the screen touch event through the event type judgment function included in the target rendering tool class;
[0008] The displayed three-dimensional map model is updated through the touch event processing function corresponding to the event type.
[0009] In one embodiment of the present application, a 3D map model based on an open source 3D rendering OSG engine is displayed through a target rendering tool class, including:
[0010] Start the drawing thread of the target rendering tool class;
[0011] Initialize the OSG engine through the view initialization function in the rendering method subclass of the target rendering tool class;
[0012] Load the OSG-based 3D map model through the resource loading function of the target rendering tool class;
[0013] Render the three-dimensional map model through the effect rendering function in the rendering method subclass of the target rendering tool class;
[0014] Display the rendered 3D map model.
[0015] In one embodiment of the present application, the terminal uses the Android operating system, the target rendering tool class is the GLSurfaceView class, the screen event acquisition function is the onTouchEvent function, the event type judgment function is the changeMode function, the touch event processing function is the preformMode function, the drawing thread is the GLThread thread, the rendering method subclass is the Render subclass, the view initialization function is the onSurfaceChanged function, the resource loading function is the loadObject function, and the effect rendering function is the onDrawFrame function.
[0016] In one embodiment of the present application, a 3D map model based on an open source 3D rendering OSG engine is displayed through a target rendering tool class, including:
[0017] Acquire first location information of the terminal;
[0018] When the first position information meets the target condition, a three-dimensional map model based on the open source three-dimensional rendering OSG engine is displayed through the target rendering tool class.
[0019] In one embodiment of the present application, updating the displayed three-dimensional map model includes at least one of the following:
[0020] Enlarging the displayed three-dimensional map model;
[0021] Zooming out the displayed three-dimensional map model;
[0022] Rotate the displayed three-dimensional map model;
[0023] Move the displayed 3D map model.
[0024] In one embodiment of the present application, the method further includes:
[0025] Through the click event listening function included in the target rendering tool class, the registered listener function is called back to the interface event processing class in the OSG function;
[0026] In response to monitoring a click operation on the three-dimensional map model through the registered listener function, a click event corresponding to the click operation is obtained through the event transmission function.
[0027] In one embodiment of the present application, the click event listening function is the setOnceModelClickListener function, the interface event processing class is the GUIEventHandler class, the registration listener function is the OnceModelClickListener, and the event transmission function is the onceModelClicked function.
[0028] In one embodiment of the present application, after obtaining the click event corresponding to the click operation through the event transparent transmission function, the method further includes:
[0029] Play the video data corresponding to the clicked object.
[0030] In one embodiment of the present application, the method further includes:
[0031] The number of people in a queue corresponding to the clicked object is obtained and displayed. The number of people in a queue is determined based on the video data corresponding to the clicked object.
[0032] In one embodiment of the present application, the process of determining the number of people in the queue includes:
[0033] Get the video data corresponding to the clicked object;
[0034] Get the video picture corresponding to the current time in the video data;
[0035] The number of faces included in the video image is determined, and the number of faces is used as the number of people in the queue.
[0036] In one embodiment of the present application, the method further includes:
[0037] Displaying a first function option on the three-dimensional map model;
[0038] In response to a triggering operation on the first function option, determining a first duration based on first location information for displaying the terminal, second location information of each candidate object, and a preset moving speed;
[0039] Determine the second duration based on the preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, the preset passing time, and the first duration;
[0040] Determine a target object based on the first duration and the second duration;
[0041] On the three-dimensional map model, a route from the location of the terminal to the location of the target object is displayed.
[0042] In one embodiment of the present application, determining the first duration based on the first location information of the terminal, the second location information of each candidate object, and a preset moving speed includes:
[0043] Determining the distance between the terminal and each candidate object based on the first location information and each second location information;
[0044] The first duration is determined based on the distance between the terminal and each candidate object and a preset moving speed.
[0045] In one embodiment of the present application, determining the second duration based on the preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, the preset passing time, and the first duration includes:
[0046] Determine a change rate of the number of people in the queue based on a preset time period and the number of people in the queue corresponding to each candidate object in two adjacent preset time periods;
[0047] The second duration is determined based on the number of queue members, the rate of change of the number of queue members, the preset passing time, and the first duration of each candidate object in the latter of two adjacent preset time periods.
[0048] In one embodiment of the present application, determining the target object based on the first duration and the second duration includes:
[0049] The candidate object with the smallest sum of the first duration and the second duration is determined as the target object.
[0050] In one embodiment of the present application, the method further includes:
[0051] Displaying a second function option on the three-dimensional map model;
[0052] In response to a triggering operation on the second function option, displaying a first function entry;
[0053] In response to a triggering operation on the first function entry, a first information filling interface is displayed, where the first information filling interface is used to provide a function of reporting lost object information;
[0054] In response to a submission operation on the first information filling interface, the lost object information is published.
[0055] In one embodiment of the present application, the method further includes:
[0056] In response to receiving the lost object clue fed back based on the lost object information, the lost object position corresponding to the lost object clue is displayed on the three-dimensional map model.
[0057] In one embodiment of the present application, the method further includes:
[0058] In response to receiving the lost object clue fed back based on the lost object information, a route from the location of the terminal to the location of the lost object is displayed on the three-dimensional map model.
[0059] In one embodiment of the present application, after displaying the second function option on the three-dimensional map model, the method further includes:
[0060] In response to a triggering operation on a second function option, displaying a second function entry;
[0061] In response to the triggering operation on the second function entrance, a second information filling interface is displayed, and the second information filling interface is used to provide a function of uploading a clue of a lost object;
[0062] In response to a submission operation on the second information filling interface, a missing object clue is published.
[0063] According to a second aspect of an embodiment of the present application, a map data processing device is provided, the device comprising:
[0064] A display unit, used to display a 3D map model based on an open source 3D rendering OSG engine through a target rendering tool class;
[0065] An acquisition unit, configured to respond to an interactive operation on the three-dimensional map model and acquire a screen touch event corresponding to the interactive operation through a screen event acquisition function included in the target rendering tool class;
[0066] A determination unit, used to determine the event type of the screen touch event through an event type judgment function included in the target rendering tool class;
[0067] The updating unit is used to update the displayed three-dimensional map model through a touch event processing function corresponding to the event type.
[0068] In one embodiment of the present application, the display unit, when used to display a three-dimensional map model based on an open source three-dimensional rendering OSG engine through a target rendering tool class, is used to:
[0069] Start the drawing thread of the target rendering tool class;
[0070] Initialize the OSG engine through the view initialization function in the rendering method subclass of the target rendering tool class;
[0071] Load the OSG-based 3D map model through the resource loading function of the target rendering tool class;
[0072] Render the three-dimensional map model through the effect rendering function in the rendering method subclass of the target rendering tool class;
[0073] Display the rendered 3D map model.
[0074] In one embodiment of the present application, the terminal uses the Android operating system, the target rendering tool class is the GLSurfaceView class, the screen event acquisition function is the onTouchEvent function, the event type judgment function is the changeMode function, the touch event processing function is the preformMode function, the drawing thread is the GLThread thread, the rendering method subclass is the Render subclass, the view initialization function is the onSurfaceChanged function, the resource loading function is the loadObject function, and the effect rendering function is the onDrawFrame function.
[0075] In one embodiment of the present application, the display unit, when used to display a three-dimensional map model based on an open source three-dimensional rendering OSG engine through a target rendering tool class, is used to:
[0076] Acquire first location information of the terminal;
[0077] When the first position information meets the target condition, a three-dimensional map model based on the open source three-dimensional rendering OSG engine is displayed through the target rendering tool class.
[0078] In one embodiment of the present application, the updating unit, when used to update the displayed three-dimensional map model, is used for any of the following:
[0079] Enlarging the displayed three-dimensional map model;
[0080] Zooming out the displayed three-dimensional map model;
[0081] Rotate the displayed three-dimensional map model;
[0082] Move the displayed 3D map model.
[0083] In one embodiment of the present application, the device further comprises:
[0084] The callback unit is used to call back the registered listener function to the interface event processing class in the OSG function through the click event listening function included in the target rendering tool class;
[0085] The acquisition unit is further used to, in response to monitoring a click operation on the three-dimensional map model through the registered listener function, acquire a click event corresponding to the click operation through the event transparent transmission function.
[0086] In one embodiment of the present application, the click event listening function is the setOnceModelClickListener function, the interface event processing class is the GUIEventHandler class, the registration listener function is the OnceModelClickListener, and the event transmission function is the onceModelClicked function.
[0087] In one embodiment of the present application, the device further comprises:
[0088] The playback unit is used to play the video data corresponding to the clicked object.
[0089] In one embodiment of the present application, the acquisition unit is further used to acquire the number of people in the queue corresponding to the clicked object;
[0090] The display unit is also used to display the acquired number of people in the queue;
[0091] The number of people in the queue is determined based on the video data corresponding to the clicked object.
[0092] In one embodiment of the present application, the process of determining the number of people in the queue includes:
[0093] Get the video data corresponding to the clicked object;
[0094] Get the video picture corresponding to the current time in the video data;
[0095] The number of faces included in the video image is determined, and the number of faces is used as the number of people in the queue.
[0096] In one embodiment of the present application, the display unit is further used to display the first function option on the three-dimensional map model;
[0097] The determination unit is further configured to determine, in response to a triggering operation on the first function option, a first duration based on first location information for the display terminal, second location information of each candidate object, and a preset moving speed;
[0098] The determination unit is further configured to determine the second duration based on the preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, the preset passing time, and the first duration;
[0099] The determination unit is further configured to determine the target object based on the first duration and the second duration;
[0100] The display unit is also used to display a route from the location of the terminal to the location of the target object on the three-dimensional map model.
[0101] In one embodiment of the present application, the determining unit, when used to determine the first duration based on the first location information of the terminal, the second location information of each candidate object, and a preset moving speed, is used to:
[0102] Determining the distance between the terminal and each candidate object based on the first location information and each second location information;
[0103] In one embodiment of the present application, the determining unit, when used to determine the second duration based on the preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, the preset passing time, and the first duration, is used to:
[0104] Determine a change rate of the number of people in the queue based on a preset time period and the number of people in the queue corresponding to each candidate object in two adjacent preset time periods;
[0105] The second duration is determined based on the number of queue members, the rate of change of the number of queue members, the preset passing time, and the first duration of each candidate object in the latter of two adjacent preset time periods.
[0106] In one embodiment of the present application, the determining unit, when used to determine the target object based on the first duration and the second duration, is used to:
[0107] The candidate object with the smallest sum of the first duration and the second duration is determined as the target object.
[0108] In one embodiment of the present application, the display unit is further used to display a second function option on the three-dimensional map model;
[0109] The display unit is further used to display the first function entry in response to a triggering operation on the second function option;
[0110] The display unit is further used to display a first information filling interface in response to a triggering operation on the first function entrance, where the first information filling interface is used to provide a function of reporting lost object information;
[0111] The device also includes:
[0112] The publishing unit is used to publish the lost object information in response to a submission operation on the first information filling interface.
[0113] In one embodiment of the present application, the display unit is further configured to display the lost object position corresponding to the lost object clue on the three-dimensional map model in response to receiving the lost object clue fed back based on the lost object information.
[0114] In one embodiment of the present application, the display unit is further used to display a route from the location of the terminal to the location of the lost object on the three-dimensional map model in response to receiving a lost object clue fed back based on the lost object information.
[0115] In one embodiment of the present application, the display unit is further configured to display a second function entry in response to a triggering operation on the second function option;
[0116] The display unit is further used to display a second information filling interface in response to a triggering operation on the second function entrance, where the second information filling interface is used to provide a function of uploading a clue of a lost object;
[0117] The publishing unit is further used to publish the lost object clue in response to a submission operation on the second information filling interface.
[0118] According to a third aspect of an embodiment of the present application, a terminal is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the operations performed by the method for processing map data provided in the first aspect and any one of the embodiments of the first aspect are implemented.
[0119] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a program is stored. When the program is executed by a processor, the operations performed by the method for processing map data provided in the first aspect and any one of the embodiments of the first aspect are implemented.
[0120] According to a fifth aspect of the embodiments of the present application, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, it implements the operations performed by the method for processing map data provided in the first aspect and any one of the embodiments of the first aspect.
[0121] The present application implements the transplantation of the OSG engine through a target rendering tool class, so that a three-dimensional map model based on the OSG engine can be displayed on a terminal and other mobile devices, and then the user can perform interactive operations on the displayed three-dimensional map model, so that the terminal can obtain the screen touch event corresponding to the interactive operation through the screen event acquisition function included in the target rendering tool class based on the user's interactive operation, and then determine the event type of the screen touch event through the event type judgment function included in the target rendering tool class, so that the displayed three-dimensional map model can be updated through the touch event processing function corresponding to the event type, thereby realizing the zooming in, zooming out, rotating, moving, etc. of the displayed three-dimensional map model.
[0122] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0123] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0124] Figure 1 is a schematic diagram of an implementation environment of a method for processing map data according to an embodiment of the present application;
[0125] Figure 2 is a flowchart of a method for processing map data according to an embodiment of the present application;
[0126] Figure 3 is a flow chart of a display process of a three-dimensional map model according to an embodiment of the present application;
[0127] Figure 4 is a schematic diagram of a display interface of a three-dimensional map model provided according to an embodiment of the present application;
[0128] Figure 5 is a flow chart of a face detection process provided according to an embodiment of the present application;
[0129] Figure 6 is a flow chart of an interactive function based on a three-dimensional map model provided according to an embodiment of the present application;
[0130] Figure 7 is a flowchart of a map data processing device provided according to an embodiment of the present application;
[0131] Figure 8 It is a schematic diagram of the structure of a terminal provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0132] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0133] The present application provides a method for processing map data, which can be used to display a three-dimensional map model based on an open source three-dimensional rendering engine (OpenSceneGraph, OSG), and provide a series of human-computer interaction functions based on the three-dimensional map model, including a live viewing function, a three-dimensional navigation function, an information reporting function, etc. In an exemplary scenario, when a user is touring a scenic spot, the data processing method provided by the present application can be used to view the number of people queuing for each project in the scenic spot, or intelligently plan the path to the project with the shortest waiting time (including the time to walk to the project and the queuing time), or report lost object information, lost object clues, etc., so as to help users better tour the scenic spot.
[0134] The above-mentioned method for processing map data can be executed by a terminal, such as a terminal using an Android operating system. Figure 1 , Figure 1 It is a schematic diagram of an implementation environment of a method for processing map data according to an embodiment of the present application, and the implementation environment includes: a display device 101, a camera device 102, a server 103 and a terminal 104.
[0135] Among them, the display device 101 can be a display screen, the camera device 102 can be a camera, the server 103 can be one server, multiple servers, a server cluster, a cloud computing platform, etc., the terminal 104 can be a smart phone, a tablet computer, a smart watch, etc., the display device 101 and the server 103, the camera device 102 and the server 103 can communicate through wired or wireless communication, and the terminal 104 and the server 103 can communicate through wireless communication.
[0136] Taking the application of the map data processing method provided in the present application in a scenic spot as an example, a camera device 102 can be installed at the entrance of each project in the scenic spot, so that the video data of the entrance of each project can be collected in real time through the camera device 102, and the camera device 102 sends the collected video data to the server 103.
[0137] The server 103 processes the received video data to determine the number of people in the queue for each project, and sends the determined number of people in the queue to the display device 101, so that the number of people in the queue can be displayed through the display device 101. The display device 101 can be set at the entrance of each project in the scenic area, so that the user can see the number of people in the queue of the current project at the entrance of each project, so that the queuing situation of the project can be timely understood. The above process is explained by taking the display device 101 only displaying the number of people in the queue of the corresponding project as an example. Optionally, the display device can also display the number of people in the queue of multiple projects at the same time, so that the user can see the number of people in the queue of multiple projects in the scenic area at the entrance of each project, so that the user can decide the order of sightseeing according to the queuing situation of each project.
[0138] In addition, the server 103 can also obtain scenic spot announcements, weather information, etc., and send the obtained scenic spot announcements, weather information, etc. to the display device 101, so that the scenic spot announcements, weather information, etc. are displayed through the display device 101. Among them, the scenic spot announcements may include lost object information (such as lost item information, lost person information, etc.), recommended tour time, tour precautions, etc.
[0139] A target application may be installed in the terminal 104. When a user triggers an icon corresponding to the target application on the visual interface of the terminal 104, the terminal 104 may respond to the user's triggering operation and run the target application, thereby displaying a three-dimensional map model based on the OSG engine through the target application and providing multiple function options on the interface for displaying the three-dimensional map model, thereby providing the user with a variety of human-computer interaction functions (including live viewing function, intelligent navigation function, search function, etc.) through these multiple function options.
[0140] The above is only an introduction to an exemplary application scenario and does not constitute a limitation on the application scenario of the present application. In more possible implementations, the map data processing method provided by the present application can also be applied to other types of scenarios. The present application does not limit the specific application scenario.
[0141] After introducing the application scenarios and implementation environment of the present application, the following describes the method for processing map data provided by the present application in combination with several optional embodiments.
[0142] See also Figure 2 , Figure 2 : is a flowchart of a method for processing map data according to an embodiment of the present application, which is applied to a terminal. The method includes:
[0143] Step 201: Display a three-dimensional map model based on an open source three-dimensional rendering OSG engine through a target rendering tool class.
[0144] Among them, the OSG engine is a cross-platform graphics development kit provided by the Open Graphics Library (OpenGL), which is designed for the development of high-performance graphics applications such as scientific computing visualization. The OSG engine provides an object-oriented framework on top of OpenGL, which can free developers from the implementation and optimization of underlying graphics calls, and can provide many additional practical tools for the rapid development of graphics applications. It is suitable for 3D modeling on low-performance mobile terminals.
[0145] OpenGL is a cross-platform graphics application programming interface (Application Programming Interface, API), which is used to specify the software and hardware programming interface in three-dimensional (3D) graphics processing hardware. However, due to performance and portability reasons, it is relatively difficult to use OpenGL on mobile devices such as terminals. To facilitate the use of OpenGL on terminals, a subset OpenGL ES (OpenGL for Embedded System) is created under OpenGL, so as to provide a cross-platform and fully functional 3D graphics library interface API for terminals through OpenGL ES.
[0146] Generally speaking, there are two versions of OpenGL ES, including OpenGL ES 1.0 and OpenGL ES 2.0. In this application, the 2.0 version of OpenGL ES can be used to provide a cross-platform and fully functional 3D graphics library interface API. In more possible implementations, the 1.0 version of OpenGL ES can also be used. This application does not limit which version is used.
[0147] Step 202: In response to the interactive operation on the three-dimensional map model, a screen touch event corresponding to the interactive operation is obtained through a screen event acquisition function included in the target rendering tool class.
[0148] It should be noted that when the user touches the screen, a screen touch event corresponding to the interactive operation of touching the screen will be generated, and the terminal can obtain the screen touch event corresponding to the user's interactive operation through the screen event acquisition function.
[0149] Step 203: Determine the event type of the screen touch event through the event type judgment function included in the target rendering tool class.
[0150] Among them, the event types of screen touch events may include single-click events, double-click events, single-finger touch events, two-finger touch events, sliding events, etc. Optionally, screen touch events may also include other types of events, which are not limited in this application.
[0151] It should be noted that screen touch events of different event types correspond to different processing logics, and by determining the event type of the screen touch event, a corresponding event processing function can be determined according to the determined event type.
[0152] Step 204: Update the displayed three-dimensional map model through the touch event processing function corresponding to the event type.
[0153] Optionally, when updating the display of the three-dimensional map model, the displayed three-dimensional map model may be enlarged, reduced, rotated, moved, etc.
[0154] The present application implements the transplantation of the OSG engine through a target rendering tool class, so that a three-dimensional map model based on the OSG engine can be displayed on a terminal and other mobile devices, and then the user can perform interactive operations on the displayed three-dimensional map model, so that the terminal can obtain the screen touch event corresponding to the interactive operation through the screen event acquisition function included in the target rendering tool class based on the user's interactive operation, and then determine the event type of the screen touch event through the event type judgment function included in the target rendering tool class, so that the displayed three-dimensional map model can be updated through the touch event processing function corresponding to the event type, thereby realizing the zooming in, zooming out, rotating, moving, etc. of the displayed three-dimensional map model.
[0155] In addition, the display of the three-dimensional map model is more in line with the actual road conditions, allowing users to more accurately determine their location, thereby improving the accuracy of subsequent navigation processes.
[0156] After introducing the basic principles of the present application, various non-limiting implementation methods of the present application are described in detail below.
[0157] The terminal involved in the present application may be a terminal using an Android operating system. When an OSG engine is used on the Android operating system, it may be implemented by relying on the GLSurfaceView class. Therefore, the target rendering tool class may be the GLSurfaceView class.
[0158] The GLSurfaceView class is a display class function provided by the OSG engine, which is used to present the rendering effect of the OSG scene in the Android operating system. Since the use of the OSG engine on the Android operating system is implemented through the GLSurfaceView class, in some embodiments, a GLSurfaceView class can be customized before rendering the three-dimensional map model.
[0159] In addition, at least one subclass may be defined in the GLSurfaceView class, so that the initialization of the OSG engine and model rendering can be completed through the defined subclass, thereby realizing the display of the three-dimensional map model. The at least one subclass may include a rendering method subclass, and the rendering method subclass may be a GLSurfaceView.Render class, that is, a Render subclass.
[0160] In summary, for the above step 101, when displaying a 3D map model based on an open source 3D rendering OSG engine through a target rendering tool class, the following steps may be included:
[0161] Step 2011: Start the drawing thread of the target rendering tool class.
[0162] The drawing thread may be a GLThread thread. The GLThread thread is a drawing thread that comes with the GLSurfaceView class. The GLThread thread can be executed synchronously with the main thread without blocking the main thread. It is usually used to perform OpenGL drawing work.
[0163] Step 2012: Initialize the OSG engine through the view initialization function in the rendering method subclass of the target rendering tool class.
[0164] The rendering method subclass is also a Render subclass, and the view initialization function may be an onSurfaceChanged function.
[0165] In a possible implementation, when the OSG engine is initialized through the onSurfaceChanged function, the OSG engine can be initialized by calling the function of the OSG engine through the onSurfaceChanged function. The function of the OSG engine can be stored in a dynamic library corresponding to the OSG engine.
[0166] Step 2013: Load the OSG-based three-dimensional map model through the resource loading function of the target rendering tool class.
[0167] The resource loading function may be a loadObject function. By using the loadObject function, the loading of the three-dimensional map model may be performed synchronously when the GLThread thread is started.
[0168] Step 2014: Render the three-dimensional map model through the effect rendering function in the rendering method subclass of the target rendering tool class.
[0169] The effect rendering function may be an onDrawFrame function. When the three-dimensional map model is rendered by the onDrawFrame function, the function of the OSG engine may be called by the onDrawFrame function to render the three-dimensional map model.
[0170] Step 2015: display the rendered three-dimensional map model.
[0171] The process of the above steps 2011 to 2015 can be found in Figure 3 , Figure 3 It is a flowchart of a display process of a three-dimensional map model according to an embodiment of the present application. A custom GLSurfaceView class is instantiated by an Android application, thereby starting the GLThread thread of the custom GLSurfaceView class instance, so that the OSG engine can be initialized by calling back the onSurfaceChanged function of the Render subclass instance, thereby loading the three-dimensional map model through the loadObject function, and then rendering the three-dimensional map model by calling back the onDrawFrame function of the Render subclass instance, so that the rendered three-dimensional map model can be displayed.
[0172] The above process introduces how to transplant the OSG engine to the terminal using the Android operating system through the GLSurfaceView class, so that the terminal using the Android operating system can display the 3D map model based on the OSG engine. Among them, the onSurfaceChanged function and the onDrawFrame function can perform corresponding processing by calling the functions in the dynamic library corresponding to the OSG engine.
[0173] It should be noted that the dynamic library corresponding to the OSG engine can be generated in advance. The OSG engine entity of the Android operating system is a static library. In a possible implementation, the source code of the OSG engine can be compiled according to the characteristics of the Android operating system through the native development tool (Native Development Kit, NDK) in conjunction with an external build tool (Cmake), and the CMakeList.txt configuration file corresponding to the Android operating system is obtained, so that the OSG engine can be used by the terminal using the Android operating system. The Android operating system can call the static library of the OSG engine through the Java Native Interface (Java Native Interface, JNI), and JNI can integrate the local layer code (C++ code) and the application layer code (Java code). By compiling the local layer code of JNI with the OSG static library, a dynamic library that can be used by the Android operating system can be obtained, so that the onSurfaceChanged function and the onDrawFrame function can call the OSG function in the dynamic library.
[0174] It should be noted that the above-mentioned step 201 and steps 2011 to 2015 corresponding to step 201 only involve the process of rendering and displaying the three-dimensional map model. In a possible implementation method, when the user's location meets certain conditions, the three-dimensional map model can be rendered and displayed through step 201 and corresponding steps.
[0175] That is, in some embodiments, before step 201, the following process may also be included:
[0176] The first location information of the terminal is obtained, and when the first location information meets the target condition, a three-dimensional map model based on the open source three-dimensional rendering OSG engine is displayed through the GLSurfaceView class.
[0177] Among them, the terminal can have a positioning function, so that the terminal can obtain the first location information of the terminal through the positioning function as the first location information of the user, thereby determining whether the first location information meets the target condition. When the first location information meets the target condition, the above step 201 is executed again, and the three-dimensional map model based on the open source three-dimensional rendering OSG engine is displayed through the target rendering tool class.
[0178] Optionally, the target condition may be that the first location information is within a preset range, or the target condition may be other types of conditions, which are not limited in the present application.
[0179] It should be noted that after the three-dimensional map model is displayed through step 101, the user can interact with the three-dimensional map model by performing interactive operations such as single-finger rotation, two-finger zoom-in, two-finger zoom-out, and three-finger movement on the three-dimensional map model.
[0180] Optionally, the screen event acquisition function may be an onTouchEvent function, the event type determination function may be a changeMode function, and the touch event processing function may be a preformMode function.
[0181] The onTouchEvent function can intercept touch events occurring on the screen, so that the changeMode function can determine the event type of the screen touch event based on the screen touch event intercepted by the onTouchEvent function.
[0182] It should be noted that screen touch events of different event types correspond to different processing logics, and different processing logics correspond to codes corresponding to different values of the preformMode function. That is, different time types correspond to different values of the preformMode function. After determining the event type of the screen touch event, the response to the interactive operation can be achieved by executing the code corresponding to the value of the preformMode function corresponding to the event type.
[0183] Optionally, when updating the displayed three-dimensional map model based on the user's interactive operation, at least one of the following updating methods may be included:
[0184] Enlarging the displayed three-dimensional map model;
[0185] Zooming out the displayed three-dimensional map model;
[0186] Rotate the displayed three-dimensional map model;
[0187] Move the displayed 3D map model.
[0188] For example, after determining that the user's click event is a single-finger rotation event through the changeMode function, the displayed three-dimensional map model can be rotated through the preformMode function.
[0189] For another example, after determining through the changeMode function that the user's click event is a two-finger zoom-in event, the displayed three-dimensional map model can be zoomed in through the preformMode function.
[0190] For another example, after determining through the changeMode function that the user's click event is a two-finger zoom-out event, the displayed three-dimensional map model can be zoomed out through the preformMode function.
[0191] For another example, after determining through the changeMode function that the user's click event is a three-finger movement event, the displayed three-dimensional map model can be moved through the preformMode function.
[0192] It should be noted that in addition to displaying the three-dimensional map model, the terminal can also provide a variety of human-computer interaction functions based on the three-dimensional map model. For example, the terminal can display at least one function option on the three-dimensional map model so that the user can use the corresponding function by triggering the at least one function option.
[0193] See also Figure 4 , Figure 4 is a schematic diagram of a display interface of a three-dimensional map model provided according to an embodiment of the present application, such as Figure 4 As shown, the terminal provides the user with three function options, including the first function option (that is, Figure 4 3D navigation function option in the Figure 4 The information reporting function option in the Figure 4 The scenic spot live function option in the map) provides users with a variety of services through these three function options.
[0194] In one possible implementation, after displaying the three-dimensional map model, the terminal automatically triggers the third function option, which can provide the user with a live viewing function for viewing the real-time queue status, so that the user can click on any object in the three-dimensional map model (that is, any location in the three-dimensional map model, any tourist item in the three-dimensional map model, etc.) to view the queue status of the clicked object.
[0195] In one possible implementation, when obtaining a click event performed by a user on a three-dimensional map model, the click event listening function included in the target rendering tool class can be used to call back a registered listener function to the interface event processing class in the OSG function, and then in response to the click operation on the three-dimensional map model monitored by the registered listener function, the click event corresponding to the click operation is obtained through the event transmission function.
[0196] The click event listening function may be the setOnceModelClickListener function, the interface event handling class may be the GUIEventHandler class, the registration listener function may be the OnceModelClickListener, and the event transmission function may be the onceModelClicked function.
[0197] Accordingly, when the registered listener function is called back to the interface event processing class in the OSG function through the click event monitoring function, the setOnceModelClickListener function can be used to call back the registered listener function through the Handle callback function of the GUIEventHandler class in the OSG function.
[0198] After obtaining the click event, the clicked object can be determined based on the obtained click event, thereby obtaining the video data corresponding to the clicked object, and then playing the video data corresponding to the clicked object, so that the user can understand the real-time queuing situation of each project in the scenic area by watching the played video data.
[0199] In a possible implementation, when playing the video data corresponding to the clicked object, the terminal can display a dialog box on the three-dimensional map model, and then play the video data in the dialog box. Optionally, it is also possible to jump from the display interface of the three-dimensional map model to the video playback interface, and then play the video data in the video playback interface.
[0200] The terminal can be connected to the camera device via a wireless connection, so that the terminal and the camera device can communicate via wireless communication. Therefore, when obtaining the video data corresponding to the clicked object, the terminal can directly obtain the video data collected by the camera device. Optionally, the camera device can also upload the collected video data to the server, so that the terminal can obtain the video data uploaded by the camera device from the server. This application does not limit the specific method used to obtain the video data.
[0201] It should be noted that when the camera device transmits video data to the terminal, or when the camera device transmits video data to the server, the video data can be transmitted through the Real Time Streaming Protocol (RTSP), thereby achieving real-time transmission of the video data.
[0202] By providing a live viewing function, users can understand the queue status of each project in the scenic area in advance, increase the amount of information in the map data processing process, and enable users to plan their tour process early.
[0203] Optionally, the terminal may also obtain the number of people in the queue corresponding to the clicked object, and display the obtained number of people in the queue, thereby increasing the amount of information in the interactive process so that the user can understand the queue status of each item more intuitively.
[0204] The number of people in the queue is determined based on the video data corresponding to the clicked object. The process of determining the number of people in the queue may be performed by the server. The process of determining the number of people in the queue may include the following steps:
[0205] Step 1: Get the video data corresponding to the clicked object.
[0206] The specific implementation process of step one can refer to the above process of obtaining the video data corresponding to the clicked object, which will not be repeated here.
[0207] Step 2: Get the video frame corresponding to the current time in the video data.
[0208] The current time is the time when the user clicks the object.
[0209] In a possible implementation, the video frame in the acquired video data may be intercepted through the FFmpeg library, thereby obtaining the video frame corresponding to the current time in the video data.
[0210] Step 3: Determine the number of faces included in the video image, and use the determined number of faces as the number of people in the queue.
[0211] In a possible implementation, the number of faces included in the video image can be determined by using a face detection module (SeetaFace Detection) included in the SeetaFace face recognition engine.
[0212] Among them, the face detection module is implemented by combining the classic cascade structure and the face detection method of the multi-layer neural network. The face detection module may include a funnel-structured cascade structure (FuSt) and a multi-layer perceptron (MLP) cascade structure. The FuSt cascade structure may be composed of multiple fast LAB cascade classifiers. The multi-layer MLP cascade structure may include two layers. The first layer is a plurality of MLP cascade structures based on accelerated robust features (Speeded UpRobust Features, SURF), and the second layer is a unified MLP cascade structure to process the features output by the multiple MLP cascade structures of the previous layer.
[0213] When the face detection module is used to determine the number of faces included in the video image, it can be achieved through the following process:
[0214] The acquired video screen is input into multiple fast LAB cascade classifiers of the FuSt cascade structure, and multiple LAB features are obtained through the multiple fast LAB cascade classifiers. The acquired multiple LAB features are then input into multiple MLPs in the first-layer MLP cascade structure, and multiple SURF features are obtained through the multiple MLPs. The acquired multiple SURF features are then input into the unified MLP cascade structure of the second layer, and the number of faces included in the video screen is output through the unified MLP cascade structure.
[0215] The above is only an exemplary method for determining the number of faces included in the video picture. Among more possible implementation methods, other implementation methods can also be used to determine the number of faces included in the video picture. This application does not limit which specific method is used.
[0216] It should be noted that after determining the number of faces, the server can send the determined number of faces to the terminal so that the terminal can obtain the number of queued people corresponding to the clicked object and then display the obtained number of queued people.
[0217] The above process is explained by taking the example of displaying the number of people in the queue at the moment when the user clicks the object after the user clicks the object. In more possible implementations, after determining the number of faces included in the video screen at the current moment, the server can also obtain video screens from the video data at intervals of a first preset time, and then determine the number of faces included in the obtained video screen based on the obtained video screen. The specific implementation process can refer to the above process and will not be repeated here. Among them, the first preset time length is an arbitrary time length, and this application does not limit the specific value of the first preset time length.
[0218] It should be noted that the above process is explained by taking the example of a user clicking on any object on the three-dimensional map model displayed on the terminal, and the server acquiring and identifying the video screen based on the clicked object. In more possible implementations, after acquiring the video data sent by each camera device, the server can acquire the video screen from the received video data according to the second preset time length, thereby determining the number of faces included in the acquired video screen, and then sending the determined number of faces to the corresponding display device, so that the display device can display the determined number of faces as the number of people in the queue, so that the user can see the number of people in the queue for the current tour item from the display device located at the entrance of each tour item.
[0219] See also Figure 5 , Figure 5It is a flowchart of a face detection process provided according to an embodiment of the present application. After acquiring the video data, it is determined whether the current time meets the screenshot cycle, that is, whether the time interval between the current time and the last face detection process is a second preset time length. Therefore, when the current time meets the screenshot cycle, the video data is screenshotted using the FFmpeg library to obtain the video screen, and then the SeetFace face recognition engine is used to perform face detection on the acquired video screen to obtain the number of faces included in the video screen, and then the determined number of faces is sent to the display device, so that the display device uses the received number of faces as the number of people in the queue to display the number of people in the queue. Figure 5 The process shown is only a procedural description. The specific implementation process can be found in the above embodiment and will not be repeated here.
[0220] Optionally, the server may also send the number of faces corresponding to each object to each display device, so that the user can see the number of people queuing for each tourist item in the scenic area on any display device.
[0221] The second preset duration may be any duration, and the second preset duration may be the same as or different from the first preset duration.
[0222] Optionally, in addition to using the service corresponding to the third function option, the user may also use the services corresponding to the first function option and the second function option. The services corresponding to the first function option and the second function option are described below respectively.
[0223] First, let's introduce the service corresponding to the first function option.
[0224] The user can use the function corresponding to the first function option by triggering the first function option. The first function option can provide the user with a three-dimensional navigation function that intelligently plans the path to the project with the shortest waiting time (including the time to walk to the project and the queuing time).
[0225] In a possible implementation, after the user triggers the first function option, the following steps may be performed to provide the user with a three-dimensional navigation function.
[0226] Step 1: In response to a trigger operation on a first function option, a first duration is determined based on the first location information of the terminal, the second location information of each candidate object, and a preset moving speed.
[0227] In a possible implementation, the distance between the terminal and each candidate object is determined based on the first position information and each second position information, and then the first duration is determined based on the distance between the terminal and each candidate object and a preset moving speed.
[0228] The first location information and each second location information may be expressed in the form of global positioning system (GPS) coordinates. When determining the distance between the terminal and any candidate object based on the first location information and any second location information, the following formulas (1) to (3) may be used to implement the distance:
[0229] d=R*c (1)
[0230]
[0231]
[0232] Where d represents the distance between the terminal and the candidate object, and R represents the radius of the earth (generally 6378137 meters). Indicates the arc value obtained by converting the longitude coordinate of point A. It represents the radian value obtained by transforming the longitude coordinate of point B, ωA represents the radian value obtained by transforming the latitude coordinate of point A, and ωB represents the radian value obtained by transforming the latitude coordinate of point B.
[0233] It should be noted that the GPS coordinates (including longitude and latitude) used in the above calculation formula are decimal GPS coordinates, and the GPS coordinates are generally expressed in degrees / minutes / seconds. Therefore, the GPS coordinates expressed in degrees / minutes / seconds must be converted to decimal GPS coordinates. For example, the GPS coordinates are (39°54′27″N, 116°23′17″E), which can be expressed as (39.5427,116.2317).
[0234] After obtaining the GPS coordinates expressed in decimal form, the GPS coordinates can be converted into corresponding radian values using the following formula (4):
[0235]
[0236] in, represents the radian value obtained by converting the longitude coordinate, ω represents the radian value obtained by converting the latitude coordinate, and N represents the GPS coordinate (which can be either the longitude coordinate or the latitude coordinate).
[0237] After determining the distance between the terminal and each candidate object, the first duration can be determined by the following formula (5):
[0238] t1=d / v (5)
[0239] Among them, t1 represents the first duration, d represents the distance between the terminal and any candidate object, and v represents the preset moving speed. The value of v is generally 1.1 meters / second (m / s)-1.5m / s. For example, the value of v can be 1.2m / s.
[0240] Step 2: Determine the second duration based on the preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, the preset passing time, and the first duration.
[0241] In a possible implementation, the rate of change of the number of people in queue is determined based on the preset time period and the number of people in queue corresponding to each candidate object in two adjacent preset time periods; the second duration is determined based on the number of people in queue in the latter of two adjacent preset time periods for each candidate object, the rate of change of the number of people in queue, the preset passing time and the first duration.
[0242] Among them, when determining the change rate of the number of people in the queue, it can be achieved by the following formula (6):
[0243] S=(n next -n pre ) / T (6)
[0244] Among them, S represents the change rate of the number of people in the queue, n next Indicates the number of candidates queuing in the latter of two adjacent preset time periods, n pre It represents the number of candidate objects queuing in the previous preset time period between two adjacent preset time periods, and T represents the preset time period (which can be the first preset time length, the second preset time length, or other preset time lengths).
[0245] After determining the rate of change of the number of people in the queue, the second duration can be determined by the following formula (7):
[0246] t2=(n next +S*t1)*t j (7)
[0247] Wherein, t2 represents the second preset duration, n next represents the number of candidates in the queue in the latter of two adjacent preset time periods, S represents the rate of change of the number of queue members, t1 represents the first preset duration, t j Indicates the preset passing time (that is, the preset ticket checking time).
[0248] Step three: determine the target object based on the first duration and the second duration.
[0249] In a possible implementation manner, the candidate object with the smallest sum of the first duration and the second duration is determined as the target object.
[0250] That is, after determining the first time length and the second time length through the above steps one and two, the sum of the first time length and the second time length can be determined to obtain the time required to enter each candidate object, and then the candidate object with the smallest sum value, that is, the candidate object with the shortest entry time, is determined as the target object.
[0251] Step 4: Displaying a route from the location of the terminal to the location of the target object on the three-dimensional map model.
[0252] In one possible implementation, after the target object is determined through the above step three, the location of the target object and the location of the user (that is, the location of the terminal) can be displayed in the three-dimensional map model by marking, and the roads included in the three-dimensional map model are pre-set, so that after the location of the target object and the location of the user are determined in the three-dimensional map model, the route from the location of the terminal to the location of the target object is determined from the pre-set roads, and the determined route is displayed by adding a layer.
[0253] It should be noted that when displaying a route on a three-dimensional map model, the user can still zoom in, zoom out, rotate, move, etc. the three-dimensional map model through the interactive operations involved in the above embodiments. The specific process can be found in the above embodiments and will not be repeated here.
[0254] By providing users with the functions of zooming in, zooming out, rotating and moving the displayed three-dimensional map model when displaying the route, users can adjust the display of the three-dimensional map model according to their needs, making it convenient for users to view the displayed offline.
[0255] In addition, when the route is displayed on the three-dimensional map model, the user can still click on the objects included in the three-dimensional map model to view the video data and the number of people in the queue corresponding to the clicked object. The specific process can be found in the above embodiment and will not be repeated here.
[0256] By providing users with the real-time function of scenic spots when displaying the route, users can view the queue status of each project while using the three-dimensional navigation function, and then adjust their sightseeing order in real time according to the actual situation viewed.
[0257] The following describes the services corresponding to the second function option.
[0258] The user can use the function corresponding to the second function option by triggering the second function option. The second function option can provide the user with an information reporting function for reporting lost object information and can also provide the user with an information reporting function for reporting lost object clues.
[0259] In a possible implementation, after the user triggers the second function option, the following steps can be used to provide the user with an information reporting function. The information reporting function may include a function for uploading lost object information, so that when a user loses an item, or a companion, child, etc. of the user is lost, the user can use the function for uploading lost object information to report the relevant information of the lost item (such as item image, item description, etc.), or the relevant information of the lost companion or child (such as character image, character description, etc.). In addition, the information reporting function may also include a function for uploading lost object clues, so that when a user sees lost items or lost persons reported by other users, the user can use the function for uploading lost object clues to provide clues to the user who reported the lost object information.
[0260] In a possible implementation, after the user triggers the second function option, the following steps may be performed to provide the user with an information reporting function for uploading lost object information.
[0261] Step 1: In response to a trigger operation on a second function option, display a first function entry.
[0262] The first function entry may be a button, for example, a lost object information reporting button. Optionally, the first function entry may also be other types of controls, which is not limited in the present application.
[0263] Step 2: In response to a trigger operation on the first function entry, a first information filling interface is displayed, where the first information filling interface is used to provide a function of reporting lost object information.
[0264] Optionally, the first information filling interface may include an image upload portal and an edit box, so that the user can upload images of lost items or lost persons through the image upload portal, and fill in a description of the lost items or the lost person through the edit box.
[0265] Step 3: In response to the submission operation on the first information filling interface, the lost object information is published.
[0266] Optionally, the first information filling interface may include a submit control. After the user fills in the lost object information, the submit control can be triggered. The terminal can respond to the triggering operation of the submit control and send the lost object information uploaded by the user to the server, thereby publishing the lost object information through the server.
[0267] When the lost object information is published through the server, the server can send the lost object information to each display device so that the lost object information can be displayed through each display device, so that tourists in the scenic area can see the lost object information at the entrance of each project.
[0268] The display device may have a built-in or external audio component, such as a speaker, a loudspeaker, etc., so as to broadcast the lost object information reported by the user through the audio component.
[0269] In addition, the server can also send the lost object information to the terminal running the target application, so that tourists in the scenic area can view the lost object information uploaded by other users through the terminals they carry with them.
[0270] If other users see the lost items or missing persons corresponding to the published lost object information while visiting the scenic spot, other users can also upload clues of the lost objects through their portable terminals.
[0271] When uploading the missing object clue, you can do it through the following steps:
[0272] Step 1: In response to a trigger operation on a second function option, a second function entry is displayed.
[0273] The second function entry may be a button, for example, a lost object clue reporting button. Optionally, the second function entry may also be other types of controls, which is not limited in the present application.
[0274] Step 2: In response to the triggering operation on the second function entrance, a second information filling interface is displayed, and the second information filling interface is used to provide a function of uploading lost object clues.
[0275] Optionally, the second information filling interface may include an image upload entrance and a location reporting entrance, so that the user can upload images of suspected lost objects (including images of suspected lost items and images of suspected lost persons) that he has seen through the image upload entrance, and report the location of the suspected lost object that he has seen through the location reporting entrance.
[0276] Step 3: In response to the submission operation on the second information filling interface, a clue of the lost object is published.
[0277] Optionally, the second information filling interface may include a submit control. After the user fills in the lost object clue, the submit control can be triggered. The terminal can respond to the triggering operation of the submit control and send the lost object clue uploaded by the user to the server, thereby publishing the lost object clue through the server.
[0278] When the lost object clues are published through the server, the server can send the lost object clues to each display device so that the lost object clues can be displayed through each display device, so that the user who reported the lost object information can see the clues provided by other users at each project entrance.
[0279] In addition, the server may also send the lost object clue to the terminal of the user object who reported the lost object information, so that the user can view the clues provided by other users through the terminal he carries with him.
[0280] In one possible implementation, in response to receiving a lost object clue fed back based on the lost object information, the terminal displays the lost object location corresponding to the lost object clue on a three-dimensional map model, and / or displays the route from the terminal's location to the lost object location.
[0281] Optionally, when the terminal receives a lost object clue based on feedback of the lost object information, it can first prompt the user, and then based on the user's operation, display the lost object location corresponding to the lost object clue on the three-dimensional map model, and / or display the route from the terminal's location to the lost object location.
[0282] That is, when the terminal receives the lost object clues based on the lost object information, it can first display the prompt information through the dialog box, and the prompt information is used to prompt the receipt of the lost object clues fed back by other users, and the terminal can display the clue viewing control in the dialog box used to display the prompt information, so that the user can display the clue viewing interface through the clue viewing control, and display the lost object clues provided by other users on the clue viewing interface for the user to view.
[0283] When a user determines that the lost object clues uploaded by other users may correspond to his / her lost items or his / her lost companions or children, the user can check the location of the lost objects uploaded by other users and plan a route to the location of the lost objects.
[0284] In one possible implementation, a location viewing control and a route planning control may be provided on the clue viewing interface, so that the user can view the location of the lost object uploaded by other users through the location viewing control, and plan the route to the location of the lost object through the route planning control.
[0285] If the user triggers the location viewing control, the terminal can display the lost object location corresponding to the lost object clue on the three-dimensional map model in response to the user's triggering operation on the location viewing control.
[0286] If the user triggers the route planning control, the terminal can respond to the user's triggering operation of the route planning control and display the route from the terminal's location to the location of the lost object on the three-dimensional map model. The implementation process of displaying the route can refer to the above embodiment and will not be repeated here.
[0287] It should be noted that when displaying the location of a lost object on a three-dimensional map model, or displaying a route to the location of a lost object, the user can still zoom in, zoom out, rotate, move, etc. the three-dimensional map model through the interactive operations involved in the above embodiments. The specific process can be found in the above embodiments and will not be repeated here.
[0288] The above process of displaying a three-dimensional map model and providing an interactive function based on the displayed three-dimensional map model can be found in Figure 6 , Figure 6 This is a flow chart of an interactive function based on a three-dimensional map model provided in an embodiment of the present application. After obtaining the location information of the terminal, the obtained location information is used as the current location information of the tourist, so as to determine whether the current location information meets the target condition, that is, to determine whether the tourist is within the scope of the scenic area. When the tourist is within the scope of the scenic area, the three-dimensional map model of the scenic area is loaded, and then based on the loaded three-dimensional map model, a three-dimensional navigation function of displaying the scenic spot with the shortest display time and drawing a three-dimensional navigation route map, a live viewing function of viewing the real-time video stream of the scenic spot, and a reporting function of reporting lost object information and lost object clues are provided. For the introduction of each function, please refer to the above-mentioned embodiments and will not be repeated here.
[0289] The embodiment of the present application also proposes a map data processing device, see Figure 7 , Figure 7 is a flowchart of a map data processing device provided according to an embodiment of the present application, the device comprising:
[0290] The display unit 701 is used to display the 3D map model based on the open source 3D rendering OSG engine through the target rendering tool class;
[0291] The acquisition unit 702 is used to respond to the interactive operation on the three-dimensional map model and acquire the screen touch event corresponding to the interactive operation through the screen event acquisition function included in the target rendering tool class;
[0292] A determination unit 703, configured to determine the event type of the screen touch event through an event type determination function included in the target rendering tool class;
[0293] The updating unit 704 is used to update the displayed three-dimensional map model through a touch event processing function corresponding to the event type.
[0294] In some embodiments, the display unit 701, when used to display a 3D map model based on an open source 3D rendering OSG engine through a target rendering tool class, is used to:
[0295] Start the drawing thread of the target rendering tool class;
[0296] Initialize the OSG engine through the view initialization function in the rendering method subclass of the target rendering tool class;
[0297] Load the OSG-based 3D map model through the resource loading function of the target rendering tool class;
[0298] Render the three-dimensional map model through the effect rendering function in the rendering method subclass of the target rendering tool class;
[0299] Display the rendered 3D map model.
[0300] In some embodiments, the terminal uses the Android operating system, the target rendering tool class is the GLSurfaceView class, the screen event acquisition function is the onTouchEvent function, the event type judgment function is the changeMode function, the touch event processing function is the preformMode function, the drawing thread is the GLThread thread, the rendering method subclass is the Render subclass, the view initialization function is the onSurfaceChanged function, the resource loading function is the loadObject function, and the effect rendering function is the onDrawFrame function.
[0301] In some embodiments, the display unit 701, when used to display a 3D map model based on an open source 3D rendering OSG engine through a target rendering tool class, is used to:
[0302] Acquire first location information of the terminal;
[0303] When the first position information meets the target condition, a three-dimensional map model based on the open source three-dimensional rendering OSG engine is displayed through the target rendering tool class.
[0304] In some embodiments, the updating unit 704, when used to update the displayed three-dimensional map model, is used for any of the following:
[0305] Enlarging the displayed three-dimensional map model;
[0306] Zooming out the displayed three-dimensional map model;
[0307] Rotate the displayed three-dimensional map model;
[0308] Move the displayed 3D map model.
[0309] In some embodiments, the apparatus further comprises:
[0310] The callback unit is used to call back the registered listener function to the interface event processing class in the OSG function through the click event listening function included in the target rendering tool class;
[0311] The acquisition unit 702 is further configured to, in response to monitoring a click operation on the three-dimensional map model through the registered listener function, acquire a click event corresponding to the click operation through an event transparent transmission function.
[0312] In some embodiments, the click event listening function is the setOnceModelClickListener function, the interface event processing class is the GUIEventHandler class, the registration listener function is the OnceModelClickListener, and the event transmission function is the onceModelClicked function.
[0313] In some embodiments, the apparatus further comprises:
[0314] The playback unit is used to play the video data corresponding to the clicked object.
[0315] In some embodiments, the acquisition unit 702 is further used to acquire the number of people in the queue corresponding to the clicked object;
[0316] The display unit 701 is also used to display the acquired number of people in the queue;
[0317] The number of people in the queue is determined based on the video data corresponding to the clicked object.
[0318] In some embodiments, the process of determining the number of people in the queue includes:
[0319] Get the video data corresponding to the clicked object;
[0320] Get the video picture corresponding to the current time in the video data;
[0321] The number of faces included in the video image is determined, and the number of faces is used as the number of people in the queue.
[0322] In some embodiments, the display unit 701 is further configured to display the first function option on the three-dimensional map model;
[0323] The determining unit 703 is further configured to determine a first duration in response to a triggering operation on the first function option based on first location information for the display terminal, second location information of each candidate object, and a preset moving speed;
[0324] The determining unit 703 is further configured to determine the second duration based on the preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, the preset passing time, and the first duration;
[0325] The determining unit 703 is further configured to determine a target object based on the first duration and the second duration;
[0326] The display unit 701 is also used to display a route from the location of the terminal to the location of the target object on the three-dimensional map model.
[0327] In some embodiments, the determining unit 703, when used to determine the first duration based on the first location information of the terminal, the second location information of each candidate object, and a preset moving speed, is used to:
[0328] Determining the distance between the terminal and each candidate object based on the first location information and each second location information;
[0329] The first duration is determined based on the distance between the terminal and each candidate object and a preset moving speed.
[0330] In some embodiments, the determining unit 703, when used to determine the second duration based on the preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, the preset passing time, and the first duration, is used to:
[0331] Determine a change rate of the number of people in the queue based on a preset time period and the number of people in the queue corresponding to each candidate object in two adjacent preset time periods;
[0332] The second duration is determined based on the number of queue members, the rate of change of the number of queue members, the preset passing time, and the first duration of each candidate object in the latter of two adjacent preset time periods.
[0333] In some embodiments, the determining unit 703, when used to determine the target object based on the first duration and the second duration, is used to:
[0334] The candidate object with the smallest sum of the first duration and the second duration is determined as the target object.
[0335] In some embodiments, the display unit 701 is further used to display a second function option on the three-dimensional map model;
[0336] The display unit 701 is further configured to display the first function entry in response to a triggering operation on the second function option;
[0337] The display unit 701 is further configured to display a first information filling interface in response to a triggering operation on the first function entry, where the first information filling interface is configured to provide a function of reporting lost object information;
[0338] The device also includes:
[0339] The publishing unit is used to publish the lost object information in response to a submission operation on the first information filling interface.
[0340] In some embodiments, the display unit 701 is further configured to display the lost object location corresponding to the lost object clue on the three-dimensional map model in response to receiving the lost object clue fed back based on the lost object information.
[0341] In some embodiments, the display unit 701 is further configured to display a route from the location of the terminal to the location of the lost object on the three-dimensional map model in response to receiving a lost object clue fed back based on the lost object information.
[0342] In some embodiments, the display unit 701 is further configured to display a second function entry in response to a triggering operation on the second function option;
[0343] The display unit 701 is further configured to display a second information filling interface in response to a triggering operation on the second function entrance, wherein the second information filling interface is configured to provide a function of uploading a clue of a lost object;
[0344] The publishing unit is further used to publish the lost object clue in response to a submission operation on the second information filling interface.
[0345] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0346] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0347] This application also provides a terminal, see Figure 8 , Figure 8 is a schematic diagram of the structure of a terminal provided according to an embodiment of the present application. Figure 8As shown, the terminal includes a processor 810, a memory 820 and a network interface 830. The memory 820 is used to store computer program codes that can be run on the processor 810. The processor 810 is used to implement the map data processing method provided in any embodiment of the present application when executing the computer program code. The network interface 830 is used to implement input and output functions. In more possible implementations, the terminal may also include other hardware, which is not limited in the present application.
[0348] The present application also provides a computer-readable storage medium, which can be in various forms. For example, in different examples, the computer-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof. In particular, the computer-readable medium can also be paper or other suitable medium capable of printing programs. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for processing map data provided in any embodiment of the present application is implemented.
[0349] The present application also provides a computer program product, including a computer program, which implements the map data processing method provided in any embodiment of the present application when the computer program is executed by a processor.
[0350] In the present application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The term "plurality" refers to two or more than two, unless otherwise clearly defined.
[0351] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the disclosure disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0352] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for processing map data, characterized in that: Applied to a terminal, the method comprises: Through the target rendering tool class, the 3D map model based on the open source 3D rendering OSG engine is displayed; In response to an interactive operation on the three-dimensional map model, obtaining a screen touch event corresponding to the interactive operation through a screen event acquisition function included in the target rendering tool class; Determining the event type of the screen touch event through the event type judgment function included in the target rendering tool class; Updating the displayed three-dimensional map model through the touch event processing function corresponding to the event type; The method further comprises: Displaying a first function option on the three-dimensional map model; In response to a triggering operation on the first function option, determining a first duration based on the first location information of the terminal, the second location information of each candidate object, and a preset moving speed; Determine a second duration based on a preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, a preset passing time, and the first duration; Determine a target object based on the first duration and the second duration; On the three-dimensional map model, a route from the location of the terminal to the location of the target object is displayed.
2. The method according to claim 1, characterized in that The target rendering tool class is used to display a three-dimensional map model based on an open source three-dimensional rendering OSG engine, including: Start the drawing thread of the target rendering tool class; Initialize the OSG engine through the view initialization function in the rendering method subclass of the target rendering tool class; Loading the OSG-based 3D map model through the resource loading function of the target rendering tool class; Rendering a three-dimensional map model through the effect rendering function in the rendering method subclass of the target rendering tool class; Display the rendered 3D map model.
3. The method according to claim 2, characterized in that The terminal uses the Android operating system, the target rendering tool class is the GLSurfaceView class, the screen event acquisition function is the onTouchEvent function, the event type judgment function is the changeMode function, the touch event processing function is the preformMode function, the drawing thread is the GLThread thread, the rendering method subclass is the Render subclass, the view initialization function is the onSurfaceChanged function, the resource loading function is the loadObject function, and the effect rendering function is the onDrawFrame function.
4. The method according to claim 1, characterized in that: The target rendering tool class is used to display a three-dimensional map model based on an open source three-dimensional rendering OSG engine, including: Acquire first location information of the terminal; When the first position information meets the target condition, a three-dimensional map model based on an open source three-dimensional rendering OSG engine is displayed through the target rendering tool class.
5. The method according to claim 1, characterized in that The updating of the displayed three-dimensional map model includes at least one of the following: Enlarging the displayed three-dimensional map model; Zooming out the displayed three-dimensional map model; Rotate the displayed three-dimensional map model; Move the displayed 3D map model.
6. The method according to claim 1, characterized in that The method further comprises: Through the click event listening function included in the target rendering tool class, the registered listener function is called back to the interface event processing class in the OSG function; In response to monitoring a click operation on the three-dimensional map model through the registered listener function, a click event corresponding to the click operation is obtained through an event transmission function.
7. The method according to claim 6, characterized in that The click event monitoring function is the setOnceModelClickListener function, the interface event processing class is the GUIEventHandler class, the registered listener function is the OnceModelClickListener, and the event transmission function is the onceModelClicked function.
8. The method according to claim 6, characterized in that After obtaining the click event corresponding to the click operation through the event transparent transmission function, the method further includes: Play the video data corresponding to the clicked object.
9. The method according to claim 6, characterized in that The method further comprises: The number of people in a queue corresponding to the clicked object is obtained and displayed, wherein the number of people in a queue is determined based on the video data corresponding to the clicked object.
10. The method according to claim 9, characterized in that The process of determining the number of people in the queue includes: Get the video data corresponding to the clicked object; Obtain the video frame corresponding to the current time in the video data; The number of faces included in the video image is determined, and the number of faces is used as the number of people in the queue.
11. The method according to claim 1, characterized in that: The determining the first duration based on the first location information of the terminal, the second location information of each candidate object, and a preset moving speed includes: Determining the distance between the terminal and each candidate object based on the first location information and each second location information; The first duration is determined based on the distance between the terminal and each candidate object and the preset moving speed.
12. The method according to claim 1, characterized in that The determining of the second duration based on the preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, the preset passing time, and the first duration includes: Determine a change rate of the number of people in the queue based on the preset time period and the number of people in the queue corresponding to each candidate object in two adjacent preset time periods; The second duration is determined based on the number of queue members of each candidate object in the latter of two adjacent preset time periods, the rate of change of the number of queue members, the preset passing time, and the first time.
13. The method according to claim 1, characterized in that The determining the target object based on the first duration and the second duration includes: The candidate object with the smallest sum of the first duration and the second duration is determined as the target object.
14. The method according to claim 1, characterized in that The method further comprises: Displaying a second function option on the three-dimensional map model; In response to a triggering operation on the second function option, displaying a first function entry; In response to a triggering operation on the first function entry, a first information filling interface is displayed, where the first information filling interface is used to provide a function of reporting lost object information; In response to a submission operation on the first information filling interface, the lost object information is published.
15. The method according to claim 14, characterized in that The method further comprises: In response to receiving the lost object clue fed back based on the lost object information, the lost object position corresponding to the lost object clue is displayed on the three-dimensional map model.
16. The method according to claim 15, characterized in that The method further comprises: In response to receiving the lost object clue fed back based on the lost object information, a route from the location of the terminal to the location of the lost object is displayed on the three-dimensional map model.
17. The method according to claim 14, characterized in that After displaying the second function option on the three-dimensional map model, the method further includes: In response to a triggering operation on the second function option, displaying a second function entry; In response to the triggering operation of the second function entrance, a second information filling interface is displayed, where the second information filling interface is used to provide a function of uploading a clue of a lost object; In response to a submission operation on the second information filling interface, a missing object clue is published.
18. A map data processing device, characterized in that: The device comprises: A display unit, used to display a 3D map model based on an open source 3D rendering OSG engine through a target rendering tool class; An acquisition unit, configured to respond to an interactive operation on the three-dimensional map model and acquire a screen touch event corresponding to the interactive operation through a screen event acquisition function included in the target rendering tool class; A determination unit, configured to determine the event type of the screen touch event through an event type determination function included in the target rendering tool class; An updating unit, configured to update the displayed three-dimensional map model through a touch event processing function corresponding to the event type; The display unit is further used to display the first function option on the three-dimensional map model; The determining unit is further configured to determine a first duration in response to a triggering operation on the first function option based on the first location information of the terminal, the second location information of each candidate object, and a preset moving speed; The determining unit is further configured to determine a second duration based on a preset time period, the number of queues corresponding to each candidate object in two adjacent preset time periods, a preset passing time, and the first duration; The determining unit is further configured to determine a target object based on the first duration and the second duration; The determining unit is further configured to display, on the three-dimensional map model, a route from the location of the terminal to the location of the target object.
19. A terminal, characterized in that: The terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the operations performed by the method for processing map data according to any one of claims 1 to 17 when executing the computer program.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed by the processor, the operations performed by the method for processing map data according to any one of claims 1 to 17 are implemented.