Gesture processing method and device and electronic equipment
By creating gesture capture views in native applications, capturing and passing gesture attribute information of web pages, the problem that native applications are difficult to obtain web page interaction data is solved, and non-invasive and efficient and secure gesture data collection is achieved.
Patent Information
- Application Number
- CN202510399552.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-18
AI Technical Summary
Native applications are difficult to directly access and obtain web page interaction data in built-in browsers. Existing intrusive methods may damage web page logic, lead to compatibility issues and pose security risks.
By creating gesture capture views in native applications, capturing gesture attribute information of web pages, and providing them to native applications without modifying the web application, the iOS event response chain mechanism is used to realize the transmission and processing of gesture data.
It realizes comprehensive capture of web page gesture data, maintains the stability and security of the web layer, avoids the compatibility and security risks brought by intrusive development, and improves the universality and reliability of data collection.
Smart Images

Figure CN120335604A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and particularly to technologies such as front-end development, data processing, and communication. In particular, it relates to a gesture processing method, apparatus, and electronic device. Background Art
[0002] With the development of mobile terminal technologies, the product architecture of native applications with built-in browsers (or web applications) has become increasingly popular and prominent. This architecture provides users with a convenient way to directly access web page content within native applications. Through this design, native applications can quickly integrate dynamic page functions such as product detail pages, event landing pages, and news reading pages, which not only improves the user experience but also effectively avoids the problem of operation interruption that users may encounter when jumping to external browsers.
[0003] However, since the web pages loaded by the built-in browser are usually provided by third-party developers, the data barrier between the native application layer and the web application layer makes it difficult to capture the interaction data (such as gesture-related data) in the web application layer, thus restricting the in-depth application and utilization of these interaction data in more refined operation scenarios. Summary of the Invention
[0004] The present disclosure provides a gesture processing method, apparatus, and electronic device.
[0005] According to one aspect of the present disclosure, a gesture processing method is provided. The method includes: capturing gesture attribute information for a web page in a web application based on a gesture capture view in a native application; the web application is a built-in web application of the native application; the gesture capture view is located above the web page; providing the gesture attribute information to the web application for processing the web page; and providing the gesture attribute information to the native application.
[0006] According to another aspect of the present disclosure, a gesture processing apparatus is provided. The apparatus includes: a capture module for capturing gesture attribute information for a web page in a web application based on a gesture capture view in a native application; the web application is a built-in web application of the native application; the gesture capture view is located above the web page; a providing module for providing the gesture attribute information to the web application for processing the web page; and providing the gesture attribute information to the native application.
[0007] According to another aspect of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the gesture processing method proposed above in the present disclosure.
[0008] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the gesture processing method proposed above in the present disclosure.
[0009] According to another aspect of the present disclosure, there is provided a computer program product including a computer program, and the steps of the gesture processing method proposed above in the present disclosure are implemented when the computer program is executed by a processor.
[0010] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understandable through the following description. Description of the Drawings
[0011] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0012] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure;
[0013] Figure 2 is a schematic diagram according to the second embodiment of the present disclosure;
[0014] Figure 3 is a schematic diagram according to the third embodiment of the present disclosure;
[0015] Figure 4 is a flowchart of the gesture processing method provided by the present disclosure;
[0016] Figure 5 is a schematic diagram of the view hierarchy structure provided by the present disclosure;
[0017] Figure 6 is a flowchart of the gesture capture and data reporting process provided by the present disclosure;
[0018] Figure 7 is a schematic diagram according to the fourth embodiment of the present disclosure;
[0019] Figure 8 is a block diagram of an electronic device for implementing the gesture processing method of the embodiments of the present disclosure. Detailed Embodiments
[0020] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, descriptions of well-known functions and structures are omitted below for clarity and conciseness.
[0021] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information and other processing are all carried out on the premise of obtaining the user's consent, and all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0022] User behavior analysis, as a highly favored post-link refined operation strategy, applies a large amount of interaction data of internal users of the application to build models or prediction systems, which can improve the accuracy of models or prediction systems (such as user interest prediction models, advertising conversion attribution, etc.). Based on these scientific models or prediction systems, the product form can be optimized and adjusted in a targeted manner to accurately reach and meet user needs, ultimately driving a significant increase in specific user metrics.
[0023] In the product architecture of building a browser within a native application, the collection of user behavior data is separated between the native application layer and the web application layer. Specifically, the native application layer focuses on collecting interaction data in the native environment, while the web application layer is specifically responsible for collecting interaction data for web pages. For web pages introduced from the outside, it is often difficult for the native application to directly access and obtain the interaction data for web pages.
[0024] To make up for this deficiency, current mainstream technologies mainly rely on invasive methods such as JavaScript injection to enhance data collection functions. These methods usually require a certain degree of code modification to the web page to establish a data communication bridge between the native application and the web application.
[0025] However, the solutions based on invasive means such as JavaScript injection have several defects. First, these methods may disrupt the original logic of the web page, resulting in abnormal functions or a decline in the user experience. Second, invasive means are prone to compatibility problems, especially in different device and browser environments, and it is difficult to ensure consistent behavior performance. In addition, these solutions are difficult to implement a unified and general collection mechanism across platforms and pages, limiting their applicability in diverse application scenarios. At the same time, invasive means also bring potential security vulnerability risks, which may be maliciously exploited, threatening user data security.
[0026] In view of the above problems, the present disclosure provides a gesture processing method, apparatus, and electronic device.
[0027] Figure 1 FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure. It should be noted that the gesture processing method of the embodiments of the present disclosure can be applied to a gesture processing apparatus, which can be configured in an electronic device so that the electronic device can perform a gesture processing function.
[0028] Among them, the electronic device can be any device with computing capabilities, such as a personal computer (PC for short), a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a smart speaker, a server, a server cluster, etc., which are hardware devices with various operating systems, touch screens, and / or display screens.
[0029] Among them, the gesture processing apparatus can also be software in the electronic device, such as gesture processing software, etc. In the following embodiments, the execution entity is taken as an example of an electronic device for description.
[0030] As shown in Figure 1 FIG. 2, the gesture processing method can include the following steps:
[0031] Step 101, based on the gesture capture view in the native application, capture the gesture attribute information for the web page in the web application.
[0032] Among them, the native application refers to an application program that can directly run on the current operating system, and the web application refers to a web page application that needs to run in a browser.
[0033] In the embodiments of the present disclosure, the web application can be a built-in web application of the native application. That is to say, the web application can be a web page application running in the browser embedded in the native application, and the gesture capture view can be a UI component or container embedded in the native application, which has the function of capturing the gesture input of the user.
[0034] Among them, the gesture capture view is located above the web page (i.e., the network page). Specifically, the gesture capture view can be added to the view hierarchy of the web application (or the current operating system). In the view hierarchy of the web application, the gesture capture view is located above the web view of the web page. That is to say, the gesture capture view is a sub-view of the web view of the web page.
[0035] Among them, the gesture attribute information refers to a set of parameters for describing and defining gestures, which may include geometric shape information, motion trajectory information, interaction behavior information, device information, etc., and the present disclosure does not limit this. Among them, the geometric shape information may include, for example, the contour of the gesture, the area or size occupied by the gesture in the UI interface or space, the gesture direction, etc., and the motion trajectory information may include, for example, the touch start position, the touch end position, the gesture path, the gesture speed, the gesture acceleration, etc., and the interaction behavior information may include, for example, the touch pressure, the touch start time, the touch end time, the touch duration, the trigger action type (such as click, slide, zoom, etc.).
[0036] In an example of the embodiments of the present disclosure, when a user browses a web page in a built-in web application in a native application, the electronic device may create a gesture capture view in the native application and overlay the gesture capture view on top of the web page. When the user performs a gesture operation on the web page in the user interface, the electronic device may respond to the gesture operation of the user on the web page and identify the gesture operation on the web page through the gesture capture view to obtain the gesture attribute information of the gesture operation.
[0037] Step 102: Provide the gesture attribute information to the web application for processing the web page.
[0038] In an example of the embodiments of the present disclosure, the electronic device may provide the gesture attribute information to the web application located below the gesture capture view based on the event response chain mechanism to select or operate on the page elements on the web page based on the gesture attribute information. Among them, the event response chain mechanism means that when a user interacts with the user interface of an application program on a corresponding operating system device, the operating system will pass events along a predetermined chain (i.e., the response chain) until an object capable of processing the corresponding event is found.
[0039] In another example, the electronic device may use a message passing mechanism to provide the gesture attribute information to the web application located below the gesture capture view to select or operate on the page elements on the web page based on the gesture attribute information.
[0040] Step 103: Provide the gesture attribute information to the native application.
[0041] In an example of the embodiments of the present disclosure, before providing the gesture attribute information to the native application, the electronic device may convert the gesture attribute information into structured data.
[0042] In an example of the embodiments of the present disclosure, the electronic device may locally store or cache the gesture attribute information through the native application.
[0043] Among them, it should be noted that step 102 and step 103 can be executed in parallel, or step 103 can be executed before step 102. This disclosure only takes the example of step 102 being executed before step 103.
[0044] The gesture processing method according to the embodiments of the present disclosure captures gesture attribute information for a web page in a web application by means of a gesture capture view in a native application; the web application is a built-in web application of the native application; the gesture capture view is located above the web page; provides the gesture attribute information to the web application for processing the web page; and provides the gesture attribute information to the native application; without making any modifications or invasive development to the web application itself, relying only on the gesture capture view built into the native application, the native application can comprehensively obtain the gesture attribute information of the user for the web page in the built-in web application, maintaining the security and stability of the web layer data; at the same time, it can also transmit the gesture attribute information to the web application in real time, so as to effectively maintain the continuous stability of the web layer function without disturbing its normal operation.
[0045] Among them, it should be noted that the creation of the gesture capture view and the application of the gesture capture function of the gesture capture view are not always necessary. The process of gesture capture requires a certain amount of system resources. Blindly introducing the gesture capture view or blindly applying the gesture capture function may cause unnecessary resource consumption and potential user annoyance. Therefore, in order to avoid this situation, the electronic device can perform corresponding control processing on the gesture capture view in combination with relevant conditions. As Figure 2 shown, Figure 2 is a schematic diagram according to the second embodiment of the present disclosure, Figure 2 The embodiment shown may include the following steps:
[0046] Step 201, obtain capture-related parameter information.
[0047] In the embodiments of the present disclosure, in one example, when the user needs to open or browse a web page in a built-in web application in a native application, the web page is loaded through the web view of the native application. At this time, the electronic device can obtain capture-related parameter information.
[0048] Among them, the capture-related parameter information may include but is not limited to the page address of the current web page in the web application, the current time point, the device type, the current operating system version, the screen size, etc.
[0049] Among them, the page address can be used to uniquely point to or locate the corresponding web page, and the page address can be accessed through the browser embedded in the native application to display the corresponding web page.
[0050] Among them, the current time point refers to the time point when the web page is currently accessed.
[0051] Among them, by combining the captured relevant parameter information and providing effective context information, it helps to more accurately understand the environment and state of the application, and provides strong support for the accurate implementation of the subsequent gesture capture function.
[0052] Step 202, determine whether the gesture capture view creation condition is satisfied according to the captured relevant parameter information.
[0053] In an example of the embodiments of the present disclosure, when the captured relevant parameter information includes the page address of the current web page in a web application, the electronic device can determine whether the current web page is the target web page to be subjected to gesture capture according to the page address. When the current web page is the target web page, it is determined that the gesture capture view creation condition is satisfied, and when the current web page is a non-target web page, it is determined that the gesture capture view creation condition is not satisfied.
[0054] In an example of the embodiments of the present disclosure, when determining whether the current web page is the target web page to be subjected to gesture capture according to the page address, the electronic device can extract the target field from the page address of the current web page; query the set field information according to the target field to determine whether there is a set field in the set field information that matches the target field; when there is a set field in the set field information that matches the target field, it is determined that the current web page is the target web page.
[0055] Among them, there can be at least one target field in the page address of the current web page, and the target field can exist in the path, parameters, etc. of the corresponding page address. The present disclosure does not limit this.
[0056] Among them, the set field information can include at least one set field, and the set field is preset. The present disclosure does not limit this.
[0057] It should be noted that when the page address of the current web page indicates that the current web page is the target web page, it means that the current web page is the page that needs to be subjected to gesture capture. On the contrary, it means that the current web page is not the page that needs to be subjected to gesture capture.
[0058] Among them, by combining the page address of the current web page, it is possible to quickly and accurately identify whether the current web page is the target web page. Thus, based on the recognition result, it is possible to accurately evaluate whether the gesture capture view creation condition is achieved. Further, it is possible to precisely control the creation or operation of the gesture capture view, avoid enabling the gesture capture function on irrelevant pages, effectively save system resources, and reduce unnecessary resource consumption.
[0059] In an embodiment of the present disclosure, in another example, when the captured relevant parameter information includes the page address of the current web page in the web application and the current time point, determine whether the current web page is the target web page to be subjected to gesture capture according to the page address, and determine whether the current time point is a time point within the gesture capture time period; when the current web page is the target web page and the current time point is a time point within the gesture capture time period, determine that the gesture capture view creation condition is satisfied.
[0060] Among them, the gesture capture time period can be a preset time period, such as 11:00-12:00 every day, 18:00-21:00 every day, 00:00 on March 1st to 24:00 on March 3rd every year, etc., and the present disclosure does not limit this.
[0061] In an embodiment of the present disclosure, in another example, when the captured relevant parameter information includes the page address of the current web page in the web application and the current time point, when the current web page is not the target web page, or the current time point is a time point outside the gesture capture time period, determine that the gesture capture view creation condition is not satisfied.
[0062] Among them, by combining the page address of the current web page and the current time point, it is possible to quickly and accurately lock whether the current web page is the target web page to be subjected to gesture capture. At the same time, through an accurate time judgment mechanism, determine whether the current time point falls within the gesture capture time period, so as to accurately evaluate whether the gesture capture view creation condition is achieved based on the determination result. Further, the creation or operation of the gesture capture view can be precisely controlled, avoiding enabling the gesture capture function on irrelevant pages and during non-specified time periods, effectively saving system resources and reducing unnecessary resource consumption.
[0063] In an embodiment of the present disclosure, in another example, when the captured relevant parameter information includes the page address of the current web page in the web application, the current time point, and the current operating system version, determine whether the current web page is the target web page to be subjected to gesture capture according to the page address, determine whether the current time point is a time point within the gesture capture time period, and whether the current operating system version is the target operating system version; when the current web page is the target web page, the current time point is a time point within the gesture capture time period, and the current operating system version is the target operating system version, determine that the gesture capture view creation condition is satisfied.
[0064] Among them, the target operating system version can be preset, and the present disclosure does not limit this.
[0065] In an embodiment of the present disclosure, in another example, when the captured relevant parameter information includes the page address of the current web page in the web application, the current time point, and the current operating system version, if at least one of the following conditions is not satisfied, it is determined that the condition for creating a gesture capture view is not satisfied; wherein, the situation where the condition is not satisfied includes that the current web page is not the target web page, the current time point is a time point outside the gesture capture time period, and the current operating system version is not the target operating system version.
[0066] Among them, by combining the page address of the current web page, the current time point, and the current operating system version, it is possible to accurately determine whether the condition for creating a gesture capture view is satisfied, and thus it is possible to achieve precise control over the creation or operation of the gesture capture view.
[0067] It should be noted that the present disclosure does not limit the conditions for determining whether the condition for creating a gesture capture view is satisfied, and can be added as needed.
[0068] Step 203, perform gesture capture view control processing according to whether the condition for creating a gesture capture view is satisfied.
[0069] It should be noted that in a complex and changing web application environment, users may frequently switch web pages, and the time point is also constantly changing. Therefore, there may be a situation where a gesture capture view was not created for the previous time point or the previous web page because gesture capture was not required, but a gesture capture view needs to be created for the current time point or the current web page because gesture capture is required. Thus, in an embodiment of the present disclosure, in one example, the electronic device can first determine whether a gesture capture view has been created; in the case where a gesture capture view has not been created and the condition for creating a gesture capture view is satisfied, the electronic device can perform the creation process of the gesture capture view.
[0070] Therefore, based on the presence or absence of the gesture capture view in the application environment and the achievement of its creation conditions, the demand status of the gesture capture view can be evaluated in real time, effectively avoiding the redundant creation of the gesture capture view, thereby significantly reducing the unnecessary consumption of resources. Once the actual demand for gesture capture is detected, it can also respond immediately and quickly construct a gesture capture view, effectively avoiding the problem of interruption of gesture data capture that may be caused by the absence of the view, and maintaining the timeliness and real-time nature of the captured gesture-related data (such as gesture attribute information).
[0071] Among them, it should also be noted that there may be a situation where a gesture capture view is created at a previous time point or on a previous web page because gesture capture needs to be performed, and gesture capture also needs to be performed at the current time point or on the current web page. Thus, in another example of the embodiments of the present disclosure, the electronic device can first determine whether a gesture capture view has been created; when a gesture capture view has been created and the creation conditions of the gesture capture view are met, the electronic device can control the gesture capture view to perform the gesture capture processing procedure. Thereby, the processing flow of gesture capture can be quickly started without waiting for the creation of a new view, thus greatly shortening the response time. This ability to respond immediately ensures the accurate capture and immediate processing of gesture data, avoids gesture recognition interruption or data loss caused by lagging view creation, and improves the real-time performance and reliability of the captured gesture-related data.
[0072] Among them, it should also be noted that there may be a situation where a gesture capture view is created at a previous time point or on a previous web page because gesture capture needs to be performed, but gesture capture does not need to be performed at the current time point or on the current web page. Thus, in another example of the embodiments of the present disclosure, when the creation conditions of the gesture capture view are not met and a gesture capture view has been created, the electronic device can perform deletion processing on the gesture capture view, or control the gesture capture view not to perform the gesture capture processing procedure. Thereby, unnecessary occupation of resources can be effectively avoided, the system overhead can be reduced, and the overall operation efficiency can be improved.
[0073] Thereby, dynamic management and efficient utilization of the gesture capture view resources are realized, and the creation and deletion strategies of the gesture capture view can be flexibly adjusted according to the actual application scenario and specific requirements, so as to maintain the reasonable allocation and efficient utilization of resources, and improve the stability and reliability.
[0074] In an example of the embodiments of the present disclosure, when performing the creation processing of the gesture capture view, the size of the created gesture capture view can be the same as the size of the web page. Thereby, when the user performs a gesture operation, no matter where the finger slides on the user interface, it can be accurately captured by the gesture capture view, without worrying about limited operation areas, and the fluency and accuracy of the captured gesture attribute information are improved.
[0075] In an example of the embodiments of the present disclosure, the electronic device can set the gesture capture view to be completely transparent. For example, the Alpha value indicating the transparency of the gesture capture view can be set to 0. When the Alpha value is 0, the gesture capture view is completely transparent. Among them, by adjusting the transparency of the gesture capture view to be completely transparent, when the user browses the web page in the web application, the user cannot perceive the existence of the gesture capture view. Thereby, gesture input can be effectively captured without disturbing the user's visual experience.
[0076] In another example, the electronic device can adjust the transparency of the gesture capture view so that the transparency of the gesture capture view is less than or equal to the transparency threshold. Herein, the transparency threshold can be preset, and the present disclosure does not limit its value. Thus, while maintaining the gesture capture function, the transparency of the gesture capture view can be flexibly adjusted to enhance the user experience.
[0077] The gesture processing method according to the embodiments of the present disclosure includes obtaining capture-related parameter information; determining whether the gesture capture view creation condition is satisfied according to the capture-related parameter information; and performing gesture capture view control processing according to whether the gesture capture view creation condition is satisfied. Thus, it is possible to automatically evaluate whether the gesture capture view creation condition is achieved based on the captured relevant parameter information, so as to accurately control the creation or operation of the gesture capture view, effectively avoiding unnecessary resource consumption and potential user troubles.
[0078] To improve the accuracy of the captured gesture attribute information and reduce the interference of data redundancy, the electronic device can screen the captured gesture attribute information in combination with the gesture capture requirements. As Figure 3 shown, Figure 3 is a schematic diagram according to the third embodiment of the present disclosure, Figure 3 The shown embodiment may include the following steps:
[0079] Step 301: Based on the gesture capture view in the native application, capture the gesture attribute information for the web page in the web application.
[0080] Step 302: Provide the gesture attribute information to the web application for processing the web page.
[0081] It should be noted that for the detailed content of steps 301 to 302, reference can be made to Figure 1 steps 101 to 102 in the shown embodiment, and details are not described herein again.
[0082] In the embodiments of the present disclosure, in one example, the gesture attribute information may include at least one of the following: gesture type, touch point position, touch time, gesture duration. Among them, the gesture type may include, but is not limited to, click, long press, rotation, double click, zoom out, zoom in, etc.; the touch point position is used to indicate the corresponding coordinates. It should be noted that the present disclosure does not limit the gesture attribute information, and can be added according to actual needs.
[0083] In an embodiment of the present disclosure, in one example, a rewritten touch processing function is set in the gesture capture view; wherein, the rewritten touch processing function can be a touch processing function obtained by adding the logic for providing the function response result to the original touch processing function.
[0084] Among them, the logic for providing the function response result refers to the process and method by which the corresponding function calculates and returns a result according to preset rules and algorithms after receiving input parameters.
[0085] In an embodiment of the present disclosure, in one example, after the user performs a touch operation on the display interface, the logic for providing the function response result can be: capturing the gesture parameters in the gesture attribute information, passing the gesture parameters to the original touch processing function in the view of the web application, and providing the gesture parameters as the function response result to the gesture capture view. That is to say, the rewritten touch processing function is used to capture the gesture parameters in the gesture attribute information, pass the gesture parameters to the original touch processing function in the view of the web application, and provide the gesture parameters as the function response result to the gesture capture view.
[0086] Among them, the gesture attribute information may include gesture parameters, such as the starting touch point position of the gesture, the starting touch time of the gesture, the ending touch point position of the gesture, the ending touch time of the gesture, the duration of the gesture, the gesture type, and so on.
[0087] Among them, by rewriting the touch processing function, the gesture attribute information can not only be passed to the view of the web application for the original touch processing function in the view of the web application to further process and respond to touch events (such as triggering page sliding, zooming, or clicking events), but also be provided to the gesture capture view, broadening the circulation channel of gesture information and facilitating the subsequent acquisition of gesture attribute information by the native application to which the gesture capture view belongs.
[0088] In an embodiment of the present disclosure, in one example, rewriting the touch processing function may include, but is not limited to, rewriting the hit test function, rewriting the touch event processing function, etc. Among them, rewriting the hit test function can be used to capture at least one of the following gesture parameters in the gesture attribute information: the starting touch point position of the gesture and the starting touch time of the gesture. It should be noted that the present disclosure does not limit the gesture parameters captured by rewriting the hit test function, and can be added according to actual needs; rewriting the touch event processing function can be used to capture at least one of the following gesture parameters in the gesture attribute information: the non-starting touch point position of the gesture (such as the ending touch point position of the gesture, etc.), the non-starting touch time of the gesture (such as the ending touch time of the gesture, etc.), the duration of the gesture, and the gesture type. It should be noted that the present disclosure does not limit the gesture parameters captured by rewriting the touch event processing function, and can be added according to actual needs.
[0089] For example, rewriting the hit test function includes the hitTest function, which is used to capture the starting touch point position and starting touch time of the gesture; rewriting the touch event handling functions includes the touchesMoved function and the touchesEnded function. Among them, the touchesMoved function is used to capture the non-starting touch point position and non-starting touch time of the gesture, and the touchesEnded function is used to capture the gesture duration and gesture type. It should be noted that the above examples of rewriting the hit test function and rewriting the touch event handling functions are only exemplary. In actual applications, the function names and functions can be set according to needs, and the present disclosure does not limit this.
[0090] Among them, by using different rewritten touch handling functions, various gesture parameters can be captured. These parameters can map every subtle aspect of the user's input gesture, not only greatly enriching the dimension of gesture data, but also providing a solid foundation for subsequent gesture recognition and analysis work, which helps to improve the accuracy and richness of the recognition results or analysis results.
[0091] Step 303, obtain the gesture capture requirements.
[0092] Among them, the gesture capture requirements can be used to indicate the specific requirements or demands during gesture capture.
[0093] In an example of the embodiments of the present disclosure, the gesture capture requirements may include gesture type requirements, gesture duration requirements, touch point position requirements, etc., which can be added according to actual needs.
[0094] Among them, the gesture type requirements are used to indicate the gesture types that need to be satisfied; the gesture duration requirements are used to indicate the gesture durations that need to be satisfied; the touch point position requirements are used to indicate the touch point position coordinates or regions that need to be satisfied.
[0095] In an example of the embodiments of the present disclosure, the gesture capture requirements can be preset and saved, so that when creating a gesture capture view or applying a gesture capture view, the electronic device can directly obtain the saved gesture capture requirements.
[0096] In an embodiment of the present disclosure, in another example, an electronic device may obtain the current application scenario of a web application through a native application, and obtain a gesture capture requirement corresponding to the current application scenario according to the current application scenario of the web application. It can be understood that different application scenarios of web applications may have corresponding gesture capture requirements. For example, in the application scenario of product browsing and selection in a web application, the gesture type requirements in the gesture capture requirement are swiping and clicking; in the application scenario of shopping cart management and settlement in a web application, the gesture type requirements in the gesture capture requirement are long pressing, dragging, and clicking; in the news reading scenario of a web application, the gesture type in the gesture capture requirement is zooming, enlarging, and double clicking. It should be noted that the above application scenarios and their corresponding gesture capture requirements are only exemplary. In actual applications, the application scenario may also be others, and the gesture capture requirements corresponding to the above application scenarios may also be others.
[0097] In an embodiment of the present disclosure, in yet another example, an electronic device may obtain the page address of the current web page in a web application through a native application, and obtain a gesture capture requirement matching the page address.
[0098] It should be understood that each page address points to a specific network resource, and these network resources have corresponding resource types. Among them, the resource type may include, for example, files, application programs or services, news, products, etc. There may be corresponding gesture capture requirements for different resource types. Therefore, in one example, when obtaining a gesture capture requirement matching the page address, the electronic device may determine the corresponding resource type based on the page address; and then determine the corresponding gesture capture requirement according to the resource type, and determine the gesture capture requirement corresponding to the resource type as the gesture capture requirement matching the page address.
[0099] Among them, by combining the page address of the current web page in the web application to obtain a gesture capture requirement matching the page address, the gesture capture requirement can be intelligently adjusted dynamically according to the current network environment or application state of the user, improving flexibility.
[0100] Step 304, determine whether the gesture attribute information meets the gesture capture requirement according to the gesture capture requirement.
[0101] In an embodiment of the present disclosure, an electronic device may analyze gesture attribute information based on gesture capture requirements to determine whether the gesture attribute information meets the gesture capture requirements. For example, assume that the gesture capture requirements include a gesture duration requirement, and the gesture duration requirement indicates that the gesture duration to be satisfied is n seconds, and the gesture duration included in the gesture attribute information is m seconds. When m ≥ n, it indicates that the gesture attribute information meets the gesture capture requirements; otherwise, it indicates that the gesture attribute information does not meet the gesture capture requirements.
[0102] Step 305, filter the gesture attribute information when the gesture attribute information does not meet the gesture capture requirements.
[0103] In an embodiment of the present disclosure, when the gesture attribute information does not meet the gesture capture requirements, the electronic device may filter the gesture attribute information. For example, it may filter out the information of the gesture object that does not meet the gesture capture requirements. For example, when the user performs an input operation of gesture A on the user interface, after the electronic device captures the gesture attribute information of gesture A based on the gesture capture view and then determines that the gesture attribute information corresponding to gesture A does not meet the gesture capture requirements based on the gesture capture requirements, the gesture attribute information corresponding to gesture A is filtered.
[0104] In another example, when the gesture attribute information does not meet the gesture capture requirements, the electronic device may provide the gesture attribute information to the native application.
[0105] In an embodiment of the present disclosure, in one example, after providing the gesture attribute information to the native application, the electronic device may report the gesture attribute information to the application server corresponding to the native application through the native application, instructing the application server to perform gesture analysis processing in combination with the gesture attribute information.
[0106] In an embodiment of the present disclosure, in one example, the electronic device may report the gesture attribute information and the resource type determined based on the page address of the web page corresponding to the gesture attribute information to the application server corresponding to the native application through the native application, instructing the application server to perform gesture analysis processing in combination with the gesture attribute information and the resource type. For example, it instructs the application server to analyze the user's gesture operation habits in combination with the gesture attribute information and the resource type to predict the user's preferences, so as to intelligently recommend interesting products or services to the user based on the predicted user preferences.
[0107] In an embodiment of the present disclosure, in another example, the electronic device may report the gesture attribute information to the application server corresponding to the native application through the native application, instructing the application server to obtain the gesture operation object information corresponding to the gesture attribute information and perform gesture analysis processing in combination with the gesture operation object information and the gesture attribute information.
[0108] Among them, the gesture operation object information may include, for example, the object on which the gesture operation acts (such as a picture, a control, etc.), the operation time, the gesture type, etc., and the present disclosure places no limitation thereon.
[0109] Among them, in the process of the application server obtaining the gesture operation object information corresponding to the gesture attribute information, in one example, multiple gesture operation object information can be obtained manually, and then each piece of gesture operation object information is matched with the gesture attribute information, so as to obtain the gesture operation object information corresponding to the gesture attribute information.
[0110] Among them, by combining the gesture operation object information and the gesture attribute information for gesture analysis and processing, the user's gesture operation habits can be accurately identified, and then intelligent prediction and recommendation can be performed based on the user's gesture habits and behavior patterns, and more personalized services can be provided.
[0111] Among them, the application server has powerful computing capabilities and rich algorithm resources, and with the help of such powerful data processing capabilities of the application server, in-depth mining and intelligent analysis of the gesture attribute information can be realized.
[0112] Among them, it should be noted that step 302 can be executed in parallel with steps 303 to 305, or steps 303 to 305 can be executed before step 302. The present disclosure only takes step 302 being executed before steps 303 to 305 as an example.
[0113] The gesture processing method according to the embodiments of the present disclosure includes obtaining a gesture capture requirement; determining whether the gesture attribute information meets the gesture capture requirement according to the gesture capture requirement; and filtering the gesture attribute information when the gesture attribute information does not meet the gesture capture requirement. Among them, through the clear gesture capture requirement, the collected gesture attribute information can be quickly screened, and the data that does not meet the specific requirements can be eliminated, which can improve the data accuracy and reduce the interference of redundant information.
[0114] The following is an example for illustration. As Figure 4 shown, it is a schematic diagram of the framework of gesture processing, which may specifically include the following steps:
[0115] Step 1. Create a gesture capture view (denoted as the gesture capture view in the present disclosure)
[0116] Create a gesture capture view on the upper layer of the web page of the built-in web application of the APP (Application) (denoted as the native application in the present disclosure) to capture the gesture attribute information for the web page in the web application.
[0117] Among them, the gesture capture view has the following characteristics:
[0118] (1) Full-screen coverage
[0119] The gesture capture view can cover the entire web page. That is to say, the size of the gesture capture view can be the same as that of the web page. Thus, it is convenient to comprehensively capture all gesture operations of the user on the web page and avoid missing any gesture operations of the user on the web page.
[0120] (2) Completely transparent
[0121] The transparency of the gesture capture view can be set to completely transparent, that is, the Alpha value indicating transparency is set to 0. Thus, when the user browses the web page in the web application, the user cannot perceive the existence of the gesture capture view, and the gesture input can be effectively captured without disturbing the user's visual experience.
[0122] (3) User interaction disabled
[0123] In addition to the function of gesture capture, the gesture capture view does not respond to the interaction events of the user on the web page and does not interfere with the preset response chain of the operating system.
[0124] Step 2. Configure the view hierarchy
[0125] Add the gesture capture view to the view hierarchy structure of the web application, making the gesture capture view a sub-view of the web view of the web application, that is, making the gesture capture view located above the web view of the web application. Specifically:
[0126] (1) View hierarchy management:
[0127] Based on the view management mechanism of the iOS operating system, the gesture capture view is added to the view hierarchy structure of the web application as the top-level view, so that all user interaction events can be first passed to the gesture capture view. The overall view hierarchy structure within the App is as Figure 5 shown.
[0128] (2) Response chain setting:
[0129] The hitTest method (denoted as the overridden hit test function in this disclosure) is set in the gesture capture view, so that the gesture capture view is the primary recipient of the response chain and the gesture event is passed to the lower-level view along the response chain.
[0130] Among them, rewriting the hitTest method can be used to capture gesture parameter such as the starting touch point position and starting touch time of the gesture, pass the gesture parameters along the response chain to the original hitTest method in the web view of the web application, and provide the gesture parameters as the function response result to the gesture capture view.
[0131] Step 3. Gesture capture and data reporting
[0132] As Figure 6 shown, the specific process of gesture capture and data reporting may include:
[0133] 3.1 Gesture recognition and gesture attribute information extraction
[0134] Through the rewritten touch event handling functions (such as the touchesBegan function, touchesMoved function, touchesEnded function, etc.) set in the gesture capture view, capture and parse the gesture object, and capture the gesture attribute information of the gesture object. For example, gesture parameters such as the non-starting touch point position, non-starting touch time, gesture duration, and gesture type of the gesture object can be captured.
[0135] Optionally, the gesture capture requirements can be obtained, and according to the gesture capture requirements, it can be determined whether the gesture attribute information meets the gesture capture requirements; in the case where the gesture attribute information does not meet the gesture capture requirements, the gesture attribute information is filtered.
[0136] 3.2 Providing the gesture attribute information to the web application and the native application
[0137] Among them, based on the event response chain mechanism, the gesture attribute information can be passed to the web application for processing the web page content.
[0138] Among them, the gesture attribute information returned by the rewritten hitTest method and the rewritten touch event handling functions is integrated by the gesture capture view, and the gesture attribute information is locally stored or cached to be provided to the native application.
[0139] 3.3 Data reporting
[0140] Through the communication mechanism between the native application and the backend server Server of the native application (denoted as the application server in this disclosure), the gesture attribute information is reported to the backend server corresponding to the native application to instruct the backend server to perform gesture analysis processing in combination with the gesture attribute information, for example, for model prediction analysis.
[0141] The gesture processing method of this disclosure has the following advantages:
[0142] 1) Zero intrusion: It can comprehensively capture web layer gestures without modifying the web - side code or injecting JavaScript scripts into the web side, maintaining the integrity and stability of the web page logic.
[0143] 2) Full - web coverage: Through the iOS native event response chain mechanism, it realizes unified gesture collection for all web pages in the built - in browser, with strong applicability.
[0144] 3) High compatibility: Based on the iOS system native mechanism, it avoids cross - platform and cross - page compatibility problems, enhancing the universality and reliability of the solution.
[0145] 4) High security: It avoids the security risks brought by invasive means, ensuring the security and privacy of user data.
[0146] In summary, the gesture processing method of the present disclosure, based on the event response chain mechanism of the iOS system, realizes the real - time gesture capture ability that is completely decoupled from the web page content without modifying the web code and without invading the web control logic, and has the characteristics of full - web coverage, zero intrusion, and native - like.
[0147] To implement the above - mentioned embodiments, the present disclosure also provides a gesture processing device. As Figure 7 shown, Figure 7 is a schematic diagram according to the fourth embodiment of the present disclosure. The gesture processing device 70 may include: a capture module 701 and a providing module 702.
[0148] Among them, the capture module 701 is used to capture gesture attribute information for the web page in the web application based on the gesture capture view in the native application; the web application is the built - in web application of the native application; the gesture capture view is located above the web page.
[0149] The providing module 702 is used to provide the gesture attribute information to the web application for processing the web page, and to provide the gesture attribute information to the native application.
[0150] As a possible implementation manner of the embodiment of the present disclosure, the gesture processing device 70 may further include:
[0151] A first acquisition module, used to acquire capture - related parameter information.
[0152] A first determination module, used to determine whether the gesture capture view creation condition is satisfied according to the capture - related parameter information.
[0153] A processing module, used to perform gesture capture view control processing according to whether the gesture capture view creation condition is satisfied.
[0154] As a possible implementation manner of an embodiment of the present disclosure, the captured relevant parameter information includes at least one of the following: the page address of the current web page in the web application, and the current time point.
[0155] As a possible implementation manner of an embodiment of the present disclosure, the captured relevant parameter information includes the page address of the current web page in the web application; a first determination module, configured to: determine whether the current web page is a target web page to be subjected to gesture capture according to the page address; in the case that the current web page is the target web page, determine that the gesture capture view creation condition is satisfied; or, in the case that the current web page is a non-target web page, determine that the gesture capture view creation condition is not satisfied.
[0156] As a possible implementation manner of an embodiment of the present disclosure, the captured relevant parameter information includes the page address of the current web page in the web application and the current time point; a first determination module, configured to: determine whether the current web page is a target web page to be subjected to gesture capture according to the page address, and determine whether the current time point is a time point within the gesture capture time period; in the case that the current web page is the target web page and the current time point is a time point within the gesture capture time period, determine that the gesture capture view creation condition is satisfied.
[0157] As a possible implementation manner of an embodiment of the present disclosure, the first determination module is further configured to: in the case that the current web page is a non-target web page, or in the case that the current time point is a time point outside the gesture capture time period, determine that the gesture capture view creation condition is not satisfied.
[0158] As a possible implementation manner of an embodiment of the present disclosure, a processing module is configured to: determine whether a gesture capture view is created; in the case that the gesture capture view creation condition is satisfied and no gesture capture view is created, perform creation processing of the gesture capture view.
[0159] As a possible implementation manner of an embodiment of the present disclosure, the processing module is further configured to: in the case that the gesture capture view creation condition is not satisfied and a gesture capture view is created, perform deletion processing of the gesture capture view.
[0160] As a possible implementation manner of an embodiment of the present disclosure, the size of the gesture capture view is the same as the size of the web page.
[0161] As a possible implementation manner of an embodiment of the present disclosure, the gesture capture view is completely transparent; or, the transparency of the gesture capture view is less than or equal to the transparency threshold.
[0162] As a possible implementation manner of an embodiment of the present disclosure, the gesture attribute information includes at least one of the following: gesture type, touch point position, touch time, and gesture duration.
[0163] As a possible implementation manner of an embodiment of the present disclosure, a rewritten touch processing function is set in the gesture capture view; the rewritten touch processing function is a touch processing function obtained by adding a function response result logic to the original touch processing function; the rewritten touch processing function is used to capture gesture parameters in the gesture attribute information, pass the gesture parameters to the original touch processing function in the view of the web application, and provide the gesture parameters as a function response result to the gesture capture view.
[0164] As a possible implementation manner of an embodiment of the present disclosure, the rewritten touch processing function includes rewriting the hit test function and rewriting the touch event processing function; the rewritten hit test function is used to capture at least one of the following gesture parameters in the gesture attribute information: gesture starting touch point position and gesture starting touch time; the rewritten touch event processing function is used to capture at least one of the following gesture parameters in the gesture attribute information: gesture non-starting touch point position, gesture non-starting touch time, gesture duration, and gesture type.
[0165] As a possible implementation manner of an embodiment of the present disclosure, the gesture processing device 70 may further include:
[0166] A second acquisition module, configured to acquire a gesture capture requirement.
[0167] A second determination module, configured to determine whether the gesture attribute information meets the gesture capture requirement according to the gesture capture requirement.
[0168] A filtering module, configured to filter the gesture attribute information when the gesture attribute information does not meet the gesture capture requirement.
[0169] As a possible implementation manner of an embodiment of the present disclosure, the gesture capture requirement includes at least one of the following: gesture type requirement; gesture duration requirement; touch point position requirement.
[0170] As a possible implementation manner of an embodiment of the present disclosure, the second acquisition module is configured to: acquire the page address of the current web page in the web application through the native application; acquire the gesture capture requirement matching the page address.
[0171] As a possible implementation manner of an embodiment of the present disclosure, the gesture processing device 70 may further include:
[0172] A reporting module, configured to report the gesture attribute information to the application server corresponding to the native application through the native application, and instruct the application server to perform gesture analysis processing in combination with the gesture attribute information.
[0173] The gesture processing device according to the embodiments of the present disclosure captures gesture attribute information for a web page in a web application by means of a gesture capture view in a native application; the web application is a built-in web application of the native application; the gesture capture view is located on top of the web page; provides the gesture attribute information to the web application for processing the web page; and provides the gesture attribute information to the native application. Among them, without any modification or invasive development to the web application itself, relying only on the gesture capture view built into the native application, the native application can comprehensively obtain the gesture attribute information of the user for the web page in the built-in web application, maintaining the security and stability of the web layer data; at the same time, it can also transmit the gesture attribute information to the web application in real time, so as to effectively maintain the continuous stability of the web layer function without interfering with its normal operation.
[0174] In the technical solution of the present disclosure, the processing of collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved are all carried out on the premise of obtaining the user's consent, and all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0175] According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0176] Figure 8 FIG. shows a schematic block diagram of an exemplary electronic device 800 that can be used to implement the embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0177] As Figure 8 shown, the device 800 includes a computing unit 801, which can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 802 or the computer program loaded from the storage unit 808 into the random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. The input / output (I / O) interface 805 is also connected to the bus 804.
[0178] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as a keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as a disk, optical disc, etc.; and communication unit 809, such as a network card, modem, wireless communication transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0179] Computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 801 executes the various methods and processes described above, such as the gesture processing method or the knowledge Q&A method. For example, in some embodiments, the gesture processing method or the knowledge Q&A method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the gesture processing method or the knowledge Q&A method described above can be executed. Alternatively, in other embodiments, computing unit 801 can be configured to execute the gesture processing method or the knowledge Q&A method in any other suitable manner (e.g., by means of firmware).
[0180] Various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special or general-purpose programmable processor, and can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0181] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program codes cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0182] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0183] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0184] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0185] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
[0186] It should be understood that various forms of the processes shown above can be used, steps can be reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this is not limited herein.
[0187] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. A gesture processing method, the method comprising: Based on a gesture capture view in a native application, capturing gesture attribute information for a web page in a web application; The web application is a built-in web application of the native application; The gesture capture view is located above the web page; Providing the gesture attribute information to the web application for processing the web page; and Providing the gesture attribute information to the native application.
2. The method according to claim 1, wherein, The method further comprises: Obtaining capture-related parameter information; Determining whether a gesture capture view creation condition is satisfied according to the capture-related parameter information; Performing gesture capture view control processing according to whether the gesture capture view creation condition is satisfied.
3. The method according to claim 2, wherein, The capture-related parameter information includes at least one of the following: the page address of the current web page in the web application, and the current time point.
4. The method according to claim 2 or 3, wherein The capture-related parameter information includes the page address of the current web page in the web application; determining whether the gesture capture view creation condition is satisfied according to the capture-related parameter information includes: Determining whether the current web page is a target web page for which gesture capture is to be performed according to the page address; In the case where the current web page is the target web page, determining that the gesture capture view creation condition is satisfied; Or, In the case where the current web page is a non-target web page, determining that the gesture capture view creation condition is not satisfied.
5. The method according to claim 2 or 3, wherein The capture-related parameter information includes the page address of the current web page in the web application and the current time point; Determining whether the gesture capture view creation condition is satisfied according to the capture-related parameter information includes: Determining whether the current web page is a target web page for which gesture capture is to be performed according to the page address, and determining whether the current time point is a time point within a gesture capture time period; In the case where the current web page is the target web page and the current time point is a time point within the gesture capture time period, determining that the gesture capture view creation condition is satisfied.
6. The method according to claim 5, wherein Determining whether the gesture capture view creation condition is satisfied according to the capture-related parameter information further includes: In the case where the current web page is a non-target web page, or in the case where the current time point is a time point outside the gesture capture time period, determining that the gesture capture view creation condition is not satisfied.
7. The method according to claim 2, wherein, Performing gesture capture view control processing according to whether the gesture capture view creation condition is satisfied includes: Determining whether a gesture capture view has been created; In the case where the gesture capture view creation condition is satisfied and the gesture capture view has not been created, performing creation processing of the gesture capture view.
8. The method according to claim 7, wherein Performing gesture capture view control processing according to whether the gesture capture view creation condition is satisfied further includes: In the case where the gesture capture view creation condition is not satisfied and the gesture capture view has been created, performing deletion processing of the gesture capture view.
9. The method according to claim 1, wherein, The size of the gesture capture view is the same as the size of the web page.
10. The method according to claim 1 or 9, wherein The gesture capture view is completely transparent; or, the transparency of the gesture capture view is less than or equal to the transparency threshold.
11. The method according to claim 1, wherein, The gesture attribute information includes at least one of the following: gesture type, touch point position, touch time, and gesture duration.
12. The method according to claim 1 or 11, wherein A rewritten touch processing function is set in the gesture capture view; the rewritten touch processing function is obtained by adding the logic for providing the function response result to the original touch processing function. The rewritten touch processing function is used to capture the gesture parameters in the gesture attribute information, pass the gesture parameters to the original touch processing function in the view of the web application, and provide the gesture parameters as the function response result to the gesture capture view.
13. The method according to claim 12, wherein, The rewritten touch processing function includes a rewritten hit test function and a rewritten touch event processing function. The rewritten hit test function is used to capture at least one of the following gesture parameters in the gesture attribute information: gesture start touch point position and gesture start touch time. The rewritten touch event processing function is used to capture at least one of the following gesture parameters in the gesture attribute information: gesture non-start touch point position, gesture non-start touch time, gesture duration, and gesture type.
14. The method according to claim 1, wherein, Before providing the gesture attribute information to the native application, the method further includes: Obtaining the gesture capture requirement. Determining whether the gesture attribute information meets the gesture capture requirement according to the gesture capture requirement. Filtering the gesture attribute information in the case that the gesture attribute information does not meet the gesture capture requirement.
15. The method according to claim 14, wherein, The gesture capture requirement includes at least one of the following: Gesture type requirement. Gesture duration requirement. Touch point position requirement.
16. The method according to claim 14 or 15, wherein, The obtaining of the gesture capture requirement includes: Obtaining the page address of the current web page in the web application through the native application. Obtaining the gesture capture requirement matching the page address.
17. The method according to claim 1, wherein, The method further includes: Reporting the gesture attribute information to the application server corresponding to the native application through the native application, and instructing the application server to perform gesture analysis and processing in combination with the gesture attribute information.
18. A gesture processing device, the device includes: A capture module, configured to capture gesture attribute information for a web page in a web application based on a gesture capture view in a native application. The web application is a built-in web application of the native application; the gesture capture view is located on the upper layer of the web page. A providing module, configured to provide the gesture attribute information to the web application for processing the web page; and provide the gesture attribute information to the native application.
19. An electronic device, including: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method according to any one of claims 1 to 17.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are for causing the computer to execute the method according to any one of claims 1 to 17.
21. A computer program product, comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 17.