Webpage control sliding control method and device, equipment and storage medium

By intercepting the hand-raising event of the web control and using the system-level sliding curve to control its sliding, the problem that the sliding curve of the web control cannot be modified is solved, and the sliding experience of the Android system control and the web control is consistent.

CN118708093AInactive Publication Date: 2024-09-27GUANG DONG MING CHUANG SOFTWARE TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410804884.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology cannot modify the sliding curve of web page controls, resulting in inconsistent sliding experiences between Android system controls and web page controls, making it difficult to efficiently control the sliding of web page controls.

Method used

By detecting touch events of web controls, intercepting hand-raising events, and controlling the inertial sliding of the displayed content of web controls based on the sliding curve of system-level controls, ensuring consistent sliding offsets.

Benefits of technology

It achieves efficient control over the sliding of web page controls, ensures the consistency of the sliding experience within the device, and solves the problem that the sliding curve of web page controls cannot be modified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708093A
    Figure CN118708093A
Patent Text Reader

Abstract

The embodiment of the invention discloses a sliding control method and device for a webpage control, equipment and a storage medium. According to the technical scheme, firstly, the touch event of the webpage control is detected, then, under the condition that the touch event is the hand raising event for the webpage control, the hand raising event is intercepted, the hand raising event is used for triggering inertial sliding of the webpage control, and finally, in response to the hand raising event, inertial sliding of the display content of the webpage control is controlled. The offset of inertial sliding of the display content is determined according to a sliding curve of the system-level control. According to the sliding control method of the webpage control, inertial sliding of the display content of the webpage control is controlled according to the sliding curve of the system-level control, sliding of the webpage control can be efficiently controlled, and the consistency of sliding experience in equipment is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and relate to, but are not limited to, a method and apparatus, device, and storage medium for sliding control of a web page control. Background Art

[0002] In an electronic device equipped with an Android system, a user manually slides an Android system control, and the system control can continue to slide for a certain distance after the user lifts the hand. At the same time, a user manually slides a webpage control WebView, and the WebView can continue to slide for a certain distance after the user lifts the hand.

[0003] However, in the current related art, for sliding of system controls, the Android system can modify the sliding curve of the system controls, but cannot modify the sliding curve of the web page controls. For sliding of web page controls, the web page controls can only modify the sliding curve of their corresponding applications.

[0004] Therefore, how to efficiently control the sliding of web controls and ensure the consistency of the sliding experience in the device is an urgent problem to be solved. Summary of the invention

[0005] In view of this, the sliding control method, device, equipment, and storage medium of the web page control provided in the embodiments of the present application can efficiently control the sliding of the web page control and ensure the consistency of the sliding experience in the device. The sliding control method, device, equipment, and storage medium of the web page control provided in the embodiments of the present application are implemented as follows:

[0006] The sliding control method of the web page control provided in the embodiment of the present application includes: detecting a touch event on the web page control; when the touch event is a hand-raising event for the web page control, intercepting the hand-raising event, the hand-raising event is used to trigger the inertial sliding of the web page control; in response to the hand-raising event, controlling the inertial sliding of the displayed content of the web page control, and the offset of the inertial sliding of the displayed content is determined according to the sliding curve of the system-level control.

[0007] The sliding control device of the web page control provided in the embodiment of the present application includes: a detection module, which is used to detect a touch event on the web page control; an interception module, which is used to intercept the hand-raising event when the touch event is a hand-raising event for the web page control, and the hand-raising event is used to trigger the inertial sliding of the web page control; a control module, which is used to control the inertial sliding of the displayed content of the web page control in response to the hand-raising event, and the offset of the inertial sliding of the displayed content is determined according to the sliding curve of the system-level control.

[0008] The computer device provided in the embodiment of the present application includes 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 method described in the embodiment of the present application is implemented.

[0009] The computer-readable storage medium provided in the embodiment of the present application stores a computer program thereon, and when the computer program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0010] The computer program product provided in the embodiment of the present application includes a computer program, and when the computer program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0011] In the sliding control method, device, equipment, and storage medium of the web page control provided in the embodiments of the present application, the sliding of the web page control can be efficiently controlled by controlling the inertial sliding of the displayed content of the web page control according to the sliding curve of the system-level control, thereby ensuring the consistency of the sliding experience in the device and solving the technical problems raised in the background technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0013] Figure 1 A schematic diagram of sliding a contact list control provided by an embodiment of the present application;

[0014] Figure 2 A schematic diagram of a process of sliding an Android system control provided by an embodiment of the present application;

[0015] Figure 3 A schematic diagram of a process of sliding a web page control WebView provided in one embodiment of the present application;

[0016] Figure 4 A schematic diagram of a system architecture of an electronic device provided by an embodiment of the present application;

[0017] Figure 5 A schematic diagram of an implementation flow of a sliding control method for a web page control provided in one embodiment of the present application;

[0018] Figure 6 An exemplary schematic diagram of a sliding curve provided for an embodiment of the application;

[0019] Figure 7 An exemplary schematic diagram of a sliding curve provided for applying another embodiment;

[0020] Figure 8A schematic diagram of an implementation flow of a sliding control method for a web page control provided in another embodiment of the present application;

[0021] Fig. 9 A schematic diagram of the overall flow of a sliding control method for a web page control provided by an embodiment of the present application;

[0022] Fig.10 A schematic diagram of an implementation flow of a sliding control method for a web page control provided in yet another embodiment of the present application;

[0023] Fig.11 A schematic diagram of the overall flow of a sliding control method for a web page control provided by another embodiment of the present application;

[0024] Fig.12 A schematic diagram of an implementation flow of a sliding control method for a web page control provided in yet another embodiment of the present application;

[0025] Fig.13 A schematic diagram of the overall flow of a sliding control method for a web page control provided in yet another embodiment of the present application;

[0026] Fig.14 A structural schematic diagram of a sliding control device for a web page control provided by an embodiment of the present application;

[0027] Fig.15 A structural schematic diagram of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution 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 used to limit the scope of the present application.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0030] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0031] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0032] In an electronic device equipped with an Android system, a user manually slides an Android system control, and the system control can continue to slide for a certain distance after lifting the hand. Among them, the Android system control has attributes mScrollX and mScrollY, where mScrollX represents its horizontal offset value and mScrollY represents its vertical offset value, where the offset value can also be called an offset amount.

[0033] For example, in the embodiment of the present application, a vertical list control is taken as an example. Assume that in the contact list of the electronic device, the list control is 1080 pixels wide and 2376 pixels high, and there is a contact item control, and the items are arranged vertically. The overall height exceeds the list control, so only a part of the contacts can be displayed; after the vertical offset value scrollY of the list control is set to 400 pixels, the contact item control can be offset upward by 400 pixels; the specific display is as follows Figure 1 As shown, Figure 1 Each contact in the contact list includes an avatar and a name. The solid black rectangle in the figure is a list control, and the dotted part is a part of the contact item control that is not displayed. The list control has a width w of 1080 pixels and a height h of 2376 pixels. The initial horizontal offset value ScrollX of the list control is 0, and the vertical offset value ScrollY is 0. Figure 1 As shown in (a); after the vertical offset value ScrollY of the list control is set to 400 pixels, that is, the offset value ScrollX is 0, and the vertical offset value ScrollY is 400 pixels, the contact item control can be offset upward by 400 pixels, as shown in Figure 1 As shown in (b), the following that has not been displayed before can be displayed.

[0034] It should be noted that, usually, the standard refresh rate in Android is 60 frames, that is, refresh once every 16 milliseconds (ms). When the scrollY value of the list control is set to an incremental value every 16 ms in a continuous period of time (for example, 1 second), the effect is that the list control performs a sliding animation.

[0035] Based on the above examples, please refer to Figure 2 , is a schematic diagram of the process of sliding an Android system control provided by an embodiment of the present application. Figure 2As shown, it is assumed that the list is a list control in an electronic device equipped with an Android system. The electronic device includes a touch screen. The user slides the list vertically, and then the touch screen reports the event point, and then passes the event to the list control, records the event point, and calculates the real-time speed. Among them, the events include click (Down) events, hand-following sliding (Move) events, and inertial sliding (Up) events. When the event is a Down event, the system control processes the Down event and cancels the last slide, wherein the end flag is true; when the event is a Move event, that is, the user touches and slides the touch screen, which is also called a hand-following sliding event, the system control processes the Move event and updates the offset value scrollY of the control in real time according to the touch point.

[0036] When the event is an Up event, that is, a hand-raising event, the system control processes the Up event and triggers inertial sliding. At this time, the system control calculates the longitudinal velocity velocityY of the touch point corresponding to the hand-raising event when it leaves the touch screen based on the previous touch point, that is, the longitudinal velocity when Up, also known as the initial velocity. At the same time, a Scroller is built in advance in the Android system to calculate the sliding offset value; the system control records the initial velocity, initial position and initial time when the touch point leaves the touch screen, and uses Scroller to start calculating. The interface is refreshed every 16ms, that is, it is called back every 16ms under 60 frames, and it is determined whether the event is over. If not, the time difference is calculated, that is, the difference between the current time and the initial time, and then Scroller returns the position coordinates and speed at the current time, calculates the offset value, and updates the offset value ScrollY of the system control, and then waits for the next callback until the end, which means reaching the end point or the speed is still or interrupted.

[0037] It should be noted that the motion curve of the Scroller defined by the system can control the sliding curve of the system controls of the third-party applications in the electronic device.

[0038] Furthermore, if the user manually slides the webpage control WebView, the WebView can continue to slide for a certain distance after lifting the hand. The WebView in Android is different from the system control. The sliding curve of WebView is implemented in the Scroller of the web kernel, for example, it can be implemented in the Scroller in the Google source code or WeChat code. The basic principle of sliding is similar to the sliding of the above-mentioned system controls. The web also has scrollX and scrollY attributes representing the offset, and the internal Scroller calculates and updates the sliding offset value.

[0039] For example, please refer to Figure 3 , is a schematic diagram of a process flow of sliding a web page control WebView provided by an embodiment of the present application. Figure 3 As shown, the user slides the web control WebView vertically, and then the touch screen reports the event point, and then passes the event to the web control WebView. Among them, the events include Down event, Move event and Up event. When the event is a Down event, the web control WebView processes the Down event, that is, it is processed in the web kernel, that is, Web Down, and then cancels the last slide. At the same time, it also calculates the real-time speed of the touch point, where the end flag of canceling the last slide is true; when the event is a Move event, that is, the user touches and slides the touch screen, which is also called a hand-following slide event, the web control WebView processes the Move event, that is, it is processed in the web kernel, that is, Web Move, and updates the offset value web-scrollY of the web control in real time according to the touch point.

[0040] When the event is an Up event, that is, a hand-raising event, the webpage control WebView processes the Up event, that is, it is processed in the web kernel, that is, Web Up, triggering inertial sliding. At this time, the webpage control calculates the longitudinal velocity velocityY of the touch point corresponding to the hand-raising event when it leaves the touch screen according to the previous touch point, that is, the longitudinal velocity when Up, also known as the initial velocity. At the same time, a Scroller, that is, Web Scroller, is built in advance in the webpage control to calculate the sliding offset value; the webpage control records the initial velocity, initial position and initial time when the touch point leaves the touch screen, and uses Scroller to start calculation, refreshes the interface every 16ms, that is, calls back every 16ms under 60 frames, and determines whether the event is over. If not, calculate the time difference, that is, the difference between the current time and the initial time, and then Scroller returns the position coordinates and speed at the current time, calculates the offset value, and updates the offset value web-scrollY of the webpage control, and then waits for the next callback until the end, which means reaching the end point or the speed is still or interrupted.

[0041] That is to say, the touch event is transferred through the web page control WebView and passed to the web kernel for processing. The processing flow in the web kernel is similar to that in the system control.

[0042] However, in the current related technologies, for the sliding of system controls, the Android system can modify the sliding curve of system controls, but cannot modify the sliding curve of web controls. For the sliding of web controls, web controls can only modify the sliding curve of their corresponding applications. Therefore, how to efficiently control the sliding of web controls and ensure the consistency of the sliding experience in the device is an urgent problem to be solved.

[0043] In view of this, an embodiment of the present application provides a sliding control method for a web page control, which is applied to an electronic device, and specifically comprises: firstly detecting a touch event of the web page control, and then intercepting the hand-raising event when the touch event is a hand-raising event for the web page control, the hand-raising event is used to trigger the inertial sliding of the web page control, and finally responding to the hand-raising event to control the inertial sliding of the displayed content of the web page control, and the offset of the inertial sliding of the displayed content is determined according to the sliding curve of the system-level control. In the sliding control method for the web page control of the present application, by controlling the inertial sliding of the displayed content of the web page control according to the sliding curve of the system-level control, the sliding of the web page control can be efficiently controlled to ensure the consistency of the sliding experience in the device.

[0044] It should be understood that the electronic devices involved in the embodiments of the present application may be mobile phones, tablet computers, laptop computers, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, smart screens, artificial intelligence (AI) speakers, headphones, terminals in industrial control, terminals in self-driving, terminals in remote medical surgery, terminals in smart grids, terminals in transportation safety, terminals in smart cities, terminals in smart homes, personal digital assistants (PDAs), etc., and the embodiments of the present application are not limited to this.

[0045] In some embodiments, the electronic device can communicate with other electronic devices or servers through a communication network. The communication network can be a wired network or a wireless network. For example, the communication network can be a local area network (LAN) or a wide area network (WAN), such as the Internet. When the communication network is a local area network, exemplarily, the communication network can be a short-range communication network such as a wireless fidelity (Wi-Fi) hotspot network, a Wi-Fi P2P network, a Bluetooth network, a zigbee network, or a near field communication (NFC) network. When the communication network is a wide area network, exemplarily, the communication network can be a third generation wireless telephone technology (3G) network, a fourth generation mobile communication technology (4G) network, a fifth generation mobile communication technology (5G) network, a future-evolved public land mobile network (PLMN) or the Internet, etc.

[0046] In some embodiments, the electronic device may install one or more APPs (applications). APP can be referred to as an application, which is a software program that can implement one or more specific functions. For example, instant messaging applications, video applications, audio applications, image capture applications, cloud desktop applications, painting applications, etc. The applications mentioned in the embodiments of the present application may be system applications installed when the electronic device leaves the factory, or may be third-party applications downloaded from the Internet or obtained from other electronic devices by the user during the use of the electronic device.

[0047] In some embodiments, the electronic device includes but is not limited to running Windows, Android or other operating systems.

[0048] For example, Figure 4 A schematic diagram of the system architecture of an electronic device provided in one embodiment of the present application. Figure 4 As shown, the electronic device includes components such as a processor 410, a memory 420, a transceiver 430, a display unit 440, an input unit 450, a sensor 460, an audio circuit 470, and a power module 480.

[0049] The processor 410 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 420, and calling data stored in the memory 420, the processor 410 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 410 may include one or more processing units; optionally, the processor 410 may integrate an application processor, which mainly processes operating devices, user interfaces, and application programs, etc. Of course, other processors may also be included, which are not listed here one by one.

[0050] The memory 420 can be used to store software programs and modules. The processor 410 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 420. The memory 420 mainly includes a program storage area and a data storage area, wherein the program storage area can store operating devices, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device (such as audio data, phone book, etc.), etc. In addition, the memory 420 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 devices.

[0051] The transceiver 430 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared technology (IR), etc. The transceiver 430 can be one or more devices integrating at least one communication processing module, for example, an antenna and a baseband processor are integrated into the transceiver 430, or an antenna and a modem processor are integrated into the transceiver 430, etc., which are not limited here.

[0052] The display unit 440 may be used to display information input by a user or information provided to a user and various menus of the electronic device. The display unit 440 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc., which is not limited here.

[0053] The input unit 450 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the input unit 450 can collect the user's operations on or near it, and drive the corresponding connection device according to a pre-set program. In addition, the input unit 450 may include a touch panel, which can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel, the input unit 450 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of function keys (such as volume control keys, switch keys, etc.), trackballs, joysticks, etc.

[0054] The electronic device may also include at least one sensor 460, such as a gyroscope sensor, a motion sensor, and other sensors. The motion sensor may include an acceleration sensor for detecting the magnitude of acceleration in all directions, and the magnitude and direction of gravity when stationary, which can be used for applications to identify the posture of the electronic device, such as horizontal and vertical screen switching, related games, magnetometer posture calibration, etc. As for other sensors that may be configured in the electronic device, such as a pressure gauge, a barometer, a hygrometer, a thermometer, an infrared sensor, a fingerprint sensor, etc., they will not be described in detail here.

[0055] The audio circuit 470 may include a speaker and a microphone, and may provide an audio interface between a user and an electronic device. The audio circuit 470 may transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 470 and converted into audio data, and then the audio data is output to the processor 410 for processing, and then sent to another electronic device through the video circuit, or the audio data is output to the memory 420 for further processing.

[0056] The electronic device also includes a power module 480 for supplying power to various components. Optionally, the power module 480 can be logically connected to the processor 410 through a power management device, so that the power management device can manage functions such as charging, discharging, and power consumption.

[0057] Although not shown, the electronic device may further include a camera. Optionally, the camera may be located at the front or rear of the electronic device, which is not limited in the present embodiment.

[0058] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0059] In order to make the purpose and technical solution of the present application clearer and more intuitive, the sliding control method, device, equipment, and storage medium of the web page control provided by the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] Please refer to Figure 5 , is a schematic diagram of the implementation flow of a sliding control method for a web page control provided by an embodiment of the present application. The method can be applied to Figure 4 The electronic equipment shown, such as Figure 5 As shown, the method may include the following steps 501 to 503:

[0061] Step 501: Detect a touch event on a web page control.

[0062] It should be understood that the web page control WebView is a type of View control, which is one of the most basic user interface elements in Android development. It represents a view space on an interface that can display text, pictures, or other content. All Android controls, whether simple buttons (Button), text views (TextView) or complex layouts (such as RelativeLayout and ListView), have a common base class of View. The web page control WebView is a control for displaying web page content, which includes text and pictures. WebView is a user interface (UI) component in Android that is used to embed and display web page content in applications. It is based on the WebKit rendering engine, or it can be based on the Chromium browser engine, and is essentially an embedded browser.

[0063] By using WebView, developers can directly load web pages, provide embedded standard markup language (HyperText Markup Language, HTML) content for creating web pages, process multi-paradigm high-level interpreted programming languages ​​(JavaScript, JS) based on prototypes and first-class functions, etc., so that applications can display dynamic content without leaving the application interface.

[0064] It should also be understood that touch events can include click events, hand-following sliding events, hand-raising events, pressing events, etc., and this application does not limit this. Among them, click events generally refer to the operation of the user's finger clicking the touch screen; hand-following sliding events include the sliding operation of the user's finger on the touch screen after clicking the touch screen, and the inertial sliding operation caused by the user's finger leaving the touch screen; hand-raising events refer to the operation of the user's finger lifting and leaving the touch screen; pressing events refer to the operation of the user's finger applying a certain force on the touch screen and pressing the touch screen.

[0065] In some embodiments, the electronic device detects touch events on the web page controls through its own pressure sensor, gravity sensor, displacement sensor, etc.

[0066] Step 502: When the touch event is a hand-raising event for a web page control, intercept the hand-raising event, and the hand-raising event is used to trigger the inertial sliding of the web page control.

[0067] In some embodiments, the touch event dispatching process will first pass through the parent control of the web page control. The parent control is the system-level control corresponding to the web page control. The parent control layer can decide whether to intercept the dispatched touch event. Furthermore, in the case where the touch event is a hand-raising event for the web page control, the electronic device intercepts the hand-raising event through the parent control, so that the hand-raising event is no longer transmitted to the web page control, and the sliding process after the hand-raising event is taken over by the parent control.

[0068] It should be noted that system-level controls are implemented in the system source code, such as in the Android system source code; web page controls use web page kernels, such as Google Web kernel, manufacturer-developed web kernels, and third-party self-developed web kernels, among which those using manufacturer-developed web kernels include manufacturer-provided browsers, and those using third-party self-developed web kernels include WeChat.

[0069] Step 503, in response to the hand-raising event, controlling the inertial sliding of the displayed content of the web page control, wherein the offset of the inertial sliding of the displayed content is determined according to the sliding curve of the system-level control.

[0070] In some embodiments, the electronic device responds to a hand-raising event and obtains a target speed, a target position, and a target time when the touch point corresponding to the hand-raising event leaves the touch screen. The target speed when the touch point corresponding to the hand-raising event leaves the touch screen may be the average speed of the touch point corresponding to the hand-raising event within a period of time before leaving the touch screen, or the instantaneous speed of the touch point corresponding to the hand-raising event at the moment before leaving the touch screen, or may be a speed value preset based on experience, which is not limited in this application.

[0071] Furthermore, the electronic device updates the offset of the inertial sliding of the displayed content based on the sliding curve and the target speed, target position and target time when the touch point leaves the touch screen, so that the displayed content slides inertially according to the offset.

[0072] In some embodiments, the sliding curve is pre-set in the parent control, and can be understood as a functional relationship related to speed, position and time. The rate of change of the sliding curve is defined by the system, and uniform motion, deceleration motion, etc. can be customized.

[0073] For example, please refer to Figure 6 , is an exemplary schematic diagram of a sliding curve provided for an embodiment of the application. Figure 6 As shown in the figure, assuming that the horizontal axis is the sliding time and the vertical axis is the sliding distance, during the sliding process, the sliding distance gradually increases with the sliding time, showing a uniform motion. Figure 7 , is an exemplary schematic diagram of a sliding curve provided for another embodiment of the application. Figure 7 As shown, assuming that the horizontal axis is the sliding time and the vertical axis is the sliding distance, during the sliding process, the sliding distance gradually increases slowly with the sliding time, showing a decelerating motion.

[0074] It should be noted that the sliding curve is also called Scroller, which is a class used to calculate the View sliding offset in the Android system.

[0075] In a possible implementation, when the touch event is other events for the web page control, other events are released, and the other events are events other than the hand raising event, such as a click event, a sliding event, and the like.

[0076] In this embodiment, the electronic device first detects a touch event on the web page control, and then intercepts the hand-raising event when the touch event is a hand-raising event for the web page control. The hand-raising event is used to trigger the inertial sliding of the web page control. Finally, in response to the hand-raising event, the inertial sliding of the displayed content of the web page control is controlled. The offset of the inertial sliding of the displayed content is determined according to the sliding curve of the system-level control. In the sliding control method of the web page control of the present application, by controlling the inertial sliding of the displayed content of the web page control according to the sliding curve of the system-level control, the sliding of the web page control can be efficiently controlled to ensure the consistency of the sliding experience in the device.

[0077] Based on the above embodiments, Figure 8 A schematic diagram of the implementation flow of a sliding control method for a web page control provided in another embodiment of the present application is shown in FIG. Figure 8 As shown, the method may include the following steps 801 to 805:

[0078] Step 801, detecting a touch event on a web page control.

[0079] It should be understood that touch events can include click events, hand-following sliding events, hand-raising events, pressing events, etc., and this application does not limit this. Among them, click events generally refer to the operation of the user's finger clicking the touch screen; hand-following sliding events include the sliding operation of the user's finger on the touch screen after the user's finger clicks the touch screen, and the inertial sliding operation caused by the user's finger leaving the touch screen; hand-raising events refer to the operation of the user's finger lifting and leaving the touch screen; pressing events refer to the operation of the user's finger applying a certain force on the touch screen and pressing the touch screen.

[0080] In some embodiments, the electronic device detects touch events on the web page controls through its own pressure sensor, gravity sensor, displacement sensor, etc.

[0081] Step 802: When the touch event is a hand-raising event for a web page control, intercept the hand-raising event, and the hand-raising event is used to trigger the inertial sliding of the web page control.

[0082] In some embodiments, the touch event dispatching process will first pass through the parent control of the web page control. The parent control is the system-level control corresponding to the web page control. The parent control layer can decide whether to intercept the dispatched touch event. Furthermore, in the case where the touch event is a hand-raising event for the web page control, the electronic device intercepts the hand-raising event through the parent control, so that the hand-raising event is no longer transmitted to the web page control, and the sliding process after the hand-raising event is taken over by the parent control.

[0083] Step 803, in response to the hand-raising event, obtaining the target speed, target position and target time when the touch point corresponding to the hand-raising event leaves the touch screen.

[0084] In some embodiments, the electronic device responds to a hand-raising event and obtains a target speed, a target position, and a target time when the touch point corresponding to the hand-raising event leaves the touch screen. The target speed when the touch point corresponding to the hand-raising event leaves the touch screen may be the average speed of the touch point corresponding to the hand-raising event within a period of time before leaving the touch screen, or the instantaneous speed of the touch point corresponding to the hand-raising event at the moment before leaving the touch screen, or may be a speed value preset based on experience, which is not limited in this application.

[0085] Step 804 , triggering a target offset update event according to the target speed, target position and target time when the touch point leaves the touch screen.

[0086] In some embodiments, the offset update event can be understood as the electronic device transmitting the target speed, target position and target time when the touch point leaves the touch screen to the parent control, and executing subsequent processes through the parent control.

[0087] Step 805 , updating the offset according to the target offset update event and the sliding curve, so that the displayed content slides inertially according to the offset.

[0088] In some embodiments, the sliding curve is pre-set in the parent control, and can be understood as a functional relationship related to speed, position and time. The rate of change of the sliding curve is defined by the system, and uniform motion, deceleration motion, etc. can be customized.

[0089] In some embodiments, the parent control calculates the offset based on the target offset update event and the sliding curve, that is, the target speed, target position and target time when the touch point leaves the touch screen are input into the sliding curve (Scroller) to calculate the offset. At the same time, the Scroller calls back every 16ms (60 frames) to calculate the position and speed at that time to assign values ​​to the web control properties, that is, to update the offset of the web control to achieve the sliding effect.

[0090] In a possible implementation, the parent control only intercepts the hand-raising event, and does not intercept the click event and the sliding event. The click event and the sliding event are still processed by the web page control, and the offset value of the web page control is refreshed in real time according to the coordinate position of the touch point.

[0091] In this embodiment, the electronic device first detects a touch event on the web page control, and intercepts the hand-raising event when the touch event is a hand-raising event for the web page control. The hand-raising event is used to trigger the inertial sliding of the web page control, and then responds to the hand-raising event to obtain the target speed, target position, and target time when the touch point corresponding to the hand-raising event leaves the touch screen. According to the target speed, target position, and target time when the touch point leaves the touch screen, a target offset update event is triggered, and then the offset is updated according to the target offset update event and the sliding curve, so that the displayed content slides inertially according to the offset. By intercepting the hand-raising event, the hand-raising event can be prevented from being fed back to the web page control, and then the parent control takes over the inertial sliding process. By controlling the inertial sliding of the displayed content of the web page control according to the sliding curve of the system-level control through the parent control, the sliding of the web page control can be efficiently controlled to ensure the consistency of the sliding experience in the device.

[0092] For example, please refer to Fig. 9 , is a schematic diagram of the overall flow of a sliding control method for a web page control provided by an embodiment of the present application. Fig. 9As shown in the figure, the user slides the webpage control WebView vertically, and then the touch screen reports the event point, and then passes the event to the parent control of the webpage control WebView, records the event point, and calculates the real-time speed. Among them, the events include Down event, Move event and Up event. When the event is a Down event, the parent control does not intercept the Down event, and passes the Down event to WebView, which processes the Down event, that is, processes it in the web kernel, that is, Web Down, and cancels the last slide at the same time. The end flag of canceling the last slide is true.

[0093] When the event is a Move event, that is, the user touches and slides the touch screen, also known as a hand-following sliding event, the parent control does not intercept the Move event and passes the Move event to WebView. WebView processes the Move event, that is, it is processed in the web kernel, namely Web Move, and updates the offset value web-scrollY of the web page control in real time according to the touch point.

[0094] When the event is an Up event, that is, a hand-raising event, the parent control intercepts the Up event and triggers inertial sliding. At this time, the longitudinal speed velocityY of the touch point corresponding to the hand-raising event when it leaves the touch screen is calculated according to the previous touch point, that is, the speed when Up, also known as the initial speed. At the same time, a Scroller is built in advance in the parent control to calculate the sliding offset value; the parent control records the initial speed, initial position and initial time when the touch point leaves the touch screen, triggers the next interface refresh, and uses Scroller to start calculation. The interface is refreshed every 16ms, that is, it is called back every 16ms under 60 frames, and it is determined whether the event is over. If not, the time difference is calculated, that is, the difference between the current time and the initial time, and then Scroller returns the position coordinates and speed at the current time, calculates the offset value, and updates the offset value scrollY of the web page control, and then waits for the next callback until the end, which means reaching the end point or the speed is still or interrupted.

[0095] Based on the above embodiments, Fig.10 A schematic diagram of the implementation flow of a sliding control method for a web page control provided in another embodiment of the present application is shown as follows: Fig.10 As shown, the method may include the following steps 1001 to 1005:

[0096] Step 1001, detecting a touch event on a web page control.

[0097] It should be understood that touch events can include click events, hand-following sliding events, hand-raising events, pressing events, etc., and this application does not limit this. Among them, click events generally refer to the operation of the user's finger clicking the touch screen; hand-following sliding events include the sliding operation of the user's finger on the touch screen after the user's finger clicks the touch screen, and the inertial sliding operation caused by the user's finger leaving the touch screen; hand-raising events refer to the operation of the user's finger lifting and leaving the touch screen; pressing events refer to the operation of the user's finger applying a certain force on the touch screen and pressing the touch screen.

[0098] In some embodiments, the electronic device detects touch events on the web page controls through its own pressure sensor, gravity sensor, displacement sensor, etc.

[0099] Step 1002: When the touch event is a hand-raising event for a web page control, intercept the hand-raising event, where the hand-raising event is used to trigger inertial sliding of the web page control.

[0100] In some embodiments, the touch event dispatching process will first pass through the parent control of the web page control. The parent control is the system-level control corresponding to the web page control. The parent control layer can decide whether to intercept the dispatched touch event. Furthermore, in the case where the touch event is a hand-raising event for the web page control, the electronic device intercepts the hand-raising event through the parent control, so that the hand-raising event is no longer transmitted to the web page control, and the sliding process after the hand-raising event is taken over by the parent control.

[0101] Step 1003, in response to the hand-raising event, obtaining the target speed, target position and target time when the touch point corresponding to the hand-raising event leaves the touch screen.

[0102] In some embodiments, the electronic device responds to a hand-raising event and obtains a target speed, a target position, and a target time when the touch point corresponding to the hand-raising event leaves the touch screen. The target speed when the touch point corresponding to the hand-raising event leaves the touch screen may be the average speed of the touch point corresponding to the hand-raising event within a period of time before leaving the touch screen, or the instantaneous speed of the touch point corresponding to the hand-raising event at the moment before leaving the touch screen, or may be a speed value preset based on experience, which is not limited in this application.

[0103] Step 1004, generating a target sliding event according to the target speed, target position and target time when the touch point leaves the touch screen, and the offset of the target sliding event is determined according to the sliding curve of the system-level control.

[0104] In some embodiments, the electronic device generates a target sliding event based on the target speed, target position and target time when the touch point leaves the touch screen. That is, after the parent control intercepts the hand-raising event, a target sliding event is generated based on the hand-raising event. The target sliding event is a follow-up sliding (Move) event.

[0105] Step 1005: Send the target sliding event to the web page control to implement inertial sliding of the displayed content of the web page control.

[0106] In some embodiments, the target sliding event is sent to the web page control for processing. The target sliding event can also be a Move event that is customized and encapsulated according to the calculated position coordinates and time in the Scroller callback, and then sent to the web page control for processing. In other words, the target sliding event is processed by the web page control, and the offset value of the web page control is updated in the web page kernel.

[0107] For example, please refer to Fig.11 , is a schematic diagram of the overall flow of a sliding control method for a web page control provided by another embodiment of the present application. Fig.11 As shown in the figure, the user slides the webpage control WebView vertically, and then the touch screen reports the event point, and then passes the event to the parent control of the webpage control WebView, records the event point, and calculates the real-time speed. Among them, the events include Down event, Move event and Up event. When the event is a Down event, the parent control does not intercept the Down event, and passes the Down event to WebView, which processes the Down event, that is, processes it in the web kernel, that is, Web Down, and cancels the last slide at the same time. The end flag of canceling the last slide is true.

[0108] When the event is a Move event, that is, the user touches and slides the touch screen, also known as a hand-following sliding event, the parent control does not intercept the Move event and passes the Move event to WebView. WebView processes the Move event, that is, it is processed in the web kernel, namely Web Move, and updates the offset value web-scrollY of the web page control in real time according to the touch point.

[0109] When the event is an Up event, that is, a hand-raising event, the parent control intercepts the Up event and triggers inertial sliding. At this time, the longitudinal speed velocityY of the touch point corresponding to the hand-raising event when it leaves the touch screen is calculated according to the previous touch point, that is, the speed at Up, also known as the initial speed. The initial speed, initial position and initial time when the touch point leaves the touch screen are recorded, and Up is modified to a Move event, and continued to be passed to WebView, which processes the Move event. Further, the electronic device records the initial speed, initial position and initial time when the touch point leaves the touch screen, triggers the next interface refresh, and uses Scroller to start calculation. The interface is refreshed every 16ms, that is, it is called back every 16ms under 60 frames, and it is determined whether the event is over. If not, the time difference is calculated, that is, the difference between the current time and the initial time, and then Scroller returns the position coordinates and speed at the current time to obtain a custom Move event, and passes the custom Move event to WebView for processing. At the same time, after obtaining the custom Move event, wait for the next callback until the end, which means reaching the end point or the speed is still or interrupted.

[0110] In this embodiment, the electronic device first detects a touch event on the web page control, and intercepts the hand-raising event when the touch event is a hand-raising event for the web page control. The hand-raising event is used to trigger the inertial sliding of the web page control, and then responds to the hand-raising event to obtain the target speed, target position and target time when the touch point corresponding to the hand-raising event leaves the touch screen, and generates a target sliding event according to the target speed, target position and target time when the touch point leaves the touch screen. Finally, the target sliding event is sent to the web page control to achieve inertial sliding of the displayed content of the web page control. By intercepting the hand-raising event, the hand-raising event can be prevented from being fed back to the web page control, and then the parent control takes over the inertial sliding process. Further, based on the hand-raising event, a target sliding event is generated and sent to the web page control for processing, and the offset value can be updated in the kernel of the web page control to efficiently control the sliding of the web page control and ensure the consistency of the sliding experience in the device.

[0111] Based on the above embodiments, Fig.12 A schematic diagram of the implementation flow of a sliding control method for a web page control provided in another embodiment of the present application is shown as follows: Fig.12 As shown, the method may include the following steps 1201 to 1206:

[0112] Step 1201, detecting a touch event on a web page control.

[0113] It should be understood that touch events can include click events, hand-following sliding events, hand-raising events, pressing events, etc., and this application does not limit this. Among them, click events generally refer to the operation of the user's finger clicking the touch screen; hand-following sliding events include the sliding operation of the user's finger on the touch screen after the user's finger clicks the touch screen, and the inertial sliding operation caused by the user's finger leaving the touch screen; hand-raising events refer to the operation of the user's finger lifting and leaving the touch screen; pressing events refer to the operation of the user's finger applying a certain force on the touch screen and pressing the touch screen.

[0114] In some embodiments, the electronic device detects touch events on the web page controls through its own pressure sensor, gravity sensor, displacement sensor, etc.

[0115] Step 1202: When the touch event is a hand-raising event for a web page control, intercept the hand-raising event, where the hand-raising event is used to trigger inertial sliding of the web page control.

[0116] In some embodiments, the touch event dispatching process will first pass through the parent control of the web page control. The parent control is the system-level control corresponding to the web page control. The parent control layer can decide whether to intercept the dispatched touch event. Furthermore, in the case where the touch event is a hand-raising event for the web page control, the electronic device intercepts the hand-raising event through the parent control, so that the hand-raising event is no longer transmitted to the web page control, and the sliding process after the hand-raising event is taken over by the parent control.

[0117] Step 1203, in response to the hand-raising event, obtaining the target speed, target position and target time when the touch point corresponding to the hand-raising event leaves the touch screen.

[0118] In some embodiments, the electronic device responds to a hand-raising event and obtains a target speed, a target position, and a target time when the touch point corresponding to the hand-raising event leaves the touch screen. The target speed when the touch point corresponding to the hand-raising event leaves the touch screen may be the average speed of the touch point corresponding to the hand-raising event within a period of time before leaving the touch screen, or the instantaneous speed of the touch point corresponding to the hand-raising event at the moment before leaving the touch screen, or may be a speed value preset based on experience, which is not limited in this application.

[0119] Step 1204: inject a preset language code into the web page control, where the preset language code is used to update the offset of the inertial sliding of the displayed content according to the sliding curve of the system-level control.

[0120] In some embodiments, the preset language code includes a multi-paradigm high-level interpreted programming language JavaScript code based on prototypes and first-class functions. By injecting the preset language code into the web page control, the property value of the web page control kernel can be updated, thereby updating the offset of the inertial sliding of the displayed content according to the sliding curve of the system-level control.

[0121] Step 1205 , sending the target speed, target position and target time when the touch point leaves the touch screen to the web page control.

[0122] Step 1206, controlling the inertial sliding of the displayed content of the web page control through the preset language code in the web page control.

[0123] In some embodiments, a callback loop is created every 16ms (60 frames) in the preset language code JS, and a custom calculation formula is used to calculate the position coordinates and speed each time according to the time, and then the scrollTop attribute of the element is updated in JS to achieve inertial sliding of the displayed content of the webview.

[0124] For example, please refer to Fig.13 , is a schematic diagram of the overall flow of a sliding control method for a web page control provided by another embodiment of the present application. Fig.13 As shown in the figure, the user slides the webpage control WebView vertically, and then the touch screen reports the event point, and then passes the event to the parent control of the webpage control WebView, records the event point, and calculates the real-time speed. Among them, the events include Down event, Move event and Up event. When the event is a Down event, the parent control does not intercept the Down event, and passes the Down event to WebView, which processes the Down event, that is, processes it in the web kernel, that is, Web Down, and cancels the last slide at the same time. The end flag of canceling the last slide is true.

[0125] When the event is a Move event, that is, the user touches and slides the touch screen, also known as a hand-following sliding event, the parent control does not intercept the Move event and passes the Move event to WebView. WebView processes the Move event, that is, it is processed in the web kernel, namely Web Move, and updates the offset value web-scrollY of the web page control in real time according to the touch point.

[0126] When the event is an Up event, that is, a hand-raising event, the parent control intercepts the Up event and triggers inertial sliding. At this time, the longitudinal speed velocityY of the touch point corresponding to the hand-raising event when it leaves the touch screen is calculated according to the previous touch point, that is, the speed when Up, also known as the initial speed. At the same time, JavaScript code is injected into the web page control, that is, JS injection, and the algorithm for updating the position is implemented in JS to trigger the next interface refresh. Scroller is built in JS and calculations begin. The interface is refreshed every 16ms, that is, a callback is made every 16ms under 60 frames, and it is determined whether the event is over. If not, the time difference is calculated, that is, the difference between the current moment and the initial moment. Then Scroller returns the position coordinates and speed at the current moment, calculates the offset value, and updates the offset value scrollTop of the web page control in JS, and then waits for the next callback until the end, which means reaching the end point or the speed is stationary or interrupted.

[0127] In this embodiment, the electronic device first detects a touch event on the web page control, and intercepts the hand-raising event when the touch event is a hand-raising event for the web page control. The hand-raising event is used to trigger the inertial sliding of the web page control. Then, in response to the hand-raising event, the target speed, target position, and target time when the touch point corresponding to the hand-raising event leaves the touch screen are obtained, and a preset language code is injected into the web page control. Finally, the target speed, target position, and target time when the touch point leaves the touch screen are sent to the web page control, and the inertial sliding of the displayed content of the web page control is controlled through the preset language code in the web page control. By intercepting the hand-raising event, the hand-raising event can be prevented from being fed back to the web page control, and then the parent control takes over the inertial sliding process. Further, the preset language code is injected into the web page control, and the offset value of the web page control is updated in the preset language code, which can efficiently control the sliding of the web page control and ensure the consistency of the sliding experience in the device.

[0128] To sum up, in the sliding control method of the web page control provided in the embodiment of the present application, the sliding curve of the web page control can be uniformly modified without modifying the core of the web page control, that is, the sliding curve of the web page control controlled at the system level can be consistent with the sliding curve of the system control, thereby ensuring the consistency of the sliding experience in the device.

[0129] It should be noted that the sliding control method of the web page control in the embodiment of the present application can be applied to the system WebView and all third-party self-developed WebViews.

[0130] It should be understood that, although the steps in the above-mentioned flowcharts are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flowcharts may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0131] Based on the foregoing embodiments, the embodiments of the present application provide a sliding control device for a web page control, which includes the modules included and the units included in the modules, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0132] Fig.14 A schematic diagram of a sliding control device for a web page control provided by an embodiment of the present application is shown in FIG. Fig.14 As shown, the sliding control device 1400 of the web page control includes a detection module 1401, an interception module 1402 and a control module 1403, wherein:

[0133] The detection module 1401 is used to detect a touch event in a web page control; the interception module 1402 is used to intercept the hand-raising event when the touch event is a hand-raising event for the web page control, and the hand-raising event is used to trigger the inertial sliding of the web page control; the control module 1403 is used to control the inertial sliding of the displayed content of the web page control in response to the hand-raising event, and the offset of the inertial sliding of the displayed content is determined according to the sliding curve of the system-level control.

[0134] In some embodiments, the control module 1403 is specifically used to: in response to the hand-raising event, obtain the target speed, target position and target time when the touch point corresponding to the hand-raising event leaves the touch screen; based on the sliding curve and the target speed, target position and target time when the touch point leaves the touch screen, update the offset of the inertial sliding of the displayed content, so that the displayed content slides inertially according to the offset.

[0135] In some embodiments, the device further comprises: a trigger module and an update module. The trigger module is used to trigger a target offset update event according to the target speed, target position and target time when the touch point leaves the touch screen; and the update module is used to update the offset according to the target offset update event and the sliding curve.

[0136] In some embodiments, the device further includes: a generating module and a sending module. The generating module is used to generate a target sliding event according to the target speed, target position and target time when the touch point leaves the touch screen, and the offset of the target sliding event is determined according to the sliding curve of the system-level control; the sending module is used to send the target sliding event to the web page control to achieve inertial sliding of the displayed content of the web page control.

[0137] In some embodiments, the device further includes: an injection module. The injection module is used to inject a preset language code into the web page control, and the preset language code is used to update the offset of the inertial sliding of the displayed content according to the sliding curve of the system-level control; the update module is specifically used to: send the target speed, target position and target time when the touch point leaves the touch screen to the web page control; and control the inertial sliding of the displayed content of the web page control through the preset language code in the web page control.

[0138] In some embodiments, the preset language code includes JavaScript code, a multi-paradigm high-level interpreted programming language based on prototypes and first-class functions.

[0139] In some embodiments, the device further includes: a release module. The release module is used to release other events for the webpage control when the touch event is other events, and the other events are events other than the hand raising event.

[0140] In some embodiments, the interception module 1402 is specifically used for: when the touch event is a hand-raising event for the web page control, intercepting the hand-raising event through a parent control, where the parent control is a system-level control corresponding to the web page control.

[0141] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0142] It should be noted that in the embodiments of this application Fig.14The division of modules in the sliding control device of the web page control shown is schematic, which is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or it can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. It can also be implemented in the form of a combination of software and hardware.

[0143] It should be noted that in the embodiment of the present application, if the above method 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 such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device 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 a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.

[0144] The embodiment of the present application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Fig.15 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0145] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the above embodiment are implemented.

[0146] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.

[0147] Those skilled in the art will understand that Fig.15The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0148] In one embodiment, the sliding control device of the web page control provided by the present application can be implemented in the form of a computer program. The computer program can be Fig.15 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the above-mentioned device. The computer program composed of various program modules enables the processor to execute the steps in the method of each embodiment of the present application described in this specification.

[0149] It should be noted here 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, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0150] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that 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 one embodiment" or "in some embodiments" appearing throughout the specification may 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 various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and 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 embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.

[0151] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.

[0152] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0153] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules 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 devices or modules can be electrical, mechanical or other forms.

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

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

[0156] A person skilled in the art can understand that all or part of the steps of implementing the above 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 method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0157] 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 essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device 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.

[0158] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0159] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0160] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0161] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A sliding control method for a web page control, characterized in that: include: Detect touch events on web controls; In the case where the touch event is a hand-raising event for the webpage control, intercepting the hand-raising event, where the hand-raising event is used to trigger inertial sliding of the webpage control; In response to the hand-raising event, the displayed content of the webpage control is controlled to slide inertially, and the offset of the inertially sliding of the displayed content is determined according to the sliding curve of the system-level control.

2. The method according to claim 1, characterized in that The step of controlling the inertial sliding of displayed content of the webpage control in response to the hand raising event includes: In response to the hand-raising event, obtaining a target speed, a target position, and a target time when the touch point corresponding to the hand-raising event leaves the touch screen; Based on the sliding curve and the target speed, target position and target time when the touch point leaves the touch screen, the offset of the inertial sliding of the displayed content is updated so that the displayed content slides inertially according to the offset.

3. The method according to claim 2, characterized in that Before updating the offset of the inertial sliding of the displayed content based on the sliding curve and the target speed, target position and target time when the touch point leaves the touch screen, the method further includes: triggering a target offset update event according to the target speed, target position and target time when the touch point leaves the touch screen; The updating of the offset of the inertial sliding of the displayed content based on the sliding curve and the target speed, target position and target time when the touch point leaves the touch screen includes: The offset is updated according to the target offset update event and the sliding curve.

4. The method according to claim 2, characterized in that: Before updating the offset of the inertial sliding of the displayed content based on the sliding curve and the target speed, target position and target time when the touch point leaves the touch screen, the method further includes: Generate a target sliding event according to the target speed, target position and target time when the touch point leaves the touch screen, wherein the offset of the target sliding event is determined according to the sliding curve of the system-level control; The target sliding event is sent to the webpage control to achieve inertial sliding of displayed content of the webpage control.

5. The method according to claim 2, characterized in that: Before updating the offset of the inertial sliding of the displayed content based on the sliding curve and the target speed, target position and target time when the touch point leaves the touch screen, the method further includes: Injecting a preset language code into the webpage control, the preset language code is used to update the offset of the inertial sliding of the displayed content according to the sliding curve of the system-level control; The updating of the offset of the inertial sliding of the displayed content based on the sliding curve and the target speed, target position and target time when the touch point leaves the touch screen includes: Sending the target speed, target position and target time when the touch point leaves the touch screen to the web page control; The preset language code in the webpage control is used to control the inertial sliding of the displayed content of the webpage control.

6. The method according to claim 5, characterized in that The preset language code includes JavaScript code, which is a multi-paradigm high-level interpreted programming language based on prototypes and first-class functions.

7. The method according to claim 1, characterized in that The method further comprises: In the case that the touch event is other events for the webpage control, the other events are released, and the other events are events other than the hand raising event.

8. The method according to claim 1, characterized in that When the touch event is a hand-raising event for the webpage control, intercepting the hand-raising event includes: In the case where the touch event is a hand-raising event for the webpage control, the hand-raising event is intercepted by a parent control, and the parent control is a system-level control corresponding to the webpage control.

9. A sliding control device for a web page control, characterized in that: include: A detection module, used to detect touch events on web page controls; An interception module, used for intercepting the hand-raising event when the touch event is a hand-raising event for the webpage control, wherein the hand-raising event is used for triggering the inertial sliding of the webpage control; The control module is used to control the inertial sliding of the displayed content of the web page control in response to the hand-raising event, and the offset of the inertial sliding of the displayed content is determined according to the sliding curve of the system-level control.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.