CN108509454B - Operation method of character string and related device - Google Patents
Operation method of character string and related device Download PDFInfo
- Publication number
- CN108509454B CN108509454B CN201710109393.3A CN201710109393A CN108509454B CN 108509454 B CN108509454 B CN 108509454B CN 201710109393 A CN201710109393 A CN 201710109393A CN 108509454 B CN108509454 B CN 108509454B
- Authority
- CN
- China
- Prior art keywords
- character string
- target operation
- module
- page
- characteristic region
- 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.)
- Active
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the application provides an operation method and a related device of a character string, wherein the method comprises the following steps: accessing a first address, and loading a first page to which a data object belongs, wherein the first page has a characteristic region; loading a character string generated based on a second address of a second page to which the data object belongs in the characteristic region; covering a window above the characteristic region; monitoring a target operation in the window; and selecting the character strings in the characteristic region according to the target operation so as to perform operation processing. The user can select the character strings in the characteristic region through simple target operations such as clicking and the like, the operation is simple and convenient, the consumed time is reduced, other irrelevant information can be avoided from appearing around the character strings by loading the character strings in the specific characteristic region, and the window can intercept the modification operation of the user on the character strings, so that the accurate selection of the character strings is ensured.
Description
Technical Field
The present application relates to the field of computer processing technology, and in particular, to a method for processing a string, an apparatus for processing a string, and one or more computer-readable media.
Background
Due to business concerns, some applications on the mobile side (hereinafter referred to as target applications) may restrict certain applications (hereinafter referred to as source applications) through which data objects are distributed.
For example, target applications such as social applications and forum applications may limit source applications such as shopping applications from sharing data objects such as merchandise links for the purpose of avoiding harassment to users.
Therefore, the source application converts the link of the data object into a character string, the character string is pasted in the target application and displayed in a file area in the target application after being copied by the user, other users drag a cursor to select the character string after a cursor of the file area appears, a copied control is popped up after long pressing, the source application is opened after copying, and the character string is restored into the data object by the source application.
However, this method is cumbersome to operate, not only takes a lot of time, but also there may be other irrelevant information around the character string, the dragging operation may select these irrelevant information, and once the user understands the error, the wrong (possibly more information, possibly less information) character string is copied, the source application cannot restore the link to the data object, resulting in a sharing error.
Disclosure of Invention
In view of the above problems, embodiments of the present application are proposed to provide a method for processing an operation of a character string and a corresponding apparatus for processing an operation of a character string, an apparatus, one or more computer-readable media, which overcome or at least partially solve the above problems.
The embodiment of the application discloses an operation processing method of a character string, which comprises the following steps:
accessing a first address, and loading a first page to which a data object belongs, wherein the first page has a characteristic region;
loading a character string generated based on a second address of a second page to which the data object belongs in the characteristic region;
covering a window above the characteristic region;
monitoring a target operation in the window;
and selecting the character strings in the characteristic region according to the target operation so as to perform operation processing.
The embodiment of the present application further discloses an operation processing apparatus for a character string, including:
the page loading module is used for accessing a first address and loading a first page to which a data object belongs, and the first page is provided with a characteristic area;
the character string loading module is used for loading a character string generated based on a second address of a second page to which the data object belongs in the characteristic region;
the window covering module is used for covering a window above the characteristic region;
the target operation monitoring module is used for monitoring target operation in the window;
and the character string selection module is used for selecting the character strings in the characteristic region according to the target operation so as to perform operation processing.
The embodiment of the application also discloses a device, including:
one or more processors; and
instructions in one or more computer-readable media stored thereon, which when executed by the one or more processors, cause the apparatus to perform the above-described method.
One or more computer-readable media having instructions stored thereon, which, when executed by one or more processors, cause a terminal to perform the above-described methods are also disclosed.
The embodiment of the application has the following advantages:
the method and the device for processing the character string have the advantages that the first address is accessed, the first page to which the data object belongs is loaded, the character string generated based on the second address of the second page to which the data object belongs is loaded in the characteristic region of the first page, a window is covered, when the target operation is monitored in the window, the character string in the characteristic region is selected for operation processing, a user can select the character string in the characteristic region through simple target operation such as clicking, the operation is simple and convenient, the consumed time is reduced, the phenomenon that other irrelevant information appears around the character string can be avoided by loading the character string in the specific characteristic region, the window can intercept the modification operation of the user on the character string, and the character string is guaranteed to be accurately selected.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for handling operations on a string according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating steps of another method for handling operations on a string according to one embodiment of the present application;
3A-3H are exemplary diagrams of a copy string according to one embodiment of the present application;
fig. 4 is a block diagram of an operation processing apparatus for a character string according to an embodiment of the present application;
fig. 5 schematically illustrates an exemplary system that can be used to implement various embodiments described in this disclosure.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
Referring to fig. 1, a flowchart illustrating steps of a method for processing a string according to an embodiment of the present application is shown, which may specifically include the following steps:
In specific implementation, the embodiments of the present application can be applied to various mobile terminals, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device (such as glasses, a watch, and the like), and the like.
The operating systems of these mobile terminals may include Android, IOS, Windows Phone, Windows, etc., in which various clients may be installed, such as shopping applications, social applications (e.g., instant messaging tools), forum-like applications, etc.
In an embodiment of the present application, the client has a page container, i.e., a container that loads and exposes pages.
For example, in an Android, IOS system, the page container may be a WebView control, in a Windows system, the page container may be a WebBrowser control, and so on.
In order to make the embodiments of the present application better understood by those skilled in the art, WebView is described as an example of a web page container in the present specification.
In the Android system, WebView is a view class of a Java layer of a WebKit module (browser Web typesetting engine), and a Web resource for displaying and processing a request of a view object can be created by using an Android application program with a Web browsing function.
Currently, the WebKit module supports HTTP (Hypertext Transfer Protocol), HTTPs (Hypertext Transfer Protocol over Secure Socket Layer, HTTP channel targeted for security), FTP (File Transfer Protocol), and JS (JavaScript, an interpreted scripting language) requests.
WebView is used as a UI (User Interface) Interface of an application program, a series of web browsing and User interaction interfaces are provided for a User, and a client accesses WebKit core codes through the interfaces.
In practical applications, for platforms in different business fields (server, server cluster, etc.), massive data objects, i.e. data with business field characteristics, are usually collected.
For example, for the news media domain, the data objects may be news data; for the mobile communication field, the data object may be mobile communication data; for the field of Electronic Commerce (EC), the data object may be commodity data, and so on.
Data objects, while carrying different traffic characteristics, are still data in nature, e.g., text, image data, audio data, video data, and so forth.
Some websites can collect data objects in the platforms and perform processing such as user pushing.
If the first user wants to share the data objects collected by the websites, the first address can be configured for the data objects collected by the websites.
The domain name of the first address belongs to the platform, but the first address carries user information of the user to which the data object belongs, website information, user information of the first user, and the like as parameters, so that the user to which the data object belongs, the website, and the first user can be tracked and subjected to other processing in the following.
The first user can send the first address to a client side such as a social application (such as an instant messenger) and a forum application, and share the first address with the second user.
And a second user clicks the first address, the client accesses the first address, and a first page where the data object in the platform is located is loaded, wherein in a normal condition, the first page shows brief information in the data object.
For example, if the data object is product data, information such as a summary picture, a title, and a price of the product data may be loaded on the first page.
Taking WebView as an example, the following method can be generally adopted to load the page (including the first page and the second page):
the first method comprises the following steps:
1. instantiating a WebView component in Activity: WebView ═ new WebView (this);
2. setting a page to be displayed by WevView by a webView.
The page may be a web page (e.g., http:// www. c. n. is a domain name), a local page (e.g., file:// sdcard/uc/a. html), a currently loaded page JS method (e.g., javascript: window. alert ()), or the like, which is not limited in this embodiment.
3. Invoking the setContentView () method of Activity to display a page view;
4. after a plurality of pages are viewed by the WebView point link, in order to enable the WebView to support the backspacing function, an onKeyDown () method of an Activity class can be covered;
5. add rights in android manifest. xml file, otherwise Web not available error will occur.
The second method comprises the following steps:
1. declaring WebView in a layout file;
2. instantiating WebView in Activity;
3. calling a loadUrl () method of WebView, and setting a page to be displayed by the WebView;
4. in order to enable WebView to respond to the hyperlink function, a setWebViewClient () method is called, and a WebView view is set;
5. after a plurality of pages are viewed by the WebView point link, in order to enable the WebView to support the backspacing function, an onKeyDown () method of an Activity class can be covered;
6. add permissions in android manifest.
Of course, the page loading method is only an example, and when the embodiment of the present application is implemented, other page loading methods may be set according to actual situations, which is not limited in the embodiment of the present application. In addition, besides the above page loading method, a person skilled in the art may also adopt other page loading methods according to actual needs, and this is not limited in this embodiment of the application.
And 102, loading a character string generated based on a second address of a second page to which the data object belongs in the characteristic area.
In an embodiment of the present application, when the first page is loaded, a feature area may be created in the first page, so that the first page has the feature area.
A page, typically an HTML (HyperText Markup Language) document, may be a Textarea element in the HTML document.
The second page of the platform where the data object is located will usually show the detailed information in the data object.
The detailed information is simplified information, in which the amount of detailed information is larger than the amount of simplified information.
For example, if the data object is product data, information such as various reference pictures, titles, prices, evaluation information, store information (such as scores, customer service, product classifications, etc.), product parameters (such as quantity, color, etc.), and the like of the product data may be loaded on the second page.
It should be noted that the domain name of the second address of the second page belongs to the platform.
The second page can be converted into a character string according to a certain rule and loaded into the characteristic area of the first page.
In an embodiment of the present application, a window may be created above the feature area, and the window may be a Div element in an HTML document.
The area of the window is larger than or equal to the characteristic region, and the position of part or all of the window is the same as that of the characteristic region, so that the characteristic region can be covered.
In practical applications, the window may be set to be transparent, so that the feature area under the window is still visible, and therefore, in terms of visual effect, the window does not affect the user to browse the character strings in the feature area.
In general, the user intends to perform operations such as clicking and long-pressing on the character string in the feature region, and since the window is located at the upper layer of the feature region, the user actually performs operations such as clicking and long-pressing on the window, so that the user does not directly perform operations such as clicking and long-pressing on the character string in the feature region.
And 104, monitoring target operation in the window.
In a specific implementation, an API (Application Programming Interface) Interface provided by a page container (e.g., WebView) may be called, and an operation event generated when a target operation such as clicking, long-pressing, double-clicking, sliding occurs in a window is monitored in advance, such as a click event, a long-pressing event, a double-clicking event, a sliding event, and the like.
If the operational event is monitored, it may be determined that a target operation occurred in the window.
And 105, selecting character strings in the characteristic region according to the target operation so as to perform operation processing.
If the target operation is monitored and the user intends to perform operation processing such as copying on the character string in the characteristic region, the client can select the character string in the characteristic region to perform operation processing such as copying.
Taking copying as an example, the character string may be copied to a clipboard, and when an application of a platform to which the data object belongs is started, the application may detect the clipboard, extract the character string, convert the character string into a second address, access the second address, and load a second page to which the data object belongs.
In one embodiment of the present application, step 105 may comprise the sub-steps of:
sub-step S1051, locating a focus at the feature region.
The focus is a state in a page container (such as WebView), and the element in which the focus is located is an element being operated by a user.
The focus is positioned at the feature region so that the character string in the feature region can be operated on.
In the sub-step S1052, a character string is selected in the feature region after the focus is located.
And a substep S1053 of loading an operation control for performing operation processing on the selected character string.
In a specific implementation, a select () command in JavaScript can be executed on a character string, and an operation control is loaded on the character string, so that a user can trigger the operation control by clicking and the like to perform operation processing such as copying and canceling.
Meanwhile, the selected character string may be highlighted or the like.
Sub-step S1054, removing the focus from the feature region.
Although there is a window covering the feature area, since the focus is set in the feature area, the user can still modify the character string in the feature area.
After the operation control is loaded, the focus can be removed from the feature area, preventing the user from modifying the character string in the feature area.
The method and the device for processing the character string have the advantages that the first address is accessed, the first page to which the data object belongs is loaded, the character string generated based on the second address of the second page to which the data object belongs is loaded in the characteristic region of the first page, a window is covered, when the target operation is monitored in the window, the character string in the characteristic region is selected for operation processing, a user can select the character string in the characteristic region through simple target operation such as clicking, the operation is simple and convenient, the consumed time is reduced, the phenomenon that other irrelevant information appears around the character string can be avoided by loading the character string in the specific characteristic region, the window can intercept the modification operation of the user on the character string, and the character string is guaranteed to be accurately selected.
Referring to fig. 2, a flowchart illustrating steps of another method for processing a string operation according to an embodiment of the present application is shown, and specifically, the method may include the following steps:
In a particular implementation, the first page has a feature region.
And step 204, monitoring target operation in the window.
At step 206, the current target operation is ignored.
In order to prevent double operations, delayed operations (such as a delay of 300 ms), and the like, if the interval between two consecutive target operations is small (which is indicated by not exceeding the time threshold), the current target operation is ignored, and if the interval between two consecutive target operations is large (which is indicated by exceeding the time threshold), the processing is allowed to continue, for example, removing the target element, backing up the character string, selecting the character string, and the like.
In one example of an embodiment of the present application, step 206 may include the following sub-steps:
a substep S2061 of judging whether to start a timer whose timing time is a preset time threshold; if yes, the step S2062 is executed, otherwise, the step S2063 is executed.
And a sub-step S2062 of determining that the interval time between the current target operation and the last target operation does not exceed the time threshold.
And a substep S2063 of determining that the time interval between the current target operation and the last target operation has exceeded the time threshold.
In sub-step S2064, a timer with a timing time equal to a preset time threshold is started.
In the embodiment of the present application, a timer may be set, the timer sets a timing time to be a preset time threshold, for example, 500 milliseconds, and the timer is automatically cancelled when the timing is completed.
After listening for the target operation, it may be detected whether a timer is present.
If the timer exists, the time interval between the current target operation and the last target operation is less than or equal to the time threshold, and the current target operation is ignored.
If the timer does not exist, the time interval between the current target operation representation and the last target operation is larger than the time threshold, the continuous processing is allowed, and meanwhile, a timer is set for timing.
And step 207, removing target elements of the character strings in the characteristic region.
When rendering the HTML document of the first page, it is possible to insert in the target area target elements that are not related to the character string,
in particular implementations, the target element may include one or more of:
space element, line feed element.
And step 208, backing up the character strings in the characteristic area to obtain backup character strings.
In the embodiment of the application, the character string can be retained before the character string is selected, so that the character string is prevented from being modified by a user under certain conditions, and errors are caused to the character string.
For example, the character string is backed up in an area such as a cache, that is, the backed-up character string is stored in the area such as the cache.
It should be noted that the remaining character string may be an original character string or a character string after the target element is removed, which is not limited in this embodiment of the present application.
After the character string is to be selected, the reserved character string (i.e., the backup character string) is read from the cache and other areas, the character string in the feature area is covered, i.e., the feature area is cleared, and the reserved character string (i.e., the backup character string) is written into the feature area, so that the character string in the feature area can be reselected for operation processing after the character string has an error.
In order to make the embodiments of the present application better understood by those skilled in the art, in the present specification, commodity data is described as an example of a data object.
The seller opens a shop at the shopping platform and sells commodity data (data object) showing detailed information in a second page in the shopping platform.
In order to develop a promotion channel of commodity data, a seller promotes the commodity data in a sharing website, and the commodity data shows brief information in a first page in the sharing website.
The first user browses certain commodity data in the sharing type website through the browser and determines to share the commodity data.
The sharing website informs a shopping platform, and the shopping platform configures a first address for the commodity data by taking the information of the seller, the sharing website and the first user as parameters:
https://uland.***.com/coupon/edetaile=sxivuOhGZMrzX1yJ4zwwtkOBvRyRaAzkrS%2FiL0VBVwgnPvnvzwFwhswBAs06HAOzx3JNNoIqwiV%2BGnteGM%2ByLh0HgBdG%2FDDL%2F1M%2FBw7Sf%2FcB5K%2Bl3iNNDDQQnEzbcy2oA3PzEfc8vngHZ3L7L0lRptXh5NG5dmad&pid=mm_47506526_14142864_63636599&af=1&ali_trackid=2:mm_47506526_14142864_56402451:1484202403_2k4_1347448660&upsid=e2b8b2df1c128568895450f99f018524&clk1=e2b8b2df1c128568895450f99f018524
wherein, the name is the domain name of the shopping platform.
The first user sends the first address to the second user as an instant message in an instant messaging tool in the mobile terminal.
As shown in fig. 3A, after the second user clicks the first address in the instant messenger in the mobile terminal, the first page is loaded in the instant messenger.
As shown in fig. 3B, the shopping platform converts the second address of the second page where the commodity data is located into a character string:
"seeing and seeing super beautiful flocking technology beautiful dress recommended in super fine 17 early spring" … … lyCnh1 vlEA.
In the first page, a feature area is created, and the character string is loaded in the feature area.
As shown in fig. 3C, a transparent window is created overlying the feature area, covering the feature area.
As shown in fig. 3D, in the window, the click operation of the second user is monitored.
As shown in fig. 3E, if the clicking operation of the second user is monitored, it may be determined whether the last clicking operation exceeds 500 milliseconds, and if so, the character string in the feature area is acquired, and a timer with a timing time of 500 milliseconds is set.
As shown in fig. 3F, elements such as spaces and linefeeds in the character string are removed and backed up in the cache.
As shown in FIG. 3G, the focus is positioned on the feature area, the character string in the feature area is highlighted, a copy control is provided, and after the second user clicks the copy control, the character string in the feature area is copied to the clipboard.
As shown in fig. 3H, the focus is removed from the feature area, and the character string in the cache is overlaid with the character string in the feature area.
And the second user opens the shopping application of the shopping platform, after detecting the character string in the clipboard, the shopping application extracts the character string and reports the character string to the shopping platform, and the shopping platform converts the character string into a second address and returns the second address to the shopping application.
And the shopping application loads a second page corresponding to the second address, and if the second user purchases the commodities in the second page, the shared website and the first user can be divided.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 4, a block diagram of a structure of an operation processing apparatus for a character string according to an embodiment of the present application is shown, which may specifically include the following modules:
the page loading module 401 is configured to access a first address and load a first page to which a data object belongs, where the first page has a feature area;
a character string loading module 402, configured to load, in the feature area, a character string generated based on a second address of a second page to which the data object belongs;
a window covering module 403, configured to cover a window over the feature area;
a target operation monitoring module 404, configured to monitor a target operation in the window;
a character string selecting module 405, configured to select a character string in the feature region according to the target operation, so as to perform operation processing.
In one embodiment of the present application, the string selection module 405 includes:
a focus positioning sub-module for positioning a focus in the feature region;
the focus selects the submodule, is used in locating the characteristic area after the focus, choose the character string;
the operation control loading sub-module is used for loading an operation control for operation processing on the selected character string;
a focus removal submodule to remove the focus from the feature region.
In one embodiment of the present application, further comprising:
the time judgment module is used for judging whether the interval time between the current target operation and the last target operation exceeds a preset time threshold value or not; if not, calling a target operation ignoring module;
and the target operation ignoring module is used for ignoring the current target operation.
In an example of the embodiment of the present application, the time determination module includes:
the timer judgment submodule is used for judging whether the timer with the timing time being a preset time threshold value is started or not; if yes, calling a first determining submodule, and if not, calling a second determining submodule;
a first determining submodule for determining that the interval time between the current target operation and the last target operation does not exceed the time threshold;
a second determination submodule for determining that the interval time between the current target operation and the last target operation has exceeded the time threshold;
and the timer starting module is used for starting a timer with the timing time being a preset time threshold.
In one embodiment of the present application, further comprising:
the target element removing module is used for removing target elements of the character strings in the characteristic region;
wherein the target elements include one or more of:
space element, line feed element.
In one embodiment of the present application, further comprising:
the character string backup module is used for backing up the character strings in the characteristic area to obtain backup character strings;
and the character string covering module is used for covering the backup character strings with the character strings in the characteristic region.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Embodiments of the present disclosure may be implemented as a system using any suitable hardware and/or software for the desired configuration. Fig. 5 schematically illustrates an exemplary system 500 that can be used to implement various embodiments described in this disclosure.
For one embodiment, fig. 5 illustrates an exemplary system 500 having one or more processors 502, a system control module (chipset) 504 coupled to at least one of the processor(s) 502, system memory 506 coupled to the system control module 504, non-volatile memory (NVM)/storage 508 coupled to the system control module 504, one or more input/output devices 510 coupled to the system control module 504, and a network interface 512 coupled to the system control module 506.
The processor 502 may include one or more single-core or multi-core processors, and the processor 502 may include any combination of general-purpose or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, the system 500 can be implemented as a mobile terminal as described in embodiments herein.
In some embodiments, system 500 may include one or more computer-readable media (e.g., system memory 506 or NVM/storage 508) having instructions and one or more processors 502 in combination with the one or more computer-readable media configured to execute the instructions to implement modules to perform the actions described in this disclosure.
For one embodiment, system control module 504 may include any suitable interface controllers to provide any suitable interface to at least one of the processor(s) 502 and/or any suitable device or component in communication with system control module 504.
For one embodiment, system control module 504 may include one or more input/output controllers to provide an interface to NVM/storage 508 and input/output device(s) 510.
For example, NVM/storage 508 may be used to store data and/or instructions. NVM/storage 508 may include any suitable non-volatile memory (e.g., flash memory) and/or may include any suitable non-volatile storage device(s) (e.g., one or more Hard Disk Drives (HDDs), one or more Compact Disc (CD) drives, and/or one or more Digital Versatile Disc (DVD) drives).
NVM/storage 508 may include storage resources that are physically part of the device on which system 500 is installed, or it may be accessible by the device, and need not be part of the device. For example, NVM/storage 508 may be accessed over a network via input/output device(s) 510.
Input/output device(s) 510 may provide an interface for system 500 to communicate with any other suitable device, input/output devices 510 may include communication components, audio components, sensor components, and so forth. Network interface 512 may provide an interface for system 500 to communicate over one or more networks, and system 500 may communicate wirelessly with one or more components of a wireless network according to any of one or more wireless network standards and/or protocols, such as to access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
For one embodiment, at least one of the processor(s) 502 may be packaged together with logic for one or more controller(s) (e.g., memory controller module) of the system control module 504. For one embodiment, at least one of the processor(s) 502 may be packaged together with logic for one or more controller(s) of the system control module 504 to form a System In Package (SiP). For one embodiment, at least one of the processor(s) 502 may be integrated on the same die with logic for one or more controller(s) of the system control module 504. For one embodiment, at least one of the processor(s) 502 may be integrated on the same die with logic for one or more controller(s) of the system control module 504 to form a system on a chip (SoC).
In various embodiments, system 500 may be, but is not limited to being: a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.). In various embodiments, system 500 may have more or fewer components and/or different architectures. For example, in some embodiments, system 500 includes one or more cameras, a keyboard, a Liquid Crystal Display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an Application Specific Integrated Circuit (ASIC), and speakers.
Wherein, if the display includes a touch panel, the display screen may be implemented as a touch screen display to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The embodiment of the application discloses an example and a device, and example 1 comprises a character string operation processing method, which comprises the following steps: accessing a first address, and loading a first page to which a data object belongs, wherein the first page has a characteristic region; loading a character string generated based on a second address of a second page to which the data object belongs in the characteristic region; covering a window above the characteristic region; monitoring a target operation in the window; and selecting the character strings in the characteristic region according to the target operation so as to perform operation processing.
Example 2 may include the method of example 1, wherein the selecting, for operation processing, the character string in the feature region in accordance with the target operation includes: positioning a focal point at the feature region; selecting a character string in the feature region after the focus is located; loading an operation control for performing operation processing on the selected character string; removing the focal point from the feature region.
Example 3 may include the method of example 1 or example 2, wherein, after listening for the target operation in the window, further comprising: judging whether the interval time between the current target operation and the last target operation exceeds a preset time threshold value or not; if not, ignoring the current target operation.
Example 4 may include the method of example 3, wherein the determining whether the interval time between the current target operation and the last target operation exceeds a preset time threshold includes: judging whether a timer with the timing time being a preset time threshold value is started or not; if so, determining that the interval time between the current target operation and the last target operation does not exceed the time threshold; if not, determining that the interval time between the current target operation and the last target operation exceeds the time threshold, and starting a timer with the timing time being a preset time threshold.
Example 5 may include the method of example 1, wherein, after listening for the target operation in the window, further comprising: removing target elements of the character strings in the characteristic region; wherein the target elements include one or more of: space element, line feed element.
Example 6 may include the method of example 1 or example 2 or example 5, wherein after listening for the target operation in the window, further comprising: backing up the character strings in the characteristic area to obtain backup character strings; after selecting the character string in the feature region according to the target operation, the method further comprises the following steps: and overlaying the backup character string on the character string in the characteristic area.
Example 7 includes an operation processing apparatus of a character string, the apparatus including: the page loading module is used for accessing a first address and loading a first page to which a data object belongs, wherein the first page has a characteristic area; the character string loading module is used for loading a character string which is generated based on a second address of a second page to which the data object belongs in the characteristic region; the window covering module is used for covering a window above the characteristic region; the target operation monitoring module is used for monitoring target operation in the window; and the character string selection module is used for selecting the character strings in the characteristic region according to the target operation so as to perform operation processing.
Example 8 may include the apparatus of example 7, wherein the string selection module comprises: a focus positioning sub-module for positioning a focus in the feature region; the focus selects the submodule, is used in locating the characteristic area after the focus, choose the character string; the operation control loading sub-module is used for loading an operation control for operation processing on the selected character string; a focus removal submodule to remove the focus from the feature region.
Example 9 may include the apparatus of example 7 or 8, further comprising: the time judgment module is used for judging whether the interval time between the current target operation and the last target operation exceeds a preset time threshold value or not; if not, calling a target operation ignoring module; and the target operation ignoring module is used for ignoring the current target operation.
Example 10 may include the apparatus of example 9, wherein the time determination module comprises: the timer judgment submodule is used for judging whether the timer with the timing time being a preset time threshold value is started or not; if yes, calling a first determining submodule, and if not, calling a second determining submodule; a first determining submodule for determining that the interval time between the current target operation and the last target operation does not exceed the time threshold; a second determination submodule for determining that the interval time between the current target operation and the last target operation has exceeded the time threshold; and the timer starting module is used for starting a timer with the timing time being a preset time threshold.
Example 11 may include the apparatus of example 7, further comprising: the target element removing module is used for removing target elements of the character strings in the characteristic region; wherein the target elements include one or more of: space element, line feed element.
Example 12 may include the apparatus of example 7 or 8 or 11, further comprising: the character string backup module is used for backing up the character strings in the characteristic area to obtain backup character strings; and the character string covering module is used for covering the backup character strings with the character strings in the characteristic region.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application 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 the like) having computer-usable program code embodied therein.
In a typical configuration, the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (fransitory media), such as modulated data signals and carrier waves.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. 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 terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, 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 terminal 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 terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal 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 application have been described, additional variations and modifications of these 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 the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above detailed description is provided for a method for processing a string, a device, and one or more computer-readable media, and specific examples are applied herein to explain the principles and embodiments of the present application, and the descriptions of the above embodiments are only used to help understand the method and core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (14)
1. A character string operation processing method is characterized by comprising the following steps:
accessing a first address, and loading a first page to which a data object belongs, wherein the first page has a characteristic region; the first page is used for showing the brief information of the data object;
loading a character string generated based on a second address of a second page to which the data object belongs in the characteristic region;
covering a window above the characteristic region;
monitoring a target operation in the window;
selecting character strings in the characteristic region according to the target operation so as to perform operation processing; and the operation control used for operation processing is loaded based on the selected character string in the characteristic region after the focus is positioned.
2. The method according to claim 1, wherein the step of selecting the character string in the feature region for operation processing in accordance with the target operation comprises:
positioning a focal point at the feature region;
selecting a character string in the feature region after the focus is located;
loading an operation control for performing operation processing on the selected character string;
removing the focal point from the feature region.
3. The method of claim 1 or 2, wherein after listening for a target operation in the window, further comprising:
judging whether the interval time between the current target operation and the last target operation exceeds a preset time threshold value or not;
if not, ignoring the current target operation.
4. The method of claim 3, wherein the step of determining whether the time interval between the current target operation and the last target operation exceeds a preset time threshold comprises:
judging whether a timer with the timing time being a preset time threshold value is started or not;
if so, determining that the interval time between the current target operation and the last target operation does not exceed the time threshold;
if not, determining that the interval time between the current target operation and the last target operation exceeds the time threshold, and starting a timer with the timing time being a preset time threshold.
5. The method of claim 1, wherein after listening for a target operation in the window, further comprising:
removing target elements of the character strings in the characteristic region;
wherein the target elements include one or more of:
space element, line feed element.
6. The method according to claim 1, 2 or 5,
after listening for the target operation in the window, the method further comprises:
backing up the character strings in the characteristic area to obtain backup character strings;
after selecting the character string in the feature region according to the target operation, the method further comprises the following steps:
and overlaying the backup character string on the character string in the characteristic area.
7. An operation processing apparatus for a character string, comprising:
the page loading module is used for accessing a first address and loading a first page to which a data object belongs, and the first page is provided with a characteristic area; the first page is used for showing the brief information of the data object;
the character string loading module is used for loading a character string generated based on a second address of a second page to which the data object belongs in the characteristic region;
the window covering module is used for covering a window above the characteristic region;
the target operation monitoring module is used for monitoring target operation in the window;
the character string selection module is used for selecting the character strings in the characteristic region according to the target operation so as to perform operation processing; and the operation control used for operation processing is loaded based on the selected character string in the characteristic region after the focus is positioned.
8. The apparatus of claim 7, wherein the string selection module comprises:
a focus positioning sub-module for positioning a focus in the feature region;
the focus selects the submodule, is used in locating the characteristic area after the focus, choose the character string;
the operation control loading sub-module is used for loading an operation control for operation processing on the selected character string;
a focus removal submodule to remove the focus from the feature region.
9. The apparatus of claim 7 or 8, further comprising:
the time judgment module is used for judging whether the interval time between the current target operation and the last target operation exceeds a preset time threshold value or not; if not, calling a target operation ignoring module;
and the target operation ignoring module is used for ignoring the current target operation.
10. The apparatus of claim 9, wherein the time determination module comprises:
the timer judgment submodule is used for judging whether the timer with the timing time being a preset time threshold value is started or not; if yes, calling a first determining submodule, and if not, calling a second determining submodule;
a first determining submodule for determining that the interval time between the current target operation and the last target operation does not exceed the time threshold;
a second determination submodule for determining that the interval time between the current target operation and the last target operation has exceeded the time threshold;
and the timer starting module is used for starting a timer with the timing time being a preset time threshold.
11. The apparatus of claim 7, further comprising:
the target element removing module is used for removing target elements of the character strings in the characteristic region;
wherein the target elements include one or more of:
space element, line feed element.
12. The apparatus of claim 7, 8 or 11, further comprising:
the character string backup module is used for backing up the character strings in the characteristic area to obtain backup character strings;
and the character string covering module is used for covering the backup character strings with the character strings in the characteristic region.
13. A computer device, comprising:
one or more processors; and
instructions in one or more computer-readable media stored thereon that, when executed by the one or more processors, cause the computer device to perform the method of claims 1-6.
14. One or more computer-readable media having instructions stored thereon that, when executed by one or more processors, cause a terminal to perform the method of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710109393.3A CN108509454B (en) | 2017-02-27 | 2017-02-27 | Operation method of character string and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710109393.3A CN108509454B (en) | 2017-02-27 | 2017-02-27 | Operation method of character string and related device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108509454A CN108509454A (en) | 2018-09-07 |
CN108509454B true CN108509454B (en) | 2022-03-08 |
Family
ID=63373487
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710109393.3A Active CN108509454B (en) | 2017-02-27 | 2017-02-27 | Operation method of character string and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108509454B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113573115B (en) * | 2020-04-29 | 2024-04-26 | 聚好看科技股份有限公司 | Method for determining search characters and display device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103309908A (en) * | 2012-10-09 | 2013-09-18 | 三亚中兴软件有限责任公司 | Link display method and link display device |
CN104050153A (en) * | 2013-03-11 | 2014-09-17 | 三星电子株式会社 | Method And Apparatus For Copying And Pasting Of Data |
CN104301379A (en) * | 2014-08-28 | 2015-01-21 | 北京奇虎科技有限公司 | Web page cross-domain communication method and device |
CN104899269A (en) * | 2015-05-26 | 2015-09-09 | 北京金山安全软件有限公司 | Method and device for accessing website link |
CN105550596A (en) * | 2015-12-23 | 2016-05-04 | 北京奇虎科技有限公司 | Access processing method and apparatus |
CN105608101A (en) * | 2015-09-14 | 2016-05-25 | 广州市动景计算机科技有限公司 | Method and device for utilizing address in text, and mobile terminal |
CN106202217A (en) * | 2016-06-28 | 2016-12-07 | 北京金山安全软件有限公司 | Webpage link access method and device and mobile terminal |
CN106462418A (en) * | 2014-06-23 | 2017-02-22 | 谷歌公司 | Remote invocation of mobile device actions |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8898137B1 (en) * | 2010-06-24 | 2014-11-25 | Amazon Technologies, Inc. | URL rescue by execution of search using information extracted from invalid URL |
US20120005185A1 (en) * | 2010-06-30 | 2012-01-05 | Cbs Interactive Inc. | System and method for locating data feeds |
-
2017
- 2017-02-27 CN CN201710109393.3A patent/CN108509454B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103309908A (en) * | 2012-10-09 | 2013-09-18 | 三亚中兴软件有限责任公司 | Link display method and link display device |
CN104050153A (en) * | 2013-03-11 | 2014-09-17 | 三星电子株式会社 | Method And Apparatus For Copying And Pasting Of Data |
CN106462418A (en) * | 2014-06-23 | 2017-02-22 | 谷歌公司 | Remote invocation of mobile device actions |
CN104301379A (en) * | 2014-08-28 | 2015-01-21 | 北京奇虎科技有限公司 | Web page cross-domain communication method and device |
CN104899269A (en) * | 2015-05-26 | 2015-09-09 | 北京金山安全软件有限公司 | Method and device for accessing website link |
CN105608101A (en) * | 2015-09-14 | 2016-05-25 | 广州市动景计算机科技有限公司 | Method and device for utilizing address in text, and mobile terminal |
CN105550596A (en) * | 2015-12-23 | 2016-05-04 | 北京奇虎科技有限公司 | Access processing method and apparatus |
CN106202217A (en) * | 2016-06-28 | 2016-12-07 | 北京金山安全软件有限公司 | Webpage link access method and device and mobile terminal |
Non-Patent Citations (1)
Title |
---|
针对爬虫的域名链接过滤算法;文阳等;《图书情报工作》;20141020;第125-130页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108509454A (en) | 2018-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9756140B2 (en) | Tracking user behavior relative to a network page | |
CN106610774B (en) | Webpage table editing method and device | |
US8984412B2 (en) | Advertising-driven theme preview and selection | |
CN106843665B (en) | Screenshot method and device and terminal equipment | |
CN106909294B (en) | Method and device for realizing data graph comparison on touch screen equipment | |
CN105242817A (en) | Page element real-time highlighted display method and apparatus | |
CN110647272A (en) | Display control method and device | |
CN110069734B (en) | Page component display method and device | |
CN106155524A (en) | Page control method and device | |
WO2014067442A1 (en) | Page browsing method and browser | |
CN111382386A (en) | Method and equipment for generating webpage screenshot | |
CN105279431B (en) | Method, device and system for recording operation information in mobile equipment | |
CN113190321A (en) | Method and equipment for application program page pull-up refreshing | |
CN109284101B (en) | Method and device for changing association of object attributes | |
CN107391534B (en) | Page display method, page file return method, page display device, page file return device and computer storage medium | |
CN103870191A (en) | Method and electronic equipment for saving webpage | |
US10846328B2 (en) | Digital asset association with search query data | |
CN108509454B (en) | Operation method of character string and related device | |
CN111897607A (en) | Application interface loading and interaction method, device and storage medium | |
US20160154554A1 (en) | Visual indication method and device | |
CN107450809B (en) | Page interaction method and device and electronic terminal | |
CN114968528A (en) | Policy-based information processing method, electronic device, and storage medium | |
CN113722630B (en) | Method and equipment for presenting resource data in web page based on client rendering | |
CN115525851A (en) | Detail page display method, device, equipment and storage medium | |
CN108984247B (en) | Information display method, terminal equipment and network equipment thereof |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |