Backup method, device, electronic device and storage medium based on panoramic editor
By detecting and automatically backing up the modified content between the current scene and the initial scene in the Panoramic Editor, the problem of low security for users' active backup is solved, and the security and integrity of data is improved.
Patent Information
- Application Number
- CN202110147114.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-03
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-02-03
AI Technical Summary
In the prior art, the method of active backup of users is not very secure, which can easily lead to data loss.
Automatic backup function is achieved by detecting whether there are any modified content between the current scene and the initial scene in the Panoramic Editor, and automatically adding the modified content to the backup list.
Improve data security, avoid data loss problems caused by crashes or failures, and ensure data integrity when editing scenes.
Smart Images

Figure CN114510370B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of panoramic roaming, and in particular to a backup method, device, electronic device and computer-readable storage medium based on a panoramic editor. Background Art
[0002] With the development of virtual reality technology, virtual reality technology has been widely used in panoramic display. In order to interact with users, hotspots are set at one or several locations in the scene graph, and users can obtain relevant information about the scene by clicking on the hotspots. In addition, custom modules such as navigation maps can be added to the scene graph to further enhance the user experience. When making a scene graph, in order to facilitate modification and data security, a cloud backup method is used to regularly upload files to the cloud server provided by the cloud service provider for backup. However, if cloud backup is used, the developer's help is required when the user wants to modify and restore the file, so most of them currently use the local backup method.
[0003] The local automatic backup method in the prior art mainly backs up the modified scene graph actively by the user clicking the save icon when the user wants to save the backup. However, sometimes the system freezes or becomes unresponsive during drawing. In this case, if the user forgets to back up, data loss will occur, and the data security is not high. Summary of the invention
[0004] The present application provides a backup method, device, electronic device and computer-readable storage medium based on a panoramic editor, aiming to solve the problem that the user's active backup method is not highly secure.
[0005] In a first aspect, the present application provides a backup method based on a panoramic editor, the method comprising:
[0006] When a scene editing instruction for the panorama editor is detected, current data of the current scene and initial data of the initial scene are obtained;
[0007] According to the current data and the initial data, detecting whether there is modified content between the current scene and the initial scene;
[0008] If there is modified content between the initial scene and the current scene, the current data is added to the backup list of the panoramic editor to obtain the current scene backup data.
[0009] In a possible implementation of the present application, detecting whether there is modified content between the initial scene and the current scene according to the current data and the initial data includes:
[0010] Detect whether a tool closing instruction and / or a display interface refresh instruction is received;
[0011] If a tool closing instruction and / or a display interface refresh instruction is received, it is detected whether there is any modified content between the initial scene and the current scene based on the current data and the initial data.
[0012] In a possible implementation of the present application, the initial data includes a first code file, the current data includes a second code file, the second code file is a file obtained after executing the editing instruction on the first code file, and detecting whether there is modified content between the current scene and the initial scene according to the current data and the initial data includes:
[0013] Detecting whether there is a modified code between the first code file and the second code file;
[0014] If there is a modified code between the first code file and the second code file, it is determined that there is a modified content between the initial scene and the current scene.
[0015] In a possible implementation of the present application, the backup list includes target scene backup data, the target scene generated by the target scene backup data includes a first panoramic image, and the method includes:
[0016] receiving a scene restoration instruction, wherein the scene restoration instruction carries a target scene identifier of the first panoramic image;
[0017] Detecting whether there is a second panoramic image containing the target scene identifier from the current scene;
[0018] If it exists, the second panorama is updated with the first panorama; if it does not exist, the first panorama is added to the current scene.
[0019] In a possible implementation of the present application, before receiving the scene recovery instruction, the method further includes:
[0020] The backup scene preview is generated according to the target scene backing up data.
[0021] In a possible implementation of the present application, when a scene editing instruction for a panoramic editor is detected, obtaining current data of a current scene and initial data of an initial scene includes:
[0022] The scene editing instruction is stored in an operation history list, wherein the scene editing instruction includes a deletion instruction.
[0023] In a possible implementation of the present application, the method includes:
[0024] Detecting the amount of scene backup data in the backup list;
[0025] If the number is greater than a preset threshold, the scene backup data with the earliest backup time in the backup list is deleted.
[0026] In a second aspect, the present application provides a backup device based on a panoramic editor, and the backup device based on the panoramic editor includes:
[0027] An acquisition unit, configured to acquire current data of a current scene and initial data of an initial scene when a scene editing instruction of the panorama editor is detected;
[0028] a detection unit, configured to detect whether there is modified content between the current scene and the initial scene according to the current data and the initial data;
[0029] The backup unit is used to add the current data to the backup list of the panoramic editor to generate current scene backup data if there is modified content between the initial scene and the current scene.
[0030] In some embodiments of the present application, the detection unit is also used for:
[0031] Detect whether a tool closing instruction and / or a display interface refresh instruction is received;
[0032] If a tool closing instruction and / or a display interface refresh instruction is received, it is detected whether there is any modified content between the initial scene and the current scene based on the current data and the initial data.
[0033] In some embodiments of the present application, the detection unit is also used for:
[0034] Detecting whether there is a modified code between the first code file and the second code file;
[0035] If there is a modified code between the first code file and the second code file, it is determined that there is a modified content between the initial scene and the current scene.
[0036] In some embodiments of the present application, the panoramic editor-based backup device further includes a recovery unit, and the recovery unit is used to:
[0037] receiving a scene restoration instruction, wherein the scene restoration instruction carries a target scene identifier of the first panoramic image;
[0038] Detecting whether there is a second panoramic image containing the target scene identifier from the current scene;
[0039] If it exists, the second panorama is updated with the first panorama; if it does not exist, the first panorama is added to the current scene.
[0040] In some embodiments of the present application, the panoramic editor-based backup device further includes a preview unit, and the preview unit is used to:
[0041] The backup scene preview is generated according to the target scene backing up data.
[0042] In some embodiments of the present application, the acquisition unit is further configured to:
[0043] The scene editing instruction is stored in an operation history list, wherein the scene editing instruction includes a deletion instruction.
[0044] In some embodiments of the present application, the panoramic editor-based backup device further includes a deleting unit, and the deleting unit is used to:
[0045] Detecting the amount of scene backup data in the backup list;
[0046] If the number is greater than a preset threshold, the scene backup data with the earliest backup time in the backup list is deleted.
[0047] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the processor executes the steps of any panoramic editor-based backup method provided in the present application.
[0048] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is loaded by a processor to execute the steps in the backup method based on a panoramic editor.
[0049] The backup method based on the panoramic editor provided by the present application includes: when a scene editing instruction for the panoramic editor is detected, the current data of the current scene and the initial data of the initial scene are obtained; based on the current data and the initial data, whether there is a modified content between the current scene and the initial scene is detected; if there is a modified content between the initial scene and the current scene, the current data is added to the backup list of the panoramic editor to obtain the backup data of the current scene. It can be seen that the present application can determine whether the initial scene has changed after receiving the scene editing instruction and performing the corresponding editing process by detecting whether there is a modified content between the current scene and the initial scene, and if there is a change, the current scene is backed up. Therefore, the present application can avoid the problem of losing the edited current scene if it is not manually saved when the panoramic editor freezes or does not respond, thereby improving the security of data when editing scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 It is a schematic diagram of an application scenario of a backup method based on a panoramic editor provided in an embodiment of the present application;
[0052] Figure 2 It is a flowchart of a backup method based on a panoramic editor provided in an embodiment of the present application;
[0053] Figure 3 It is a schematic diagram of an embodiment flow chart provided in the embodiments of the present application;
[0054] Figure 4 It is a schematic diagram of an embodiment flow chart provided in the embodiments of the present application;
[0055] Figure 5 It is a schematic diagram of the structure of an embodiment of a backup device based on a panoramic editor provided in an embodiment of the present application;
[0056] Figure 6 It is a schematic diagram of the structure of an embodiment of an electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0058] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0059] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can also be implemented without using these specific details. In other examples, the known process will not be elaborated in detail to avoid unnecessary details that make the description of the present application embodiment obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in accordance with the embodiments of the present application.
[0060] The embodiments of the present application provide a backup method, device, electronic device and computer-readable storage medium based on a panoramic editor. The backup device based on a panoramic editor can be integrated in an electronic device, which can be a server or a terminal.
[0061] First of all, before introducing the embodiments of the present application, the relevant content about the application background of the embodiments of the present application is introduced.
[0062] Generally speaking, panoramic tour includes two modes: 3D tour and 2D tour.
[0063] 3D roaming refers to the 3D panoramic roaming scene created by 3D modeling software such as 3DMAX, and then the visual effect of the panoramic roaming scene is generated on the 3D model by mapping and other methods. For example, a 3D model of a model house can be created through 3DMAX, and the 3D model of the model house includes 3D models such as furniture and walls, and then corresponding pictures or textures are pasted on these 3D models, such as pasting a picture of a chair or wooden texture on a chair, to form a 3D roaming scene of the model house.
[0064] 2D roaming refers to a panoramic roaming scene formed by splicing or associating multiple panoramas through hot spots. Users can move the perspective from one panorama to another by selecting hot spots to create a roaming effect. The panoramic roaming in this application refers to the 2D roaming described here.
[0065] In the embodiment provided in the present application, the panoramic roaming scene is generated according to the background data, so the user's editing of the panoramic roaming scene is achieved by editing the background data of the panoramic roaming scene.
[0066] The background data of the panoramic roaming scene may include multiple files. For example, in some embodiments, the background data of the panoramic roaming scene may include code files, image files, video files, etc. The panoramic editor may splice or associate image files and video files with each other according to the codes of different functions in the code files to generate a panoramic roaming scene.
[0067] Each panoramic image in the panoramic roaming scene includes a scene identifier. The scene identifier is used to distinguish different panoramas and can be an identification code. For example, when the panoramic roaming scene is a model house, the panorama containing the living room and the panorama containing the bedroom respectively contain different scene identifiers. Furthermore, if two panoramic roaming scenes contain the same panorama, the scene identifiers of the same panorama in the two panoramic roaming scenes are the same. For example, when the panoramic roaming scenes are model house A and model house B, the scene identifiers of the same panorama containing the living room are the same.
[0068] Furthermore, the data related to the panorama in the background data of the panoramic roaming scene will also contain the corresponding scene identifier. Specifically, assuming that panorama A contains scene identifier A, if the scene backup data contains the image source file of panorama A, other panorama source files, hotspot files, and code files for stitching and associating panorama A, other panoramas, and hotspots. Then the image source file of panorama A and the code related to panorama A in the code file will contain scene identifier A.
[0069] The executor of the panoramic editor-based backup method of the embodiment of the present application may be the panoramic editor-based backup device provided in the embodiment of the present application, or a server device, a physical host, or a user equipment (UE) or other different types of electronic devices that integrate the panoramic editor-based backup device. The panoramic editor-based backup device may be implemented in hardware or software, and the UE may specifically be a terminal device such as a smart phone, a tablet computer, a laptop computer, a PDA, a desktop computer, or a personal digital assistant (PDA).
[0070] The electronic device may work in a single operation mode or in a device cluster mode.
[0071] See also Figure 1 , Figure 1 1 is a schematic diagram of a scenario of a backup system based on a panoramic editor provided in an embodiment of the present application. The backup system based on a panoramic editor may include an electronic device 100, in which a backup device based on a panoramic editor is integrated.
[0072] In addition, if Figure 1 As shown, the backup system based on the panoramic editor may further include a memory 200 for storing data, such as image data and video data.
[0073] It should be noted that Figure 1The scenario diagram of the panoramic editor-based backup system shown is merely an example. The panoramic editor-based backup system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that, with the evolution of the panoramic editor-based backup system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.
[0074] Next, we will begin to introduce the backup method based on the panoramic editor provided in the embodiment of the present application. In the embodiment of the present application, an electronic device is used as the execution subject. For the sake of simplicity and ease of description, the execution subject will be omitted in the subsequent method embodiments.
[0075] Reference Figure 2 , Figure 2 This is a flowchart of a backup method based on a panoramic editor provided by an embodiment of the present application. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that here. The backup method based on a panoramic editor includes steps 10 to 30, wherein:
[0076] 10. When a scene editing instruction for the panoramic editor is detected, the current data of the current scene and the initial data of the initial scene are obtained.
[0077] Among them, the panoramic editor is a tool for making and modifying panoramic roaming scenes. It can be used to make panoramic roaming scenes such as virtual house viewing scenes and community scenes in the real estate industry, and can also be used to make panoramic roaming scenes such as virtual travel scenes in the tourism industry. Users can visually edit panoramic roaming scenes on the panoramic editor. For example, users can add display text to the panoramic roaming scene on the panoramic editor, and then select the display text and drag the mouse to move the display text in the panoramic roaming scene. For another example, users can delete hotspots on the panoramic roaming scene on the panoramic editor.
[0078] The panoramic editor is developed based on the panoramic roaming production engine and can exist in various forms. Specifically, the panoramic editor can be an installable software editing tool or an editing tool that does not need to be installed. For example, the panoramic editor can be an Html file. After the user opens the Html file, an editing tool based on the browser software is formed. The panoramic roaming scene is displayed on the display interface of the browser software, and the user can edit the panoramic roaming scene on the display interface. For another example, the panoramic editor can be software installed on a computer or other device after opening the installation package. The panoramic roaming scene is displayed on the display interface of the software. The user can open the software and edit the panoramic roaming scene through the software.
[0079] The scene editing instruction is an editing instruction issued by the user on the panoramic editor to the panoramic roaming scene, and may include. Specifically, the scene editing instruction may be an editing instruction issued by the user to the panoramic roaming scene by clicking a function button of the panoramic editor, or an editing instruction issued by the user to the panoramic roaming scene by inputting a code. For example, the user may delete a hotspot in the panoramic roaming scene by clicking a delete button of the panoramic editor with a mouse, or may delete a hotspot in the panoramic roaming scene by inputting a delete function code in the background compiler of the panoramic editor.
[0080] Since the user's editing of the panoramic roaming scene in the embodiment of the present application is realized by editing the background data of the panoramic roaming scene, the panoramic editor will correspondingly edit the background data pointed to by the scene editing instruction after the user issues the scene editing instruction. For example, after the user adds a hotspot to the panoramic roaming scene, the background data such as the code file will be modified accordingly to associate the hotspot with the panoramic roaming scene. It should be noted that there are other ways to issue scene editing instructions, and the examples here are only exemplary.
[0081] Among them, the initial scene refers to the unedited scene, the current scene refers to the edited scene, and the specific editing operation is determined according to the scene editing instruction. Relatively speaking, the initial data refers to the background data of the initial scene, and the current data refers to the background data of the current scene. Take the editing of the model house as an example: after the user opens the panoramic editor, the model house displayed on the display interface of the panoramic editor is the initial scene. Subsequently, the user issues a scene editing instruction to delete a hotspot in the model house by clicking or other means, and the model house with the hotspot deleted is the current scene.
[0082] Furthermore, the scene editing instructions include modification instructions that cause the scene content of the panoramic roaming scene to change and non-modification instructions that do not cause the scene content of the panoramic roaming scene to change. The scene content can specifically refer to the editable content in the panoramic roaming scene, such as the rendering theme, hotspots, and navigation map of the scene. The above-mentioned modification instructions include deletion instructions, addition instructions, etc., and users can issue modification instructions to achieve functions such as adding hotspots and deleting hotspots to change the scene content. On the other hand, the above-mentioned non-modification instructions include instructions such as rotation viewing angle instructions that will not change the scene content after being issued by the user.
[0083] 20. Detect whether there is any modified content between the current scene and the initial scene based on the current data and the initial data.
[0084] Among them, detecting whether there is modified content in this step refers to detecting whether there is a difference between the scene content of the current scene and the scene content of the initial scene. For example, there are 10 hotspots in the initial scene, and there are only 9 hotspots in the edited current scene, then the scene content of the current scene is different from the scene content of the initial scene. For another example, the initial scene uses a red rendering theme, and the edited current scene uses a gray rendering theme, then the scene content of the current scene is different from the scene content of the initial scene. The examples here are only illustrative examples, and the modified content can also include different texts of hotspots, etc., and are not limited to the examples here.
[0085] Specifically, there can be multiple detection methods. In some embodiments, it is possible to determine whether there is modified content between the current scene and the initial scene by detecting whether the current data and the initial data are different. Taking the initial data including code files and picture files as an example, it is assumed that the initial data includes code file A, picture file B, and picture file C. After the panoramic editor deletes picture file C according to the scene editing instruction issued by the user, and edits code file A to generate code file D, the current data includes code file D and picture file B. Therefore, the current data is different from the initial data, and there is modified content between the current scene and the initial scene.
[0086] In some embodiments, only specific data in the initial data may be detected to detect whether there is modified content between the current scene and the initial scene, as described in detail below.
[0087] It should be noted that if the scene editing instruction issued by the user is the non-modification instruction described above, for example, when the user issues a scene editing instruction to rotate the current viewing angle 90° clockwise, the panoramic editor will not modify the initial data. Therefore, the current data is the same as the initial data, and there is no modification between the current scene and the initial scene.
[0088] 30. If there are modified contents between the initial scene and the current scene, the current data is added to the backup list of the panoramic editor to obtain the backup data of the current scene.
[0089] The backup list is used to store the scene backup data of the backup scene. The backup list may contain multiple scene backup data, each scene backup data represents a backup scene.
[0090] The current scene backup data refers to the background data stored in the backup list when the backup scene is the current scene. The current scene backup data may include code files, image files, and video files. For example, when the current scene is a model house, the current scene backup data is the background data of the model house, which may include living room images, bedroom images, and code files for splicing and associating living room images with bedroom images.
[0091] In summary, the backup method based on the panoramic editor provided by the present application includes: when a scene editing instruction for the panoramic editor is detected, the current data of the current scene and the initial data of the initial scene are obtained; based on the current data and the initial data, whether there is a modified content between the current scene and the initial scene is detected; if there is a modified content between the initial scene and the current scene, the current data is added to the backup list of the panoramic editor to obtain the backup data of the current scene. It can be seen that the present application can determine whether the initial scene has changed after receiving the scene editing instruction and performing the corresponding editing processing by detecting whether there is a modified content between the current scene and the initial scene, and if there is a change, the current scene is backed up. Therefore, the present application can avoid the problem of losing the edited current scene if it is not manually saved when the panoramic editor freezes or does not respond, thereby improving the security of data when editing scenes.
[0092] If every time a scene editing instruction is detected, it is checked whether there are any changes between the current scene and the initial scene, and a back-up is performed if there are any changes, a large amount of memory of the computer and other devices will be occupied due to multiple detections, resulting in an unsmooth editing process, and the redundant scene backup data generated in the backup list will occupy the storage space of the device.
[0093] refer to Figure 3 In order to solve the problem that the editing process is not smooth and the redundant scene backup data occupies a large amount of device storage space, in some actual scenarios, it is possible to detect whether there is modified content between the current scene and the initial scene only when certain specific instructions are detected, such as a tool closing instruction and / or a display interface refresh instruction. Specifically, the following steps 21-22 may be included:
[0094] 21. Check whether a tool closing command and / or a display interface refresh command is received.
[0095] The tool close command is used to close the panoramic editor. After receiving the tool close command, the panoramic editor is closed.
[0096] The tool closing command can be issued by the user or by a device such as a computer. For example, the user can actively issue a tool closing command by clicking the close button of the panorama editor to close the panorama editor. For another example, when the panorama editor is unresponsive or crashes, the device can automatically issue a tool closing command to close the panorama editor.
[0097] Among them, the display interface refresh instruction is used to refresh the display interface of the panoramic editor. After receiving the display interface refresh instruction, the display interface is refreshed.
[0098] The display interface refresh command can be actively issued by the user or automatically issued by a computer or other device. For example, after the device detects that the panorama editor edits the initial scene according to the scene editing command, it will automatically issue a display interface refresh command to update the initial scene to the current scene. For example, the user can click the refresh function button of the panorama editor or actively refresh the display interface by other means.
[0099] In an embodiment of the present application, in addition to the tool closing instruction and display interface refresh instruction described herein, other specific instructions can also be detected. Take the detection of interface switching instructions as an example for illustration. Interface switching instructions refer to instructions for switching different applications. For example, when using a computer, a user can press the Alt key and the Tab key on the keyboard at the same time to issue an interface switching instruction to switch the software interface displayed on the screen to another software interface. Assuming that the panoramic editor is an Html file, the device can detect the interface switching instruction when the user presses the Alt key and the Tab key on the keyboard at the same time to switch the browser software interface that opens the Html file to other software interfaces.
[0100] It should be noted that specific instructions only include instructions that may cause data loss after being issued. The reason for detecting specific instructions in this step is that specific instructions may cause data loss, so it is necessary to determine whether the current scene needs to be backed up when the specific instruction is detected. For example, after the interface switching instruction used as an example in this step is issued, the panoramic editor interface displayed on the screen will switch to another software interface. Usually, when switching software interfaces, software crashes are prone to occur, resulting in data loss. Therefore, it is necessary to determine whether the current scene displayed in the display interface of the panoramic editor needs to be backed up.
[0101] 22. If a tool closing instruction and / or a display interface refresh instruction is received, whether there is any modified content between the initial scene and the current scene is detected based on the current data and the initial data.
[0102] If a tool closing instruction and / or a display interface refresh instruction is received, that is, if the panorama editor is closed or the display interface is refreshed, then it is detected whether there is a modified content between the initial scene and the current scene. The specific method of detecting whether there is a modified content between the initial scene and the current scene is as described in step 20, which will not be repeated here.
[0103] The panoramic editor-based backup method provided in the embodiment of the present application can limit the timing of detecting whether there is any modified content between the current scene and the initial scene, so as to reduce the detection frequency and reduce the scene backup data, thereby solving the problem of an unsmooth editing process and redundant scene backup data occupying a large amount of device storage space.
[0104] It should be noted that the tool closing instructions and / or display interface refresh instructions described in steps 21 to 22 are only examples and do not constitute a limitation to the present application.
[0105] Before continuing to describe the embodiments of the present application, we first describe a panoramic editor editing logic that can improve editing efficiency. The background data of a panoramic roaming scene usually includes code files and scene source files. According to the codes of different functions in the code files, the panoramic editor can splice or associate scene source files including pictures and videos with each other to generate a panoramic roaming scene. Therefore, when editing a panoramic roaming scene, you can only edit the code files in the background data without editing scene source files such as pictures and videos to change the final generated panoramic roaming scene, saving the time and process of editing scene source files. It should be noted that at this time, the background data of all panoramic roaming scenes can include the same scene source file.
[0106] Under the premise of adopting this editing logic, only the difference between the code files of the initial data and the current data can be detected to further improve the backup efficiency, which can specifically include the following steps 31-32:
[0107] 31. Detect whether there is a modified code between the first code file and the second code file.
[0108] The first code file refers to the code file included in the initial data, the second code file refers to the code file included in the current data, and the second code file is a code file obtained by editing the first code file according to the scene editing instruction. It should be noted that the initial data and the current data may also include the same scene source file.
[0109] Among them, the modification code in this step refers to the code contained in the second code file that is different from the first code file. Specifically, the modification code can realize a variety of functions according to the scene editing instructions. The following example specifically illustrates a function realized by the modification code. Take the scene in which the user is editing the model house as an example. After the user opens the panoramic editor, the model house displayed on the display interface of the panoramic editor is the initial scene generated by the first code file and the scene source file. Assuming that the user issues a scene editing instruction for adding a picture hotspot, the panoramic editor can add a code for associating the picture hotspot to the initial scene in the first code file according to the scene editing instruction to form a second code file. The above-mentioned "code for associating the picture hotspot to the initial scene" is the modification code, which can realize the function of adding associated picture hotspots to the initial scene.
[0110] It should be noted that if the scene editing instruction is the non-modification instruction described above, for example, when the user issues a scene editing instruction to rotate the current viewing angle 40° clockwise, the panoramic editor will not modify the first code file. Therefore, the code in the first code file is the same as the code in the second code file, and there is no modification code.
[0111] 32. If there is a modified code between the first code file and the second code file, it is determined that there is a modified content between the initial scene and the current scene.
[0112] Specifically, if there is a modification code between the first code file and the second code file after the first code file is edited, it means that the splicing or association relationship between the scene source files has changed, so it can be determined that the scene content has changed between the initial scene and the current scene, and there is a modification content between the initial scene and the current scene. For example, if the second code file adds a function code for changing the color of the hotspot compared to the first code file, it can be determined that the hotspot in the current scene has changed color compared to the hotspot in the initial scene, the scene content has changed between the initial scene and the current scene, and there is a modification content between the initial scene and the current scene.
[0113] refer to Figure 4 , the embodiment of the present application also provides a method for restoring the current scene based on the panoramic editor with the backed-up target scene, and the target scene is generated according to the target scene backup data in the backup list. There are two specific recovery methods: (1) Restoring the entire target scene. (2) Restoring a specific panorama in the target scene. The relationship between the scene and the panorama has been described in the previous text and will not be repeated here. For the recovery method (1), it can be implemented by overwriting the current data of the current scene with the target scene backup data of the target scene in the backup list. For the recovery method (2), it can specifically include the following steps 41-43:
[0114] 41. Receive a scene restoration instruction, wherein the scene restoration instruction carries a target scene identifier of the first panoramic image.
[0115] The first panoramic image refers to the target panoramic image that the user wants to restore in the target scene. Taking the scene where the user is editing a model house as an example, if the user wants to restore the living room in the model house, the first panoramic image refers to the panoramic image including the living room.
[0116] Furthermore, the first panoramic image may also include scene content added by the user, including rendering themes and hot spots.
[0117] The target scene identifier refers to the scene identifier included in the first panoramic image. The scene identifier has been explained above and will not be repeated here.
[0118] Among them, the scene restoration instruction refers to an editing instruction for restoring the first panoramic image. The method of issuing the scene restoration instruction can refer to the method of issuing in step 10, which will not be repeated here. Specifically, the scene restoration instruction also carries a target scene identifier, and the device can select the first panoramic image according to the target scene identifier carried in the scene restoration instruction.
[0119] 42. Detect whether there is a second panoramic image containing the target scene identifier from the current scene.
[0120] Among them, the second panorama and the first panorama both contain the target scene identifier, so the second panorama and the first panorama are the same panorama in the current scene and the target scene respectively. Take the scene where the user is editing the model room A as an example, the edited model room A is the current scene, the model room B is the target scene and contains the living room panorama, the user issues a scene recovery command carrying the living room panorama scene identifier, then the first panorama is the living room panorama, if the model room A also contains the living room panorama, then the current data contains the second panorama.
[0121] Furthermore, the second panoramic image may also include scene content added by the user, including rendering themes and hot spots.
[0122] It should be noted that the scene content on the second panorama and the first panorama does not change the target scene identification. That is, assuming that the second panorama contains several hotspots and the first panorama does not contain hotspots, as long as the second panorama and the first panorama both contain the target scene identification, the second panorama and the first panorama are also considered to be the same panorama.
[0123] In some embodiments, the method of detecting the second panoramic image includes:
[0124] (1) According to the target scene identifier, whether the function codes related to the second panoramic image in the target code file included in the second code file and the target scene backup data are the same, the function code including the code for adding the second panoramic image to the current scene. Assuming that the target scene identifier is set to "living room", the function code containing "living room" is detected in the second code file.
[0125] (2) According to the target scene identifier, detect whether there is an image source file of the second panoramic image in the current data. Assuming that the target scene identifier is set to "living room", detect the image source file containing "living room".
[0126] By simultaneously executing (1) and (2) in this step, it is possible to detect whether the current data contains the image source file of the second panoramic image, and it is possible to determine whether the second panoramic image is added to the current scene.
[0127] In some embodiments, in order to improve the efficiency of editing, the logic for editing the panoramic roaming scene adopts the editing logic described above. At this time, since the background data of the panoramic roaming scene other than the code file will not be edited, the method for detecting the second panoramic image can only include (1) in step 42.
[0128] In some embodiments, (1) in step 42 may be further optimized to improve the accuracy of detection, specifically including:
[0129] A. Detect whether the function codes related to the second panorama in the second code file and the target code file are the same, the function codes include codes for adding rendering themes and associated hotspots to the second panorama, and codes for adding the second panorama to the current scene. It should be noted that the functions implemented by the codes here are only examples and cannot be a limitation to the embodiments of the present application.
[0130] By executing step A in this step, it is possible to detect whether the second panorama is added to the current scene, and determine whether the scene content in the second panorama is consistent with the first scene. Figure 1 It improves the precision and accuracy of detection.
[0131] 43. If it exists, update the second panorama with the first panorama; if it does not exist, add the first panorama to the current scene.
[0132] Wherein, updating the second panoramic image with the first panoramic image refers to updating the current data with the target scene backup data. Specifically, the following respectively explains two situations of adopting the editing logic described above and not adopting the editing logic described above.
[0133] 1. The situation where the editing logic described above is adopted:
[0134] Because the editing logic defines: when editing a panoramic roaming scene, the background data of the panoramic roaming scene other than the code file will not be edited. Therefore, when it is detected that there is a second panoramic image, the code in the target code file involving the second panoramic image can be used to overwrite the code in the second code file involving the second panoramic image. When it is detected that there is no second panoramic image, the code in the target code file involving the second panoramic image is added to the second code file. The recovery method provided in this step 1 only needs to recover the code file, and the recovery speed is fast and efficient.
[0135] 2. The situation where the editing logic described above is not adopted:
[0136] In addition to adopting the method in step 1 of step 43, it is also necessary to add the image source file of the second panoramic image in the target scene backup data to the current data.
[0137] In some actual scenarios, in order to confirm whether the target scene generated by the target scene backup data is the scene you want to restore, you can also generate a backup scene preview before restoring. The backup scene preview can be a preview link generated by the panoramic editor, taking Html as an example, and the target scene is displayed in the link. The backup scene preview can also be generated directly in the display interface of the panoramic editor. For example, when the user is editing the scene of model room A, if he wants to preview the scene of the backed up model room B, he can issue a preview instruction carrying the background data of model room B. The method of sending the preview instruction is the same as in step 10, which will not be repeated here. After detecting the preview instruction, the panoramic editor can generate an Html link based on the browser software, and the scene of model room B is displayed in the link. The panoramic editor can also generate the scene of model room B in the display interface.
[0138] In some embodiments, in addition to generating a backup scene preview by issuing a preview instruction, a backup scene preview may also be automatically generated after obtaining the current scene backup data.
[0139] Furthermore, the generated backup scene preview can simultaneously display the current scene and the target scene, making it convenient for users to compare and confirm whether to restore the target scene. In the example of the user editing Model Room A in this step, if the panoramic editor generates an Html link based on the browser software, the scenes of Model Room A and Model Room B can be displayed simultaneously in the link, and the proportion of Model Room A and Model Room B in the browser interface can be adjusted as needed. If the backup scene preview is generated directly in the display interface of the panoramic editor, the scenes of Model Room A and Model Room B can be displayed simultaneously in the display interface, and the proportion of Model Room A and Model Room B in the display interface can be adjusted as needed.
[0140] Furthermore, the backup scene preview also includes preset custom functions. Custom functions can include switching rendering themes, switching hotspot colors, etc. Users can preview the effect of the target scene after changing the rendering theme or hotspot color to facilitate confirmation of whether to restore the target scene. In the example of the user editing the model room A in this step, the user can add rendering themes of various colors to the preview interface after generating the preview interface of the model room B.
[0141] In some actual scenarios, in order to review the user's operations when a problem occurs when editing a panoramic roaming scene, the scene editing instruction can be stored in an operation history list each time a scene editing instruction is detected. When a problem occurs when editing a panoramic roaming scene, such as display errors or missing scene content, the user or the developer of the panoramic editor can call up the operation history list to locate the instruction that caused the problem.
[0142] Furthermore, in order to reduce the storage space occupied by the operation history list, only the specific scene editing instructions that may cause problems can be stored. For example, when a delete instruction is detected, the delete instruction can be stored in the operation history list.
[0143] By storing scene editing instructions in the operation history list, developers and users can rely on the operation history list to locate instructions that may cause problems when problems occur in the panoramic roaming scene, thereby reducing the occurrence of problems.
[0144] In some actual scenarios, in order to reduce the storage space occupied by the scene backup data in the backup list, the scene backup data in the backup list may be deleted according to a specific rule, for example, the scene backup data with the earliest backup time in the backup list may be deleted. In this case, the following steps 71-72 may be specifically included:
[0145] 71. Detect the amount of scene backup data in the backup list.
[0146] The number of scene backup data in the backup list represents the number of backed-up panoramic roaming scenes. For example, if the user backs up 10 panoramic roaming scenes, there are 10 scene backup data in the backup list.
[0147] Specifically, the scene backup data may include code files, picture files, video files, etc. The panoramic editor may splice or associate the picture files and video files, etc. with each other according to the codes of different functions in the code files to generate a backup panoramic roaming scene.
[0148] 72. If the number is greater than a preset threshold, deleting the scene backup data with the earliest backup time in the backup list.
[0149] The preset threshold can be adjusted according to the storage space. If the storage space is small, the preset threshold can be set to a smaller value. If the storage space is large, the preset threshold can be set to a larger value. For example, if the computer storage space used by the user is small, you can ask the developer of the panorama editor to set the preset threshold to 10. When the number of scene backup data in the backup list reaches 11, the computer automatically deletes the scene backup data with the earliest backup time.
[0150] In some embodiments, other specific rules may also be adopted. For example, when the number is greater than a preset threshold, the scene backup data with the least number of restorations in the backup list may be deleted to filter out the commonly used scene backup data for backup.
[0151] By deleting the scene backup data that meets specific rules (the earliest backup time in the embodiment of the present application) in the backup list, redundant scene backup data can be deleted and the storage space occupied by the scene backup data can be reduced.
[0152] In order to better implement the backup method based on the panoramic editor in the embodiment of the present application, on the basis of the backup method based on the panoramic editor, the embodiment of the present application also provides a backup device based on the panoramic editor, such as Figure 5 FIG. 1 is a schematic diagram of a structure of a backup device based on a panoramic editor according to an embodiment of the present application. The backup device 500 based on a panoramic editor includes:
[0153] The acquisition unit 501 is used to acquire the current data of the current scene and the initial data of the initial scene when a scene editing instruction of the panorama editor is detected;
[0154] A detection unit 502, configured to detect whether there is any modified content between the current scene and the initial scene according to the current data and the initial data;
[0155] The backup unit 503 is configured to add the current data to the backup list of the panoramic editor to generate backup data of the current scene if there is any modification between the initial scene and the current scene.
[0156] In some embodiments of the present application, the detection unit 502 is further used to:
[0157] Detect whether a tool closing instruction and / or a display interface refresh instruction is received;
[0158] If a tool closing instruction and / or a display interface refresh instruction is received, it is detected whether there is any modified content between the initial scene and the current scene based on the current data and the initial data.
[0159] In some embodiments of the present application, the detection unit 502 is further used to:
[0160] Detecting whether there is a modified code between the first code file and the second code file;
[0161] If there is a modified code between the first code file and the second code file, it is determined that there is a modified content between the initial scene and the current scene.
[0162] In some embodiments of the present application, the panoramic editor-based backup device 500 further includes a recovery unit 504, and the recovery unit 504 is used to:
[0163] receiving a scene restoration instruction, wherein the scene restoration instruction carries a target scene identifier of the first panoramic image;
[0164] Detecting whether there is a second panoramic image containing the target scene identifier from the current scene;
[0165] If it exists, the second panorama is updated with the first panorama; if it does not exist, the first panorama is added to the current scene.
[0166] In some embodiments of the present application, the panoramic editor-based backup device 500 further includes a preview unit 505, and the preview unit 505 is used to:
[0167] The backup scene preview is generated according to the target scene backing up data.
[0168] In some embodiments of the present application, the acquisition unit 501 is further configured to:
[0169] The scene editing instruction is stored in an operation history list, wherein the scene editing instruction includes a deletion instruction.
[0170] In some embodiments of the present application, the panoramic editor-based backup device 500 further includes a deletion unit 506, and the deletion unit 506 is used to:
[0171] Detecting the amount of scene backup data in the backup list;
[0172] If the number is greater than a preset threshold, the scene backup data with the earliest backup time in the backup list is deleted.
[0173] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0174] Since the backup device based on the panoramic editor can execute the application as follows Figures 1 to 4 Corresponding to the steps in the backup method based on the panoramic editor in any embodiment, therefore, the present application can be implemented as follows Figures 1 to 4 For the beneficial effects that can be achieved by the backup method based on the panoramic editor in any embodiment, please refer to the previous description in detail, which will not be repeated here.
[0175] In addition, in order to better implement the backup method based on the panoramic editor in the embodiment of the present application, on the basis of the backup method based on the panoramic editor, the embodiment of the present application also provides an electronic device, referring to Figure 6 , Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present application is shown. Specifically, the electronic device provided by the embodiment of the present application includes a processor 601, and the processor 601 is used to execute a computer program stored in a memory 602 to implement the following Figures 1 to 4 Corresponding to the steps of the backup method based on the panoramic editor in any embodiment; or, the processor 601 is used to execute the computer program stored in the memory 602 to implement the following Figure 5 The functions of each unit in the corresponding embodiment.
[0176] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 602, and executed by the processor 601 to complete the embodiment of the present application. One or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0177] The electronic device may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will appreciate that the illustration is merely an example of an electronic device and does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the illustration, or a combination of certain components, or different components. For example, the electronic device may also include an input / output device, a network access device, a bus, etc., and the processor 601, the memory 602, the input / output device, and the network access device are connected via a bus.
[0178] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0179] The memory 602 can be used to store computer programs and / or modules. The processor 601 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 602 and calling the data stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device (such as audio data, video data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0180] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the backup device, electronic device and its corresponding units based on the panoramic editor described above can refer to the following. Figures 1 to 4 The description of the backup method based on the panoramic editor in any embodiment will not be repeated here.
[0181] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0182] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figures 1 to 4 For the steps in the backup method based on the panoramic editor in any embodiment, the specific operations can be referred to as follows: Figures 1 to 4 The description of the backup method based on the panoramic editor in any embodiment will not be repeated here.
[0183] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0184] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figures 1 to 4 Corresponding to the steps in the backup method based on the panoramic editor in any embodiment, therefore, the present application can be implemented as follows Figures 1 to 4For the beneficial effects that can be achieved by the backup method based on the panoramic editor in any embodiment, please refer to the previous description in detail, which will not be repeated here.
[0185] The above is a detailed introduction to a backup method, device, electronic device and computer-readable storage medium based on a panoramic editor provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A backup method based on a panoramic editor, characterized in that: include: When a scene editing instruction for the panorama editor is detected, current data of the current scene and initial data of the initial scene are obtained; According to the current data and the initial data, detecting whether there is modified content between the current scene and the initial scene; If there is a modification between the initial scene and the current scene, the current data is added to the backup list of the panoramic editor to obtain current scene backup data, wherein the backup list includes target scene backup data, and the target scene generated by the target scene backup data includes the first panoramic image; receiving a scene restoration instruction, wherein the scene restoration instruction carries a target scene identifier of the first panoramic image; Detecting whether there is a second panoramic image containing the target scene identifier from the current scene; If it exists, the second panorama is updated with the first panorama; if it does not exist, the first panorama is added to the current scene.
2. The backup method based on the panoramic editor according to claim 1, characterized in that: The detecting, according to the current data and the initial data, whether there is modified content between the initial scene and the current scene comprises: Detect whether a tool closing instruction and / or a display interface refresh instruction is received; If a tool closing instruction and / or a display interface refresh instruction is received, it is detected whether there is any modified content between the initial scene and the current scene based on the current data and the initial data.
3. The backup method based on the panoramic editor according to claim 1, characterized in that: The initial data includes a first code file, the current data includes a second code file, the second code file is a file obtained after executing the editing instruction on the first code file, and the detecting whether there is a modified content between the current scene and the initial scene according to the current data and the initial data includes: Detecting whether there is a modified code between the first code file and the second code file; If there is a modified code between the first code file and the second code file, it is determined that there is a modified content between the initial scene and the current scene.
4. The backup method based on the panoramic editor according to claim 1, characterized in that: The receiving scene recovery instruction further includes: The backup scene preview is generated according to the target scene backing up data.
5. The backup method based on the panoramic editor according to claim 1, characterized in that: When a scene editing instruction for the panorama editor is detected, current data of the current scene and initial data of the initial scene are obtained, including: The scene editing instruction is stored in an operation history list, wherein the scene editing instruction includes a deletion instruction.
6. The backup method based on the panoramic editor according to claim 1, characterized in that: The method comprises: Detecting the amount of scene backup data in the backup list; If the number is greater than a preset threshold, the scene backup data with the earliest backup time in the backup list is deleted.
7. A backup device based on a panoramic editor, characterized in that: The device comprises: An acquisition unit, configured to acquire current data of a current scene and initial data of an initial scene when a scene editing instruction of the panorama editor is detected; a detection unit, configured to detect whether there is modified content between the current scene and the initial scene according to the current data and the initial data; A backup unit, configured to add the current data to a backup list of the panoramic editor to generate current scene backup data if there is a modification between the initial scene and the current scene, wherein the backup list includes target scene backup data, and the target scene generated by the target scene backup data includes a first panoramic image; A restoration unit, configured to receive a scene restoration instruction, wherein the scene restoration instruction carries a target scene identifier of the first panoramic image; Detecting whether there is a second panoramic image containing the target scene identifier from the current scene; If it exists, the second panorama is updated with the first panorama; if it does not exist, the first panorama is added to the current scene.
8. An electronic device, characterized in that: The system comprises a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the backup method based on the panoramic editor as claimed in any one of claims 1 to 6 is executed.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the backup method based on a panoramic editor as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for recovering files closed abnormally
CN102073554A