Data display method and system based on lightweight digital twinning

By pre-processing and analyzing the 720 panoramic photos of water conservancy facilities, lightweight digital twin scenes are generated, and real-time monitoring data is integrated, the problem of high cost of traditional digital modeling is solved, and low-cost data display and intuitive display are achieved.

CN120353955APending Publication Date: 2025-07-22JILIN AILITER TECHNOLOGY SERVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510828767.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

Traditional digital modeling technology is costly to build in water conservancy flood prevention work, making it difficult to achieve widespread promotion, and the existing technology cannot achieve lightweight digital twin display at low cost.

Method used

By obtaining 720 panoramic photos of water conservancy facilities for preprocessing and analysis, vectorized data is generated, lightweight digital twin scenes are established, and real-time monitoring data is integrated and displayed, and dynamic simulation is performed using image annotation technology.

Benefits of technology

It realizes low-cost data display, combined with the intuitive display of panoramic photos and real-time monitoring data, reduces construction costs and improves the efficiency and safety of flood prevention work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120353955A_ABST
    Figure CN120353955A_ABST
Patent Text Reader

Abstract

The invention relates to a data display method based on lightweight digital twinning, and belongs to the technical field of data processing. The data display method comprises the following steps: acquiring a 720 panoramic photo of a target water conservancy facility, preprocessing the 720 panoramic photo to generate a target photo, and analyzing the target photo to generate vectorized data; based on the vectorized data, generating a lightweight digital twinborn scene of the target water conservancy facility; and acquiring real-time monitoring data of the target water conservancy facility, and fusing the real-time monitoring data with the lightweight digital twinborn scene so as to display the real-time monitoring data in the lightweight digital twinborn scene. According to the method, the twin scene is established in combination with the panoramic photo, the real-time monitoring data is fused, the dynamic monitoring data is displayed in the twin scene in real time, and low-cost data display is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and specifically relates to a data display method and system based on lightweight digital twins. Background Art

[0002] Digital twins can make the monitoring and early warning work in water conservancy flood control more intuitive, and can efficiently assist in carrying out flood control work under the requirements of "Four Pres". At the same time, it also plays a certain role in protecting the lives and safety of relevant staff. Traditional digital modeling technologies need to build digital models for water conservancy facilities, equipment, and natural river channels one by one, with too high construction costs and being not conducive to wide promotion and use. Therefore, it is necessary to study a display system that can achieve lightweight twins at low cost. Summary of the Invention

[0003] In view of the above problems, the present invention proposes a data display method based on lightweight digital twins, including: Obtain 720 panoramic photos of the target water conservancy facility, preprocess the 720 panoramic photos to generate target photos, and perform parsing processing on the target photos to generate vectorized data; Generate a lightweight digital twin scene of the target water conservancy facility based on the vectorized data; Obtain the real-time monitoring data of the target water conservancy facility, and fuse the real-time monitoring data with the lightweight digital twin scene to display the real-time monitoring data in the lightweight digital twin scene.

[0004] Optionally, preprocessing the 720 panoramic photos includes: Verify the data format, picture ratio, and name of the 720 panoramic photo. If the data format does not meet the preset requirements, convert the data format, modify the picture ratio, and name.

[0005] Optionally, the preset requirements include: The 720 panoramic photo is in JPG format, the picture ratio is 2:1, and the name does not include special characters.

[0006] Optionally, parse and convert the target photo into vectorized data with vectorized marks through two-dimensional and / or three-dimensional coordinate conversion technology and grid processing technology; The vectorized data is twin scene effect data.

[0007] Optionally, the method further includes: After generating the lightweight digital twin scene of the target water conservancy facility, in the lightweight digital twin scene, according to the display information of the 720 panoramic photo of the target water conservancy facility, mark the hot spots and geographical information of the target water conservancy facility in the lightweight digital twin scene. When displaying real-time monitoring data, fuse the real-time monitoring data with the geographical information or hot spot location information.

[0008] Optionally, the method further includes: Based on the vectorized data, generate a lightweight digital twin scene or a partial lightweight digital twin scene of the target water conservancy facility in multiple scenarios; When displaying data, switch scenes to display real-time monitoring data.

[0009] Optionally, through an embedding tool, insert picture, video or text data in an embedded manner into the lightweight digital twin scene for display together with the implementation monitoring data.

[0010] On the other hand, the present invention also proposes a data display system based on a lightweight digital twin, including: A data processing unit, configured to obtain a 720 panoramic photo of the target water conservancy facility, preprocess the 720 panoramic photo to generate a target photo, and perform parsing processing on the target photo to generate vectorized data; A digital twin unit, configured to generate a lightweight digital twin scene of the target water conservancy facility based on the vectorized data; A display unit, configured to obtain the real-time monitoring data of the target water conservancy facility, fuse the real-time monitoring data with the lightweight digital twin scene, and display the real-time monitoring data in the lightweight digital twin scene.

[0011] On the other hand, the present invention also provides a computing device, including: one or more processors; A processor, configured to execute one or more programs; When the one or more programs are executed by the one or more processors, the method as described above is implemented.

[0012] On the other hand, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the method as described above is implemented.

[0013] Compared with the prior art, the beneficial effects of the present invention are: The present invention provides a data display method based on lightweight digital twins, including: obtaining 720 panoramic photos of a target water conservancy facility, preprocessing the 720 panoramic photos to generate target photos, and parsing the target photos to generate vectorized data; generating a lightweight digital twin scene of the target water conservancy facility based on the vectorized data; obtaining real-time monitoring data of the target water conservancy facility, and fusing the real-time monitoring data with the lightweight digital twin scene to display the real-time monitoring data in the lightweight digital twin scene. The present invention combines panoramic photos to establish a twin scene, fuses real-time monitoring data, and displays dynamic monitoring data in real time in this twin scene. It uses image annotation technology to perform dynamic simulation display on the 720 panorama, achieving low-cost data display. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a flowchart of the method of the present invention; Figure 2 is an application flowchart of the method of the present invention; Figure 3 is a twin achievement diagram of the method of the present invention; Figure 4 is a structural diagram of the system of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0015] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following describes in detail the specific implementation manner, structure, features, and effects of the present invention in combination with the accompanying drawings and preferred embodiments.

[0016] Example 1: The present invention proposes a data display method based on lightweight digital twins, as Figure 1 shown, including: Step 1: Obtain 720 panoramic photos of a target water conservancy facility, preprocess the 720 panoramic photos to generate target photos, and parse the target photos to generate vectorized data; Step 2: Generate a lightweight digital twin scene of the target water conservancy facility based on the vectorized data; Step 3: Obtain real-time monitoring data of the target water conservancy facility, and fuse the real-time monitoring data with the lightweight digital twin scene to display the real-time monitoring data in the lightweight digital twin scene.

[0017] Among them, preprocessing the 720 panoramic photos includes: Verify the data format, picture ratio, and name of the 720 panoramic photo. If the data format does not meet the preset requirements, convert the data format, modify the picture ratio, and name.

[0018] Among them, the preset requirements include: The 720 panoramic photo is in JPG format, the picture ratio is 2:1, and the name does not include special characters.

[0019] Among them, through two-dimensional and / or three-dimensional coordinate conversion technology and grid processing technology, the target photo is analyzed and converted into vectorized data with vectorized marks; The vectorized data is twin-scene effect data.

[0020] Among them, the method also includes: After generating the lightweight digital twin scene of the target water conservancy facility, in the lightweight digital twin scene, according to the display information of the 720 panoramic photo of the target water conservancy facility, mark the hot spots and geographical information of the target water conservancy facility in the lightweight digital twin scene. When displaying real-time monitoring data, fuse the real-time monitoring data with geographical information or hot spot location information.

[0021] Among them, the method also includes: Based on the vectorized data, generate a lightweight digital twin scene or a partial lightweight digital twin scene of the target water conservancy facility in multiple scenarios; When displaying data, switch scenes to display real-time monitoring data.

[0022] Among them, through an embedding tool, insert picture, video, or text data in an embedded manner into the lightweight digital twin scene for display together with the implementation monitoring data.

[0023] In the present invention, lightweight digital twin is carried out based on 720 panoramas, which is used to intuitively display the operation status of water conservancy engineering facilities and equipment. First, use the 720 panoramic photo taken by the drone combined with digital twin technology to realize the lightweight digital twin of the hydrological station and simulate and display it realistically. Through the 720 panoramic drone, 720 image acquisition is carried out, and the twin basic scene is established by using VR generation technology combined with panoramic splicing. The dynamic monitoring data of the current monitoring elements are fused into the twin scene through digital fusion technology. The present invention greatly reduces the construction cost compared with the traditional digital modeling twin technology.

[0024] Among them, when the present invention is applied, its implementation process is as Figure 2 shown, including: Panoramic picture loading: Obtain the selected panoramic photo, save the photo to the server through file upload, and store the relevant information of the photo in the system database. The supported image format is JPG, the image ratio requirement is 2:1, and special characters are not allowed in the image name.

[0025] Twin scene analysis: Import the panoramic image into the system. The parsing service, for the obtained panoramic photo, through two-dimensional and three-dimensional coordinate conversion technology and grid processing, converts the photo into twin scene result data that can be vectorized and marked, generates the corresponding desired effect diagram. After binding the station information, other modules can realize the integration and application of the twin scene through the station information.

[0026] Lightweight digital twin configuration: Integrate the twin scene established based on the panoramic photo with the real-time monitoring data, and display the dynamic monitoring data in real time in this twin scene. Use image annotation technology to perform dynamic simulation display on the 720 panorama, realizing a digital twin display system with low performance requirements.

[0027] Among them, the twin effects of the twin scene, such as Figure 3 shown, include: Cover maintenance: Maintain the cover of the twin scene of the hydrological station, upload a photo to the corresponding position as the cover file of the twin scene, and automatically display the cover photo when showing. Automatic cruise: Set the automatic cruise time and whether to start through the editing page, and automatically perform cruise display on the display page. The cruise function mainly realizes automatic inspection and viewing of all angles within the scene; Mobile display: The mobile phone can view the twin scene results of the site in real time. After opening the access link on the mobile phone, the twin scene is directly displayed, and the picture rotates as the mobile phone rotates, achieving lightweight design and improving the convenience and timeliness of twin scene display; Multi-scene construction: Set the relationship between the station and the twin scene to one-to-many to meet the needs of multi-scene construction; users can import multiple scenes of the twin scene of the same station in the system. Finally, when viewing the twin scene of a certain station, multiple scenes of this station can be viewed, more intuitively and comprehensively displaying the true situation of the upstream and downstream of this station and important facilities; Route guide: Edit the navigation nodes. The edited nodes include various types such as hotspot markers and navigation markers. After setting up the navigation route, the displayed page can select the navigation function, and then the navigation display can be carried out in the order of the set nodes. The navigation display includes content such as perspective conversion, hotspot information display, and scene switching.

[0028] Hotspot location marker: On the editing page, perform the operation of marking the hotspot location of the twin scene. This operation can mark information such as pictures, texts, photos, and links onto the twin scene and can add click events such as jumps to the hotspot content. When viewing on the display page, the corresponding hotspot information can be seen, and clicking on the hotspot information can trigger the corresponding event actions.

[0029] Embedded tool: Embed content such as text pictures and videos into the twin scene for unified display, increasing the diversity and comprehensiveness of the twin scene.

[0030] Lightweight digital twin: Set up relevant information about the survey station on the twin scene, such as geographical information, monitoring information, basic information, etc. When displaying, the system automatically obtains the latest real-time data and presents it together with the twin scene, achieving the purpose that each survey station is a lightweight digital twin effect.

[0031] Lightweight digital twin result display: Display the twin scene after parsing and configuring. Each result will generate an access address, and entering this address in the browser can be used for display and viewing, and it supports display on both the computer side and the mobile side.

[0032] In the present invention, the lightweight digital twin technology is used: This technology comprehensively applies core technologies such as image stitching and two-dimensional and three-dimensional coordinate conversion to accurately generate a panoramic view. On this basis, vectorization analysis processing is performed on the panoramic view, and real-time data is anchored in the panoramic view in the form of annotations, etc. Finally, the deep fusion display of the real scene photo and real-time data is realized, forming a lightweight digital twin effect.

[0033] Establish the scene of the twin model, including: Panoramic photo collection: Use a panoramic camera to take multi-angle photos in the target scene to ensure that all parts of the scene are covered and rich image data is obtained. When shooting, pay attention to maintaining the stability of the camera and the consistency of the shooting angle.

[0034] Image processing: Through two-dimensional and three-dimensional coordinate conversion technology and grid processing, convert the photo into twin scene result data that can be vectorized and marked, and generate the corresponding desired effect diagram.

[0035] Real-time data integration: If there are real-time data requirements, such as environmental sensor data, equipment operation status data, etc., integrate this real-time data with the 3D model. By establishing data interfaces and communication protocols, the real-time data can be updated to the model in real time to achieve dynamic display of the scene. For example, map the temperature sensor data to the corresponding positions in the model to visually display the temperature distribution.

[0036] VR scene integration and interaction design: Integrate the optimized panoramic image into the VR environment, select a suitable VR development platform and tools, set the camera perspective, lighting effects, sound effects, etc. in the VR environment to create a realistic virtual scene atmosphere. Design interaction methods, such as users can freely walk in the scene, view object details, interact with virtual objects, etc. through the handle or gestures.

[0037] Scene and data fusion, including: After completing the accurate conversion of the two-dimensional and three-dimensional coordinates of the scene, the vectorization information annotation work can be carried out. By establishing an accurate association mechanism between the annotation points and the actual positions of the scene, ensure that the positions of the annotation points remain stable during subsequent display. At the same time, perform data binding operations on the annotation points. With the efficient query interface of the backend, the real-time query and dynamic display of monitoring data can be achieved, so as to provide users with timely and accurate information presentation.

[0038] When the present invention performs data display based on lightweight digital twins, it is displayed through a display system constructed according to the method of the present invention. The display system includes a result display interface, as well as a lightweight digital twin front end, a hotspot front end, an embedded content front end, and a lightweight digital twin back end, etc.; The main functions of the lightweight digital twin back end include: The functions of adding, modifying, deleting, querying, and exporting lightweight digital twins are as follows: Add function: Store the basic information of the lightweight digital twin in the database and compress the cover image. Modify function: Replace the original information with the new lightweight digital twin information. Delete function: Delete the lightweight digital twin information and the following scene information. Query function: Obtain the corresponding data from the database through the query conditions such as the name transmitted back by the front end. Export function: On the basis of the query function, generate an Excel table with the obtained data and return it to the front end for downloading.

[0039] The functions of querying, setting, and modifying the menu content that can be displayed by the lightweight digital twin are as follows: Query function: Obtain the menu that can be displayed by the lightweight digital twin from the database based on conditions such as the station name passed back by the front end; Setting function: Set the menu content that can be displayed by a certain lightweight digital twin, such as information on water level, flow rate, rainfall, etc.; Modification function: The menu content of the lightweight digital twin can be reset.

[0040] For the functions of adding, modifying, deleting, and querying hot spot markers on the lightweight digital twin, as follows: Addition function: Save the information of the placed hot spot icon (such as: title, location, content, etc.); Modification function: Modify the basic information of the saved hot spot icon and overwrite the saved content; Deletion function: Delete the information of the hot spot icon through the primary key; Query function: Query all hot spot icon data under the scenario through the scenario primary key and return it to the front end for display; For the functions of adding, modifying, deleting, querying, and exporting the lightweight digital twin scenario, as follows: Addition function: Save function for each sub-scenario of the lightweight digital twin; Modification function: Replace the saved scenario; Deletion function: Delete the saved scenario information; Query function: Filter out the desired scenario data through conditions; Export function: Based on the query function, generate an Excel table with the obtained data and return it to the front end for download.

[0041] For the query function of lightweight digital twin data, as follows: Function description: Query the real-time data such as rainfall and water level of a certain marker point and display it on the page.

[0042] The code of its lightweight digital twin backend is as follows: / ** * Station information Controller * @date 2024-09-09 * / @RestController @RequestMapping(" / pano / info") @RequiredArgsConstructor public class StationInfoController extends BaseController { @Value("${pronomara.profile}") private String profile; @Autowired private ServerConfig serverConfig; private final IStationInfoService stationInfoService; private final IStationSceneService stationSceneService; / ** * Query the list of lightweight digital twin information * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:info')") @GetMapping(" / list") public TableDataInfo list(StationInfo stationInfo) { / / Enable paging startPage(); / / Query the lightweight digital twin list based on the query conditions passed by the front end List <stationinfovo>list = stationInfoService.selectStationInfoList(stationInfo); / / Package the data and return it for front-end display return getDataTable(list); } / ** * Query the list of station information * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:info')") @GetMapping(" / allList") public TableDataInfo allList(StationInfo stationInfo) { List <stationinfovo>list = stationInfoService.selectStationInfoList(stationInfo); return getDataTable(list); } / ** * Export the lightweight digital twin information list * / / / @Log(title = "Export lightweight digital twin information", businessType =BusinessType.EXPORT) @PreAuthorize("@shanmai.hasPermi('qjjxxt:info:export')") @PostMapping(" / export") public void export(HttpServletResponse response, StationInfostationInfo) { / / Query the corresponding lightweight digital twin information list through the page query conditions List <stationinfovo>list = stationInfoService.selectStationInfoList(stationInfo); / / Convert the obtained lightweight digital twin information list into an Excel table ExcelUtil <stationinfovo>util = new ExcelUtil<>(StationInfoVO.class); / / Return the Excel table to the page for download util.exportExcel(response, list, "Station information data"); } / ** * Get the detailed information of the lightweight digital twin * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:info')") @GetMapping(value = " / {id}") public AjaxResult getInfo(@PathVariable("id") String id) { / / Query the detailed information of the lightweight digital twin by the primary key return success(stationInfoService.selectStationInfoByStcd(id)); } / ** * Add lightweight digital twin information * / / / @Log(title = "Lightweight digital twin information", businessType = BusinessType.INSERT) @PreAuthorize("@shanmai.hasPermi('qjjxxt:info:add')") @PostMapping public AjaxResult add(@RequestBody ExtStationInfo stationInfo) { / / Get the cover image of the lightweight digital twin String cover = stationInfo.getCover(); / / Check if the cover image exists if (cover != null &&!"".equals(cover)) { / / If the cover image exists, compress the cover image stationInfo.setThumbnail(ImageUtils.compressIamge(profile, cover)); } / / Save lightweight digital twin information return toAjax(stationInfoService.insertStationInfo(stationInfo)); } / ** * Modify lightweight digital twin information * / / / @Log(title = "Lightweight digital twin information", businessType =BusinessType.UPDATE) @PreAuthorize("@shanmai.hasPermi('qjjxxt:info:edit')") @PutMapping public AjaxResult edit(@RequestBody StationInfo stationInfo) { / / Get the original station panoramic information StationInfo origin = stationInfoService.selectStationInfoById(stationInfo.getId()); / / Get the cover image of the original panoramic information String originCover = origin.getCover(); / / Get the cover image String cover = stationInfo.getCover(); / / Determine whether the original image is the same as the modified original image if (originCover == null || "".equals(originCover) ||!originCover.equals(cover)) { / / The two images are different, delete the original image if (originCover != null && !"".equals(originCover)) { FileUtils.deleteFile(profile + originCover.substring(Constants.RESOURCE_PREFIX.length())); } / / Delete the thumbnail if (origin.getThumbnail() != null && !"".equals(origin.getThumbnail())) { FileUtils.deleteFile(profile + origin.getThumbnail().substring(Constants.RESOURCE_PREFIX.length())); } / / Store the thumbnail if (cover != null && !"".equals(cover)) { stationInfo.setThumbnail(ImageUtils.compressIamge(profile, stationInfo.getCover())); } } / / Update the data and return the result to the front end return toAjax(stationInfoService.updateStationInfo(stationInfo)); } / ** * Delete the lightweight digital twin information * / / / @Log(title = "Lightweight digital twin information", businessType =BusinessType.DELETE) @PreAuthorize("@shanmai.hasPermi('qjjxxt:info:delete')") @DeleteMapping(" / {ids}") public AjaxResult remove(@PathVariable Long[] ids) { for (int i = 0; i < ids.length; i++) { / / Query the lightweight digital twin information to be deleted by the primary key StationInfo stationInfo = stationInfoService.selectStationInfoById(ids[i]); / / Create the query condition for the scene information under the lightweight digital twin StationScene scene = new StationScene(); / / Store the lightweight scene.setStationCode(stationInfo.getStationCode()); / / Query the scene information included in the lightweight digital twin List <stationscene>stationScenes = stationSceneService.selectStationSceneList(scene); / / Delete all scenes if (stationScenes.size() > 0) { stationSceneService.deleteStationSceneByIds(stationScenes.stream().map(t -> t.getId()).toArray(Long[]::new)); } / / Get the cover image String cover = stationInfo.getCover(); / / Get the thumbnail String thumbnail = stationInfo.getThumbnail(); / / Delete the cover image if (cover != null && !"".equals(cover)) { FileUtils.deleteFile(profile + cover.substring(Constants.RESOURCE_PREFIX.length())); } / / Delete the thumbnail if (thumbnail != null && !"".equals(thumbnail)){ FileUtils.deleteFile(profile + thumbnail.substring(Constants.RESOURCE_PREFIX.length())); } } / / Delete the lightweight digital twin information and return the result to the front end return toAjax(stationInfoService.deleteStationInfoByIds(ids)); } / ** * Upload scene images * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:info:add')") @PostMapping(" / upload") public AjaxResult uploadScene(MultipartFile file) { try { / / Upload file path String filePath = PanoramaConfig.getUploadPath(); / / Upload and return the new file name String fileName = FileUploadUtils.upload(filePath, file); / / Generate the physical path of the image String url = serverConfig.getUrl() + fileName; / / Perform image cutting ImageUtils.cutImage(fileName, 4, 4); / / Image compression ImageUtils.compressIamge(profile, fileName); / / Garbage collection System.gc(); / / Package the data returned to the front end AjaxResult ajax = AjaxResult.success(); / / Put the real path ajax.put("url", url); / / Put the relative path ajax.put("fileName", fileName); / / Put the newly generated file name after saving ajax.put("newFileName", FileUtils.getName(fileName)); / / Put the original name ajax.put("originalFilename",file.getOriginalFilename()); / / Return data to the front end return ajax; } catch (Exception e) { / / Return error information return AjaxResult.error(e.getMessage()); } } } / ** * Station authority Controller * * @author cq * @date 2024-09-20 * / @RestController @RequestMapping(" / pano / permission") @Api("Get menu data") public class stationPermissionController extends BaseController { @Autowired private IStationPermissionService stationPermissionService; / ** * Query menu list * @param stationPermission * @return * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:menuconfig')") @GetMapping(" / list") @ApiOperation(value = "Get the menu list of lightweight digital twins", tags = "Get the menu list of lightweight digital twins") @ApiImplicitParam(name = "stationCode", value = "Station code", required = true) public TableDataInfo selectStationInfoList(StationPermission stationPermission) { / / Enable paging startPage(); / / Based on the passed parameters, query the menu content that can be displayed by each lightweight digital twin List <extstationpermission>stationPermissions = stationPermissionService.selectStationInfoList(stationPermission); / / Wrap the data and return it (including status code, total number, data list, etc.) return getDataTable(stationPermissions); } / ** * Set the menu items included in the lightweight digital twin * @param stationPermission * @return * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:menuconfig:add')") / / @Log(title = "Menu items included in the lightweight digital twin", businessType = BusinessType.INSERT) @PostMapping(" / add") AjaxResult insertSelective(StationPermission stationPermission){ / / Store the menu items set by the front end into the database int i = stationPermissionService.insertSelective(stationPermission); if (i == 0){ / / Check if the menu items have been set to prevent repeated addition return error("The menu has already been configured!"); } / / Return the success message for the setting return toAjax(i); } / ** * Modify the menu items included in the lightweight digital twin * @param stationPermission * @return * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:menuconfig:add')") / / @Log(title = "Modify the menu items included in the lightweight digital twin", businessType = BusinessType.UPDATE) @PutMapping(" / update") AjaxResult updateByPrimaryKeySelective(StationPermission stationPermission) { / / Replace the original data in the database with the data passed back from the front end int result = stationPermissionService.updateByPrimaryKeySelective(stationPermission); / / Return the modification success message return toAjax(result); } } / ** * Scene Controller * * @date 2024-09-10 * / @RestController @RequestMapping(" / pano / scene") public class StationSceneController extends BaseController { @Value("${panorama.profile}") private String profile; @Autowired private IStationSceneService stationSceneService; / ** * Query the scene list * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:scene')") @GetMapping(" / list") public TableDataInfo list(StationScene stationScene) { / / Enable paging function startPage(); / / Query scene information based on the query conditions passed back from the front end List <stationscene>list = stationSceneService.selectStationSceneList(stationScene); / / Package and return the scene information (including: status code, quantity, data list) return getDataTable(list); } / ** * Export the scene list * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:scene:export')") / / @Log(title = "Scene", businessType =BusinessType.EXPORT) @PostMapping(" / export") public void export(HttpServletResponse response, StationScenestationScene) { / / Query the scene information based on the query conditions passed back by the front end List <stationscene>list = stationSceneService.selectStationSceneList(stationScene); / / Create an Excel table utility class ExcelUtil <stationscene>util = new ExcelUtil <stationscene>(StationScene.class); / / Use the utility class to convert data into an Excel file and return it to the front end for download util.exportExcel(response, list, "Scene Data"); } / ** * Get detailed scene information * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:scene')") @GetMapping(value = " / {id}") @ApiOperation(value = "Get scene data", tags = "Get scene data") @ApiImplicitParam(name = "id", value = "Scene code", required = true) public R <stationscene>getInfo(@PathVariable("id") Long id) { / / Query the detailed scene information through the primary key and return the data to the front end return R.ok(stationSceneService.selectStationSceneById(id)); } / ** * Add a scene * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:scene:add')") / / @Log(title = "Add a scene", businessType =BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody StationScene stationScene) { / / Get the scene picture String photo = stationScene.getPhoto(); / / Determine whether there is a scene picture if (photo != null &&!"".equals(photo)) { / / Compress the scene picture stationScene.setThumbnail(ImageUtils.compressIamge(profile, photo)); / / Crop the scene picture stationScene.setPhotoWidth(ImageUtils.cutImage(photo, 4,4)); } / / Save the picture path, size, width, height and other information to the database and return the storage result to the page return toAjax(stationSceneService.insertStationScene(stationScene)); } / ** * Modify the scene * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:scene:edit')") / / @Log(title = "Modify the scene", businessType =BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody StationScene stationScene) { / / Get the scene diagram String photo = stationScene.getPhoto(); / / Determine whether there is a scene diagram if (photo != null &&!"".equals(photo)) { / / Query the original scene diagram information StationScene scene = stationSceneService.selectStationSceneById(stationScene.getId()); / / Get the original scene picture String originPhoto = scene.getPhoto(); / / Get the original compressed picture String originThumbnail = scene.getThumbnail(); / / If the original picture exists, delete the original picture file and then store the new scene picture if (!photo.equals(scene.getPhoto())) { / / Delete the original picture ImageUtils.deleteImage(profile, originPhoto); / / Delete the compressed picture ImageUtils.deleteImage(profile, originThumbnail); / / Delete the original image cuts ImageUtils.deleteImageCuts(profile, originPhoto); / / Compress the new image stationScene.setThumbnail(ImageUtils.compressIamge(profile, photo)); / / Cut the new image stationScene.setPhotoWidth(ImageUtils.cutImage(photo,4, 4)); } } / / Update the scene data in the database and return the result to the front end return toAjax(stationSceneService.updateStationScene(stationScene)); } / ** * Delete the scene * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:scene:delete')") / / @Log(title = "Delete the scene", businessType =BusinessType.DELETE) @DeleteMapping(" / {ids}") public AjaxResult remove(@PathVariable Long[] ids) { / / Delete the scene information one by one according to the scene primary key passed back by the front end and return the result to the front end return toAjax(stationSceneService.deleteStationSceneByIds(ids)); } } / ** * @ClassName: MarkerController * @Description: Icon control class * @date: 2024 / 9 / 19 16:22 * / @RestController @RequestMapping(" / scene / build") @RequiredArgsConstructor public class MarkerController extends BaseController { private final MarkerService markerService; / / private final ServerConfig serverConfig; / ** * @Title addMarker * @Description Add a new hotspot * @param marker * @date 2024 / 9 / 20 13:46 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:hotspot:add')") @PostMapping(" / addMarker") / / @Log(title = "New Hotspot", businessType =BusinessType.INSERT) public AjaxResult addMarker(@RequestBody TStationMarker marker) { / / Save the hotspot related data passed by the front end to the database Integer res = markerService.addMarker(marker); / / Return the stored results to the front end return success(res); } / ** * @Title addFileMarker * @Description Add a new hotspot * @param marker, file * @date 2024 / 9 / 24 8:57 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:hotspot:add')") @PostMapping(" / addFileMarker") public AjaxResult addFileMarker(ExtTStationMarker marker, MultipartFile file) { try { / / The content to be saved TStationMarker param = new TStationMarker(); / / Store the primary key of the scene graph where the hotspot is located param.setSceneId(marker.getSceneId()); / / Store the type of the hotspot param.setMarkerType(marker.getMarkerType()); / / Convert the basic information (location, title, etc.) of the hotspot icon into JSON data for easy storage in the database JSONObject markerData = JSONObject.parseObject(marker.getMarkerData()); / / Determine whether the hotspot map contains embedded files such as images if (file != null) { / / Get the save path of the file String filePath = PanoramaConfig.getUploadPath(); / / Call the public method to save the file, and return the saved location and file name after storage String fileName = FileUploadUtils.upload(filePath, file); / / Get the hotspot content information from the JSON data JSONObject content = (JSONObject) markerData.get("content"); / / Store the saved file location and name into the J hotspot content information content.put("img", fileName); } / / Store the JSON information of the hotspot icon param.setMarkerData(markerData); / / Save the above information to the database Integer res = markerService.addMarker(param); / / Return the success message to the page return success(res); } catch (IOException e) { / / Saving failed, print the error message e.printStackTrace(); / / Return the error message to the page return error(); } } / ** * @Title updateMarker * @Description Modify the hotspot * @param marker * @date 2024 / 9 / 20 15:57 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:hotspot:edit')") @PostMapping(" / updateMarker") public AjaxResult updateMarker(@RequestBody TStationMarkermarker) { / / Update the hotspot-related information passed from the front end to the database Integer res = markerService.updateMarker(marker); / / Return the update result to the front end return success(res); } / ** * @Title updateFileMarker * @Description Modify the hotspot * @param marker, file * @date 2024 / 9 / 24 9:57 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:hotspot:edit')") @PostMapping(" / updateFileMarker") public AjaxResult updateFileMarker(ExtTStationMarker marker, MultipartFile file) { / / Content to be saved TStationMarker param = new TStationMarker(); / / Store the primary key param.setId(marker.getId()); / / Store the primary key of the scene where the hotspot is located param.setSceneId(marker.getSceneId()); / / Store the hotspot type param.setMarkerType(marker.getMarkerType()); / / Convert the basic information (position, title, etc.) of the hotspot icon into JSON data for easy storage in the database JSONObject markerData = JSONObject.parseObject(marker.getMarkerData()); / / Get the content information of the hotspot JSONObject content = (JSONObject) markerData.get("content"); / / Get the original hotspot data TStationMarker origan = markerService.getMarkerById(marker.getId()); / / Get the content information of the original hotspot JSONObject origanContent = (JSONObject) origan.getMarkerData().get("content"); / / Get the embedded image information of the original hotspot String imgURL = (String) origanContent.get("img"); / / Determine whether the new hotspot has image and other information if (file != null) { / / The new hotspot contains an image file try { / / The original hotspot has an image if (!imgURL.equals("")) { / / Get the image file of the original hotspot File origanFile = new File(PanoramaConfig.getUploadPath() + imgURL.replace(" / profile / upload", "")); / / Determine whether the image file of the original hotspot exists on the disk if (origanFile.exists()) { / / If it exists, delete it origanFile.delete(); } } / / Get the upload file path String filePath = PanoramaConfig.getUploadPath(); / / Upload and return the new file name String fileName = FileUploadUtils.upload(filePath,file); / / Store the new file name in the content information of the new hotspot content.put("img", fileName); } catch (IOException e) { / / If an error occurs, return the error message return error(); } } else { / / The new hotspot does not contain an image file String img = (String) content.get("img"); if (img.equals("")) { / / Get the image file of the original hotspot File origanFile = new File(PanoramaConfig.getUploadPath() + imgURL.replace(" / profile / upload", "")); / / Check if the image file of the original hotspot exists on the disk if (origanFile.exists()) { / / If it exists, delete it origanFile.delete(); } } } / / Save the new hotspot data param.setMarkerData(markerData); / / Save the new hotspot data to the database to replace the original data Integer res = markerService.updateMarker(param); return success(res); } / ** * @Title deleteMarker * @Description Delete the hotspot * @param marker * @date 2024 / 9 / 20 17:08 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:hotspot:delete')") @DeleteMapping(" / deleteMarker") public AjaxResult deleteMarker(@RequestBody TStationMarkermarker) { / / Delete hotspot icon information Integer res = markerService.deleteMarker(marker); / / Return success message for deletion return success(res); } / ** * @Title getMarkerList * @Description Get hotspots in the scene * @param sceneId * @date 2024 / 9 / 20 13:46 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:hotspot')") @GetMapping("getMarkerList") public AjaxResult getMarkerList(Integer sceneId, @RequestParam(required = false) List <string>markerType) { / / Query all the hotspot icon data set under the scene by the primary key of the scene List <tstationmarker>list = markerService.getMarkerList(sceneId, markerType); / / Return the query result to the front end return success(list); } / ** * @Title getGuideList * @Description Get all navigation nodes * @param stcd * @date 2024 / 9 / 26 9:38 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:hotspot')") @GetMapping("getGuideList") public AjaxResult getGuideList(String stcd) { / / Query the nodes participating in the page navigation by the station code List <tstationmarker>list = markerService.getGuideList(stcd); / / Return the query data to the front end return success(list); } / ** * @Title getScenelist * @Description Query scenarios related to the measuring station * @param stationCode * @date 2024 / 10 / 15 19:10 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:hotspot')") @GetMapping("getScenelist") public AjaxResult getScenelist(String stationCode) { / / Query relevant scenario information by the code of the measuring station List <stationscene>list = markerService.getScenelist(stationCode); / / Return the query result to the front end return success(list); } } / ** * @ClassName: RealDataConroller * @Description: Real-time data * @date: 2024 / 10 / 13 18:22 * / @RestController @ResponseBody @RequestMapping(" / real") @Api("Get real-time rain and water situation data") public class RealDataConroller extends BaseController { @Resource(name = "realDataServiceImpl") RealDataService realDataService; / ** * @Title rain * @Description Query the latest rainfall * @param stcd * @date 2024 / 10 / 14 7:02 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:index')") @GetMapping(" / rain") @ApiOperation(value = "Get rainfall data", tags = "Get rainfall data") @ApiImplicitParam(name = "stcd", value = "Station code", required = true) public R <stpptnr>rain(String stcd) { / / Query the latest rainfall data by the station code StPptnR res = realDataService.rain(stcd); / / Return the queried data to the page return R.ok(res); } / ** * @Title waterlevel * @Description Query the latest water level * @param stcd * @date 2024 / 10 / 14 7:18 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:index')") @GetMapping(" / waterlevel") @ApiOperation(value = "Get water level data", tags = "Get water level data") @ApiImplicitParam(name = "stcd", value = "Station code", required = true) public R <strsvrr>waterlevel(String stcd) { / / Query the latest water level data by station code StRsvrR res = realDataService.waterlevel(stcd); / / Return the queried data to the page return R.ok(res); } / ** * @Title flow * @Description Query the latest flow * @param stcd * @date 2024 / 10 / 14 7:47 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:index')") @GetMapping(" / flow") @ApiOperation(value = "Get flow data", tags = "Get flow data") @ApiImplicitParam(name = "stcd", value = "Station code", required = true) public R <striverr>flow(String stcd) { / / Query the latest flow data by station code StRiverR res = realDataService.flow(stcd); / / Check if the data exists if (res != null) { / / Retrieve the queried flow value Double q = res.getQ(); / / Check if there is a flow value if (q != null) { / / If the flow value exists, format it (retain decimals, add unit) res.setQStr(String.format("%.3g", q) + "m³ / s"); } else { / / If the flow value does not exist, return 0 res.setQStr("0m³ / s"); } } / / Return the data return R.ok(res); } / ** * @Title waterflow * @Description Query the latest water level and flow * @param stcd * @date 2024 / 10 / 25 16:06 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:index')") @GetMapping(" / waterflow") @ApiOperation(value = "Get water level and flow data", tags = "Get water level and flow data") @ApiImplicitParam(name = "stcd", value = "Station code", required = true) public R <striverr>waterflow(String stcd) { / / Obtain the latest water level and flow rate data through the station code StRiverR res = realDataService.waterflow(stcd); / / Return the query result return R.ok(res); } / ** * @Title vapor * @Description Query the latest evaporation * @param stcd * @date 2024 / 10 / 14 8:48 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:index')") @GetMapping(" / vapor") @ApiOperation(value = "Obtain evaporation data", tags = "Obtain evaporation data") @ApiImplicitParam(name = "stcd", value = "Station code", required = true) public R <stdayevr>vapor(String stcd) { / / Obtain the latest evaporation data through the station code StDayevR res = realDataService.vapor(stcd); / / Return the query result return R.ok(res); } / ** * @Title soil * @Description Query the latest soil moisture * @param stcd * @date 2024 / 10 / 14 8:59 * / @PreAuthorize("@shanmai.hasPermi('qjjxxt:index')") @GetMapping(" / soil") @ApiOperation(value = "Obtain soil moisture data", tags = "Obtain soil moisture data") @ApiImplicitParam(name = "stcd", value = "Station code", required = true) public R <stsoilr>soil(String stcd) { / / Query the latest soil moisture data by the station code StSoilR res = realDataService.soil(stcd); / / Return the query result return R.ok(res); } / ** * @Title stinfo * @Description Basic information of the station * @param stcd * @date 2024 / 10 / 14 9:13 * / @Log(title = "Query station information", businessType =BusinessType.OTHER) @PreAuthorize("@shanmai.hasPermi('qjjxxt:index')") @GetMapping(" / stinfo") @ApiOperation(value = "Get station information", tags = "Get station information") @ApiImplicitParam(name = "stcd", value = "Station code", required = true) public R <ststbprpb>stinfo(String stcd) { / / Query relevant information of the measuring station by the code of the measuring station StStbprpB res = realDataService.stinfo(stcd); / / Return the query result return R.ok(res); } }。

[0043] Example 2: On the other hand, the present invention also proposes a data display system 200 based on lightweight digital twins, as Figure 4 shown, including: A data processing unit 201, configured to obtain 720 panoramic photos of the target water conservancy facility, preprocess the 720 panoramic photos to generate target photos, and perform parsing processing on the target photos to generate vectorized data; A digital twin unit 202, configured to generate a lightweight digital twin scene of the target water conservancy facility based on the vectorized data; A display unit 203, configured to obtain real-time monitoring data of the target water conservancy facility, and fuse the real-time monitoring data with the lightweight digital twin scene to display the real-time monitoring data in the lightweight digital twin scene.

[0044] Example 3: Based on the same inventive concept, the present invention also provides a computer device, which includes a processor and a memory. The memory is used to store a computer program, and the computer program includes program instructions. The processor is used to execute the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, and is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function, so as to implement the steps of the method in the above embodiments.

[0045] Example 4: Based on the same inventive concept, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a computer device and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, and this storage space stores the operating system of the terminal. Moreover, one or more instructions suitable for being loaded and executed by the processor are stored in this storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. One or more instructions stored in the computer-readable storage medium can be loaded and executed by the processor to implement the steps of the method in the above embodiments.

[0046] The above is only a preferred embodiment of the present invention and does not impose any formal restrictions on the present invention. Although the present invention has been disclosed above in a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to the above-disclosed technical content to form equivalent embodiments with equivalent changes within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any brief modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.< / ststbprpb> < / stsoilr> < / stdayevr> < / striverr> < / striverr> < / strsvrr> < / stpptnr> < / stationscene> < / tstationmarker> < / tstationmarker> < / string> < / stationscene> < / stationscene> < / stationscene> < / stationscene> < / stationscene> < / extstationpermission> < / stationscene> < / stationinfovo> < / stationinfovo> < / stationinfovo> < / stationinfovo>

Claims

1. A data display method based on lightweight digital twins, characterized in that, Including: Obtain the 720 panoramic photo of the target water conservancy facility, preprocess the 720 panoramic photo to generate a target photo, and perform parsing processing on the target photo to generate vectorized data; Based on the vectorized data, generate a lightweight digital twin scene of the target water conservancy facility; Obtain the real-time monitoring data of the target water conservancy facility, and fuse the real-time monitoring data with the lightweight digital twin scene to display the real-time monitoring data in the lightweight digital twin scene.

2. The data display method according to claim 1, wherein The preprocessing of the 720 panoramic photo includes: Verify the data format, picture ratio, and name of the 720 panoramic photo. If the data format does not meet the preset requirements, convert the data format, modify the picture ratio, and name.

3. The data display method according to claim 2, characterized in that The preset requirements include: The 720 panoramic photo is in JPG format, the picture ratio is 2:1, and the name does not include special characters.

4. The data display method according to claim 1, wherein Through two-dimensional and / or three-dimensional coordinate conversion technology and grid processing technology, parse and convert the target photo into vectorized data with vectorized marks; The vectorized data is twin scene effect data.

5. The data display method according to claim 1, wherein The method further includes: After generating the lightweight digital twin scene of the target water conservancy facility, in the lightweight digital twin scene, according to the display information of the 720 panoramic photo of the target water conservancy facility, mark the hot spots and geographical information of the target water conservancy facility in the lightweight digital twin scene. When displaying the real-time monitoring data, fuse the real-time monitoring data with the geographical information or hot spot location information.

6. The data display method according to claim 1, characterized in that The method further includes: Based on the vectorized data, generate a lightweight digital twin scene in multiple scenarios or a partial lightweight digital twin scene of the target water conservancy facility; When displaying data, switch scenes to display the real-time monitoring data.

7. The data display method according to claim 1, wherein Through an embedding tool, insert picture, video, or text data in an embedded manner into the lightweight digital twin scene for display together with the implementation monitoring data.

8. A data display system based on lightweight digital twins, characterized in that, Including: A data processing unit for obtaining the 720 panoramic photo of the target water conservancy facility, preprocessing the 720 panoramic photo to generate a target photo, and performing parsing processing on the target photo to generate vectorized data; A digital twin unit for generating a lightweight digital twin scene of the target water conservancy facility based on the vectorized data; A display unit for obtaining the real-time monitoring data of the target water conservancy facility, and fusing the real-time monitoring data with the lightweight digital twin scene to display the real-time monitoring data in the lightweight digital twin scene.

9. A computer device, characterized in that, Including: One or more processors; The processor is used to execute one or more programs; When the one or more programs are executed by the one or more processors, the method described in any one of claims 1-7 is implemented.

10. A computer-readable storage medium, characterized in that, There is a computer program stored thereon, and when the computer program is executed, the method described in any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Industrial manufacturing data acquisition system based on VR panoramic displaying

    CN108287533A

  • Water conservancy monitoring method and system based on digital twinning

    CN113139659A

  • Method for building and using digital twin smart fishing port based on oblique photography

    CN117671130A

  • Wharf digital twin construction and display method and device

    CN118502592A

  • Water conservancy digital twin platform double-engine driving method

    CN118709389A