CN113343138A - Rollback interception method and device, intelligent terminal and storage medium - Google Patents

Rollback interception method and device, intelligent terminal and storage medium Download PDF

Info

Publication number
CN113343138A
CN113343138A CN202110597835.XA CN202110597835A CN113343138A CN 113343138 A CN113343138 A CN 113343138A CN 202110597835 A CN202110597835 A CN 202110597835A CN 113343138 A CN113343138 A CN 113343138A
Authority
CN
China
Prior art keywords
current page
preset
processing
rollback
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110597835.XA
Other languages
Chinese (zh)
Inventor
毕建浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110597835.XA priority Critical patent/CN113343138A/en
Publication of CN113343138A publication Critical patent/CN113343138A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Abstract

The disclosure discloses a backspacing interception method, a backspacing interception device, an intelligent terminal and a storage medium. The method comprises the following steps: receiving rollback request information of a current page; when the current page meets a preset backspacing interception condition, responding to the backspacing request information, deleting a browsing record copy corresponding to the current page in a browser record set, and stopping updating of a display interface corresponding to the current page; and executing a preset callback function based on the first application program interface, and performing rollback processing or stay processing on the current page. By the scheme, when the situation that the user clicks the physical backspace key is monitored, whether backspace is given, and the situation that the page is lost due to the fact that the user triggers the physical backspace key by mistake is reduced.

Description

Rollback interception method and device, intelligent terminal and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a fallback intercepting method and apparatus, an intelligent terminal, and a storage medium.
Background
With the continuous update and popularization of mobile devices, mobile application programs have also been vigorously developed and innovated. Currently, APPs (applications) are mainly classified into three categories: namely, native applications, HTML5(HyperText Markup Language 5, fifth generation HyperText Markup Language) applications, and hybrid applications.
Moreover, the HTML5 application program is increasingly used due to the advantages of no installation package downloading, real-time updating and the like. In a browser container opened inside HTML5 APP, a user may open a page, which may involve the user opening or exiting multiple pages.
In the actual use process, it may happen that the user mistakenly touches the return key to exit the current page, for example, the user is filling in the content, and the physical return key is mistakenly triggered to exit the current page, so that the whole filled content needs to be re-filled, which affects the use experience of the user.
Disclosure of Invention
The disclosure provides a backspacing interception method, a backspacing interception device, an intelligent terminal and a storage medium, which are used for solving the technical problem that a page is lost due to the fact that a user mistakenly triggers a physical backspacing key in the related art. The technical scheme of the disclosure is as follows:
in a first aspect of the embodiments of the present disclosure, a fallback intercepting method is provided, where the method includes:
receiving rollback request information of a current page;
when the current page meets a preset backspacing interception condition, responding to the backspacing request information, deleting a browsing record copy corresponding to the current page in a browser record set, and stopping updating of a display interface corresponding to the current page;
and executing a preset callback function based on the first application program interface, and performing rollback processing or stay processing on the current page.
In one possible implementation, before the receiving the rollback request information for the current page, the method further includes:
monitoring a current page;
and when the current page meets a preset backspacing interception condition, calling a second application program interface to send a browsing record copy corresponding to the current page to a browser record set.
In a possible embodiment, the preset fallback interception condition is one or more of the following conditions:
the address information of the page belongs to preset address information; alternatively, the first and second electrodes may be,
the service attribute information of the page belongs to preset service attribute information; the preset service attribute information at least comprises payment service attribute information, money inquiry service attribute information and editing service attribute information; alternatively, the first and second electrodes may be,
the information of the number of times of use and/or the information of the length of use of the page belong to a preset range.
In a possible implementation manner, the executing a preset callback function based on the second application program interface to perform rollback processing or stay processing on the current page includes:
in the process of executing a preset callback function, outputting prompt information, wherein the prompt information is used for prompting a user to select to execute backspacing processing or staying processing, the backspacing processing is used for indicating to return to the last page of the current page, and the staying processing is used for indicating to stay at the current page;
and executing the backspacing processing or the staying processing in response to the selection operation of the prompt information.
In one possible embodiment, the method further comprises:
acquiring a return value of the preset callback function;
determining whether to output the prompt message when receiving the rollback request message again after executing the staying processing according to the return value and the rollback triggering condition in the preset callback function;
when the fallback request information is received again after the stay processing is performed,
if the determination result of determining whether to output the prompt message is yes, outputting the prompt message;
and if the determination result of whether the prompt information is output is determined to be negative, executing the rollback processing.
In a possible implementation mode, the prompt message is output in a mode of outputting a text prompt message in a prompt box or in a mode of combining voice and text prompt messages.
In one possible embodiment, the first application program interface is an onpopstate application program interface; the second application program interface is a pushState application program interface.
In a second aspect of the embodiments of the present disclosure, there is provided a fallback intercepting device, the device including:
a receiving unit configured to perform receiving rollback request information for a current page;
the deleting unit is configured to respond to the backspacing request information when the current page meets a preset backspacing intercepting condition, delete a browsing record copy corresponding to the current page in a browser record set, and stop updating of a display interface corresponding to the current page;
and the processing unit is configured to execute a preset callback function based on the first application program interface and perform rollback processing or stay processing on the current page.
In a possible implementation, the apparatus further includes a transmitting unit configured to perform:
monitoring a current page;
and when the current page meets a preset backspacing interception condition, calling a second application program interface to send a browsing record copy corresponding to the current page to a browser record set.
In a possible embodiment, the preset fallback interception condition is one or more of the following conditions:
the address information of the page belongs to preset address information; alternatively, the first and second electrodes may be,
the service attribute information of the page belongs to preset service attribute information; the preset service attribute information at least comprises payment service attribute information, money inquiry service attribute information and editing service attribute information; alternatively, the first and second electrodes may be,
the information of the number of times of use and/or the information of the length of use of the page belong to a preset range.
In one possible embodiment, the processing unit is configured to perform:
in the process of executing a preset callback function, outputting prompt information, wherein the prompt information is used for prompting a user to select to execute backspacing processing or staying processing, the backspacing processing is used for indicating to return to the last page of the current page, and the staying processing is used for indicating to stay at the current page;
and executing the backspacing processing or the staying processing in response to the selection operation of the prompt information.
In one possible embodiment, the processing unit is configured to perform:
acquiring a return value of the preset callback function;
determining whether to output the prompt message when receiving the rollback request message again after executing the staying processing according to the return value and the rollback triggering condition in the preset callback function;
when the fallback request information is received again after the stay processing is performed,
if the determination result of determining whether to output the prompt message is yes, outputting the prompt message;
and if the determination result of whether the prompt information is output is determined to be negative, executing the rollback processing.
In a possible implementation mode, the prompt message is output in a mode of outputting a text prompt message in a prompt box or in a mode of combining voice and text prompt messages.
In one possible embodiment, the first application program interface is an onpopstate application program interface; the second application program interface is a pushState application program interface.
In a third aspect of the embodiments of the present disclosure, an intelligent terminal is provided, where the intelligent terminal includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the first aspect of the embodiments of the present disclosure described above and any of the methods referred to in the first aspect.
In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, where instructions, when executed by a processor of a smart terminal, enable the smart terminal to perform the method according to the first aspect of the embodiments of the present disclosure and any one of the methods related to the first aspect.
In a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, the computer program implements the method according to any one of the above first aspect and the first aspect of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the embodiment of the present disclosure, rollback request information for a current page may be received, and when it is determined that the current page meets a preset rollback interception condition, that is, it is determined whether the current page is a page that is expected to perform rollback interception based on the preset rollback interception condition, that is, a requirement for performing rollback interception processing on a customized page is supported. And when the current page meets the preset backspacing interception condition, responding to the backspacing request information, deleting a browsing record copy corresponding to the current page in the browser record set, and stopping updating of a display interface corresponding to the current page. That is, false response may be performed on the rollback request information based on the browsing record copy, and the current page corresponding to the browsing record copy may be kept unchanged, that is, the update of the display interface corresponding to the current page may be stopped. Further, based on the first application program interface executing the preset callback function, the current page may be subjected to rollback processing or stay processing.
Therefore, in the embodiment of the present disclosure, after the user triggers the physical backspace key, the user does not directly exit from the current page, and based on the preset callback function, whether to perform backspace processing on the current page, that is, to return to the previous page of the current page, or to intercept that the current page is returned to the previous page, that is, to stop on the current page, is determined, thereby reducing the occurrence of the situation that the current page is lost due to the fact that the user triggers the physical backspace key by mistake, and improving the use experience of the user.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a schematic diagram illustrating an application scenario in accordance with an exemplary embodiment;
FIG. 2 is a flowchart illustrating a fallback interception method according to an example embodiment;
FIG. 3 is a schematic diagram illustrating a fallback function key in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating the structure of a fallback intercept in accordance with an exemplary embodiment;
fig. 5 is a schematic structural diagram of an intelligent terminal according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the images so used are interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present disclosure, some key terms used by the embodiments of the present disclosure are explained first:
1. native application: refers to an application program developed by using a development tool or language supported by a mobile platform, that is, an operating system developed specifically for a certain operating system, such as iOS (operating system of apple inc), Android (Android), and the like.
2. HTML5 application: using standard Web (page) technology, typically HTML5, JavaScript, and CSS (Cascading Style Sheets), which are essentially Web-based applications designed for mobile browsers that can run on the browsers of various operating systems.
3. Mixing application programs: refers to a mixture of native applications and HTML5 applications.
4. jsbridge: and the Web View Java script Bridge in the Android system realizes the interaction of js and Java.
5. A terminal: the intelligent wearable device comprises a mobile phone, a computer, a tablet personal computer, an intelligent terminal, multimedia equipment, an intelligent wearable device and the like.
The following briefly introduces the design ideas of the embodiments of the present disclosure:
currently, in the related art, developers often embed webview content in apps to achieve the effect of flexibly replacing published content, but rollback interaction of webview can only receive a message of rollback of a user operation in a jsbridge interaction manner.
For example, to implement global event interception of a physical backspacing key by using an Android operating system as an example, a native application is required to monitor an operation of a user clicking the physical backspacing key, and then the HTML5 application is notified through jsbridge, so that the backspacing interception effect can be achieved by combining the operations.
It can be seen that, in the related art, a client engineer is required to cooperate with the jsbridge development to provide the jsbridge to a developer of the HTML5 application, generally, the development period is too long, and it is required to support customized development, that is, the requirements for use in a specific scene and for avoiding the occurrence in other scenes are met, but a scheme capable of meeting the requirements does not exist in the related art.
In view of this, in the embodiment of the present disclosure, a method for rollback interception is provided, which can implement rollback interception on an important interface, and improve the use experience of a user.
After introducing the design concept of the embodiment of the present disclosure, some simple descriptions are made below on application scenarios to which the fallback interception technical scheme in the embodiment of the present disclosure is applicable, and it should be noted that the application scenarios described in the embodiment of the present disclosure are for more clearly describing the technical scheme of the embodiment of the present disclosure, and do not form a limitation on the technical scheme provided in the embodiment of the present disclosure.
In the embodiment of the present disclosure, please refer to an application scenario schematic diagram shown in fig. 1, where the application scenario includes a plurality of intelligent terminals (i.e., the intelligent terminal 101, the intelligent terminal 102, and the intelligent terminal 103) and a server 104, and each of the intelligent terminals may communicate with the server 104, for example, directly or indirectly connect through a wired or wireless communication manner, which is not limited in the present disclosure. The intelligent terminals 101, 102 and 103 are installed with clients corresponding to the same application, the social application is, for example, a hybrid application or an HTML5 application, and the server 104 is a service device providing a background service for the application. Each of the intelligent terminal 101, the intelligent terminal 102, and the intelligent terminal 103 has an account allocated in the social platform corresponding to the application, and users of the intelligent terminal 101, the intelligent terminal 102, and the intelligent terminal 103 can log in the respective accounts to publish content or browse content.
In this scenario, the user of each intelligent terminal may view or edit information at the interface of the respective account. Taking the intelligent terminal 1 as an example, the user 1 browses a current page through an interface of the account 1 in the intelligent terminal 1, and when the user 1 clicks a physical backspace key, the intelligent terminal 1 may process a backspace request generated based on the physical backspace key, and determine to display prompt information for exiting the current page or return to a previous page of the current page.
The server 104 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like. The smart terminals 101, 102, 103 may be, but are not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart television, a smart wearable device, and the like.
To further explain the scheme of the fallback interception method provided by the embodiment of the present disclosure, the following detailed description is made with reference to the accompanying drawings and the specific embodiments. Although the disclosed embodiments provide method steps as shown in the following embodiments or figures, more or fewer steps may be included in the methods based on conventional or non-inventive efforts. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the disclosed embodiments. The method can be executed in sequence or in parallel according to the method shown in the embodiment or the figures when the method is executed in an actual processing procedure or a device (for example, a parallel processor or an application environment of multi-thread processing).
The rollback interception method in the embodiment of the present disclosure is described below with reference to a method flowchart shown in fig. 2, and the steps shown in fig. 2 may be executed by the intelligent terminal shown in fig. 1.
The method flow of the disclosed embodiments is described below.
Step 201: and receiving rollback request information of the current page.
In the embodiment of the present disclosure, when a user operates a physical backspace key on a current page, an intelligent terminal may receive backspace request information generated based on an operation of triggering the physical backspace key for the current page.
Specifically, before step 201, a current page in the HTML5 application or the hybrid application being used by the user may be monitored, and it is determined whether the current page meets a preset rollback interception condition, that is, whether to perform rollback interception on the current page. That is to say, in the embodiment of the present disclosure, a current page browsed by a user may be determined, and whether the current page is an important page, that is, a page that needs to be subjected to rollback interception is determined, where a specific determination manner is to determine whether the current page meets a preset rollback interception condition. In such a way, the backspacing interception processing is not carried out on each page, namely the personalized use requirements of the user are met.
In the embodiment of the present disclosure, the preset rollback interception condition may be determined by a developer in advance, for example, all interfaces to be paid for shopping are determined as a specific page, that is, a page that needs to be subjected to rollback interception processing, or may be determined by a user based on an actual use requirement, for example, a page that is filling information is marked and determined as a specific page, which is not limited in the embodiment of the present disclosure.
In an exemplary embodiment, a preset rollback interception function key may be provided in the embodiment of the present disclosure, that is, a page marked as needing rollback interception processing on a specific page may be implemented by the rollback interception function key. Specifically, the user may use the rollback interception function key to mark a certain page or a certain type of page, so that the intelligent terminal may obtain mark information indicating that the page is a page that needs to be subjected to rollback interception processing, and the intelligent terminal may determine, according to the mark information, that the page meets a preset rollback interception condition, that is, determine that the page is a page that the user wishes to be subjected to rollback interception processing.
For example, referring to fig. 3, when browsing a first page, a user may click a backspacing interception function key provided by a current page, and the intelligent terminal may obtain the tag information of the first page and determine that the first page meets a preset backspacing interception condition based on the tag information of the first page.
It should be noted that, in the embodiment of the present disclosure, the operation on the backspacing interception function key may be any manner of operation, such as clicking, long pressing, dragging, or gesture. In addition, the display mode of the backspacing interception function key may be that a page is clicked to trigger popup display, or a page is opened to directly display, and of course, the display mode may also be that the page is triggered to display in other modes, which is not limited in the embodiment of the present disclosure. Moreover, the identifier of the backspacing interception function key may be a star shape as shown in fig. 3, or may be a polygon such as a triangle, a pentagon, etc., or may be a circle or an ellipse, or of course, may be formed by combining the aforementioned shapes or combining the aforementioned forms with chinese characters or other characters, and the embodiment of the present disclosure is not limited.
In an exemplary embodiment, if a page of the same type as the current page is selected and determined to be a page satisfying a preset fallback intercepting condition, the user may trigger a corresponding function button to implement the function button, and specific implementation may refer to an implementation manner of the fallback intercepting function key, which is not described herein again.
In another exemplary embodiment, it may be determined whether a preset fallback interception condition is satisfied based on predetermined information, wherein the preset fallback interception condition is one or more of the following conditions: the address information of the page belongs to preset address information; or the service attribute information of the page belongs to preset service attribute information; the preset service attribute information at least comprises payment service attribute information, money inquiry service attribute information and editing service attribute information; or the information of the number of times of use and/or the information of the length of use of the page belong to a preset range.
In the embodiment of the disclosure, based on historical data or statistical user usage data, pages with more physical backspacing keys operated by a user by mistake are determined, address information of the pages is determined to be preset address information, and when the address information of the current page is determined to belong to the preset address information, it can be determined that the current page meets a preset backspacing interception condition.
In the embodiment of the present disclosure, the service attribute information of the page may be determined, and then, whether the page satisfies the preset fallback intercepting condition is determined according to whether the attribute information of the page belongs to the preset service attribute information. Specifically, the preset service attribute information at least includes payment service attribute information, money inquiry service attribute information, and editing service attribute information.
For example, if the current page is a page where the user is editing information, such as a modified form or a page where a resume is filled in, it may be determined that the service attribute information of the current page belongs to the edited service attribute information, and it may be determined that the current page satisfies the preset fallback intercepting condition.
If the current page is a page for which the user is paying the amount or an interface for inquiring the balance, it can be determined that the service attribute information of the current page belongs to the preset service attribute information, so that the current page is determined to meet the preset backspacing interception condition.
In the embodiment of the disclosure, the number of times of use and/or the information of the use duration of the page may also be determined, so as to determine whether the number of times of use and/or the information of the use duration of the page belong to a preset range, and further determine whether the page meets a preset rollback interception condition. For example, if the preset range is [5,6] times and the number of times of using the first page is determined to be 5 times, it is determined that the first page satisfies the preset rollback intercepting condition.
Therefore, in the embodiment of the present disclosure, whether the current page meets the preset rollback interception condition may be quickly determined based on the preset rollback interception condition preset by the system, and the current page may also be judged based on the preset rollback interception condition set by the user in a personalized manner, that is, various implementable manners are provided, and the implementability of the scheme is enhanced.
In this embodiment of the present disclosure, when it is determined that the current page meets the preset rollback interception condition, a second application program interface may be called, and a browsing record copy corresponding to the current page is sent to the browser record set, where the second application program interface is, for example, a pushState application program interface, that is, a pushState API.
In the embodiment of the present disclosure, when a user opens a current page, a browsing record original corresponding to the current page may be sent to a browser record set. Further, when it is determined that the current page meets the preset rollback interception condition, a second application program interface may be called, and a browsing record copy corresponding to the current page is sent to the browser record set. That is to say, two browsing records corresponding to the current page are stored in the browser record set, so that the current page is not affected when the browsing record copies in the browser record set are processed.
Step 202: and when the current page meets a preset backspacing interception condition, responding to backspacing request information, deleting a browsing record copy corresponding to the current page in the browser record set, and stopping updating of a display interface corresponding to the current page.
In the embodiment of the present disclosure, when the current page meets the preset rollback interception condition, the rollback request information is responded, that is, the browsing record copy in the browser record set may be deleted, but since the browsing record original is still stored in the browser record set, the rollback request information is not substantially responded, that is, the previous page of the current page is not returned, and the update of the display interface corresponding to the current page is stopped.
Therefore, the scheme provided by the embodiment of the disclosure makes a false response to the rollback request information, and the response mode is to delete the browsing record copy in the browser record set. That is to say, since the display of the current page is based on the browsing record original, deleting the browsing record pair does not affect the display of the current page, so that the display page corresponding to the current page seen by the user is not updated, that is, the current page is not exited.
As can be seen, in the embodiment of the present disclosure, a mode of pushing one more browsing record corresponding to the current page to the browser record set, that is, a mode of sending a browsing record copy is adopted, so that a false response can be performed on the rollback request information based on the browsing record copy, and therefore, the current page displayed based on the browsing record in the browser record set is not updated, and the current page is prevented from directly exiting.
Step 203: and executing a preset callback function based on the first application program interface, and performing backspacing or staying processing on the current page.
In the embodiment of the present disclosure, after deleting the browsing record copy in the browser record set, a preset callback function may be executed based on the first application program interface, and a rollback process or a stay process may be performed on the current page. The first application program interface may be, for example, an onstatus application program interface, that is, an onstatus API.
In the embodiment of the present disclosure, in the process of executing the preset callback function, the prompt information is output, and the rollback processing or the stay processing is executed in response to the selection operation of the prompt information. Specifically, the prompt information is used to prompt the user to select to execute a rollback process or a stay process, where the rollback process is used to instruct to return to a previous page of the current page, and the stay process is used to instruct to stay at the current page.
Therefore, in the embodiment of the present disclosure, in the process of executing the preset callback function, the service code logic is executed to remind the user whether to return to the previous page of the current page or stay at the current page.
In an exemplary embodiment, the prompt is a text prompt output in a prompt box. Specifically, the prompt box may be displayed in the form of a pop-up window or a suspension frame, which is not limited in the embodiment of the present disclosure. The text prompt information may be automatically set by the system, i.e., preset by the developer, or may be set by the user, which is not limited in the embodiment of the present disclosure. In such a way, the occurrence of page exit conditions caused by the fact that the user touches the physical backspace key by mistake can be reduced as much as possible, and the user is prompted intuitively.
In an exemplary embodiment, the prompt may be output as a combination of voice and text prompts. Specifically, the prompt voice may be sent while popping up the prompt box, where the prompt voice may be a piece of music or a piece of prompt, and both the music and the prompt may be preset by the system or may be set by the user. By the mode, the information can be fed back to the user in time, the situation that the user does not pay attention to the page display information to cause page quitting is avoided, and meanwhile, the old or the use feeling of the user who cannot see the prompt box clearly can be taken care of.
In the embodiment of the disclosure, a user may perform a selection operation on the prompt information, and when the user determines to leave the current page and clicks the physical backspace key again, the intelligent terminal may obtain the return value of the preset callback function, so that whether to output the prompt information, that is, to output the prompt information or to directly quit the current page and return to the previous page of the current page, when the user receives the backspace request information again after the backspace request information is determined according to the return value and the backspace trigger condition in the preset callback function. Specifically, the return value may indicate to return to the previous page, i.e., to exit the current page, or to stay on the current page, i.e., to intercept to return to the previous page.
In the embodiment of the present disclosure, the rollback triggering condition may be understood as that when the return value indicates to return, the current page may be retired and the previous page of the current page may be returned; when the return value indicates interception, then output of a prompt message may be triggered.
In the embodiment of the present disclosure, when the rollback request information is received again after the stay processing is executed, if the determination result of determining whether to output the prompt information is yes, that is, the return value indicates interception, according to the return value and the rollback trigger condition, the prompt information is output, and if the determination result of determining whether to output the prompt information is no, that is, the return value indicates exit, the rollback processing is executed.
In summary, in the embodiment of the present disclosure, when the user triggers the physical back-off key, the user does not directly exit from the current page, but sends the prompt information, and further, when the user operates again, the user can still send the prompt information to prompt the user whether to exit from the current page, thereby avoiding the occurrence of the direct exit.
In addition, the pushState API and the oppropstate API are adopted in the method, namely the browser HTML5 standard API is realized, so that the method can be adapted to intelligent terminals of different operating systems, namely jsbridge development is avoided, and the development efficiency is improved. In addition, the scheme provided by the embodiment of the present disclosure may support customized service requirements, that is, the preset rollback triggering condition may be updated based on actual implementation, and the rollback interception method provided by the embodiment of the present disclosure may be formed into an independent module, so that the rollback interception function may be used in a hot-swap manner.
Based on the same inventive concept, the embodiment of the present disclosure provides a rollback intercepting device, which can implement a function corresponding to the rollback intercepting method. The rollback intercepting means may be a hardware structure, a software module, or a hardware structure plus a software module. The backspacing interception device can be realized by a chip system, and the chip system can be formed by a chip and can also comprise the chip and other discrete devices. Referring to fig. 4, the rollback intercepting apparatus includes a receiving unit 401, a deleting unit 402, and a processing unit 403. Wherein:
a receiving unit 401 configured to perform receiving rollback request information for a current page;
a deleting unit 402, configured to, when the current page meets a preset rollback interception condition, respond to the rollback request information, delete a browsing record copy corresponding to the current page in a browser record set, and stop updating a display interface corresponding to the current page;
the processing unit 403 is configured to execute a preset callback function based on the first application program interface, and perform rollback processing or stay processing on the current page.
In a possible implementation, the apparatus further includes a transmitting unit configured to perform:
monitoring a current page;
and when the current page meets a preset backspacing interception condition, calling a second application program interface to send a browsing record copy corresponding to the current page to a browser record set.
In a possible embodiment, the preset fallback interception condition is one or more of the following conditions:
the address information of the page belongs to preset address information; alternatively, the first and second electrodes may be,
the service attribute information of the page belongs to preset service attribute information; the preset service attribute information at least comprises payment service attribute information, money inquiry service attribute information and editing service attribute information; alternatively, the first and second electrodes may be,
the information of the number of times of use and/or the information of the length of use of the page belong to a preset range.
In a possible implementation, the processing unit 403 is configured to perform:
in the process of executing a preset callback function, outputting prompt information, wherein the prompt information is used for prompting a user to select to execute backspacing processing or staying processing, the backspacing processing is used for indicating to return to the last page of the current page, and the staying processing is used for indicating to stay at the current page;
and executing the backspacing processing or the staying processing in response to the selection operation of the prompt information.
In a possible implementation, the processing unit 403 is configured to perform:
acquiring a return value of the preset callback function;
determining whether to output the prompt message when receiving the rollback request message again after executing the staying processing according to the return value and the rollback triggering condition in the preset callback function;
when the fallback request information is received again after the stay processing is performed,
if the determination result of determining whether to output the prompt message is yes, outputting the prompt message;
and if the determination result of whether the prompt information is output is determined to be negative, executing the rollback processing.
In a possible implementation mode, the prompt message is output in a mode of outputting a text prompt message in a prompt box or in a mode of combining voice and text prompt messages.
In one possible embodiment, the first application program interface is an onpopstate application program interface; the second application program interface is a pushState application program interface.
All the related contents of the aforementioned steps related to the embodiment of the rollback interception method shown in fig. 2 may be referred to the functional description of the functional unit corresponding to the rollback interception device in the embodiment of the present disclosure, and are not described herein again.
The division of the units in the embodiments of the present disclosure is schematic, and is only a logical function division, and there may be another division manner in actual implementation, and in addition, each functional unit in each embodiment of the present disclosure may be integrated in one processor, may also exist alone physically, or may also be integrated in one unit by two or more units. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
Based on the same inventive concept, the embodiment of the present disclosure further provides an intelligent terminal, which is, for example, any one of the aforementioned intelligent terminals in fig. 1, such as the intelligent terminal 101, the intelligent terminal 102, or the intelligent terminal 103 in fig. 1. Referring to fig. 5, the intelligent terminal in the embodiment of the present disclosure includes at least one processor 501 and a memory 502 connected to the at least one processor, but a specific connection medium between the processor 501 and the memory 502 is not limited in the embodiment of the present disclosure, for example, the processor 501 and the memory 502 may be connected by a bus, and the bus may be divided into an address bus, a data bus, a control bus, and the like.
In the embodiment of the present disclosure, the memory 502 stores instructions executable by the at least one processor 501, and the at least one processor 501 may execute the steps included in the foregoing video processing method by executing the instructions stored in the memory 502.
The Processor 501 may be a general-purpose Processor, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present disclosure. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present disclosure may be embodied directly in a hardware processor, or in a combination of hardware and software modules.
Memory 502, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charged Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 502 in the disclosed embodiments may also be circuitry or any other device capable of performing a storage function to store program instructions and/or data.
The processor 501 is a control center of the intelligent terminal, and can connect various parts of the entire intelligent terminal by using various interfaces and lines, and perform various functions and process data of the intelligent terminal by operating or executing instructions stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring on the intelligent terminal. Optionally, the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles an operating system, a user interface, an application program, and the like, and the modem processor mainly handles wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 501. In some embodiments, processor 501 and memory 502 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
Further, the smart terminal in the embodiment of the present disclosure may further include an input unit 503, a display unit 504, a radio frequency unit 505, an audio circuit 506, a speaker 507, a microphone 508, a Wireless Fidelity (WiFi) module 509, a bluetooth module 510, a power supply 511, an external interface 512, an earphone jack 513, and the like. It will be understood by those skilled in the art that fig. 5 is merely an example of a smart terminal and is not intended to limit the smart terminal, which may include more or fewer components than those shown, or some components may be combined, or different components.
The input unit 503 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the intelligent terminal. For example, the input unit 503 may include a touch screen 514 and other input devices 515. The touch screen 514 may collect touch operations of a user (e.g., operations of the user on or near the touch screen 514 using any suitable object such as a finger, a joint, a stylus, etc.), that is, the touch screen 514 may be used to detect touch pressure and touch input position and touch input area, and drive the corresponding connection device according to a preset program. The touch screen 514 can detect a touch operation of the touch screen 514 by a user, convert the touch operation into a touch signal and send the touch signal to the processor 501, or can transmit touch information of the touch operation to the processor 501, and can receive and execute a command sent by the processor 501. The touch information may include at least one of pressure magnitude information and pressure duration information. The touch screen 514 may provide an input interface and an output interface between the smart terminal and the user. In addition, the touch screen 514 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 503 may include other input devices 515 in addition to the touch screen 514. For example, other input devices 515 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 504 may be used to display information input by the user or information provided to the user and various menus of the smart terminal. Further, the touch screen 514 may cover the display unit 504, and when the touch screen 514 detects a touch operation on or near the touch screen, the touch screen transmits the pressure information of the touch operation to the processor 501. In the embodiment of the present disclosure, the touch screen 514 and the display unit 504 may be integrated into one component to implement the input, output and display functions of the intelligent terminal. For convenience of description, the touch screen 514 is schematically illustrated as an example of a functional set in which the touch screen 514 represents the touch screen 514 and the display unit 504, but in some embodiments, the touch screen 514 and the display unit 504 may be provided as two separate components.
When the display unit 504 and the touch panel are superimposed on each other in the form of layers to form the touch screen 514, the display unit 504 can be used as an input device and an output device, and when serving as an output device, can be used to display images, for example, to enable playing of various videos. The Display unit 504 may include at least one of a Liquid Crystal Display (LCD), a Thin Film Transistor Liquid Crystal Display (TFT-LCD), an Organic Light Emitting Diode (OLED) Display, an Active Matrix Organic Light Emitting Diode (AMOLED) Display, an In-Plane Switching (IPS) Display, a flexible Display, a 3D Display, and the like. Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as transparent displays, and the smart terminal may include two or more display units (or other display devices) according to a particular desired embodiment, for example, the smart terminal may include an external display unit (not shown in fig. 5) and an internal display unit (not shown in fig. 5).
The radio frequency unit 505 may be used for receiving and transmitting information or signals during a call. Typically, the radio frequency circuitry includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the radio frequency unit 505 may also communicate with network devices and other devices through wireless communication.
The audio circuitry 506, speaker 507, microphone 508 may provide an audio interface between the user and the smart terminal. The audio circuit 506 may transmit the electrical signal converted from the received audio data to the speaker 507, and convert the electrical signal into an audio signal for output by the speaker 507. On the other hand, the microphone 508 converts the collected sound signal into an electrical signal, which is received by the audio circuit 506 and then converted into audio data, and then the audio data is processed by the audio data output processor 501 and then sent to another intelligent terminal through the radio frequency unit 505, or the audio data is output to the memory 502 for further processing, and the audio circuit may also include a headphone jack 513 for providing a connection interface between the audio circuit and a headphone.
WiFi belongs to short-distance wireless transmission technology, and the intelligent terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 509, and provides wireless broadband internet access for the user. Although fig. 5 shows the WiFi module 509, it is understood that it does not belong to the essential constitution of the smart terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
Bluetooth is a short-range wireless communication technology. By using the bluetooth technology, the communication between mobile communication devices such as a palm computer, a notebook computer and a mobile phone can be effectively simplified, the communication between the devices and the Internet (Internet) can also be successfully simplified, and the intelligent terminal enables the data transmission between the intelligent terminal and the Internet to be more rapid and efficient through the bluetooth module 510, thereby widening the way for wireless communication. Bluetooth technology is an open solution that enables wireless transmission of voice and data. Although fig. 5 shows the bluetooth module 510, it is understood that it does not belong to the essential constitution of the smart terminal and may be omitted entirely as needed within the scope not changing the essence of the invention.
The smart terminal may also include a power supply 511, such as a battery, for receiving external power or powering various components within the smart terminal. Preferably, the power supply 511 may be logically connected to the processor 501 through a power management system, so that functions of managing charging, discharging, and power consumption are implemented through the power management system.
The intelligent terminal may further include an external interface 512, where the external interface 512 may include a standard Micro USB interface, may also include a multi-pin connector, and may be used to connect the intelligent terminal to communicate with other devices, and may also be used to connect a charger to charge the intelligent terminal.
Although not shown, the intelligent terminal in the embodiment of the present disclosure may further include a camera, a flash, and other possible functional modules, which are not described herein again.
Based on the same inventive concept, the embodiments of the present disclosure provide a computer-readable storage medium, and when instructions in the computer-readable storage medium are executed by a processor, the computer-readable storage medium can perform any one of the methods performed by the intelligent terminal in the embodiments described above.
Based on the same inventive concept, embodiments of the present disclosure provide a computer program product, which contains a computer program, and when the computer program of the computer program product is executed by a processor, any one of the methods executed by the intelligent terminal in the above embodiments can be implemented.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present disclosure have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the disclosure.
It will be apparent to those skilled in the art that various changes and modifications may be made to the disclosed embodiments without departing from the spirit and scope of the disclosed embodiments. Thus, if such modifications and variations of the embodiments of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to encompass such modifications and variations.

Claims (10)

1. A fallback interception method, comprising:
receiving rollback request information of a current page;
when the current page meets a preset backspacing interception condition, responding to the backspacing request information, deleting a browsing record copy corresponding to the current page in a browser record set, and stopping updating of a display interface corresponding to the current page;
and executing a preset callback function based on the first application program interface, and performing rollback processing or stay processing on the current page.
2. The method of claim 1, wherein prior to receiving the rollback request information for the current page, the method further comprises:
monitoring a current page;
and when the current page meets a preset backspacing interception condition, calling a second application program interface to send a browsing record copy corresponding to the current page to a browser record set.
3. The method of claim 1 or 2, wherein the preset fallback interception condition is one or more of the following conditions:
the address information of the page belongs to preset address information; alternatively, the first and second electrodes may be,
the service attribute information of the page belongs to preset service attribute information; the preset service attribute information at least comprises payment service attribute information, money inquiry service attribute information and editing service attribute information; alternatively, the first and second electrodes may be,
the information of the number of times of use and/or the information of the length of use of the page belong to a preset range.
4. The method of claim 1, wherein said executing a preset callback function based on the first application program interface to perform a rollback process or a stay process on the current page comprises:
in the process of executing a preset callback function, outputting prompt information, wherein the prompt information is used for prompting a user to select to execute backspacing processing or staying processing, the backspacing processing is used for indicating to return to the last page of the current page, and the staying processing is used for indicating to stay at the current page;
and executing the backspacing processing or the staying processing in response to the selection operation of the prompt information.
5. The method of claim 4, wherein the method further comprises:
acquiring a return value of the preset callback function;
determining whether to output the prompt message when receiving the rollback request message again after executing the staying processing according to the return value and the rollback triggering condition in the preset callback function;
when the fallback request information is received again after the stay processing is performed,
if the determination result of determining whether to output the prompt message is yes, outputting the prompt message;
and if the determination result of whether the prompt information is output is determined to be negative, executing the rollback processing.
6. The method of claim 4, wherein the prompt message is output in a prompt box to output a text prompt message or a combination of voice and text prompt messages.
7. The method of claim 2, wherein the first application program interface is an oppoprtate application program interface; the second application program interface is a pushState application program interface.
8. A fallback intercepting apparatus, the apparatus comprising:
a receiving unit configured to perform receiving rollback request information for a current page;
the deleting unit is configured to respond to the backspacing request information when the current page meets a preset backspacing intercepting condition, delete a browsing record copy corresponding to the current page in a browser record set, and stop updating of a display interface corresponding to the current page;
and the processing unit is configured to execute a preset callback function based on the first application program interface and perform rollback processing or stay processing on the current page.
9. An intelligent terminal, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the fallback interception method of any one of claims 1 to 7.
10. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor of a smart terminal, enable the smart terminal to perform the fallback interception method according to any one of claims 1 to 7.
CN202110597835.XA 2021-05-31 2021-05-31 Rollback interception method and device, intelligent terminal and storage medium Pending CN113343138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110597835.XA CN113343138A (en) 2021-05-31 2021-05-31 Rollback interception method and device, intelligent terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110597835.XA CN113343138A (en) 2021-05-31 2021-05-31 Rollback interception method and device, intelligent terminal and storage medium

Publications (1)

Publication Number Publication Date
CN113343138A true CN113343138A (en) 2021-09-03

Family

ID=77472287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110597835.XA Pending CN113343138A (en) 2021-05-31 2021-05-31 Rollback interception method and device, intelligent terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113343138A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740095A (en) * 2018-12-27 2019-05-10 四川新网银行股份有限公司 A kind of H5 page dynamic backing method based on browser stack management
CN110795185A (en) * 2019-09-26 2020-02-14 北京淇瑀信息科技有限公司 Method and device for preventing quitting misoperation and electronic equipment
CN111339470A (en) * 2020-03-03 2020-06-26 政采云有限公司 Page return alarm method, system, device and readable storage medium
CN111459481A (en) * 2020-03-26 2020-07-28 平安普惠企业管理有限公司 Page sideslip method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109740095A (en) * 2018-12-27 2019-05-10 四川新网银行股份有限公司 A kind of H5 page dynamic backing method based on browser stack management
CN110795185A (en) * 2019-09-26 2020-02-14 北京淇瑀信息科技有限公司 Method and device for preventing quitting misoperation and electronic equipment
CN111339470A (en) * 2020-03-03 2020-06-26 政采云有限公司 Page return alarm method, system, device and readable storage medium
CN111459481A (en) * 2020-03-26 2020-07-28 平安普惠企业管理有限公司 Page sideslip method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10762277B2 (en) Optimization schemes for controlling user interfaces through gesture or touch
CN104133828A (en) Drag-and-drop clipboard for HTML documents
CN107066188B (en) A kind of method and terminal sending screenshot picture
CN104246659A (en) Instantiable gesture objects
CN111190673B (en) Page display method and device based on operation monitoring and electronic equipment
CN105786455B (en) Data processing method and device and terminal
CN108124016B (en) Method and device for sending POST (POST on POST) request
CN108604245B (en) Method and device for acquiring webpage content
WO2018086454A1 (en) Page data processing method and device
JP2018506793A (en) Method, apparatus, system and computer program for providing a rich menu of official accounts in an instant messaging service
CN109271208A (en) Parameter setting method, device, terminal and storage medium
CN111611513B (en) Page display method and device based on user identity information and electronic equipment
CN111596971B (en) Application cleaning method and device, storage medium and electronic equipment
CN108319474B (en) Page information generation method, device and equipment
CN103941955A (en) Method and device for displaying individual information on social network platform
JP2022091904A (en) Mini program page skin changeover method, device, and electronic apparatus
US20240089223A1 (en) Information display method and apparatus, and electronic device
CN114327087A (en) Input event processing method and device, electronic equipment and storage medium
CN112054950B (en) Resource transmission method, device, terminal and medium
CN110162350B (en) Notification bar information display method, notification bar information display device, server and storage medium
CN109145182B (en) Data acquisition method and device, computer equipment and system
CN113343138A (en) Rollback interception method and device, intelligent terminal and storage medium
CN115563134A (en) Interaction method, interaction device, electronic equipment and computer readable medium
CN112291412B (en) Application program control method and device and electronic equipment
JP2024500300A (en) Information interaction methods, devices, and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination