Information synchronization method and device, electronic equipment and storage medium

By monitoring the transformation of 3D virtual scenes and obtaining corresponding perspective differences, rotating elements on the 2D map, it solves the problem that users have difficulty perceiving the size and depth of the virtual space, and improves the interactive experience of 3D virtual exhibition halls.

CN119516153APending Publication Date: 2025-02-25CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411492494.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the 3D virtual showroom, it is difficult for users to perceive the size, depth and distance of the virtual space, resulting in poor user experience of moving and roaming in the 3D exhibitionroom.

Method used

By monitoring the transformation of the three-dimensional 3D virtual scene in the panoramic image, the first horizontal view angle after transformation and the second horizontal view angle before transformation are obtained, and the target elements on the two-dimensional 2D map are rotated according to the angle difference between the two, the combination of the 3D scene and the 2D map is achieved.

Benefits of technology

This method allows users to better perceive changes in the virtual space and improves users' interactive experience in the 3D virtual showroom.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516153A_ABST
    Figure CN119516153A_ABST
Patent Text Reader

Abstract

The invention provides an information synchronization method and device, electronic equipment and a storage medium, and relates to the technical field of virtual reality. The method comprises the following steps: monitoring the transformation of a three-dimensional (3D) virtual scene in a panorama; in response to monitoring that the 3D virtual scene is changed, obtaining a first horizontal view angle after the 3D virtual scene is changed; obtaining a second horizontal view angle before the virtual scene is changed from the cache; and according to the first horizontal view angle and the second horizontal view angle, rotating a target element on a two-dimensional (2D) map associated with the 3D virtual scene. Therefore, according to the scheme, the first horizontal view angle after the virtual scene is transformed and the second horizontal view angle before the virtual scene is transformed are determined, and the target element in the 2D map is rotated according to the first horizontal view angle and the second horizontal view angle, so that view angle change of a user can be better positioned, view angle deviation is avoided, and user experience is improved. Therefore, the user can better perceive the virtual scene, and the interaction experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of virtual reality technology, and in particular to an information synchronization method, device, electronic device and storage medium. Background Art

[0002] With the development of the Internet and three-dimensional (3D) technology, traditional exhibition methods are being upgraded and changed. 3D virtual exhibition halls are one of the evolutionary trends of traditional exhibition methods. In the virtual digital space built by 3D modeling, virtual panoramic images, etc., new forms and experiences have emerged in the interaction between people and exhibition halls and exhibits.

[0003] In a 3D exhibition hall, due to the limitations of interactive devices and existing technologies, users cannot perceive the size, depth and distance of the virtual space very well, making it difficult for users to move and roam in the 3D exhibition hall, which greatly reduces the user's interactive experience. Summary of the invention

[0004] The present disclosure provides an information synchronization method, device, electronic device and storage medium, which are used to solve the problem that positioning and interaction cannot be performed from the user's 3D perspective.

[0005] To this end, an object of the present disclosure is to provide an information synchronization method.

[0006] The second objective of the present disclosure is to provide an information synchronization device.

[0007] A third objective of the present disclosure is to provide an electronic device.

[0008] A fourth object of the present disclosure is to provide a non-transitory computer-readable storage medium.

[0009] A fifth object of the present disclosure is to provide a computer program product.

[0010] To achieve the above-mentioned purpose, the first aspect of the present disclosure proposes an information synchronization method, including: monitoring the transformation of a three-dimensional 3D virtual scene in a panoramic image; in response to monitoring the transformation of the 3D virtual scene, obtaining a first horizontal viewing angle of the 3D virtual scene after the transformation; obtaining a second horizontal viewing angle of the virtual scene before the transformation from a cache; and rotating a target element on a two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle.

[0011] According to one embodiment of the present disclosure, the transformation of a three-dimensional 3D virtual scene in a panoramic image is monitored, including: obtaining the triggering conditions of each of a plurality of candidate events that trigger scene transformation; calling a view monitoring function through a specified interface, and having the view monitoring function monitor the triggering conditions of the plurality of candidate events; and determining a change in the 3D virtual scene in response to the monitored status information satisfying the triggering conditions of one of the candidate events.

[0012] According to one embodiment of the present disclosure, in response to monitoring the change of the 3D virtual scene, obtaining the first horizontal viewing angle of the 3D virtual scene after the change, includes: obtaining a first timestamp of the change of the 3D virtual scene; obtaining a second timestamp of the second horizontal viewing angle; determining a time interval of scene change based on the first timestamp and the second timestamp; in response to the time interval reaching a set time interval, triggering the acquisition of the first horizontal viewing angle of the 3D virtual scene after the change.

[0013] According to one embodiment of the present disclosure, the method further includes: starting a timer to count from the moment the second horizontal viewing angle is acquired; in response to the 3D virtual scene changing, acquiring the first horizontal viewing angle after the 3D virtual scene changes, including: acquiring the timing value of the timer when the 3D virtual scene changes; in response to the timing value reaching a set time interval, triggering the acquisition of the first horizontal viewing angle after the 3D virtual scene changes.

[0014] According to an embodiment of the present disclosure, the method further includes: after acquiring the first horizontal viewing angle, resetting the timing value of the timer to zero, and restarting the timer to start timing.

[0015] According to one embodiment of the present disclosure, the rotating operation on the target element on the two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle includes: obtaining the angle difference between the first horizontal viewing angle and the second horizontal viewing angle; setting Cascading Style Sheets CSS variables according to the angle difference, and performing CSS style operations on the target element according to the set CSS variables to rotate the target element.

[0016] According to one embodiment of the present disclosure, the Cascading Style Sheet (CSS) variables are set according to the angle difference, and a CSS style operation is performed on the target element according to the set CSS variables to rotate the target element, including: defining the angle difference as a rotation variable of the CSS based on a CSS custom property setting command; and executing a rotation function of a CSS transformation property to reference the CSS rotation variable to control the target element to rotate around a center point according to the CSS rotation variable.

[0017] According to one embodiment of the present disclosure, before performing a rotation operation on a target element on a two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle, the method also includes: determining a target scene area corresponding to the scene transformation; determining a virtual element within the target scene area, and obtaining the 3D coordinates of the virtual element; converting the 3D coordinates of the virtual element into 2D coordinates, and determining the position of the target element on the 2D map according to the 2D coordinates.

[0018] According to one embodiment of the present disclosure, after the target element on the two-dimensional 2D map associated with the 3D virtual scene is rotated, it also includes: clearing the second horizontal perspective from the cache, and updating the horizontal perspective before the virtual scene is transformed to the first horizontal perspective and caching it.

[0019] To achieve the above-mentioned purpose, the second aspect of the present disclosure proposes an information synchronization device, including: a monitoring module, used to monitor the transformation of a three-dimensional 3D virtual scene in a panoramic image; a first acquisition module, used to acquire a first horizontal viewing angle of the 3D virtual scene after the transformation in response to monitoring the transformation of the 3D virtual scene; a second acquisition module, used to acquire a second horizontal viewing angle of the virtual scene before the transformation from a cache; and a rotation module, used to rotate a target element on a two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle.

[0020] According to one embodiment of the present disclosure, the monitoring module is further used to: obtain the triggering conditions of each of multiple candidate events that trigger scene change; call the view monitoring function through a specified interface, and the view monitoring function monitors the triggering conditions of the multiple candidate events; in response to the monitored status information satisfying the triggering conditions of one of the candidate events, determine the change of the 3D virtual scene.

[0021] According to one embodiment of the present disclosure, the first acquisition module is further used to: obtain a first timestamp when the 3D virtual scene changes; obtain a second timestamp of the second horizontal viewing angle; determine a time interval for scene change based on the first timestamp and the second timestamp; in response to the time interval reaching a set time interval, trigger acquisition of the first horizontal viewing angle after the 3D virtual scene changes.

[0022] According to one embodiment of the present disclosure, the device also includes: starting a timer to count from the moment the second horizontal viewing angle is acquired; the first acquisition module is also used to: acquire the timing value of the timer when the 3D virtual scene changes; in response to the timing value reaching a set time interval, trigger the acquisition of the first horizontal viewing angle after the 3D virtual scene is transformed.

[0023] According to an embodiment of the present disclosure, the first acquisition module is further used to: after acquiring the first horizontal viewing angle, reset the timing value of the timer to zero, and restart the timer to start timing.

[0024] According to one embodiment of the present disclosure, the rotation module is also used to: obtain the angle difference between the first horizontal viewing angle and the second horizontal viewing angle; set the cascading style sheet CSS variables according to the angle difference, and perform CSS style operations on the target element according to the set CSS variables to rotate the target element.

[0025] According to one embodiment of the present disclosure, the rotation module is further used to: define the angle difference as a rotation variable of the CSS based on a CSS custom property setting command; and execute a rotation function of the CSS transformation property to reference the rotation variable of the CSS to control the target element to rotate around a center point according to the rotation variable of the CSS.

[0026] According to one embodiment of the present disclosure, the rotation module is also used to: determine the target scene area corresponding to the scene transformation; determine the virtual elements within the target scene area and obtain the 3D coordinates of the virtual elements; convert the 3D coordinates of the virtual elements into 2D coordinates, and determine the position of the target element on the 2D map based on the 2D coordinates.

[0027] According to an embodiment of the present disclosure, the rotation module is further used to: clear the second horizontal viewing angle from the cache, and update the horizontal viewing angle before the virtual scene is transformed to the first horizontal viewing angle and cache it.

[0028] To achieve the above-mentioned purpose, the third aspect embodiment of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the information synchronization method as described in the first aspect embodiment of the present disclosure.

[0029] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to implement the information synchronization method as described in the first aspect embodiment of the present disclosure.

[0030] To achieve the above-mentioned purpose, the fifth aspect of the present disclosure proposes a computer program product, including a computer program, which, when executed by a processor, is used to implement the information synchronization method as described in the first aspect of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0032] Figure 1 An example flow chart of an information synchronization method provided in an embodiment of the present disclosure;

[0033] Figure 2 A flowchart of another information synchronization method provided by an embodiment of the present disclosure;

[0034] Figure 3 A flowchart of another information synchronization method provided by an embodiment of the present disclosure;

[0035] Figure 4 A flowchart of another information synchronization method provided by an embodiment of the present disclosure;

[0036] Figure 5 An example diagram of a process for rotating a target element provided in an embodiment of the present disclosure;

[0037] Figure 6 A structural example diagram of an information synchronization device provided in an embodiment of the present disclosure;

[0038] Figure 7 This is a diagram showing an example structure of an electronic device provided in an embodiment of the present disclosure.

[0039] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0040] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0041] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0042] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the provisions of relevant laws and regulations.

[0043] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.

[0044] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the relevant content of the solution.

[0045] Figure 1 This is an example flow chart of the information synchronization method provided by the embodiment of the present disclosure. Figure 1 As shown, the information synchronization method includes:

[0046] S101, monitoring the transformation of the three-dimensional 3D virtual scene in the panoramic image.

[0047] It should be noted that the execution subject of the information synchronization method provided in the embodiment of the present disclosure is an electronic device, and the electronic device can be a terminal device. Optionally, the terminal device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and the non-mobile electronic device can be a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc. The embodiment of the present disclosure is not specifically limited.

[0048] In some implementations, the user's interactive operation can be monitored, and based on the interactive operation, it is determined whether the three-dimensional (3D) virtual scene in the panorama has changed. The interactive operation can be a user dragging a mouse or sliding a device to view views from different angles. That is, when the user is monitored to perform an interactive operation, it is determined that the 3D virtual scene in the panorama has changed.

[0049] Optionally, the user's perspective can also be tracked, and if the user's perspective changes, it is determined that the 3D virtual scene in the panorama has changed. For example, if the user uses a head-mounted virtual device, it can be determined based on the device's own sensors whether the user is turning. If the user turns, it is determined that the user's perspective has changed, that is, the 3D virtual scene in the panorama has changed.

[0050] S102: In response to monitoring that a 3D virtual scene changes, obtaining a first horizontal viewing angle after the 3D virtual scene changes.

[0051] In some implementations, when a change in the 3D virtual scene is monitored, the first horizontal viewing angle can be obtained based on the time interval between before and after the scene change. When the time interval reaches a set time interval, the first horizontal viewing angle after the change can be obtained from the software or platform where the panoramic image is located. For example, a storage location where the platform stores data can be determined, and when the 3D virtual scene changes, the first horizontal viewing angle can be obtained by accessing the location.

[0052] For example, if the set time interval is 500ms, if the time interval before and after the scene change is 300ms and does not reach 500ms, the operation of obtaining the first horizontal viewing angle will not be performed. Only when the time interval reaches 500ms, the operation of obtaining the first horizontal viewing angle will be performed.

[0053] S103, obtaining from the cache a second horizontal viewing angle before the virtual scene is transformed.

[0054] Optionally, the second horizontal viewing angle before the virtual scene transformation can be read from the cache of the software or platform where the panorama is located. The second horizontal viewing angle in the cache is obtained by determining the storage location of the virtual scene viewing angle information in the cache and accessing the cache according to the storage location.

[0055] S104: performing a rotation operation on a target element on a two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle.

[0056] In some implementations, in order to improve device performance and operating speed, small perspective rotations can be screened, that is, the absolute value of the angle difference between the first horizontal perspective and the second horizontal perspective can be determined. If the absolute value is less than an angle threshold, the perspective rotation is determined to be a small perspective rotation, and the transformation of the 3D virtual scene in the panoramic image is re-monitored to obtain the first horizontal perspective until the absolute value of the angle difference between the first horizontal perspective and the second horizontal perspective is greater than or equal to the angle threshold. Based on the angle difference, the target element on the two-dimensional 2D map associated with the 3D virtual scene can be rotated.

[0057] In some implementations, the 3D angle difference may be converted into a two-dimensional (2D) angle difference, and the coordinates of the target element on the 2D map may be determined. The rotated coordinates may be obtained by rotating the coordinates by the 2D angle difference, and the target element may be moved to the position of the rotated coordinates to implement the rotation operation on the target element. Alternatively, the rotated coordinates of the target element may be determined based on a rotation matrix.

[0058] In some implementations, the target element on the 2D map may be rotated based on Cascading Style Sheets (CSS). The target element may be rotated based on the angle difference between the first horizontal viewing angle and the second horizontal viewing angle according to a rotation function of CSS.

[0059] In the information synchronization method provided by the embodiment of the present disclosure, when the 3D virtual scene in the panoramic image is monitored to change, the first horizontal viewing angle after the virtual scene is changed is determined, and the second horizontal viewing angle before the virtual scene is changed is obtained. Further, according to the first horizontal viewing angle and the second horizontal viewing angle, the target element in the 2D map is rotated, and the combination of the 3D scene and the 2D map is realized, which can better locate the user's perspective change and avoid perspective deviation, so that the user can better perceive the virtual scene and improve the user's interactive experience.

[0060] Figure 2 This is an example flow chart of the information synchronization method provided by the embodiment of the present disclosure. Figure 2 As shown, the information synchronization method includes:

[0061] S201, obtaining trigger conditions of each of a plurality of candidate events for triggering scene change.

[0062] S202: calling a view monitoring function through a designated interface, and having the view monitoring function monitor triggering conditions of a plurality of candidate events.

[0063] S203: In response to the monitored state information satisfying a trigger condition of one of the candidate events, determining a change in the 3D virtual scene.

[0064] In some implementations, by determining the trigger conditions of each of the multiple candidate events and monitoring the trigger conditions of each candidate event, it is possible to determine whether the 3D virtual scene has changed. For example, the trigger condition of the candidate event may be a mouse click, movement of a head-mounted device, a change in the focus of a human pupil, etc.

[0065] Optionally, the trigger condition can be monitored by calling the view monitoring function to obtain the state information of the trigger condition. When the state information indicates the same trigger condition as any of the multiple candidate events, that is, the trigger condition of one of the candidate events is met, the change of the 3D virtual scene can be determined.

[0066] For example, the view monitoring function may monitor the click status of the mouse. If a mouse click is detected, it is determined that a trigger condition is satisfied. Alternatively, the user's pupils may be tracked. If it is determined that the focus of the user's pupils changes, it is determined that a trigger condition is satisfied.

[0067] S204 , in response to monitoring that the 3D virtual scene changes, obtaining a first horizontal viewing angle after the 3D virtual scene changes.

[0068] S205, obtaining from the cache a second horizontal viewing angle before the virtual scene is transformed.

[0069] S206: Perform a rotation operation on a target element on a two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle.

[0070] The relevant contents of step S204 to step S206 can be found in the above embodiment and will not be repeated here.

[0071] In the information synchronization method provided by the embodiment of the present disclosure, by monitoring the trigger conditions of multiple candidate events, and when the trigger condition of one of the candidate events is met, it is determined that the 3D virtual scene in the panoramic image has changed, and then the first horizontal viewing angle after the virtual scene is changed can be determined, and the second horizontal viewing angle before the virtual scene is changed can be obtained. Further, according to the first horizontal viewing angle and the second horizontal viewing angle, the target element in the 2D map is rotated, and the combination of the 3D scene and the 2D map is realized, which can better locate the user's perspective change and avoid perspective deviation, so that the user can better perceive the virtual scene and improve the user's interactive experience.

[0072] Figure 3 This is an example flow chart of the information synchronization method provided by the embodiment of the present disclosure. Figure 3 As shown, the information synchronization method includes:

[0073] S301, monitoring the transformation of the three-dimensional 3D virtual scene in the panoramic image.

[0074] The relevant contents of step S301 can be found in the above embodiment and will not be described again here.

[0075] S302: In response to monitoring that a 3D virtual scene changes, obtaining a first timestamp of the 3D virtual scene changing.

[0076] In some implementations, when it is determined that the 3D virtual scene has changed, the first timestamp of the 3D virtual scene changing can be determined based on the software or platform where the 3D virtual scene is located. For example, a storage location where the platform stores data is determined, and when the 3D virtual scene changes, the first timestamp can be obtained by accessing the location.

[0077] S303: Obtain a second timestamp of a second horizontal viewing angle.

[0078] Optionally, the cache may be accessed to obtain a timestamp when the second horizontal viewing angle is stored as the second timestamp.

[0079] S304: Determine a time interval of scene change according to the first timestamp and the second timestamp.

[0080] S305 , in response to the time interval reaching the set time interval, triggering acquisition of a first horizontal viewing angle after the 3D virtual scene is transformed.

[0081] In some implementations, the difference between the first timestamp and the second timestamp is calculated and used as the time interval of the scene change. In order to reduce the amount of data, invalid virtual scene changes can be screened based on the time interval and the set time interval.

[0082] That is, when the time interval reaches the set time interval, it is determined that the current 3D virtual scene transformation is valid, and then the first horizontal viewing angle can be obtained from the storage location of the data.

[0083] In some implementations, in order to improve device performance and operating speed, the triggering times can be controlled based on a timer without affecting the viewing angle effect. That is, the timer can be started from the moment the second horizontal viewing angle is acquired.

[0084] Furthermore, the timing value of the timer is obtained when the 3D virtual scene changes, and in response to the timing value reaching the set time interval, the first horizontal viewing angle after the 3D virtual scene changes is triggered to obtain, and then after obtaining the first horizontal viewing angle, the timing value of the timer is reset to zero, and the timer is restarted to avoid timing errors of the timer and ensure the accuracy of subsequent timing.

[0085] S306, obtaining from the cache the second horizontal viewing angle before the virtual scene is transformed.

[0086] S307: performing a rotation operation on a target element on a two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle.

[0087] The relevant contents of step S306 to step S307 can be found in the above embodiment and will not be repeated here.

[0088] In the information synchronization method provided by the embodiment of the present disclosure, when the 3D virtual scene in the panoramic image is monitored to change, it is determined whether the time interval between the scene change and the scene change reaches the set time interval, and when the set time interval is reached, the first horizontal viewing angle after the virtual scene change is obtained to reduce the amount of data processed, and then the second horizontal viewing angle before the virtual scene change is obtained. Further, according to the first horizontal viewing angle and the second horizontal viewing angle, the target element in the 2D map is rotated, and the combination of the 3D scene and the 2D map is realized, which can better locate the user's perspective change and avoid perspective deviation, so that the user can better perceive the virtual scene and improve the user's interactive experience.

[0089] Figure 4 This is an example flow chart of the information synchronization method provided by the embodiment of the present disclosure. Figure 4 As shown, the information synchronization method includes:

[0090] S401, monitoring the transformation of the three-dimensional 3D virtual scene in the panoramic image.

[0091] S402: In response to monitoring that a 3D virtual scene changes, obtaining a first horizontal viewing angle after the 3D virtual scene changes.

[0092] S403, obtaining from the cache the second horizontal viewing angle before the virtual scene is transformed.

[0093] The relevant contents of step S401 to step S403 can be found in the above embodiment and will not be repeated here.

[0094] S404: Obtain an angle difference between the first horizontal viewing angle and the second horizontal viewing angle.

[0095] Optionally, the difference between the first horizontal viewing angle and the second horizontal viewing angle is calculated, and the absolute value of the difference is obtained, and the absolute value of the difference is used as the angle difference between the first horizontal viewing angle and the second horizontal viewing angle.

[0096] S405: Setting Cascading Style Sheet (CSS) variables according to the angle difference, and performing CSS style operations on the target element according to the set CSS variables to rotate the target element.

[0097] In some implementations, before performing the rotation operation, data can be screened based on the angle difference to ignore small viewing angle rotations, and in response to the angle difference being greater than an angle difference threshold, the angle difference is set as a variable of a Cascading Style Sheets (CSS), and a CSS style operation is performed on the target element based on the CSS variable to rotate the target element, so that the rotation operation has high flexibility, thereby achieving a dynamic rotation effect of the target element. In other words, the CSS variable can rotate the target element by adjusting the style of the target element.

[0098] In some implementations, the angle difference can be defined as a CSS rotation variable based on a CSS custom property setting command, and the rotation function of the CSS transformation property can be executed to reference the CSS rotation variable to control the target element to rotate around the center point according to the CSS rotation variable.

[0099] In some implementations, before rotating the target element, the position of the target element in the 2D map can be pre-determined, so as to directly adjust the style of the target element based on the position to achieve the rotation operation. By determining the target scene area corresponding to the scene transformation in the 3D virtual scene, the virtual element in the target scene area is determined, and the 3D coordinates of the virtual element are obtained.

[0100] Further, the 3D coordinates of the virtual element are converted to 2D coordinates, and the position of the target element on the 2D map is determined according to the 2D coordinates. In other words, the virtual element corresponding to the target element in the target scene area can be determined, and the 3D coordinates of the virtual element are converted to 2D coordinates to determine the position of the target element in the map according to the 2D coordinates.

[0101] In some implementations, by reducing cached data, the smoothness of perspective switching can be improved, thereby improving the overall interactive experience. The second horizontal perspective can be cleared from the cache, and the horizontal perspective before the virtual scene is transformed can be updated to the first horizontal perspective and cached, so that after the next virtual scene transformation, the second horizontal perspective before the transformation obtained from the cache is the first horizontal perspective after the previous transformation.

[0102] In the information synchronization method provided by the embodiment of the present disclosure, when the 3D virtual scene in the panoramic image is monitored to change, the first horizontal viewing angle after the virtual scene is changed is determined, and the second horizontal viewing angle before the virtual scene is changed is obtained. Further, according to the first horizontal viewing angle and the second horizontal viewing angle, the angle difference is determined, and the angle difference is used as a variable of CSS to rotate the target element in the 2D map, so as to realize the combination of the 3D scene and the 2D map, and the user's perspective change can be better located to avoid perspective deviation, so that the user can better perceive the virtual scene, and the user's interactive experience is improved.

[0103] Figure 5 The flowchart of rotating the target element is shown. When the user rotates the viewing angle, it is determined that the 3D virtual scene changes, and the first horizontal viewing angle after the scene changes and the second horizontal viewing angle before the scene changes are obtained. Further, according to the angle difference between the first horizontal viewing angle and the second horizontal viewing angle, it is determined whether the change in the horizontal viewing angle is a slight change in the viewing angle. If it is a slight change in the viewing angle, no processing is performed; if it is not a slight change in the viewing angle, the angle at which the target element in the 2D map needs to be rotated can be calculated. By setting the angle difference as a CSS variable and performing CSS style operations on the target element based on the CSS variable, that is, the CSS variable adjusts the style of the target element to rotate the target element.

[0104] Corresponding to the information synchronization methods provided in the above-mentioned embodiments, an embodiment of the present disclosure also provides an information synchronization device. Since the information synchronization device provided in the embodiment of the present disclosure corresponds to the information synchronization methods provided in the above-mentioned embodiments, the implementation methods of the above-mentioned information synchronization methods are also applicable to the information synchronization device provided in the embodiment of the present disclosure and will not be described in detail in the following embodiments.

[0105] Figure 6 This is a diagram showing an example of the structure of an information synchronization device provided by an embodiment of the present disclosure. Figure 6As shown, the information synchronization device includes: a monitoring module 601, a first acquisition module 602, a second acquisition module 603 and a rotation module 604.

[0106] A monitoring module 601 is used to monitor the transformation of the three-dimensional 3D virtual scene in the panoramic image;

[0107] A first acquisition module 602 is used for acquiring a first horizontal viewing angle of the 3D virtual scene after the change in response to monitoring the change of the 3D virtual scene;

[0108] A second acquisition module 603, used to acquire from the cache the second horizontal viewing angle before the virtual scene is transformed;

[0109] The rotation module 604 is used to rotate the target element on the two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle.

[0110] According to one embodiment of the present disclosure, the monitoring module 601 is further used to: obtain the triggering conditions of each of multiple candidate events that trigger scene change; call the view monitoring function through a specified interface, and the view monitoring function monitors the triggering conditions of the multiple candidate events; in response to the monitored status information satisfying the triggering conditions of one of the candidate events, determine the change of the 3D virtual scene.

[0111] According to one embodiment of the present disclosure, the first acquisition module 602 is further used to: obtain a first timestamp when the 3D virtual scene changes; obtain a second timestamp of the second horizontal viewing angle; determine a time interval for scene change based on the first timestamp and the second timestamp; in response to the time interval reaching a set time interval, trigger acquisition of the first horizontal viewing angle after the 3D virtual scene changes.

[0112] According to one embodiment of the present disclosure, the device also includes: starting a timer to count from the moment the second horizontal perspective is acquired; the first acquisition module 602 is also used to: acquire the timing value of the timer when the 3D virtual scene changes; in response to the timing value reaching a set time interval, trigger the acquisition of the first horizontal perspective after the 3D virtual scene is transformed.

[0113] According to an embodiment of the present disclosure, the first acquisition module 602 is further used to: after acquiring the first horizontal viewing angle, reset the timing value of the timer to zero, and restart the timer to start timing.

[0114] According to one embodiment of the present disclosure, the rotation module 604 is further used to: obtain the angle difference between the first horizontal viewing angle and the second horizontal viewing angle; set the cascading style sheet CSS variables according to the angle difference, and perform CSS style operations on the target element according to the set CSS variables to rotate the target element.

[0115] According to one embodiment of the present disclosure, the rotation module 604 is further used to: define the angle difference as a rotation variable of the CSS based on a CSS custom property setting command; and execute a rotation function of the CSS transformation property to reference the rotation variable of the CSS to control the target element to rotate around a center point according to the rotation variable of the CSS.

[0116] According to one embodiment of the present disclosure, the rotation module 604 is also used to: determine the target scene area corresponding to the scene transformation; determine the virtual elements within the target scene area and obtain the 3D coordinates of the virtual elements; convert the 3D coordinates of the virtual elements into 2D coordinates, and determine the position of the target element on the 2D map based on the 2D coordinates.

[0117] According to an embodiment of the present disclosure, the rotation module 604 is further configured to: clear the second horizontal viewing angle from the cache, and update the horizontal viewing angle before the virtual scene is transformed to the first horizontal viewing angle and cache it.

[0118] In the information synchronization device provided by the embodiment of the present disclosure, when the 3D virtual scene in the panoramic image is monitored to change, the first horizontal viewing angle after the virtual scene is changed is determined, and the second horizontal viewing angle before the virtual scene is changed is obtained. Further, according to the first horizontal viewing angle and the second horizontal viewing angle, the target element in the 2D map is rotated, and the combination of the 3D scene and the 2D map is realized, which can better locate the user's perspective change and avoid perspective deviation, so that the user can better perceive the virtual scene, and improve the user's interactive experience.

[0119] Figure 7 This is a diagram showing an example of the structure of an electronic device provided in an embodiment of the present disclosure. Figure 7 As shown, the electronic device 700 may include: a transceiver 701 , a processor 702 , and a memory 703 .

[0120] The processor 702 executes the computer execution instructions stored in the memory, so that the processor 702 executes the scheme in the above embodiment. The processor 702 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0121] The memory 703 is connected to the processor 702 via a system bus and completes communication between them. The memory 703 is used to store computer program instructions.

[0122] The transceiver 701 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.

[0123] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory.

[0124] The electronic device provided in the embodiments of the present disclosure may be the terminal device of the above embodiments.

[0125] The disclosed embodiment also provides a chip for executing instructions, which is used to execute the technical solution of the information synchronization method in the above embodiment.

[0126] The embodiment of the present disclosure further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the information synchronization method of the above embodiment.

[0127] The embodiments of the present disclosure also provide a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, the technical solution of the information synchronization method in the above embodiments can be implemented.

[0128] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0129] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An information synchronization method, characterized in that: include: Monitor the transformation of 3D virtual scenes in the panorama; In response to monitoring that the 3D virtual scene changes, acquiring a first horizontal viewing angle of the 3D virtual scene after the change; Acquire from the cache a second horizontal viewing angle before the virtual scene is transformed; A rotation operation is performed on a target element on a two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle.

2. The method according to claim 1, characterized in that The monitoring of the transformation of the three-dimensional 3D virtual scene in the panoramic image includes: Obtaining trigger conditions of each of multiple candidate events that trigger scene change; Calling a view monitoring function through a specified interface, and having the view monitoring function monitor the triggering conditions of the multiple candidate events; In response to the monitored state information satisfying a trigger condition of one of the candidate events, it is determined that the 3D virtual scene has changed.

3. The method according to claim 1, characterized in that In response to monitoring that the 3D virtual scene changes, acquiring a first horizontal viewing angle of the 3D virtual scene after the change, includes: Obtaining a first timestamp when the 3D virtual scene changes; Acquire a second timestamp of the second horizontal viewing angle; Determining a time interval of scene change according to the first timestamp and the second timestamp; In response to the time interval reaching the set time interval, triggering acquisition of the first horizontal viewing angle of the transformed 3D virtual scene.

4. The method according to claim 1, characterized in that: The method further comprises: Starting from the moment when the second horizontal viewing angle is acquired, starting a timer to count; In response to the 3D virtual scene being transformed, obtaining a first horizontal viewing angle of the transformed 3D virtual scene includes: Obtaining the timing value of the timer when the 3D virtual scene changes; In response to the timing value reaching a set time interval, the acquisition of a first horizontal viewing angle of the transformed 3D virtual scene is triggered.

5. The method according to claim 4, characterized in that The method further comprises: After acquiring the first horizontal viewing angle, the timing value of the timer is reset to zero, and the timer is restarted to start timing.

6. The method according to any one of claims 1 to 5, characterized in that The rotating operation on the target element on the two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle includes: Acquire an angle difference between the first horizontal viewing angle and the second horizontal viewing angle; A Cascading Style Sheet (CSS) variable is set according to the angle difference, and a CSS style operation is performed on the target element according to the set CSS variable to rotate the target element.

7. The method according to claim 6, characterized in that The step of setting a Cascading Style Sheet (CSS) variable according to the angle difference, and performing a CSS style operation on the target element according to the set CSS variable to rotate the target element includes: Based on a CSS custom property setting command, define the angle difference as a rotation variable of the CSS; The rotation function of the CSS conversion attribute is executed to reference the rotation variable of the CSS to control the target element to rotate around the center point according to the rotation variable of the CSS.

8. The method according to any one of claims 1 to 5, characterized in that Before rotating the target element on the two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle, the method further includes: Determine the target scene area corresponding to the scene change; Determine a virtual element within the target scene area, and obtain the 3D coordinates of the virtual element; The 3D coordinates of the virtual element are converted into 2D coordinates, and the position of the target element on the 2D map is determined according to the 2D coordinates.

9. The method according to any one of claims 1 to 5, characterized in that After rotating the target element on the two-dimensional 2D map associated with the 3D virtual scene, the method further includes: The second horizontal viewing angle is cleared from the cache, and the horizontal viewing angle before the virtual scene is transformed is updated to the first horizontal viewing angle and cached.

10. An information synchronization device, characterized in that: include: A monitoring module, used to monitor the transformation of the three-dimensional 3D virtual scene in the panoramic image; A first acquisition module, configured to acquire a first horizontal viewing angle of the 3D virtual scene after the change in response to monitoring the change of the 3D virtual scene; A second acquisition module, used for acquiring from a cache a second horizontal viewing angle before the virtual scene is transformed; A rotation module is used to rotate a target element on a two-dimensional 2D map associated with the 3D virtual scene according to the first horizontal viewing angle and the second horizontal viewing angle.

11. The device according to claim 10, characterized in that The monitoring module is also used for: Obtaining trigger conditions of each of multiple candidate events that trigger scene change; Calling a view monitoring function through a specified interface, and having the view monitoring function monitor the triggering conditions of the multiple candidate events; In response to the monitored state information satisfying a trigger condition of one of the candidate events, it is determined that the 3D virtual scene has changed.

12. The device according to claim 10, characterized in that The first acquisition module is further used for: Obtaining a first timestamp when the 3D virtual scene changes; Acquire a second timestamp of the second horizontal viewing angle; Determining a time interval of scene change according to the first timestamp and the second timestamp; In response to the time interval reaching the set time interval, triggering acquisition of the first horizontal viewing angle of the transformed 3D virtual scene.

13. The device according to claim 10, characterized in that The device also includes: Starting from the moment when the second horizontal viewing angle is acquired, starting a timer to count; The first acquisition module is further used for: Obtaining the timing value of the timer when the 3D virtual scene changes; In response to the timing value reaching a set time interval, the acquisition of a first horizontal viewing angle of the transformed 3D virtual scene is triggered.

14. The device according to claim 13, characterized in that The first acquisition module is further used for: After acquiring the first horizontal viewing angle, the timing value of the timer is reset to zero, and the timer is restarted to start timing.

15. The device according to any one of claims 10 to 14, characterized in that The rotating module is also used for: Acquire an angle difference between the first horizontal viewing angle and the second horizontal viewing angle; A Cascading Style Sheet (CSS) variable is set according to the angle difference, and a CSS style operation is performed on the target element according to the set CSS variable to rotate the target element.

16. The device according to claim 15, characterized in that The rotating module is also used for: Based on a CSS custom property setting command, define the angle difference as a rotation variable of the CSS; The rotation function of the CSS conversion attribute is executed to reference the rotation variable of the CSS to control the target element to rotate around the center point according to the rotation variable of the CSS.

17. The device according to any one of claims 10 to 14, characterized in that The rotating module is also used for: Determine the target scene area corresponding to the scene change; Determine a virtual element within the target scene area, and obtain the 3D coordinates of the virtual element; The 3D coordinates of the virtual element are converted into 2D coordinates, and the position of the target element on the 2D map is determined according to the 2D coordinates.

18. The device according to any one of claims 10 to 14, characterized in that The rotating module is also used for: The second horizontal viewing angle is cleared from the cache, and the horizontal viewing angle before the virtual scene is transformed is updated to the first horizontal viewing angle and cached.

19. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 9.

20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.

21. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 9 when being executed by a processor.