Information processing method, device, equipment and storage medium

By obtaining element information outside the display interface, using cross-observer and callback functions to monitor element locations, switching levels and transparency, the waste of computing resources and page flashing problems caused by browser compatibility is solved, and an efficient ceiling effect is achieved.

CN114691267BActive Publication Date: 2025-08-19BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210258351.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-16
Publication Date
2025-08-19
Estimated Expiration
2042-03-16

AI Technical Summary

Technical Problem

In the prior art, due to compatibility of different browsers, computing resources are wasted when the distance between the top of the window page and the scrolling height of the window page, and real-time monitoring of page scrolling events leads to the listener falling into a dead loop and abnormal page flashing.

Method used

By obtaining the first information indicating whether the element is located outside the display interface, the second element with the same data is fixed in the display interface in response to the information, avoid calculating the distance and scrolling height of the element from the top of the display interface, and monitoring element position changes using the cross-observer and callback functions, switching the level and transparency of the element to achieve the ceiling effect.

Benefits of technology

Reduces the waste of computing resources, avoids abnormal page flashes, and improves computing efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691267B_ABST
    Figure CN114691267B_ABST
Patent Text Reader

Abstract

This application discloses an information processing method, comprising: obtaining first information; the first information is used to indicate whether a first element is located outside a display interface; the first element is an element of a page displayed on the display interface; in response to the first information indicating that the first element is located outside the display interface, displaying a second element in a fixed area within the display interface, wherein the data of the second element is the same as the data of the first element. In addition, this application also discloses an information processing device, an electronic device, and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing, and is related to but not limited to an information processing method, apparatus, device and storage medium. Background Art

[0002] For example, element A on a page is originally displayed in the window page, but as the user continues to scroll the page, element A gradually disappears from the window page. Currently, a method for real-time monitoring of page scrolling events has been proposed in the related art to address this scenario. This method can keep element A at the top of the window page.

[0003] In related art, the method for real-time monitoring of page scrolling events includes the following steps: calculating the distance between element A and the top of the window page and the scroll height of the window page. When the latter value is greater than the former value, it is determined that element A is outside the top of the window. In this case, element A can be fixedly displayed at the top of the window. However, due to the different browser compatibility, the calculation formula varies, and the need to calculate the distance between element A and the top of the window page and the scroll height of the window page will result in computational difficulties and waste of computing resources. Summary of the Invention

[0004] The embodiments of the present application provide an information processing method, apparatus, device and storage medium to solve at least one problem existing in the related art, which can avoid calculating the distance between the element and the top of the window page and the scrolling height of the window page, thereby reducing the waste of computing resources.

[0005] The technical solution of this application is achieved as follows:

[0006] In a first aspect, an embodiment of the present application provides an information processing method, the method comprising:

[0007] Acquire first information; the first information is used to indicate whether a first element is located outside the display interface; the first element is an element of a page displayed on the display interface;

[0008] In response to the first information indicating that the first element is located outside the display interface, a second element is fixedly displayed in a fixed area within the display interface, and data of the second element is the same as data of the first element.

[0009] In a second aspect, an embodiment of the present application provides an information processing device, the device comprising:

[0010] An acquiring unit, configured to acquire first information; the first information being used to indicate whether a first element is located outside a display interface; the first element being an element of a page displayed on the display interface;

[0011] The display unit is configured to display a second element fixedly in a fixed area within the display interface in response to the first information indicating that the first element is located outside the display interface, wherein data of the second element is the same as data of the first element.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned information processing method when executing the computer program.

[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned information processing method is implemented.

[0014] The embodiments of the present application provide an information processing method, apparatus, device, and storage medium, which obtain first information, and in response to the first information indicating that the first element is outside the display interface, a second element is fixedly displayed in a fixed area within the display interface; wherein the first information is used to indicate whether the first element is outside the display interface, the first element is an element of a page displayed on the display interface, and the data of the second element is the same as the data of the first element. In this way, when determining whether the first element is outside the display interface, it is determined based on the obtained first information, rather than by calculating the distance between the first element and the top of the display interface and the scrolling height of the display interface, thereby avoiding the calculation of the distance between the first element and the top of the display interface and the scrolling height of the display interface, and reducing the waste of computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 An information processing system provided in an embodiment of the present application;

[0016] Figure 2 Schematic diagram of an optional flow chart of the information processing method provided in the embodiment of the present application;

[0017] Figure 3A Optional interface diagram of the display interface provided in the embodiment of the present application;

[0018] Figure 3B Optional interface diagram of the display interface provided in the embodiment of the present application;

[0019] Figure 3C Optional interface diagram of the display interface provided in the embodiment of the present application;

[0020] Figure 4 Schematic diagram of an optional flow chart of the information processing method provided in the embodiment of the present application;

[0021] Figure 5 An optional structural diagram of an information processing device provided in an embodiment of the present application;

[0022] Figure 6 This is a schematic diagram of an optional structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the specific technical solutions of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application but are not intended to limit the scope of the present application.

[0024] The embodiments of the present application may provide an information processing method and apparatus, a device (eg, an electronic device), and a storage medium (eg, a computer-readable storage medium). In practical applications, the information processing method may be implemented using an information processing device.

[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0026] The application scenarios of the information processing method provided in this application include: when a user is browsing a long page, they need to switch the content or components of a tab. However, because the page is too long, after scrolling down, the selected content of the tab cannot be seen in the page window. Therefore, when a target element A relatively positioned in the original page is about to disappear from the window page, it is necessary to hide target element A and display a ceiling-mounted target element B, where the data of target element B is the same as that of target element A. The long page is the page described in the following embodiment, the window page is the display interface described in the following embodiment, target element A is the first element described in the following embodiment, and target element B is the second element described in the following embodiment.

[0027] The information processing method of the embodiment of the present application can be applied to Figure 1 The information processing device 100 is shown.

[0028] An information processing device obtains first information; the first information is used to indicate whether a first element is located outside a display interface; the first element is an element of a page displayed on the display interface; in response to the first information indicating that the first element is located outside the display interface, a second element is displayed in a fixed area within the display interface, and the data of the second element is the same as the data of the first element.

[0029] Next, combine Figure 1 The schematic diagram of the information processing device 100 shown in FIG. 1 illustrates various embodiments of the information processing method, apparatus, device, and storage medium provided in the embodiments of the present application.

[0030] Figure 2 This is a schematic diagram of an implementation flow of an information processing method provided in an embodiment of the present application, which is applied to an information processing device, such as Figure 2 As shown, the method may include the following steps:

[0031] S201: An information processing device obtains first information.

[0032] Here, the first information is used to indicate whether the first element is located outside the display interface.

[0033] In the case that the first element is located outside the display interface, the user will not be able to see the first element on the display interface.

[0034] In one example, if Figure 3A As shown, the first element 300 is located outside the display interface 301 .

[0035] When the first element is located within the display interface, the user can see the first element on the display interface.

[0036] Here, when the first element is located within the display interface, the embodiment of the present application does not impose any limitation on the specific position of the first element within the display interface.

[0037] In one example, if Figure 3B As shown, the first element 300 is located in the middle of the display interface 301 .

[0038] In another example, Figure 3C As shown, a portion of the first element 300 is located within the display interface 301 , and another portion of the first element 300 is located outside the display interface 301 .

[0039] The embodiment of the present application does not limit the specific representation of the first information. For example, the first information can be represented by a first Boolean value.

[0040] When the first information is represented by a first Boolean value, the first Boolean value is true or false. If the first Boolean value is true, it indicates that the first element is located within the display interface; if the first Boolean value is false, it indicates that the first element is located outside the display interface.

[0041] In the embodiment of the present application, the display interface is an interface displayed on a terminal device (such as a mobile phone, tablet computer, etc.).

[0042] The embodiment of the present application does not impose any limitation on the type of display interface.

[0043] In one example, the display interface is an interface of a browser displayed on a terminal device.

[0044] In another example, the display interface is the interface of various application programs (Application, APP) installed on the terminal device.

[0045] The embodiment of the present application does not impose any limitation on the number of pages included in the display interface.

[0046] In one example, the display interface includes a page.

[0047] In another example, the display interface includes multiple pages.

[0048] Here, when the display interface includes multiple pages, the page content of each of the multiple pages may be the same or different, and the embodiment of the present application does not impose any limitation on this.

[0049] When the display interface includes multiple pages, the embodiment of the present application does not impose any limitation on the page content of each of the multiple pages.

[0050] In the embodiment of the present application, the first element is an element of a page displayed on the display interface.

[0051] Here, when the display interface includes one page, the page refers to the page included in the display interface; when the display interface includes multiple pages, the page refers to any one of the multiple pages.

[0052] In one example, when the display interface is a browser interface and the browser interface includes page 1, the page is page 1.

[0053] In another example, when the display interface is a browser interface, and the browser interface includes page 1, page 2, and page 3, the page is page 2.

[0054] The embodiment of the present application does not impose any limitation on the number of elements on a page.

[0055] In one example, the number of elements of the page is one.

[0056] In another example, the number of elements of the page is plural.

[0057] Here, when there are multiple elements on the page, the first element may be any one of the multiple elements.

[0058] In one example, when the elements of a page include element A, element B, and element C, the first element is element A.

[0059] The embodiments of the present application do not impose any limitation on the specific content of the first element.

[0060] In one example, the first element is a navigation bar.

[0061] In another example, the first element is a component in a navigation bar.

[0062] In an embodiment of the present application, after receiving a first movement instruction indicating a first movement direction, the information processing device may move the first element within the display interface in the first movement direction indicated by the first movement instruction based on the first movement instruction. The first movement direction may be upward, downward, left, or right, and is not limited in this embodiment of the present application.

[0063] In one example, after receiving the first upward movement instruction, the first element will move upward within the display interface according to the upward movement indicated by the first movement instruction.

[0064] In the embodiment of the present application, while a first element is moving within the display interface based on a first movement instruction, the information processing device acquires first information indicating a positional relationship between the first element and the display interface, that is, indicating whether the first element is located outside the display interface. If the first information indicates that the first element is located outside the display interface, the information processing device executes S202 described below.

[0065] S202. In response to the first information indicating that the first element is located outside the display interface, the information processing device fixedly displays a second element in a fixed area within the display interface.

[0066] Here, the data of the second element is the same as the data of the first element. That is, the first element and the second element are different elements with the same data, and when the first element and the second element receive the same user operation, the information processing device performs the same process.

[0067] In one example, the user operation is a click operation, and the processing corresponding to the click operation is page switching. After the first element receives the user's click operation, the information processing device will execute the page switching. After the second element receives the same user click operation, the information processing device will also execute the page switching.

[0068] In the embodiment of the present application, the first element and the second element are not displayed at the same time. When the information processing device displays the first element, the second element is not displayed. When the information processing device displays the second element, the first element is not displayed.

[0069] The display position of the first element is not fixed and can move with the movement of the page, while the display position of the second element is fixed and does not move with the movement of the page.

[0070] When the information processing device determines that the first element indicated by the acquired first information is located outside the display interface, the information processing device fixedly displays the second element in a fixed area within the display interface.

[0071] In an embodiment of the present application, after receiving a first movement instruction indicating a first movement direction, the first element can be moved within the display interface in the first movement direction indicated by the first movement instruction based on the first movement instruction. When the first element moves outside the display interface, the user cannot see the first element on the display interface. The information processing device will display the second element in a fixed area, and the first element will continue to move in the first movement direction indicated by the first movement instruction.

[0072] In one example, if the first moving direction indicated by the first moving instruction is upward, the first element moves upward within the display interface based on the upward first moving instruction. When the first element moves outside the display interface, the user cannot see the first element on the display interface. The information processing device will display the second element in a fixed area, and the first element will continue to move upward according to the upward first moving instruction.

[0073] Here, the fixed area is an area on the display interface. The embodiment of the present application does not impose any limitation on the specific position of the fixed area on the display interface.

[0074] In an embodiment of the present application, when a first element is outside a display interface, the display state of a second element will change from a hidden state to a visible state, so that the second element is fixedly displayed in a fixed area within the display interface. At this time, the information processing device will receive a user operation on the second element. After receiving the operation, the information processing device performs processing corresponding to the operation. The specific content of the operation is not limited in this embodiment of the present application, for example, the operation may be a single click or a double click.

[0075] In the related art, in order to achieve the ceiling suction effect, the page scrolling event is monitored in real time, and whether the target element has touched the top of the window is determined based on the distance between the target element and the top of the window and the scrolling height of the page at this time, and the distance between the target element and the top is set by judging the position of the target element. However, when calculating the height of the target element to be suctioned from the page and the scrolling height of the page, the compatibility of different browsers will lead to different calculation formulas, which will be unfavorable for calculation, and real-time monitoring will cause a waste of computing resources. In addition, in the process of realizing the ceiling suction, since only the positioning state of one element is changed, the monitoring parameters of the cross observer will be triggered to change, and the monitored element will appear repeatedly in the page, causing the listener to fall into an infinite loop and causing the page to flash abnormally.

[0076] An embodiment of the present application provides an information processing method, which obtains first information, and in response to the first information indicating that the first element is located outside the display interface, a second element is fixedly displayed in a fixed area within the display interface; wherein the first information is used to indicate whether the first element is located outside the display interface, the first element is an element of the page displayed on the display interface, and the data of the second element is the same as the data of the first element. In this way, when determining whether the first element is located outside the display interface, it is determined based on the obtained first information, rather than by calculating the distance between the first element and the top of the display interface and the scrolling height of the display interface, thereby avoiding the calculation of the distance between the first element and the top of the display interface and the scrolling height of the display interface, reducing the waste of computing resources. In addition, by changing the positioning state of the two elements, and the two elements use synchronous data. Wherein, in the case where the two elements use synchronous data, the two elements will use the framework state management tool to achieve data synchronization to avoid the problem of abnormal page flashing.

[0077] In some embodiments, the obtaining of the first information includes: the information processing device running a cross observer; and obtaining the first information sent by a callback function through the running cross observer.

[0078] Here, after the information processing device runs the intersection observer, the callback function may obtain the first information and send the obtained first information to the intersection observer.

[0079] The method for obtaining the first information by the callback function includes: when the callback function meets the set conditions, it will automatically trigger the acquisition of the first information.

[0080] Here, the callback function is a function carried by the cross observer itself. As the cross observer runs, when the callback function meets the set conditions, it will be automatically triggered and the first information will be obtained.

[0081] The embodiments of the present application do not impose any limitation on the specific content of the setting conditions.

[0082] In one example, the setting condition is that the first element is outside the display interface.

[0083] In an embodiment of the present application, when the page is scrolled down, the first element will continue to move upward within the display interface. The intersection observer can observe the dynamics of the first element A at this time and return the first information in real time through the callback function. The first information can be represented by isIntersecting. When the returned first information indicates that the first element is outside the display interface, the information processing device can modify the hierarchy and transparency of the second element, so that the second element is displayed on the display interface.

[0084] In one example, taking the display interface as window page P2 and the first element as target element A in window page P2, when the user scrolls down the page, target element A will continue to move upward in window page P2. The cross observer is asynchronously observing the dynamics of target element A at this time. The cross observer can return parameters in real time through the callback function. The parameters may include: parameters representing whether the target element is in the window page, wherein the parameter representing whether the target element is in the window page can be represented by isIntersecting, and the parameter representing whether the target element is in the window page is a Boolean type parameter. If the target element A is in window page P2, true is returned; if the target element A is not in window page P2, false is returned.

[0085] In an embodiment of the present application, before the information processing device runs the cross observer, the information processing device may first create the cross observer. After the cross observer is created, the information processing device runs the created cross observer, obtains the first element through the identity document (ID), binds the first element to the cross observer, and starts observing.

[0086] In an embodiment of the present application, in order to achieve a ceiling effect, the display status of two elements (i.e., the first element and the second element) can be switched, or the level and transparency of the two elements can be changed. When the display status of the two elements (i.e., the first element and the second element) is switched, the two elements will be repeatedly initialized and loaded each time the switch occurs. By changing the level and transparency of the two elements, there is no need to repeatedly initialize and load the two elements, which can avoid unnecessary performance consumption and repeated interface calls.

[0087] In some embodiments, the fixed display of the second element in the fixed area within the display interface includes: the information processing device modifies the level of the second element from the first level to the second level, and modifies the transparency of the second element from the first transparency to the second transparency, so as to fixedly display the second element in the fixed area; when the level of the second element is the first level, the second element is not fixedly displayed in the fixed area, when the level of the second element is the second level, the second element is fixedly displayed in the fixed area, when the transparency of the second element is the first transparency, the second element is not fixedly displayed in the fixed area, and when the transparency of the second element is the second transparency, the second element is fixedly displayed in the fixed area.

[0088] In the embodiment of the present application, the hierarchy is used to indicate the hierarchy of an element in the display interface, and the hierarchy can be represented by a z-index, where the element can be the second element or other elements, and the embodiment of the present application does not impose any limitations on this.

[0089] The level of the second element is used to indicate the level at which the second element is located in the display interface. The level of the second element may include: a first level and a second level.

[0090] The embodiment of the present application does not impose any limitation on the specific representation of the first level. For example, the first level can be represented by a first numerical value.

[0091] In one example, when the first level is represented by a first numerical value, if the first numerical value is -1, it indicates that fixed display cannot be performed in the fixed area.

[0092] The embodiment of the present application does not impose any limitation on the specific representation of the second level. For example, the second level can be represented by a second numerical value.

[0093] In one example, when the second level is represented by a second numerical value, if the second numerical value is 1, it indicates that fixed display can be performed in a fixed area.

[0094] The embodiment of the present application does not impose any limitation on the specific representation of the first transparency. For example, the first transparency can be represented by a third value.

[0095] In one example, when the first transparency is represented by a third value, if the third value is 0, it means that fixed display cannot be performed in a fixed area.

[0096] The embodiment of the present application does not impose any limitation on the specific representation of the second transparency. For example, the second transparency can be represented by a fourth value.

[0097] In one example, when the second transparency is represented by a fourth value, if the fourth value is 1, it indicates that fixed display can be performed within a fixed area.

[0098] In some embodiments, the method also includes: the information processing device adds a target class to the set of the second element; the set includes: multiple classes, each of the multiple classes is used to indicate a function; the target class is used to determine a fixed area of the second element within the display interface.

[0099] The embodiments of the present application do not impose any limitations on the functions indicated by each of the multiple categories.

[0100] The embodiment of the present application does not impose any limitation on the class name of the target class.

[0101] In one example, the class name of the target class is fixedOpacity.

[0102] In an embodiment of the present application, since the target class can be used to determine the fixed area of the second element in the display interface, the information processing device can add a target class to multiple classes of the second element to determine the fixed area of the second element in the display interface.

[0103] In one example, the information processing device adds a target class fixedOpacity to the set of second elements (classList).

[0104] Here, the information processing device may add the target class to the set of second elements by controlling the first variable.

[0105] Here, the embodiment of the present application does not impose any limitation on the type of the first variable.

[0106] In one example, the type of the first variable is a public variable.

[0107] In the case where the type of the first variable is a public variable, the public variable may be represented by isFixed.

[0108] In another example, the first variable is of a local variable type.

[0109] In an embodiment of the present application, when the first element obtained by the information processing device is located outside the display interface, a new class can be added to the set of second elements by controlling the first variable, and the hierarchy and transparency of the second element can be changed through the newly added class, so that the second element can be displayed on the page.

[0110] In some embodiments, the method further includes: the information processing device hiding the second element fixedly displayed in the fixed area in response to the first information indicating that the first element is located within the display interface.

[0111] Here, after the information processing device receives a first movement instruction indicating a first movement direction, the first element can be moved within the display interface in the first movement direction indicated by the first movement instruction based on the first movement instruction. When the first element moves outside the display interface, the user cannot see the first element on the display interface. The information processing device will display the second element fixedly in the fixed area. At this time, the second element is displayed on the display interface instead of the first element. After the information processing device receives a second movement instruction indicating a second movement direction, the first element can be moved within the display interface in the second movement direction indicated by the second movement instruction based on the second movement instruction. When the first element moves within the display interface, the user can see the first element on the display interface. The information processing device will hide the second element fixedly displayed in the fixed area. At this time, the first element is displayed on the display interface instead of the second element.

[0112] In one example, if the first movement direction indicated by the first movement instruction is upward and the second movement direction indicated by the second movement instruction is downward, the first element will move upward within the display interface based on the upward first movement instruction. If the first element moves outside the display interface, the user will not be able to see the first element on the display interface, and the information processing device will display the second element fixedly in a fixed area. After receiving the downward second movement instruction, the first element will move downward within the display interface based on the downward second movement instruction. If the first element moves within the display interface, the user will be able to see the first element on the display interface. The information processing device will hide the second element fixedly displayed in the fixed area, and at this time, the first element will be displayed on the display interface.

[0113] Here, the second moving direction may be upward, downward, leftward or rightward, and this embodiment of the present application does not impose any limitation on this.

[0114] In an embodiment of the present application, when the second element is adsorbed on the top of the display interface, the first element is outside the display interface, and the display interface is scrolled upward, the cross observer observes the dynamics of the first element and returns the first information through the callback function. When the returned first information indicates that the first element is within the display interface, the information processing device can delete the target class in the set of the second element, so that the second element is not fixedly displayed within the display interface.

[0115] In one example, taking the display interface as window page P2, the first element as target element A in window page P2, and the second element as ceiling element B, when ceiling element B is adsorbed on the top of window page P2, target element A is outside the window page at this time, and window page P2 scrolls up. The intersection observer still monitors the intersection of target element A in the current window page P2. When target element A appears in window page P2, the intersection observer monitors the returned parameter isIntersecting as true through the callback function. At this time, the public variable isFixed is controlled to be true to modify the classList of ceiling element B, and the fixedOpacity class of ceiling element B is deleted, so that ceiling element B is restored to its initial state and is not displayed on the page. Then, as window page P2 scrolls up, target element A will be completely restored to window page P2.

[0116] In an embodiment of the present application, after obtaining the first information, the information processing device may further obtain boundary information, where the boundary information is used to indicate the distance between the first element and the upper boundary, lower boundary, left boundary, or right boundary of the display interface.

[0117] Here, after obtaining the boundary information, the information processing device can determine the distance between the first element and the boundary of the display interface, and determine the timing of displaying the second element in a fixed area and the timing of hiding the second element in a fixed area based on the distance.

[0118] In some embodiments, hiding the second element displayed in the fixed area includes: the information processing device modifies the level of the second element from the second level to the first level, and modifies the transparency of the second element from the second transparency to the first transparency, so as to hide the second element fixedly displayed in the fixed area.

[0119] Here, when the level of the second element is the first level, the second element is not fixedly displayed in the fixed area; when the level of the second element is the second level, the second element is fixedly displayed in the fixed area; when the transparency of the second element is the first transparency, the second element is not fixedly displayed in the fixed area; when the transparency of the second element is the second transparency, the second element is fixedly displayed in the fixed area.

[0120] In an embodiment of the present application, when the information processing device changes the hierarchy of the second element from the second level to the first level and changes the transparency of the second element from the second transparency to the first transparency, the first element will be displayed on the display interface, and the second element fixedly displayed in a fixed area will be hidden and no longer displayed.

[0121] In some embodiments, the method further includes: the information processing device deleting the target class in the set of second elements.

[0122] Here, the set includes: multiple classes, each of the multiple classes is used to indicate a function; the target class is a class newly added to the set of the second element; the target class is used to determine a fixed area of the second element in the display interface.

[0123] In an embodiment of the present application, after the information processing device deletes the target class in the set of second elements, the information processing device may cancel the fixed area in the display interface.

[0124] The following will be Figure 4 The flowchart shown is a detailed description of the information processing method provided by this application.

[0125] S401: The information processing device obtains a target element A.

[0126] Here, the target element A is the first element described in the above embodiment.

[0127] S402: The information processing device creates a callback function callback of the target element A.

[0128] Here, the information processing device can monitor whether the target element A is located within the display interface through the callback function callback.

[0129] S403: The information processing device creates an IntersectionObserver (IO) object.

[0130] S404: The information processing device runs the IO object and observes the target element A through the IO object.

[0131] S405: The page starts to scroll, and the IO object observes whether the target element A is located within the window page.

[0132] Here, the window page is the display interface described in the above embodiment.

[0133] S406: When the target element A disappears outside the window page, the IO object returns parameters through the callback function.

[0134] Here, the parameters include: first information and boundary information.

[0135] S407: The information processing device obtains the parameters returned by the callback function.

[0136] S408: The information processing device determines whether to attach the target element A to the ceiling based on the parameters.

[0137] S409: If the parameter is true, it indicates that the target element A appears in the window page. At this time, the target element A is not capped.

[0138] S410: If the parameter is false, it indicates that the target element A disappears outside the window page. At this time, the ceiling element B is suspended.

[0139] Here, the ceiling element B is the second element described in the above embodiment.

[0140] In the embodiment of the present application, the method further includes: the information processing device cancels monitoring of the target element A.

[0141] Here, the information processing device may cancel monitoring of the target element A when switching to other scenarios, for example, when the user closes the browser interface. The present embodiment does not impose any limitation on the limitations of other scenarios.

[0142] In an embodiment of the present application, the method further includes: after the information processing device creates the IO object, configuring parameters of the IO object, wherein the parameters may include operating parameters of the IO object.

[0143] The parameters of the IO object can be configured according to the actual usage scenario, and the embodiments of the present application do not impose any restrictions on this.

[0144] Figure 5 An information processing device provided in an embodiment of the present application, such as Figure 5 As shown, the information processing device 500 includes:

[0145] An acquiring unit 501 is configured to acquire first information; the first information is used to indicate whether a first element is located outside a display interface; the first element is an element of a page displayed on the display interface;

[0146] The display unit 502 is configured to display a second element fixedly in a fixed area within the display interface in response to the first information indicating that the first element is located outside the display interface, wherein data of the second element is the same as data of the first element.

[0147] In some embodiments, the acquiring unit 501 is further configured to:

[0148] Run the Cross Observer;

[0149] The first information sent by the callback function is obtained by running the cross observer.

[0150] In some embodiments, the display unit 502 is further configured to:

[0151] Change the level of the second element from the first level to the second level, and change the transparency of the second element from the first transparency to the second transparency, so as to display the second element fixedly in the fixed area; when the level of the second element is the first level, the second element is not fixedly displayed in the fixed area, and when the level of the second element is the second level, the second element is fixedly displayed in the fixed area, and when the transparency of the second element is the first transparency, the second element is not fixedly displayed in the fixed area, and when the transparency of the second element is the second transparency, the second element is fixedly displayed in the fixed area.

[0152] In some embodiments, the information processing device 500 further includes a processing unit configured to:

[0153] A target class is added to the set of the second element; the set includes: a plurality of classes, each of the plurality of classes is used to indicate a function; the target class is used to determine a fixed area of the second element in the display interface.

[0154] In some embodiments, the information processing device 500 further includes a hiding unit configured to:

[0155] In response to the first information indicating that the first element is located within the display interface, the second element fixedly displayed in the fixed area is hidden.

[0156] In some embodiments, the hidden unit is further configured to:

[0157] The level of the second element is changed from the second level to the first level, and the transparency of the second element is changed from the second transparency to the first transparency, so as to hide the second element that is fixedly displayed in the fixed area; when the level of the second element is the first level, the second element is not fixedly displayed in the fixed area; when the level of the second element is the second level, the second element is fixedly displayed in the fixed area; when the transparency of the second element is the first transparency, the second element is not fixedly displayed in the fixed area; when the transparency of the second element is the second transparency, the second element is fixedly displayed in the fixed area.

[0158] In some embodiments, the information processing device 500 further includes a deletion unit configured to:

[0159] Delete the target class in the set of the second element; the set includes: multiple classes, each of the multiple classes is used to indicate a function; the target class is a newly added class in the set of the second element; the target class is used to determine a fixed area of the second element within the display interface.

[0160] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the information processing method provided in the above embodiment is implemented.

[0161] An embodiment of the present application further provides a storage medium, that is, a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the information processing method provided in the above embodiment is implemented.

[0162] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0163] It should be noted that Figure 6 This is a hardware entity diagram of an electronic device according to an embodiment of the present application, such as Figure 6 As shown, the electronic device 600 includes: a processor 601, at least one communication bus 602, at least one external communication interface 604, and a memory 605. The communication bus 602 is configured to enable communication between these components. In one example, the electronic device 600 also includes: a user interface 603, wherein the user interface 603 may include a display screen, and the external communication interface 604 may include a standard wired interface and a wireless interface.

[0164] The memory 605 is configured to store instructions and applications executable by the processor 601, and can also cache data to be processed or processed by the processor 601 and various modules in the electronic device (for example, image data, audio data, voice communication data and video communication data), which can be implemented through flash memory (FLASH) or random access memory (RAM).

[0165] It should be understood that “one embodiment” or “an embodiment” mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, “in one embodiment” or “in some embodiments” appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.

[0166] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0167] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0168] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0169] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0170] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.

[0171] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0172] The above is merely an embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. An information processing method, characterized in that: The method comprises: Running a cross observer; the cross observer is used to observe the dynamics of the first element; Obtaining, by running the intersection observer, first information sent by a callback function carried by the intersection observer; the first information is used to indicate whether the first element is located outside the display interface; the first element is an element of a page displayed on the display interface; In response to the first information indicating that the first element is located outside the display interface, a second element is fixedly displayed in a fixed area within the display interface, wherein data of the second element is the same as data of the first element, the second element and the first element are two different elements, and the fixed area is an area on the display interface; The method further includes: adding a target class to the set of the second element by controlling the first variable; the set includes: multiple classes, each of the multiple classes is used to indicate a function; the target class is used to determine a fixed area of the second element within the display interface.

2. The method according to claim 1, characterized in that The fixedly displaying the second element in the fixed area within the display interface includes: Change the level of the second element from the first level to the second level, and change the transparency of the second element from the first transparency to the second transparency, so as to display the second element fixedly in the fixed area; when the level of the second element is the first level, the second element is not fixedly displayed in the fixed area, and when the level of the second element is the second level, the second element is fixedly displayed in the fixed area, and when the transparency of the second element is the first transparency, the second element is not fixedly displayed in the fixed area, and when the transparency of the second element is the second transparency, the second element is fixedly displayed in the fixed area.

3. The method according to claim 1, characterized in that The method further comprises: In response to the first information indicating that the first element is located within the display interface, the second element fixedly displayed in the fixed area is hidden.

4. The method according to claim 3, characterized in that The second element hidden in the fixed area includes: The level of the second element is changed from the second level to the first level, and the transparency of the second element is changed from the second transparency to the first transparency, so as to hide the second element that is fixedly displayed in the fixed area; when the level of the second element is the first level, the second element is not fixedly displayed in the fixed area; when the level of the second element is the second level, the second element is fixedly displayed in the fixed area; when the transparency of the second element is the first transparency, the second element is not fixedly displayed in the fixed area; when the transparency of the second element is the second transparency, the second element is fixedly displayed in the fixed area.

5. The method according to claim 3, characterized in that The method further comprises: Delete the target class in the set of the second element; the set includes: multiple classes, each of the multiple classes is used to indicate a function; the target class is a newly added class in the set of the second element; the target class is used to determine a fixed area of the second element within the display interface.

6. An information processing device, characterized in that The device comprises: an acquisition unit, configured to run a cross viewer and, through the running cross viewer, acquire first information sent by a callback function carried by the cross viewer; the cross viewer is configured to observe the dynamics of a first element; the first information is configured to indicate whether the first element is located outside a display interface; the first element is an element of a page displayed on the display interface; a display unit configured to, in response to the first information indicating that the first element is located outside the display interface, fixedly display a second element in a fixed area within the display interface, wherein data of the second element is the same as data of the first element, the second element and the first element are two different elements, and the fixed area is an area on the display interface; A processing unit is used to add a target class to the set of the second element by controlling a first variable; the set includes: multiple classes, each of the multiple classes is used to indicate a function; the target class is used to determine a fixed area of the second element within the display interface.

7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the information processing method according to any one of claims 1 to 5 is implemented.

8. A storage medium storing a computer program, wherein when the computer program is executed by a processor, the information processing method according to any one of claims 1 to 5 is executed.

Citation Information

Patent Citations

  • Method and device for displaying page elements

    CN105335071A

  • Browsing monitoring method and device for webpage elements, equipment and storage medium

    CN110188275A