Content replication method, apparatus, device, and computer-readable medium
By establishing a bridge protocol between the client and the embedded web page, the problem of embedded web pages being unable to be copied in low-version systems is solved, and efficient content copying operations are achieved.
Patent Information
- Application Number
- CN202110507494.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-10
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-05-10
AI Technical Summary
In low-version system environments, the client's embedded web pages cannot support one-click copy or long-press copy, affecting user operation efficiency.
Through the bridging protocol between the client and the web page, the content corresponding to the target operation is found from the structure tree of the embedded web page and sent to the client for copy processing.
The copy function of the client-embedded web page is realized in the low-version system environment, which improves the user operation efficiency.
Smart Images

Figure CN113296978B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and more particularly to a content replication method, apparatus, device, and computer-readable medium. Background Art
[0002] Due to system compatibility issues, copying web page content within apps is not supported in some older system environments. For example, after a user pays for an order in an e-commerce app, they are redirected to the payment details page. This payment details page can be an HTML5 page, which generally includes the order amount, payment type, payment account information, and so on. Users of older system versions cannot copy the information on the payment details page using methods such as one-click copy or long-press copy. In this case, if the user needs to use this information elsewhere, they must read the content and manually enter it, which greatly reduces user efficiency. Summary of the Invention
[0003] The content of this disclosure is intended to briefly introduce concepts that will be described in detail in the detailed description section below. This content is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions. Some embodiments of this disclosure provide content replication methods, devices, equipment, and computer-readable media to address one or more of the technical issues mentioned in the background section above.
[0004] In a first aspect, some embodiments of the present disclosure provide a content copying method, which includes: in response to detecting a user's copy operation in a target web page, searching for text corresponding to the target operation from a structure tree corresponding to the target web page; using a bridging protocol between the client and the web page, sending the text to the client, and the client being used to copy the text, wherein the target web page is an embedded web page of the client.
[0005] In a second aspect, some embodiments of the present disclosure provide a content copying device, comprising: a search unit, configured to, in response to detecting a user's copy operation in a target web page, search for text corresponding to the target operation from a structure tree corresponding to the target web page; a sending unit, configured to send the text to the client using a bridging protocol between the client and the web page, and the client is configured to copy the text, wherein the target web page is an embedded web page of the client.
[0006] In a third aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0007] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation of the first aspect is implemented.
[0008] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the client can be used to implement the copy function of the client-embedded web page, thereby solving the problem that the client-embedded web page does not support copying in a low-version system environment, and improving user operation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0010] Figure 1-2 is a schematic diagram of an application scenario of the content replication method according to some embodiments of the present disclosure;
[0011] Figure 3 is a flowchart of some embodiments of the content replication method according to the present disclosure;
[0012] Figure 4 are flowcharts of other embodiments of the content replication method according to the present disclosure;
[0013] Figure 5 is a schematic structural diagram of some embodiments of the content replication device according to the present disclosure;
[0014] Figure 6 It is a structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0016] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other.
[0017] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0018] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0019] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0020] With the rapid development of mobile Internet technology, various types of clients are emerging one after another. In order to meet the ever-changing needs of users and ever-changing scenarios, these clients also need to be constantly updated. To avoid the frequent client version releases caused by continuous updates, many applications use embedded web pages to display some content. Among them, embedded web pages are not native pages within the client, but web pages embedded inside the client. Embedded web pages can be H5 pages. The use of embedded web pages can increase the flexibility of the client and avoid frequent client version releases. Generally speaking, embedded pages can copy content through certain method functions (such as document.execCommand). However, in some low-version system environments, due to compatibility issues, these method functions are not supported. Therefore, users cannot copy content through operations such as one-click copy or long press copy.
[0021] In order to solve the above problems, the present disclosure provides a content replication method, apparatus, device, and computer-readable medium. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0022] Figure 1 It is a schematic diagram of an application scenario of the text generation method of some embodiments of the present disclosure.
[0023] exist Figure 1In the application scenario, the executor of the content copying method is the smartphone 101. A client is installed on the smartphone 101. In this application scenario, it can be an e-commerce application. At this time, the user can perform operations such as product selection and settlement through the client. After the user submits the order, some order information can be displayed through the embedded web page 102. Of course, according to actual needs, the embedded page can also be used to display various types of content. This disclosure is not limited to this. In response to detecting the user's copy operation in the embedded web page 102, such as clicking the "one-click copy" button, the smartphone 101 can search for the content corresponding to the target operation from the structure tree corresponding to the embedded web page 102. On this basis, the bridging protocol between the client and the web page can be used to send the above content to the client, so that the client can copy the above content. Optionally, after the copy is completed, the smartphone 101 can display a prompt message, such as Figure 2 "Copy successful" is shown in the .
[0024] It should be noted that the execution entity 101 can be either hardware or software. When it is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When it is software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitations are given here.
[0025] Continue to refer Figure 3 , shows a process 300 of some embodiments of the content replication method according to the present disclosure. The content replication method includes the following steps:
[0026] Step 301: In response to detecting a copy operation performed by a user on a target webpage, searching a structure tree corresponding to the target webpage for content corresponding to the target operation.
[0027] In some embodiments, the execution subject of the content replication method (eg Figure 1 The smartphone 101 shown can detect a copy operation through an interface provided by the system. The copy operation can be performed by clicking a virtual button, long pressing a button, or the like. The target webpage can be any embedded webpage in the client. In response to detecting a user copy operation on the target webpage, the execution entity can search for content corresponding to the target operation in the structure tree corresponding to the target webpage. In practice, for H5 pages, this can be done using methods provided by native JavaScript to manipulate the structure tree, or methods used by jQuery to manipulate the structure tree.
[0028] In some optional implementations of some embodiments, in response to detecting a user's copy operation on a target webpage, searching for content corresponding to the target operation from a structure tree corresponding to the target webpage includes: in response to detecting a user's click operation on a copy button on the target webpage, searching for content corresponding to a target tag from a structure tree corresponding to the target webpage as content corresponding to the target operation. In these implementations, as an example, a copy button (e.g., Figure 1 In the example above, a "one-click copy" button is clicked. Based on this, in response to a user click, the content corresponding to the target tag can be found as the content corresponding to the target operation. The target tag can be set as needed and can be at least one tag on the target webpage. The content corresponding to the target tag can include the tag's attribute name, attribute value, and so on. This allows for the complete copying of certain content, simplifying user operations.
[0029] In some optional implementations of some embodiments, before step 301, the above method may further include: obtaining the version information of the client running on the current device. At this time, in response to detecting the user's copy operation in the target webpage, searching for the content corresponding to the target operation from the structure tree corresponding to the target webpage, including: in response to detecting the user's copy operation in the target webpage, and determining that the version information meets the preset conditions, searching for the content corresponding to the target operation from the structure tree corresponding to the target webpage. In practice, not all versions of clients need to execute this content copying method. Therefore, by determining whether the version information of the client meets the preset conditions, it is ensured that the method will only be executed when the preset conditions are met. This avoids errors caused by execution in some clients that do not support this method, which helps to ensure the smooth operation of the client.
[0030] Step 302: Using a bridge protocol between the client and the webpage, the content is sent to the client, and the client is used to copy the content.
[0031] In some embodiments, a pre-agreed bridge protocol between the client and the embedded webpage can be used to send the content to the client. The client can then copy the content, thereby completing the copy of the content of the embedded webpage. The bridge protocol is used to define the interaction method between the client and the embedded webpage.
[0032] In some embodiments, the client is used to implement the copy function of the client-embedded web page, thereby solving the problem that the client-embedded web page does not support copying in a low-version system environment, thereby improving user operation efficiency.
[0033] Further references Figure 4, which shows a process 400 of another embodiment of a content replication method. The process 400 of the content replication method includes the following steps:
[0034] Step 401, in response to detecting a user's touch operation in the target web page, searching for content corresponding to the target operation from a structure tree corresponding to the target web page, and triggering a start touch event, which includes a timeout call method, and the timeout call method corresponds to the target timeout time.
[0035] In some embodiments, in practice, users are often accustomed to performing a long press operation on some content to copy the content. However, for the embedded page of the client, since there is no long press event, the long press operation cannot be directly detected through the interface.
[0036] In order to support long press copying by the user, a delayed call method can be included in the start touch event. On this basis, in response to detecting the user's touch operation in the target web page, that is, the user starts touching the screen, the content corresponding to the target operation is searched from the structure tree corresponding to the target web page, and the start touch event is triggered. At this time, the subsequent steps will not be executed immediately, but will only be executed after the target timeout period has passed. In other words, the subsequent steps will not be executed until the user continues touching the screen for the target timeout period. The target timeout period can be set according to actual needs, for example, it can be 500ms. The content corresponding to the target operation can be determined in a variety of ways. For example, by detecting the position touched by the user, and determining the content within a certain range around the touch position as the content corresponding to the target operation. For example, the user can first select part of the content, and then perform a long press operation on the selected content. At this time, the content corresponding to the target operation can be the content selected by the user.
[0037] Step 402 : In response to the difference between the current time and the time when the touch event is triggered being greater than or equal to the target timeout period, the content is sent to the client using a predefined bridge protocol.
[0038] In some embodiments, based on step 401 , in response to the time difference between the current time and the time when the touch event is triggered being greater than or equal to the target timeout time, the content is sent to the client using a predefined bridging protocol.
[0039] In some optional implementations of some embodiments, the above method further includes: in response to the time difference between the current time and the time for triggering the start touch event being less than the target timeout time, triggering a touch move event and / or a touch end event, and clearing the timeout call method in the touch move event and / or the touch end event. In these implementations, if the user stops touching the screen if the duration of time the user continues touching the screen has not reached the target timeout time, it is considered that the user does not want to perform a long press operation, and then no copying is required. Therefore, it is necessary to clear the timeout call method in the touch move event and / or the touch end event, and stop executing subsequent steps. In other words, the content will no longer be sent to the client. This can avoid the user's click and other operations being mistaken for long press operations, and will not affect the user's other normal operations.
[0040] In some optional implementations of some embodiments, the client can copy the received content by following the steps of: dynamically creating and initializing a tag of a target category on the target webpage based on the content; selecting the tag; and copying the selected tag. The target category can be a category corresponding to the content, as needed. Furthermore, the width and height of the tag can be set by initializing the tag. For example, the width and height can be set to 0 pixels to avoid white blocks on the page.
[0041] In some optional implementations of some embodiments, dynamically creating a label of a target category includes: dynamically creating a label of the target category and initializing it before the document body tag (body). In practice, since selecting (facous()) is executed first, the interface will focus on the selected label. This is likely to cause the interface to slide up when the user copies. Therefore, by creating the label before the document body tag, due to its special positional relationship, it will not continue to slide up.
[0042] In some optional implementations of some embodiments, the tag is a read-only attribute. By setting the tag to a read-only attribute, it is possible to avoid the situation where a keyboard pops up after the user clicks Copy.
[0043] Figure 4 In some corresponding embodiments, the content copy method processes the user's long press operation by using a timeout calling method in a touch start event, thereby supporting the user to perform long press copying and facilitating user operation.
[0044] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a content replication device. These device embodiments are similar to Figure 3 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0045] like Figure 5 As shown, a content copying apparatus 500 in some embodiments includes a search unit 501 and a sending unit 502. The search unit 501 is configured to, in response to detecting a user's copy operation on a target webpage, search for text corresponding to the target operation from a structure tree corresponding to the target webpage. The sending unit 502 is configured to utilize a bridging protocol between the client and the webpage to send the text to the client, which is configured to copy the text. The target webpage is an embedded webpage of the client.
[0046] In an optional implementation of some embodiments, the search unit 501 is further configured to, in response to detecting a user touch operation on a target webpage, search for content corresponding to the target operation from a structure tree corresponding to the target webpage, and trigger a start touch event, wherein the start touch event includes a timeout call method, and the timeout call method corresponds to a target timeout period. The sending unit 502 is further configured to, in response to the time difference between the current time and the time when the start touch event was triggered being greater than or equal to the target timeout period, send the content to the client using a predefined bridging protocol.
[0047] In an optional implementation of some embodiments, the device 500 also includes: a clearing unit, configured to trigger a touch move event and / or a touch end event in response to the time difference between the current time and the time for triggering the start of the touch event being less than the target timeout time, and to clear the timeout call method in the touch move event and / or the touch end event respectively.
[0048] In an optional implementation of some embodiments, the search unit 501 is further configured to search for content corresponding to the target tag from the structure tree corresponding to the target web page as content corresponding to the target operation in response to detecting a user clicking a copy button in the target web page.
[0049] In an optional implementation of some embodiments, the client performs a copy process on the content through the following steps: dynamically creating a target category tag based on the content and initializing it; performing a selection operation on the tag, and performing a copy operation on the selected tag.
[0050] In an optional implementation of some embodiments, the tag is a read-only attribute.
[0051] In an optional implementation of some embodiments, the apparatus 500 further includes an acquisition unit configured to obtain version information of the client. The search unit 501 is further configured to, in response to detecting a user's copy operation on the target webpage and determining that the version information meets a preset condition, search for content corresponding to the target operation from a structure tree corresponding to the target webpage.
[0052] It is understood that the units described in the device 500 are similar to those in the reference Figure 3 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 500 and the units included therein, and will not be repeated here.
[0053] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0054] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0055] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as needed.
[0056] In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from a network via the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of some embodiments of the present disclosure are performed.
[0057] It should be noted that the computer-readable medium described in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0058] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0059] The computer-readable medium may be included in the electronic device, or may exist independently and not incorporated into the electronic device. The computer-readable medium carries one or more programs. When executed by the electronic device, the electronic device: in response to detecting a user copy operation on a target webpage, searches for text corresponding to the target operation in a structure tree corresponding to the target webpage; and utilizes a bridging protocol between the client and the webpage to send the text to the client, which then copies the text. The target webpage is an embedded webpage of the client.
[0060] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0061] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0062] The units described in some embodiments of the present disclosure may be implemented in software or hardware. The units described may also be provided in a processor. For example, they may be described as: a processor including a search unit and a sending unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the search unit may also be described as "a unit that searches for text corresponding to the target operation from the structure tree corresponding to the target webpage."
[0063] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0064] The above description is only an illustration of some preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A content replication method, comprising: Get the version information of the client running on the current device; In response to detecting a copy operation by a user on a target webpage, searching a structure tree corresponding to the target webpage for content corresponding to a target tag as content corresponding to the target operation, wherein the content corresponding to the target tag includes an attribute name and an attribute value of the tag. In response to detecting a copy operation by a user on the target webpage, searching a structure tree corresponding to the target webpage for content corresponding to the target operation includes: in response to detecting a copy operation by a user on the target webpage and determining that the version information meets a preset condition, searching a structure tree corresponding to the target webpage for content corresponding to the target operation; The content is sent to the client by using a bridging protocol between the client and the webpage, and the client is used to copy the content, wherein the target webpage is an embedded webpage of the client.
2. The method according to claim 1, wherein In response to detecting a copy operation performed by a user on a target webpage, searching for content corresponding to the target operation from a structure tree corresponding to the target webpage includes: In response to detecting a touch operation by a user on the target webpage, searching for content corresponding to the target operation from a structure tree corresponding to the target webpage, and triggering a start touch event, wherein the start touch event includes a timeout call method, and the timeout call method corresponds to a target timeout period; and sending the content to the client using a predefined bridging protocol, including: In response to a difference between the current time and the time when the touch start event is triggered being greater than or equal to the target timeout period, the content is sent to the client using a predefined bridging protocol.
3. The method according to claim 2, wherein: The method further comprises: In response to the time difference between the current time and the time triggering the start touch event being less than the target timeout time, a touch move event and / or a touch end event is triggered, and the timeout call method is cleared in the touch move event and / or the touch end event respectively.
4. The method according to claim 1, wherein In response to detecting a copy operation performed by a user on a target webpage, searching for content corresponding to the target operation from a structure tree corresponding to the target webpage includes: In response to detecting a user click operation on a copy button in the target webpage, searching a structure tree corresponding to the target webpage for content corresponding to a target tag as content corresponding to the target operation.
5. The method according to claim 1, wherein The client copies the content by following the steps below: Based on the content, dynamically create the target category label and initialize it; A selection operation is performed on the tag, and a copy operation is performed on the selected tag.
6. The method according to claim 5, wherein: The dynamically creating target category label includes: The target category label is dynamically created and initialized before the document body label.
7. The method according to claim 5, wherein: The tag is a read-only attribute.
8. A content copying device, comprising: an acquiring unit, configured to acquire version information of a client running on a current device; The searching unit is configured to, in response to detecting a copy operation by a user on a target webpage, search for content corresponding to a target tag from a structure tree corresponding to the target webpage as content corresponding to the target operation, wherein the content corresponding to the target tag includes an attribute name and an attribute value of the tag, and searching for content corresponding to the target operation from the structure tree corresponding to the target webpage in response to detecting the copy operation by the user on the target webpage comprises: searching for content corresponding to the target operation from the structure tree corresponding to the target webpage in response to detecting the copy operation by the user on the target webpage and determining that the version information meets a preset condition; The sending unit is configured to send the content to the client by using a bridging protocol between the client and the webpage, and the client is used to copy the content, wherein the target webpage is an embedded webpage of the client.
9. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Click display method and device of webpage content
CN104063118A
Method for processing content of interface and mobile terminal
CN108595107A
User behavior data processing method, server and storage medium
CN111221711A