Window adjustment method and device, electronic equipment, storage medium and program product
By displaying candidate proportions in an extended reality scene and determining the target proportion using the movement of interactive objects, the problem of complex window proportion adjustment in existing technologies is solved, enabling fast and easy window adjustment and free size adjustment.
Patent Information
- Application Number
- CN202310513088.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2024-11-08
AI Technical Summary
When adjusting the window scale in extended reality scenarios, existing technologies require complex operations and are difficult to adjust quickly and easily.
A window adjustment method is provided, which involves displaying a content window and a control window in an extended reality scene, wherein the control window includes candidate scales, determining a target scale from the candidate scales by moving interactive objects, and adjusting the content window using the target scale.
It enables quick and easy adjustment of window proportions in extended real-world scenes, simplifying operations, reducing adjustment complexity, and supporting free adjustment of window size.
Smart Images

Figure CN118915930A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a window adjustment method, device, electronic device, storage medium, and program product. Background Art
[0002] Extended Reality (XR) can use computers and other devices to create a virtual world with realistic three-dimensional visual, tactile, olfactory and other sensory experiences, namely an extended reality scene, so that people in the extended reality scene can feel immersive.
[0003] Currently, content can be displayed in the form of a window in an extended reality scene constructed by extended reality. However, when a user wants to adjust the proportion of the window, a relatively complicated operation is usually required, and it is difficult to adjust the window proportion quickly and easily. Summary of the Invention
[0004] Embodiments of the present application provide a window adjustment method, apparatus, electronic device, storage medium, and program product, which can quickly and easily adjust the proportion of windows in an augmented reality scene.
[0005] An embodiment of the present application provides a window adjustment method, the method comprising:
[0006] Displaying a content window and a control window in an extended reality scene, wherein the control window includes a candidate ratio corresponding to the content window;
[0007] determining a target scale from the candidate scales based on movement of an interactive object, the interactive object being used to interact with the augmented reality scene;
[0008] The content window is adjusted to a target window using the target ratio.
[0009] The embodiment of the present application further provides a window adjustment device, which includes:
[0010] A display module, configured to display a content window and a control window in an extended reality scene, wherein the control window includes candidate ratios corresponding to the content window;
[0011] a determination module, configured to determine a target ratio from the candidate ratios based on movement of an interactive object, the interactive object being used to interact with the augmented reality scene;
[0012] The ratio adjustment module is used to adjust the content window to a target window using the target ratio.
[0013] An embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; the processor loads instructions from the memory to execute the steps of any one of the window adjustment methods provided in the embodiments of the present application.
[0014] An embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps of any window adjustment method provided in the embodiment of the present application.
[0015] An embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of any window adjustment method provided in the embodiment of the present application.
[0016] In an embodiment of the present application, a content window and a control window can be displayed in an extended reality scene. The control window includes candidate ratios corresponding to the content window, which can be directly displayed. Based on the movement of an interactive object that can interact with the extended reality scene, a target ratio is determined from the candidate ratios, so that the content window can be directly adjusted to the target ratio using the target ratio. By directly presenting candidate ratios in the extended reality scene for the user to select and adjust the ratio of the content window, the ratio of the content window in the extended reality scene can be quickly and easily adjusted without the user having to perform additional operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. 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.
[0018] Figure 1a This is a schematic diagram of an application scenario of the window adjustment method provided in an embodiment of the present application;
[0019] Figure 1b 1 is a flow chart of a window adjustment method provided in an embodiment of the present application;
[0020] Figure 1c is a schematic diagram showing candidate ratios provided in an embodiment of the present application;
[0021] Figure 1d is a schematic diagram showing a specified control provided by an embodiment of the present application;
[0022] Figure 1e is a schematic diagram showing a target ratio provided in an embodiment of the present application;
[0023] Figure 1fis a schematic diagram of highlighting a window border provided by an embodiment of the present application;
[0024] Figure 1g This is a schematic diagram of a process for freely adjusting the size parameters of a target window provided in an embodiment of the present application;
[0025] Figure 1h Schematic diagram of the process of determining the initial distance parameter provided in an embodiment of the present application;
[0026] Figure 2a is a flowchart of a window adjustment method provided by another embodiment of the present application;
[0027] Figure 2b This is a schematic diagram of the overall process of the window adjustment method provided in an embodiment of the present application;
[0028] Figure 2c This is a schematic diagram of displaying a specified control in an XR browser provided by an embodiment of the present application;
[0029] Figure 2d is a schematic diagram of displaying candidate ratios in an XR browser provided by an embodiment of the present application;
[0030] Figure 2e is a schematic diagram of displaying a target ratio in an XR browser provided by an embodiment of the present application;
[0031] Figure 2f This is a schematic diagram of the overall process of freely adjusting the size provided by the embodiment of the present application;
[0032] Figure 2g This is a schematic diagram of highlighting a window border in an XR browser provided by an embodiment of the present application;
[0033] Figure 3 is a structural diagram of a window adjustment device provided in an embodiment of the present application;
[0034] Figure 4 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0036] Embodiments of the present application provide a window adjustment method, apparatus, electronic device, storage medium, and program product.
[0037] The window adjustment device can be integrated into an electronic device, such as a terminal or a server. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, an Extended Reality (XR) device, a laptop computer, or a personal computer (PC); the server can be a single server or a server cluster consisting of multiple servers.
[0038] In some embodiments, the window adjustment device may also be integrated into multiple electronic devices. For example, the window adjustment device may be integrated into multiple servers, and the window adjustment method of the present application may be implemented by the multiple servers.
[0039] In some embodiments, the server may also be implemented in the form of a terminal.
[0040] For example, reference Figure 1a , shows a schematic diagram of an application scenario of the window adjustment method provided by an embodiment of the present application. Figure 1a As shown in FIG, the terminal 100 and the server 200 are located in a wireless network or a wired network, and the terminal 100 and the server 200 can be communicatively connected.
[0041] The terminal 100 may refer to an XR device, through which an extended reality scene may be displayed, and a content window and a control window may be displayed in the extended reality scene, wherein the control window may include candidate scales corresponding to the content window.
[0042] XR devices typically have accompanying interactive objects that can be used to interact with the extended reality scene. In some embodiments, the interactive object may be an interactive controller, such as a handle, a ring, or a wristband. In other embodiments, the interactive object may also be an extremity, such as a hand or foot. For example, a user can move a hand or foot to interact with the extended reality scene. For another example, a user can use a hand or foot to perform a specified action to interact with the extended reality scene.
[0043] The terminal 100 may determine a target ratio from the candidate ratios based on the movement of the interactive object, wherein the interactive object is used to interact with the augmented reality scene, and then adjust the content window to the target window using the target ratio.
[0044] In some embodiments, after detecting the movement of the interactive object, the terminal 100 may send the corresponding parameters to the server 200. The server 200 may determine the target ratio from the candidate ratios based on the parameters, and use the target ratio to adjust the ratio of the content window to obtain the target window, and then directly send the target window to the terminal 100 so that the target window can be displayed in the extended reality scene.
[0045] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0046] Extended Reality (XR) can combine the real and virtual through computers to create a virtual environment where humans and computers can interact. It is also a general term for multiple technologies such as Virtual Reality (VR), Augmented Reality (AR), and Mixed Reality (MR). By integrating the visual interaction technologies of the three, it can bring an immersive feeling of seamless transition between virtual environments and the real world.
[0047] Among them, VR is mainly based on computer technology, and utilizes and integrates three-dimensional graphics technology, multimedia technology, simulation technology, display technology, servo technology and other technologies. With the help of computers and other equipment, it creates a realistic virtual world, allowing people in the virtual world to have an immersive feeling.
[0048] AR is a technology that cleverly integrates virtual information with the real world. It widely uses various technical means such as multimedia, three-dimensional modeling, intelligent interaction, and sensing. It simulates computer-generated virtual information such as text, images, three-dimensional models, music, and videos, and applies them to the real world. The two types of information complement each other, thereby achieving "enhancement" of the real world.
[0049] MR includes AR and VR, which can merge the real and virtual worlds to create a new visual environment where physical and digital objects coexist and can interact in real time.
[0050] In this embodiment, a window adjustment method involving augmented reality is provided, such as Figure 1b As shown, the specific process of the window adjustment method can be as follows:
[0051] S110: Displaying a content window and a control window in an extended reality scene, wherein the control window includes candidate ratios corresponding to the content window.
[0052] An extended reality scene refers to a virtual scene provided by extended reality technology. This extended reality scene can be constructed based on the real environment, a completely virtual scene, or a scene constructed by combining the real environment and the virtual environment.
[0053] A content window is a window used to display content in an extended reality scene. The content displayed in a content window can include one or more of text, images, and videos. For example, in an XR game, a content window can be used to display game graphics. In another example, in XR office software, a content window can be used to display documents. In another example, in an XR browser, a content window can be used to display web pages.
[0054] A control window refers to a window used to display and control related content in an extended reality scene. For example, a control control can be displayed in the control window, and the control control can be used to adjust the content displayed in the content window, or adjust the position, size, etc. of the content window itself.
[0055] An extended reality scene is a virtual three-dimensional space. To enhance immersion within the extended reality scene, the content presented within it can follow realistic visual effects, such as a visual effect where objects appear larger when closer and smaller when farther away. A close view refers to the effect presented when objects are close, while a mid-view refers to the effect presented when objects are farther away. In some embodiments, to enhance immersion, the content window can be used to present the mid-view, while the control window can be used to present the close view.
[0056] The control window may include candidate ratios corresponding to the content window, where the candidate ratios refer to multiple pre-set ratios of the content window. The candidate ratios may refer to the ratio between the width and height of the content window, such as the default, 3:4, 4:3, 9:16, 16:9, etc.
[0057] In some embodiments, the candidate ratio may be customized by the user. For example, a candidate setting control may be provided in the control window, and the user selects the candidate setting control to input the corresponding candidate ratio.
[0058] Among them, when the content window and the control window are displayed, the control window can be displayed below or above the content window, or the control window can be displayed on the left or right side of the content window. The specific settings can be made according to actual needs and are not specifically limited here.
[0059] For example, see Figure 1c , shows a schematic diagram of displaying candidate ratios, wherein a content window 101 and a control window 102 can be displayed simultaneously, the content window 101 can be displayed with a corresponding window border 103 to indicate that the ratio of the content window can be adjusted, and candidate ratios can be displayed in the control window 102, wherein the candidate ratios can include default, 3:4, 4:3, 9:16, and 16:9 for user selection.
[0060] In some embodiments, the window border 103 of the content window 101 may be a partial border that only displays the four corners of the content window, for example Figure 1c In other embodiments, the window frame 103 may be a complete frame of the display content window 101. The specific display style of the window frame can be set according to actual needs and is not specifically limited here.
[0061] When the candidate ratios corresponding to the content window are displayed, it can be considered that the content window enters the resizing mode. In some embodiments, the content window and the control window can be displayed in the extended reality scene, wherein a specified control is displayed in the control window. When a trigger operation acting on the specified control is detected, the resizing mode is entered, and the corresponding window frame can be displayed on the content window, and the candidate ratios corresponding to the content window can be displayed in the control window. For example, see Figure 1d , shows a schematic diagram of displaying a specified control. Among them, the specified control 104 is displayed in the control window 102, and when a trigger operation acting on the specified control 104 is detected, the Figure 1c The content shown.
[0062] The designated operation may be an operation not based on a designated control. As an implementation, the designated operation may be a user operation acting on a content window. For example, in an extended reality scene, only the content window may be displayed. The user operation may be a double-click operation. When a double-click operation on the content window is detected, the content window may be directly displayed. Figure 1c The content shown.
[0063] S120: Determine a target ratio from the candidate ratios based on movement of an interactive object, where the interactive object is used to interact with the augmented reality scene.
[0064] Interactive objects refer to objects that interact with the extended reality scene. The number of interactive objects is typically two, and they can refer to two interactive controllers. Interactive controllers can be controllers, bracelets, or rings. For example, a user can hold a controller to interact with the extended reality scene. Interactive objects can also refer to limbs, such as hands and feet. For example, a user can interact with the extended reality scene directly with their hands.
[0065] The interactive object may have a corresponding interactive identifier in the extended reality scene. By controlling the movement of the interactive object, the interactive identifier can be controlled to move in the extended reality scene. The interactive identifier can be presented in the form of a cursor or a rectangular box, or the elements at the position of the interactive identifier can be displayed differently. For example, when the interactive identifier is at the position of the default ratio in the candidate ratio, the elements related to the default ratio can be controlled to be displayed in bold, or presented in a color different from other candidate ratios, so that the user can know the position of the interactive identifier. As the interactive object moves, the interactive identifier can move accordingly, so that the user can select the target ratio from the candidate ratios based on the movement of the interactive object.
[0066] For example, when displaying candidate scales, the interactive indicator defaults to the default scale position. For example, you can continue to refer to Figure 1c The default ratio is displayed in bold to distinguish it from other candidate ratios. Users can move the interactive object so that the interaction indicator moves toward other candidate ratios. Thus, the candidate ratio at the location of the interaction indicator can be determined as the target ratio. For example, when the interaction indicator moves to 3:4, the content related to "3:4" can be displayed in bold, and "3:4" will become the target ratio.
[0067] S130: Using the target ratio, adjust the content window to a target window.
[0068] The target ratio refers to a candidate ratio selected by the user from the candidate ratios. The content window can be adjusted to a target window using the target ratio. The target window refers to the adjusted content window obtained after adjusting the content window using the target ratio.
[0069] In some embodiments, when the content window is adjusted to the target window using the target ratio, the candidate size parameters corresponding to the target ratio can be determined as the target size parameters based on a mapping relationship between candidate ratios and candidate size parameters; and the size parameters of the content window are updated to the target size parameters to obtain the target window.
[0070] The candidate size parameter refers to the size parameter corresponding to the candidate ratio. For example, if the candidate ratio is the ratio between width and height, such as 3:4, the corresponding candidate size parameter can be 3 cm in width and 4 cm in height, or 6 cm in width and 8 cm in height. That is, as long as the ratio between width and height is the value of the candidate ratio, it can be used as the candidate size parameter corresponding to the candidate ratio.
[0071] Corresponding candidate size parameters can be pre-set for each candidate ratio, thereby obtaining a mapping relationship between the candidate ratios and the candidate size parameters. Based on this mapping relationship, the candidate size parameters corresponding to the target ratio can be determined as the target size parameters. The size parameters of the content window can then be directly updated to the target size parameters to obtain the target window.
[0072] As an implementation method, the current size parameters of the content window may be first acquired, and then the current size parameters of the content window are replaced with the target size parameters to obtain the target window.
[0073] As another implementation, the size parameters of the content window may be directly set as the target size parameters to obtain the target window.
[0074] It should be noted that after adjusting the proportion of the content window to the target proportion, the layout of the content displayed in the content window may be adaptively adjusted to present a better visual effect.
[0075] After obtaining the target window, you can continue to display the target window and the corresponding target ratio. For example, see Figure 1e , shows a schematic diagram of the target display ratio. Among them, the target ratio is 3:4, and the content related to the target ratio 3:4 is displayed in bold, and the content window 101 is adjusted to a ratio of 3:4. That is, when the position of the interactive identifier corresponding to the interactive object is 3:4 based on the movement of the interactive object, 3:4 can be determined as the target ratio, and the displayed content can be adjusted by Figure 1c Directly changes to Figure 1e When the user selects Figure 1e , you can exit the resizing mode while keeping the current 3:4 ratio.
[0076] By displaying candidate ratios corresponding to the content window in the control window, the target ratio can be quickly determined from the candidate ratios based on the movement of the interactive object, and the content window can be adjusted using the target ratio to obtain the target window. The operation is convenient and fast, and the ratio of the content window can be quickly changed.
[0077] After changing the ratio of the content window, the user may also need to change the size of the content window. Thus, the user can freely adjust the size of the content window based on the target ratio. Thus, in some embodiments, in order to quickly adjust the size of the content window, the size of the target window can be adjusted in response to the resizing operation based on the resizing operation and the target ratio. It should be noted that if the user does not select from the candidate ratios, the default ratio can be directly determined as the target ratio.
[0078] Optionally, if a specified event in a size adjustment operation is detected, the distance parameter between the current two interactive objects is obtained, and the size adjustment operation includes continuous specified events performed by the two interactive objects; according to the adjustment identifier corresponding to the target window, the order of the detected specified event in the continuous specified events is determined; if the detected specified event is not the first specified event in the continuous specified events, the initial distance parameter corresponding to the size adjustment operation is obtained; and the size parameter of the target window is adjusted using the distance parameter, the initial distance parameter corresponding to the size adjustment operation and the target ratio.
[0079] A resizing operation refers to an operation that freely adjusts the size parameters of a content window. This resizing operation can include consecutive specified events performed by two interactive objects. For example, the specified event is a press event, and the interactive object is an interactive controller. When a user presses a button on the interactive controller, the specified event is detected. When the user releases the button on the interactive controller, the specified event is not detected.
[0080] For another example, if the interaction objects are the user's hands, the designated event could be detecting a designated action, such as a pinching motion. When the user pinches, the designated event is detected, but when the user stops pinching, the designated event is no longer detected. The following uses the example of using the interaction controller to make adjustments in detail.
[0081] A designated event refers to a specific event included in a resizing operation. For example, a click operation may include a press event, and a slide operation may include a press event, a slide event, and a lift event. In some embodiments, a resizing operation may include consecutive designated events performed by two interactive objects. For example, if the designated event is a press event, and the resizing operation is a continuous press on the two interactive objects, then the consecutive press events can be detected.
[0082] Since resizing operations can be performed by two interactive objects, if a designated event in a resizing operation is detected, the distance parameters between the two interactive objects can be obtained for subsequent use. The adjustment identifier corresponding to the target window can be used to indicate the order of the currently detected designated event in the continuous designated events. If the currently detected designated event is not the first designated event in the continuous designated events, it indicates that the user is already adjusting the size parameters of the target window. Therefore, the initial distance parameters corresponding to the resizing operation can be obtained. The size parameters of the target window can be adjusted using the currently obtained distance parameters between the two interactive objects, the initial distance parameters corresponding to the resizing operation, and the target ratio.
[0083] Among them, the distance parameters between two interactive objects may include height distance and width distance. When obtaining the distance parameters between two interactive objects, the first position coordinates and the second position coordinates corresponding to the two interactive objects in a preset coordinate system may be obtained, and the preset coordinate system includes a first coordinate axis indicating height and a second coordinate axis indicating width; based on the first position coordinate and the second position coordinate, the height distance corresponding to the two interactive objects on the first coordinate axis is calculated; based on the first position coordinate and the second position coordinate, the width distance corresponding to the two interactive objects on the second coordinate axis is calculated.
[0084] A preset coordinate system can be a virtual coordinate system constructed by the user. The preset coordinate system can include a first coordinate axis perpendicular to the ground and a second coordinate axis parallel to the ground, wherein the first coordinate axis can be used to indicate height and the second coordinate axis can be used to indicate width. For example, the preset coordinate system includes an x-axis parallel to the ground and a y-axis perpendicular to the ground, wherein the x-axis is the second coordinate axis and the y-axis is the first coordinate axis.
[0085] In this preset coordinate system, the first and second position coordinates of the two interactive objects can be obtained. Based on the first and second position coordinates, the height distance between the two interactive objects on the first coordinate axis and the width distance between the two interactive objects on the second coordinate axis can be calculated. For example, if the first position coordinates are (2, 6) and the second position coordinates are (3, 4), the width distance is 6-4=2, and the height distance is 3-2=1.
[0086] In order to determine the order of the currently detected designated event in the continuous designated events, an adjustment flag corresponding to the target window may be obtained, wherein the adjustment flag may be set to a first flag and a second flag, the first flag indicating that the target window is not in the free adjustment mode, and the second flag indicating that the target window is in the free adjustment mode.
[0087] The adjustment flag corresponding to the target window may default to the first flag. If a specified event is detected, the adjustment flag may be updated to the second flag. If no specified event is detected, the adjustment flag may be updated to the first flag.
[0088] When determining the order of a currently detected designated event within a series of designated events, the adjustment identifier used is an adjustment identifier that has not been updated since the designated event was detected. When using the adjustment identifier to determine the order of a designated event within a series of designated events, if the adjustment identifier is a first identifier, the designated event is determined to be the first designated event in the series of designated events; if the adjustment identifier is a second identifier, the designated event is determined to be the first designated event in the series of designated events.
[0089] For example, the adjustment identifier defaults to the first identifier. After the specified event is detected, the adjustment identifier obtained is the first identifier, which indicates that before the specified event is detected, the target window is not in the free adjustment mode. Therefore, it can be determined that the currently detected specified event is the first specified event in the continuous specified events.
[0090] For another example, after the adjustment flag is set to the second flag, a designated event is detected. Since the obtained adjustment flag is the second flag, it indicates that the target window was already in free adjustment mode before the designated event was detected. Therefore, it can be determined that the currently detected designated event is not the first designated event in the continuous designated events.
[0091] It should be noted that the step of changing the adjustment identifier and the step of determining the order of the specified event in the continuous specified events using the obtained adjustment identifier can be performed simultaneously, or the step of changing the adjustment identifier can be performed after the step of determining the order of the specified event in the continuous specified events using the obtained adjustment identifier. It is only necessary to ensure that when the adjustment identifier is obtained, the adjustment identifier has not yet been updated based on the currently detected specified event.
[0092] Of course, when no designated event is detected, the adjustment flag can be directly updated to the first flag. For example, the detection of the designated event can be performed at a preset interval. Once no designated event is detected, it can be considered that the target window has exited the free adjustment mode, and the adjustment flag can be correspondingly updated to the first flag.
[0093] If the currently detected designated event is not the first designated event in a series of consecutive designated events, the initial distance parameter corresponding to the resizing operation can be obtained. The initial distance parameter corresponding to the resizing operation refers to the initial distance parameter determined using the distance parameter between the two interacting objects when the first designated event in the resizing operation is detected. Since this initial distance parameter is obtained when the first designated event in the resizing operation is detected, it can be directly obtained at this time. For details on how to obtain this initial distance parameter, please refer to the corresponding section below.
[0094] In some embodiments, a corresponding window border may be displayed on the target window. If the specified event is detected as the first specified event in a series of specified events, it indicates that the target window has entered the free adjustment mode. In order to inform the user that the target window is entering the free adjustment mode, the window border corresponding to the target window may be highlighted. For example, the window border that has already been displayed may be bolded, or the window border may be highlighted, or the window border may be set to a specified color. For example, see Figure 1f , shows a schematic diagram of highlighting the window border, in Figure 1fIn the example, the window border 103 is displayed in bold to indicate that the target window has entered the free adjustment mode. Figure 1f The hands shown in FIG are equipped with interactive controllers, and a specified event can be executed based on the interactive controller. If the user selects 3:4 as the target ratio, if the first specified event is detected, the user can Figure 1e The window border in is displayed in bold. It should be noted that Figure 1f The hands and interactive controllers shown in the figure may not be displayed in the extended reality scene, but are only used as a reference for user operations.
[0095] In some embodiments, the initial distance parameter is determined when the first specified event trigger in the resizing operation is detected. The initial distance parameter may include an initial height distance and an initial width distance. The distance parameter may include a height distance and a width distance. When adjusting the size parameters of the target window using the distance parameter, the initial distance parameter corresponding to the resizing operation, and the target ratio, the height difference between the height distance and the initial height distance, and the width difference between the width distance and the initial width distance may be calculated; if the height distance is less than a height threshold, the size parameters of the target window are adjusted according to the width difference and the target ratio; if the height distance is greater than or equal to the height threshold, the size parameters of the target window are adjusted according to the height difference and the target ratio.
[0096] The height difference refers to the difference between the height distance and the initial height distance, which can be directly calculated using the height distance and the initial height distance. The width difference refers to the difference between the width distance and the initial width distance, which can be directly calculated using the width distance and the initial width distance.
[0097] The height threshold is the minimum height distance between two interactive objects when adjusting the target window's height parameter. This height threshold can be set as needed. When the height distance between the two interactive objects is greater than or equal to the height threshold, the target window's height parameter is prioritized for adjustment. Otherwise, the target window's width parameter is prioritized for adjustment.
[0098] If the height distance is less than the height threshold, it indicates that the width parameter of the target window is currently being adjusted. In this case, the size parameter of the target window can be adjusted using the width difference and the target ratio. If the height distance is greater than or equal to the height threshold, it indicates that the height parameter of the target window is currently being adjusted. In this case, the size parameter of the target window can be adjusted using the height difference and the target ratio.
[0099] In some embodiments, the size parameters of the target window may include a height parameter and a width parameter. Using the width difference and the target ratio, when adjusting the size parameters of the target window, if the height distance is less than the height threshold, the target width corresponding to the target window is calculated according to the width value corresponding to the width difference; based on the target width and the target ratio, the target height corresponding to the target window is calculated; the width parameter is adjusted according to the target width, and the height parameter is adjusted according to the target height.
[0100] The width difference is the difference between the current width distance between two interactive objects and the initial width distance, representing the change in the width distance. The width value corresponding to the width difference is the change in the width parameter of the target window. The width difference and the width value satisfy a first functional relationship. Based on this functional relationship, the width difference can be used to calculate the width value.
[0101] Optionally, the first functional relationship can be determined based on the initial width distance and the initial width parameter of the target window. The initial width parameter refers to the width of the target window when the initial distance parameter is obtained. For example, when the initial width distance is 3 and the initial width parameter of the target window is 6, a mapping relationship between distance and width can be obtained. If the distance is recorded as a and the width is recorded as b, the first functional relationship is 3a=6b. When the width difference is 1, the corresponding width value is 0.5.
[0102] Optionally, the first functional relationship may also be a=k1*b, where k1 is a constant and can be set according to actual needs.
[0103] After the width value is calculated, the change value of the width parameter of the target window is obtained, and the target width corresponding to the target window can be calculated using the width value.
[0104] As an implementation method, if the width distance is less than the initial width distance, indicating that the user wants to reduce the width parameter of the target window, the initial width parameter of the target window can be obtained, and the width value can be subtracted from the initial width parameter to calculate the target width. According to the first functional relationship in the above example, 3a=6b, the initial width distance is 3, the width distance is 2, the width value is 0.5, and the initial width parameter is 2, then the target width is 2-0.5=1.5.
[0105] If the width distance is greater than the initial width distance, indicating that the user intends to increase the width parameter of the target window, the initial width parameter of the target window can be obtained. The target width can be calculated by adding the initial width parameter to the width value. According to the first functional relationship in the above example, 3a = 6b, the initial width distance is 3, the width distance is 4, the width value is 0.5, and the initial width parameter is 2, then the target width is 2 + 0.5 = 2.5.
[0106] After calculating the target width, to ensure the target window size meets the target ratio, the target height can be calculated using the target ratio and target width. For example, if the target ratio is height:width = 3:4 and the target width is 1.5, the corresponding target height is 2. Therefore, the target width can be used to adjust the width parameter of the target window, and the target height can be used to adjust the height parameter of the target window to achieve the desired size adjustment.
[0107] In some embodiments, the size parameters of the target window may include a height parameter and a width parameter. Using the height difference and the target ratio, when adjusting the size parameters of the target window, if the height distance is greater than or equal to the height threshold, the target height corresponding to the target window is calculated according to the height value corresponding to the height difference; based on the target height and the target ratio, the target width corresponding to the target window is calculated; the width parameter is adjusted according to the target width, and the height parameter is adjusted according to the target height.
[0108] The height difference is the difference between the current height distance between two interacting objects and the initial height distance, representing the change in height distance. The height value corresponding to the height difference is the change in the height parameter of the target window. The height difference and the height value satisfy a second functional relationship. Based on this functional relationship, the height difference can be used to calculate the height value.
[0109] Optionally, the second functional relationship can be determined based on an initial height parameter and an initial height parameter of the target window, wherein the initial height parameter refers to the height of the target window when the initial distance parameter is obtained. For example, when the initial height distance is 6, the initial height parameter of the target window is 6, and a mapping relationship between distance and height can be obtained. If the distance is recorded as a and the height is recorded as c, the second functional relationship is 6a=6c. When the height difference is 1, the corresponding height value is 1.
[0110] Optionally, the second functional relationship may also be a=k2*c, where k2 is a constant and can be set according to actual needs.
[0111] After the height value is calculated, the change value of the height parameter of the target window is obtained, and the height value can be used to calculate the target height corresponding to the target window.
[0112] As an implementation method, if the height distance is greater than or equal to the initial height distance, indicating that the user wants to increase the height parameter of the target window, the initial height parameter of the target window can be obtained, and the height value can be subtracted from the initial height parameter to calculate the target height. According to the second functional relationship in the above example, 6a=6c, the initial height distance is 6, the height distance is 7, the height difference is 1, the corresponding height value is 1, and the initial height parameter is 6, then the target height is 6+1=7.
[0113] If the height distance is less than the initial height distance, indicating that the user wants to reduce the height parameter of the target window, the initial height parameter of the target window can be obtained, and the height value can be subtracted from the initial height parameter to calculate the target height. According to the second functional relationship in the above example, 6a=6c, the initial height distance is 8, the height distance is 5, the height difference is 3, the corresponding height value is 3, and the initial height parameter is 8, then the target height is 8-3=5.
[0114] After calculating the target height, to ensure the target window size meets the target ratio, the target width can be calculated using the target ratio and target height. For example, if the target ratio is height:width = 3:4 and the target height is 4, the corresponding target width is 3. Therefore, the target width can be used to adjust the width parameter of the target window, and the target height can be used to adjust the height parameter of the target window to achieve the desired size adjustment.
[0115] It should be noted that, while adjusting the size of the target window, the layout of the content displayed in the target window may also be adaptively adjusted to present a better visual effect.
[0116] To more clearly describe the process of adjusting the size parameters of the target window, please refer to Figure 1g , which shows a flow chart for adjusting the size parameters of a target window. When the detected designated event is not the first designated event in a series of consecutive designated events, the target window is considered to be in free adjustment mode. If the initial width distance is recorded as x0, the initial height distance is recorded as y0, the width distance is recorded as dx, the height distance is recorded as dy, the width difference is recorded as Δx, and the height difference is recorded as Δy, then Δx and Δy can be calculated using x0, y0, dx, and dy.
[0117] Then, the relationship between the height distance dy and the height threshold Y is determined. If the height distance dy is less than the height threshold Y, the size parameters of the target window can be updated according to Δx and the target ratio; if the height distance dy is not less than the height threshold Y, the size parameters of the target window can be updated according to Δy and the target ratio.
[0118] In some implementations, if the currently detected designated event is the first designated event among consecutive designated events, the initial distance parameter may be determined using the currently acquired distance parameter between the two interactive objects.
[0119] Optionally, if the detected designated event is the first designated event among the continuous designated events, the initial width distance is updated with the width distance, and the initial height distance is updated with the height distance; if the initial height distance is less than the height threshold, the initial height distance is updated with the height threshold.
[0120] Since the distance parameter between two interacting objects may include height distance and width distance, the initial distance parameter may include initial width distance and initial height distance. The height distance may be directly used to update the initial height distance, and the width distance may be used to update the initial width distance.
[0121] The height threshold refers to the minimum height distance between two interactive objects when adjusting the height parameters of the target window. If the initial height distance is less than the height threshold, the height threshold can be used to update the initial height distance. For example, if the height distance is 3, the width distance is 4, and the height threshold is 5, after updating the initial height distance and initial width distance using the height distance and width distance, the initial height distance is 3 and the initial width distance is 4. Since the initial height distance of 4 is less than the height threshold of 5, the initial height distance can be updated to 5 again, resulting in an initial width distance of 4 and an initial height distance of 5.
[0122] Alternatively, the initial width distance can be updated with the width distance; if the height distance is greater than or equal to the height threshold, the initial height distance is updated with the height distance; if the height distance is less than the height threshold, the initial height distance is updated with the height threshold. For example, if the height distance is 3, the width distance is 4, and the height threshold is 5, the initial width distance is 4. Since the height distance is less than the height threshold, 5 can be directly set as the initial height distance.
[0123] Then, the relationship between the height distance dy and the height threshold Y is determined. If the height distance dy is less than the height threshold Y, the size parameters of the target window can be updated according to Δx and the target ratio; if the height distance dy is not less than the height threshold Y, the size parameters of the target window can be updated according to Δy and the target ratio.
[0124] In some implementations, if the currently detected designated event is the first designated event among consecutive designated events, the initial distance parameter may be determined using the currently acquired distance parameter between the two interactive objects.
[0125] To more clearly describe the process of determining the initial distance parameters, please refer to Figure 1h, showing a flow chart for determining the initial distance parameters. When the detected designated event is the first designated event in the continuous designated events, it can be considered that the target window is entering the free adjustment mode. In order to prompt that the target window is in the free adjustment mode, the visual display of the target window can be updated, for example, the window border of the target window is highlighted. At the same time, if the initial width distance is recorded as x0, the initial height distance is recorded as y0, the width distance is recorded as dx, the height distance is recorded as dy, and the height threshold is recorded as Y, then dx and dy can be used to reset x0 and y0, and then the relationship between the initial height distance y0 and the height threshold Y can be judged. When y0 is less than Y, y0 can be reset to Y.
[0126] Based on the above content, it can be seen that before the detected designated event is not the first designated event in the continuous designated events, the first designated event in the continuous designated events must be detected. Therefore, when the first designated event in the continuous designated events is detected, the initial distance parameters can be obtained in the above manner to be used for adjusting the size parameters of the target window when a non-first designated event in the designated events is subsequently detected.
[0127] The window adjustment scheme provided by the embodiments of the present application can be applied in various virtual reality-related scenarios. For example, in a virtual reality-based browser application, a web page is displayed through a content window. Using the scheme provided by the embodiments of the present application, candidate ratios of the content window can be displayed. The user can directly select a target ratio from the candidate ratios and adjust the content window directly using the target ratio. This further reduces the complexity of adjusting the content window ratio, making it easy and quick to adjust the content window ratio in an extended reality scenario.
[0128] The method provided by the embodiments of the present application allows candidate ratios corresponding to the content window to be directly displayed in the control window, allowing the target ratio to be determined directly from the candidate ratios, and the content window to be adjusted using the target ratio. This allows for simple operation and quick adjustment of the content window ratio. Furthermore, if the target window size still does not meet the user's needs, the user can freely adjust the size using interactive objects, which is convenient and allows for quick modification of the target window size parameters.
[0129] The method described in the above embodiment will be further described below.
[0130] In this embodiment, the method of the embodiment of the present application will be described in detail by taking the XR browser as an example.
[0131] like Figure 2a As shown, a specific process of a window adjustment method is as follows:
[0132] S210: Displaying a content window and a control window in an extended reality scene, wherein the control window includes candidate ratios corresponding to the content window.
[0133] S220: Determine a target ratio from the candidate ratios based on the movement of the interactive object.
[0134] S230: Using the target ratio, adjust the content window to a target window.
[0135] S240: If a specified event in the size adjustment operation is detected, obtain a distance parameter between the two current interactive objects.
[0136] S250: If the designated event is the first designated event among consecutive designated events, determine an initial distance parameter using the distance parameter.
[0137] S260: If the designated event is not the first designated event in the continuous designated events, adjust the size parameter of the target window using the distance parameter, the initial distance parameter, and the target ratio.
[0138] The contents of S210 to S260 can be found in the corresponding parts of the above embodiments and will not be repeated here. Figure 2b , shows the overall process diagram of the window adjustment method, the following will be combined with Figure 2b , for detailed explanation.
[0139] In the extended reality scene, the web page provided by the XR browser can be displayed normally in the content window. When the user needs to adjust the proportion or size of the content window, a trigger operation can be performed to enter the size editing mode. For example, see Figure 2c , showing a schematic diagram of displaying a specified control in an XR browser, the web page content can be displayed in the content window 101, and the specified control 104 can be displayed in the control window 102. The user can use the interactive controller to select the specified control 104, and then the content window can be controlled to enter the proportional adjustment mode.
[0140] After entering the resizing mode, only the content related to resizing is displayed in the extended reality scene, such as the candidate ratio and the window border of the content window. For example, see Figure 2d , shows a schematic diagram of displaying candidate ratios in an XR browser, wherein a window border 103 of a content window 101 may be displayed, and candidate ratios may be displayed in a control window 102. At this point, the user may determine how to adjust the size of the content window according to actual needs.
[0141] If the user does not need to perform custom resizing, the user can directly move the interaction controller to select a target ratio from the displayed candidate ratios, obtain the target size parameters corresponding to the target ratio, set the size parameters of the content window to the target size parameters, and adaptively adjust the layout of the content in the content window to obtain the target window. For example, see Figure 2e , shows a schematic diagram of displaying the target ratio in the XR browser, where the target ratio is 3:4, compared to Figure 2d In the content window, Figure 2e The ratio of the content window changes, and the layout of the content within the content window also changes. When the target ratio is 3:4, the width is smaller than the height, which can be considered a portrait ratio. Directly selecting the portrait ratio can quickly adjust the content window to a higher height, enhancing immersion while reducing scrolling when browsing.
[0142] It should be noted that if the user does not select a candidate ratio, the content window is displayed at a default ratio. The content window with the default ratio can be used as the target window, and the target ratio corresponding to the target window is the default ratio.
[0143] If the user wants to adjust the size of the target window, they can press the interactive controller, such as long pressing the interactive controller and dragging it inward or outward, to freely adjust the size of the target window. Based on the distance between the interactive controllers, the target width and target height corresponding to the target window can be obtained, and then the target width and target height can be applied to the target window to achieve free adjustment of the target window size. At the same time, the layout of the content in the content window can be adaptively adjusted to obtain the target window. In the process of dragging, the size of the target window can change in real time. When the user releases the controller, the target window stops changing immediately.
[0144] See also Figure 2f , shows a schematic diagram of the overall process of freely adjusting the size, wherein long pressing the interactive controller can freely adjust the size of the content window, so that the two-hand tap event can be detected in real time. If the two-hand tap event is detected, the coordinate positions of the two interactive controllers can be recorded, recorded as left P and right P, and then the horizontal distance dx between left P and right P, that is, the width distance, and the vertical distance dy between left P and right P, that is, the height distance, can be calculated.
[0145] If no click event is detected, the size change of the target window can be stopped directly and the free adjustment mode can be exited.
[0146] The interactive controller may be provided with a button. Long pressing the button on the interactive controller may detect a continuous tap event. Whether the detected tap event is the first tap event in the continuous tap event may be used to determine whether the target window has entered the free adjustment mode. If the detected tap event is determined to be the first tap event based on the adjustment identifier, it may be considered that the free adjustment mode is being entered. The visual display of the target window may be updated, and the initial distance parameters x0 and y0 may be determined using dx and dy, where x0 is the initial width distance and y0 is the initial height distance. For example, see Figure 2g , shows a schematic diagram of highlighting the window border in the XR browser, wherein the window border 103 of the content window 101 can be displayed in bold to indicate that the target window enters the free adjustment mode.
[0147] If the currently detected tap event is the first tap event in a series of tap events, you can directly use dx, dy, x0, and y0 to calculate the width difference Δx and height difference Δy. Then, use Δx, Δy, and the target ratio to calculate the size parameters of the target window and update the size of the target window and its internal visual performance.
[0148] As can be seen from the above, the embodiment of the present application can directly select the target ratio from the provided candidate ratios so as to adjust the content window using the target ratio. When the size of the content window needs to be freely adjusted, the button on the interactive controller can be directly long-pressed and dragged. The method of adjusting the ratio and size of the content window is simple, and the ratio and size of the content window can be quickly adjusted.
[0149] To better implement the above method, embodiments of the present application further provide a window adjustment device, which can be integrated into an electronic device, such as a terminal, a server, or the like. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, XR device, laptop computer, personal computer, or the like; the server can be a single server or a server cluster consisting of multiple servers.
[0150] For example, in this embodiment, the method of the embodiment of the present application will be described in detail by taking the specific integration of the window adjustment device into the XR device as an example.
[0151] For example, Figure 3 As shown, the window adjustment device 300 may include a display module 310 , a determination module 320 and a ratio adjustment module 330 .
[0152] A display module 310 is configured to display a content window and a control window in an augmented reality scene, wherein the control window includes a candidate ratio corresponding to the content window;
[0153] a determination module 320 for determining a target ratio from the candidate ratios based on movement of an interactive object used to interact with the augmented reality scene;
[0154] The ratio adjustment module 330 is configured to adjust the content window to a target window using the target ratio.
[0155] In some embodiments, the ratio adjustment module 330 further includes:
[0156] a determining unit, configured to determine the candidate size parameter corresponding to the target ratio as the target size parameter according to a mapping relationship between the candidate ratios and the candidate size parameters;
[0157] The proportion adjustment unit is used to update the size parameters of the content window to the target size parameters to obtain a target window.
[0158] In some embodiments, the window adjustment device 300 further includes a free adjustment module. After adjusting the content window to the target window using the target ratio, the free adjustment module includes:
[0159] an acquiring unit, configured to acquire a distance parameter between two interactive objects if a designated event in a size adjustment operation is detected, wherein the size adjustment operation includes consecutive designated events performed by the two interactive objects;
[0160] an order determining unit, configured to determine an order of the detected designated event in the continuous designated events according to an adjustment identifier corresponding to the target window;
[0161] an initial acquiring unit, configured to acquire an initial distance parameter corresponding to the size adjustment operation if the detected designated event is not the first designated event among the continuous designated events;
[0162] The free adjustment unit is configured to adjust the size parameter of the target window by using the distance parameter, the initial distance parameter corresponding to the size adjustment operation, and the target ratio.
[0163] In some embodiments, the sequence determination unit is further configured to:
[0164] If the adjustment identifier is the first identifier, determining that the designated event is the first designated event among the continuous designated events;
[0165] If the adjustment identifier is the second identifier, it is determined that the designated event is the first designated event in the continuous designated events.
[0166] In some embodiments, the free adjustment module is further configured to:
[0167] If the specified event is detected, updating the adjustment flag of the target window to the second flag;
[0168] If the designated event is not detected, the adjustment flag of the target window is updated to the first flag.
[0169] In some embodiments, the acquisition unit is further configured to:
[0170] Obtaining first position coordinates and second position coordinates corresponding to the two interactive objects in a preset coordinate system, where the preset coordinate system includes a first coordinate axis indicating a height and a second coordinate axis indicating a width;
[0171] Calculating a height distance between the two interactive objects on the first coordinate axis according to the first position coordinate and the second position coordinate;
[0172] The corresponding width distance between the two interactive objects on the second coordinate axis is calculated according to the first position coordinate and the second position coordinate.
[0173] In some embodiments, the initial distance parameters include an initial height distance and an initial width distance, and the distance parameters include a height distance and a width distance. The free adjustment unit is further configured to:
[0174] Calculating a height difference between the height distance and the initial height distance, and a width difference between the width distance and the initial width distance;
[0175] If the height distance is less than the height threshold, adjusting the size parameters of the target window according to the width difference and the target ratio;
[0176] If the height distance is greater than or equal to the height threshold, the size parameters of the target window are adjusted according to the height difference and the target ratio.
[0177] In some embodiments, the size parameter includes a height parameter and a width parameter, and the free adjustment unit is further configured to:
[0178] If the height distance is less than the height threshold, calculating the target width corresponding to the target window according to the width value corresponding to the width difference;
[0179] Calculating a target height corresponding to the target window based on the target width and the target ratio;
[0180] The width parameter is adjusted according to the target width, and the height parameter is adjusted according to the target height.
[0181] In some embodiments, the size parameter includes a height parameter and a width parameter, and the free adjustment unit is further configured to:
[0182] If the height distance is greater than or equal to the height threshold, calculating the target height corresponding to the target window according to the height value corresponding to the height difference;
[0183] Calculating a target width corresponding to the target window based on the target height and the target ratio;
[0184] The width parameter is adjusted according to the target width, and the height parameter is adjusted according to the target height.
[0185] In some embodiments, the distance parameters include a height distance and a width distance, the initial distance parameters include an initial height distance and an initial width distance, and the free adjustment module further includes:
[0186] a first updating unit, configured to update the initial width distance with the width distance and update the initial height distance with the height distance if the detected designated event is the first designated event among the continuous designated events;
[0187] The second updating unit is configured to update the initial height distance by the height threshold if the initial height distance is less than the height threshold.
[0188] In some embodiments, the free adjustment module includes:
[0189] A display unit, configured to display a window frame corresponding to the target window;
[0190] The highlighting unit is configured to highlight a window border corresponding to the target window if the detected designated event is the first designated event among the continuous designated events.
[0191] In specific implementation, the above modules or 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 modules or units can be referred to the previous method embodiments and will not be repeated here.
[0192] As can be seen from the above, the window adjustment device of this embodiment can display a content window and a control window in an extended reality scene. The control window includes candidate ratios corresponding to the content window, which can be directly displayed. Based on the movement of an interactive object that can interact with the extended reality scene, a target ratio is directly determined from the candidate ratios, so that the content window can be directly adjusted to the target ratio using the target ratio. By directly presenting candidate ratios in the extended reality scene for the user to select and adjust the content window ratio, the ratio of the content window in the extended reality scene can be quickly and easily adjusted without the user having to perform additional operations.
[0193] The present application also provides an electronic device, which may be a terminal, a server, or the like. The terminal may be a mobile phone, a tablet computer, a smart Bluetooth device, an XR device, a laptop computer, a personal computer, or the like; the server may be a single server or a server cluster consisting of multiple servers, or the like.
[0194] In some embodiments, the window adjustment device may also be integrated into multiple electronic devices. For example, the window adjustment device may be integrated into multiple servers, and the window adjustment method of the present application may be implemented by the multiple servers.
[0195] In this embodiment, the electronic device of this embodiment is an XR device as an example for detailed description, for example, Figure 4 , which shows a schematic structural diagram of an electronic device involved in an embodiment of the present application, specifically:
[0196] The electronic device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0197] Processor 401 is the control center of the electronic device, connecting all components of the electronic device using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 402 and accessing data stored in memory 402, it performs various functions of the electronic device and processes data, thereby monitoring the entire electronic device. In some embodiments, processor 401 may include one or more processing cores. In some embodiments, processor 401 may integrate an application processor and a modem processor, where the application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 401.
[0198] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may 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 may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0199] The electronic device also includes a power supply 403 for supplying power to various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 403 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.
[0200] The electronic device may further include an input module 404, which may be configured to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0201] The electronic device may further include a communication module 405. In some embodiments, the communication module 405 may include a wireless module. The electronic device may perform short-range wireless transmission via the wireless module of the communication module 405, thereby providing the user with wireless broadband Internet access. For example, the communication module 405 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0202] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402 to implement various functions as follows:
[0203] Displaying a content window and a control window in an extended reality scene, wherein the control window includes a candidate ratio corresponding to the content window;
[0204] determining a target scale from the candidate scales based on movement of an interactive object, the interactive object being used to interact with the augmented reality scene;
[0205] The content window is adjusted to a target window using the target ratio.
[0206] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.
[0207] As can be seen above, electronic devices can display content windows and control windows in an extended reality scene. The control window includes candidate ratios corresponding to the content window, which can be directly displayed. Based on the movement of interactive objects that can interact with the extended reality scene, a target ratio is directly determined from the candidate ratios, so that the content window can be directly adjusted to the target ratio using the target ratio. By directly presenting candidate ratios in the extended reality scene for the user to select and adjust the content window ratio, the ratio of the content window in the extended reality scene can be quickly and easily adjusted without the user having to perform additional operations.
[0208] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished 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.
[0209] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the steps of any of the window adjustment methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0210] Displaying a content window and a control window in an extended reality scene, wherein the control window includes a candidate ratio corresponding to the content window;
[0211] determining a target scale from the candidate scales based on movement of an interactive object, the interactive object being used to interact with the augmented reality scene;
[0212] The content window is adjusted to a target window using the target ratio.
[0213] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0214] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various optional implementations of the window adjustment aspects provided in the above-described embodiments.
[0215] Since the instructions stored in the storage medium can execute the steps in any window adjustment method provided in the embodiments of the present application, the beneficial effects that can be achieved by any window adjustment method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0216] The above is a detailed introduction to a window adjustment method, device, electronic device, storage medium and program product provided in the embodiments 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, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A window adjustment method, It is characterized in that The method comprises: Displaying a content window and a control window in an extended reality scene, wherein the control window includes a candidate ratio corresponding to the content window; determining a target ratio from the candidate ratios based on movement of an interactive object, the interactive object being used to interact with the extended reality scene; The content window is adjusted to a target window using the target ratio.
2. The method according to claim 1, It is characterized in that The adjusting the content window to a target window by using the target ratio includes: According to the mapping relationship between the candidate ratios and the candidate size parameters, the candidate size parameter corresponding to the target ratio is determined as the target size parameter; The size parameters of the content window are updated to the target size parameters to obtain a target window.
3. The method according to claim 1, It is characterized in that After adjusting the content window to a target window by using the target ratio, the method further includes: If a designated event in a size adjustment operation is detected, obtaining a distance parameter between two current interactive objects, the size adjustment operation including consecutive designated events performed by the two interactive objects; Determining, according to the adjustment identifier corresponding to the target window, the order of the detected designated event in the continuous designated events; If the detected designated event is not the first designated event in the continuous designated events, obtaining an initial distance parameter corresponding to the size adjustment operation; The size parameter of the target window is adjusted using the distance parameter, the initial distance parameter corresponding to the size adjustment operation, and the target ratio.
4. The method according to claim 3, It is characterized in that The determining, according to the adjustment identifier corresponding to the target window, the order of the detected designated event in the continuous designated events includes: If the adjustment identifier is the first identifier, determining that the designated event is the first designated event among the continuous designated events; If the adjustment identifier is the second identifier, it is determined that the designated event is the first designated event in the continuous designated events.
5. The method according to claim 3, It is characterized in that The method further comprises: If the specified event is detected, updating the adjustment flag of the target window to the second flag; If the designated event is not detected, the adjustment flag of the target window is updated to the first flag.
6. The method according to claim 3, It is characterized in that The distance parameter includes a height distance and a width distance, and the obtaining of the distance parameter between the two interactive objects includes: Acquire first position coordinates and second position coordinates corresponding to the two interactive objects in a preset coordinate system, where the preset coordinate system includes a first coordinate axis indicating a height and a second coordinate axis indicating a width; Calculating the height distance between the two interactive objects on the first coordinate axis according to the first position coordinate and the second position coordinate; According to the first position coordinates and the second position coordinates, a width distance corresponding to the two interactive objects on the second coordinate axis is calculated.
7. The method according to claim 3, It is characterized in that The initial distance parameter includes an initial height distance and an initial width distance, the distance parameter includes a height distance and a width distance, and the size parameter of the target window is adjusted by using the distance parameter, the initial distance parameter corresponding to the size adjustment operation, and the target ratio, including: Calculating a height difference between the height distance and the initial height distance, and a width difference between the width distance and the initial width distance; If the height distance is less than the height threshold, adjusting the size parameters of the target window according to the width difference and the target ratio; If the height distance is greater than or equal to the height threshold, the size parameter of the target window is adjusted according to the height difference and the target ratio.
8. The method according to claim 7, It is characterized in that The size parameter includes a height parameter and a width parameter, and if the height distance is less than a height threshold, adjusting the size parameter of the target window according to the width difference and the target ratio, includes: If the height distance is less than the height threshold, the target width corresponding to the target window is calculated according to the width value corresponding to the width difference; Calculating a target height corresponding to the target window based on the target width and the target ratio; The width parameter is adjusted with the target width, and the height parameter is adjusted with the target height.
9. The method according to claim 7, It is characterized in that The size parameter includes a height parameter and a width parameter, and if the height distance is greater than or equal to the height threshold, adjusting the size parameter of the target window according to the height difference and the target ratio, comprises: If the height distance is greater than or equal to the height threshold, the target height corresponding to the target window is calculated according to the height value corresponding to the height difference; Calculating a target width corresponding to the target window based on the target height and the target ratio; The width parameter is adjusted with the target width, and the height parameter is adjusted with the target height.
10. The method according to claim 3, It is characterized in that The distance parameters include a height distance and a width distance, the initial distance parameters include an initial height distance and an initial width distance, and the method further includes: If the detected designated event is the first designated event among the continuous designated events, the initial width distance is updated with the width distance, and the initial height distance is updated with the height distance; If the initial height distance is less than the height threshold, the initial height distance is updated with the height threshold.
11. The method according to claim 3, It is characterized in that The method further comprises: Display the window border corresponding to the target window; If the detected designated event is the first designated event among the continuous designated events, a window border corresponding to the target window is highlighted.
12. A window adjustment device, It is characterized in that The device comprises: A display module, configured to display a content window and a control window in an extended reality scene, wherein the control window includes a candidate ratio corresponding to the content window; a determination module, configured to determine a target ratio from the candidate ratios based on movement of an interactive object, wherein the interactive object is used to interact with the extended reality scene; The ratio adjustment module is used to adjust the content window to a target window using the target ratio.
13. An electronic device, It is characterized in that The invention comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the window adjustment method according to any one of claims 1 to 11.
14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the window adjustment method according to any one of claims 1 to 11.
15. A computer program product, It is characterized in that The method comprises a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the steps in the window adjustment method according to any one of claims 1 to 11 are implemented.
