Document processing method and device, and electronic device

CN116644723BActive Publication Date: 2026-10-23BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310685778.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-09
Publication Date
2026-10-23
Estimated Expiration
2043-06-09

AI Technical Summary

Technical Problem

但是,云文档中可以包括一个或多个由该客户端创建的原生组件,由前端控件对云文档中的原生组件进行渲染具有一定的局限性,会影响原生组件的部分功能

Benefits of technology

[0014]本公开的实施例提供的技术方案可以包括以下有益效果:本公开的实施例提供的一种文档的处理方法及装置,在对由目标客户端输出的目标云文档进行渲染时,利用目标客户端中的前端控件渲染部分原生组件的第一内容,并利用目标客户端渲染其它部分原生组件的第二内容,从而实现了部分的同层渲染,在能够减少原生组件与网页组件相互覆盖的问题的情况下,减少了渲染的质量和效率的降低,也减少了对原生组件的部分功能的影响。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116644723B_ABST
    Figure CN116644723B_ABST
Patent Text Reader

Abstract

The present disclosure provides a document processing method, device and electronic equipment, a specific embodiment of the method includes: receiving a trigger operation on a target cloud document; the target cloud document is output by a target client, the target cloud document includes a first object and a second object; the first object includes first content of a first component; in response to the trigger operation, rendering the first object using a front-end control in the target client; and rendering the second object using the target client; the second object includes second content of a second component. This embodiment realizes partial same-layer rendering, reduces the reduction of rendering quality and efficiency, and reduces the impact on the partial functions of the native component, while being able to reduce the problem of mutual coverage of native components and web components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer software technology, and in particular to a document processing method, apparatus, and electronic device. Background Technology

[0002] When a user opens a cloud document output by a client, the document is typically rendered by front-end controls embedded in the client. However, a cloud document may include one or more native components created by the client. Rendering these native components using front-end controls has limitations and can affect some of their functionality. Therefore, a method for rendering cloud documents is needed. Summary of the Invention

[0003] This disclosure provides a document processing method, apparatus, and electronic device.

[0004] According to the first aspect, a document processing method is provided, the method comprising:

[0005] Receive a trigger operation on a target cloud document; the target cloud document is output by a target client, and the target cloud document includes a first object and a second object; the first object includes the first content of a first component;

[0006] In response to the triggering operation, the first object is rendered using a front-end control in the target client; and

[0007] The second object is rendered using the target client; the second object includes the second content of the second component.

[0008] According to a second aspect, a document processing apparatus is provided, the apparatus comprising:

[0009] A receiving module is used to receive a trigger operation on a target cloud document; the target cloud document is output by a target client, and the target cloud document includes a first object and a second object; the first object includes the first content of a first component;

[0010] A first rendering module, configured to render the first object using front-end controls in the target client in response to the triggering operation; and

[0011] The second rendering module is used to render the second object using the target client; the second object includes the second content of the second component.

[0012] According to a third aspect, a computer-readable storage medium is provided, the storage medium storing a computer program that, when executed by a processor, implements the method described in any one of the first aspects above.

[0013] According to a fourth aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of the first aspects.

[0014] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: The document processing method and apparatus provided by the embodiments of this disclosure, when rendering a target cloud document output by a target client, utilizes the front-end controls in the target client to render the first content of some native components, and utilizes the target client to render the second content of other native components, thereby achieving partial same-layer rendering. While reducing the problem of mutual overlap between native components and web page components, it reduces the reduction in rendering quality and efficiency, and also reduces the impact on some functions of native components.

[0015] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments in this specification, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of an exemplary system architecture for applying the embodiments of this application;

[0018] Figure 2 This is a flowchart illustrating a document processing method according to an exemplary embodiment of the present disclosure;

[0019] Figure 3 This is a block diagram of a document processing apparatus according to an exemplary embodiment of the present disclosure;

[0020] Figure 4 This is a schematic block diagram of an electronic device provided in accordance with some embodiments of the present disclosure;

[0021] Figure 5 This is a schematic block diagram of another electronic device provided in accordance with some embodiments of the present disclosure;

[0022] Figure 6 This is a schematic diagram of a storage medium provided in accordance with some embodiments of the present disclosure. Detailed Implementation

[0023] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0024] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0025] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used herein are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0026] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0027] See Figure 1 Here is a schematic diagram of an exemplary system architecture for applying embodiments of this application:

[0028] like Figure 1 As shown, system architecture 100 may include terminal devices 101 and 102, network 103, and server 104. Network 103 serves as the medium for providing a communication link between terminal devices 101 and 102 and server 104. Network 103 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0029] Terminal devices 101 and 102 can interact with server 104 via network 103 to receive or send requests or information. Terminal devices 101 and 102 can be various electronic devices, including but not limited to smartphones, tablets, laptops, and desktop computers. Server 104 can be a server providing various services, such as a cloud document service server. The server can store, analyze, and process the received data. It is understood that a server can provide one or more services, and the same service can be provided by multiple servers.

[0030] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0031] based on Figure 1 In the system architecture shown in this embodiment, terminal device 101 or terminal device 102 is equipped with client a, which can be used to manage cloud documents. A browser (e.g., a webview) is embedded in client a as a front-end control. Terminal device 101 or terminal device 102 can obtain cloud document b from server 104 via network 103 and output cloud document b through client a. Users can open cloud document b by triggering an operation on it. Cloud document b includes content of a preset type to be displayed, which is the content of a specified native component (e.g., the preset type of content to be displayed can be a file embedded in a content block). The content to be displayed can be rendered using the front-end control embedded in client a. Cloud document b may also include content to be displayed corresponding to web page components, which can be rendered by the front-end control. Cloud document b may also include content to be displayed for other native components, which can be rendered by the client.

[0032] The present disclosure will now be described in detail with reference to specific embodiments.

[0033] Figure 2 This is a flowchart illustrating a document processing method according to an exemplary embodiment. The method can be applied to a terminal device. In this embodiment, for ease of understanding, an example is given using a terminal device capable of installing third-party applications. Those skilled in the art will understand that the terminal device may include, but is not limited to, mobile terminal devices such as smartphones, smart wearable devices, tablets, etc. The method may include the following steps:

[0034] like Figure 2As shown, in step 201, a trigger operation on a target cloud document is received. The target cloud document is output by the target client and includes a first object and a second object. The first object includes the first content of the first component.

[0035] In step 202, in response to the triggering operation, the first object is rendered using a front-end control in the target client.

[0036] In step 203, a second object is rendered using the target client, the second object including the second content of the second component.

[0037] In this embodiment, a target client is installed on the terminal device. This target client can be used to manage cloud documents, and a browser (such as a webview) is embedded in the target client as a front-end control. Before executing this method, some front-end code needs to be added to the front-end control so that the terminal device can execute the above method.

[0038] (1) Creating web page components by inheriting web page elements

[0039] For example, this part of the front-end code can be written using JavaScript, and a web page component can be created by inheriting from HTMLElement. Here, HTMLElement is a type of web page element. This embodiment is merely an example of creating a web page component by inheriting from HTMLElement. It is understood that web page components can also be created by inheriting from other types of web page elements, and this disclosure is not limited in this respect.

[0040] For example, if 'drive_file_block_v2' is used to indicate the preset string type, then when the string type corresponding to the element in the target cloud document is 'drive_file_block_v2', the operation of creating a web page component will be performed.

[0041] It should be noted that code can also be added to set the operations corresponding to human-computer interaction events, as well as code to customize various functions and attributes of the above-mentioned web page components.

[0042] (2) Define tags for the above web page components

[0043] For example, the tags for the aforementioned web page components can be customized using JavaScript and the `window.customElements.define` function. This code snippet for defining the tags for the web page components can be written after the code snippet used to create the web page components.

[0044] After adding front-end code to the front-end control, when the user triggers the target cloud document output by the target client, the terminal can perform the operations corresponding to steps 201-203.

[0045] First, in step 201, a trigger operation on the target cloud document is received. This trigger operation can be used to open the target cloud document. The target cloud document is output by the target client; for example, it can be displayed by the target client. The target cloud document includes a first object and a second object.

[0046] Specifically, the first object may include the first content of the first component, wherein the first component may be a native component, and the first content of the first component may be content of a preset type. For example, the first component may be a target content block in the target cloud document, and the first content may be a file embedded in the target content block. This file may include, but is not limited to, text files, video files, image files, etc., and this embodiment does not limit the specific type of the file. It can be understood that the first content may also be the content of other types of components in the target cloud document, and this embodiment does not limit this aspect.

[0047] Next, in step 202, in response to the triggering operation, the first object is rendered using the front-end controls in the target client.

[0048] In this embodiment, a front-end control can be used to render the first object. It should be noted that the target cloud document may also include a third object, which may include the content of a webpage component. The front-end control can also be used to render the third object. Specifically, the front-end control can obtain target parsing data based on the target cloud document, and then render the first and third objects based on the target parsing data. The target parsing data may, for example, be a DOM (Document Object Model) tree file. The target parsing data may include a first tag corresponding to the first object, which is a custom target tag for the first object. Additionally, the target parsing data may also include a third tag corresponding to the third object, which may be a tag of the webpage component corresponding to the third object. The front-end control can render the first and third objects based on the tags included in the target parsing data.

[0049] Then, in step 203, the second object is rendered using the target client.

[0050] In this embodiment, the second object may include the second content of the second component. The second component may be a native component of the same type as the first component, or it may be a native component of a different type. For example, if the first component is a content block, the second component may be a content block, or it may be a native component of other types. This embodiment does not limit the specific type of the second component. The second content may be content of a different type than the first content. For example, if the first content is a file within a content block, the second content may include non-file type content within the content block (e.g., text content within the content block). The second content may also include content from native components of other types besides content blocks. The second object can be rendered using the target client.

[0051] Currently, because front-end control rendering performance is worse than client-side rendering, using front-end controls to render all native component content would reduce rendering quality and efficiency. Conversely, using the client-side to render all native component content would result in native components and web components overlapping. This disclosure provides a document processing method that, when rendering a target cloud document output by a target client, uses front-end controls embedded in the target client to render the first content of some native components, and uses the target client to render the second content of other native components. This achieves partial same-layer rendering, reducing the overlap between native and web components, minimizing the reduction in rendering quality and efficiency, and also minimizing the impact on some native component functionalities.

[0052] In some embodiments, the first object corresponds to a target element in the target cloud document, and the target element may be an element corresponding to a preset string type. For example, taking the pseudocode above as an example, the target element may be an element corresponding to the string type 'drive_file_block_v2'.

[0053] Specifically, in step 202, during the rendering of the first object using the front-end control embedded in the target client, the front-end control can first parse the target cloud document to obtain the string type corresponding to each element in the target cloud document. If a preset string type corresponding to the target element is obtained, a target web page component can be created for the first object. For example, if the string type corresponding to element a is 'drive_file_block_v2', it means that element a is the target element, element a corresponds to the first object, and a target web page component can be created for the first object corresponding to element a.

[0054] Referring to the pseudocode above, a target webpage component can be created for the first object by inheriting a specified webpage element from the target cloud document. Since inheriting a specified webpage element is intended to enable the created target webpage component to have the same functionality as the specified webpage element, the specified webpage element can be determined as needed. It is understood that this embodiment does not limit the specific type of the specified webpage element.

[0055] After creating the target webpage component, the next step is to determine the target tag corresponding to the target webpage component. Taking the pseudocode above as an example, the target tag corresponding to the target webpage component could be 'custom-component'. Then, during the generation of target parsing data, the target tag corresponding to the target webpage component is embedded into the target parsing data. For example, the target tag is embedded into the DOM tree corresponding to the target parsing data, thereby obtaining the target parsing data.

[0056] In other embodiments, after obtaining the target parsed data, a preset trigger event and a preset operation procedure can be further bound to the first object. The target parsed data may include a DOM tree, and the preset trigger event for the first object may include DOM events related to the first object. Specifically, the preset trigger event for the first object may be a user-triggered event on the first object, and the preset operation procedure may be an operation that the terminal device needs to perform in response to the preset trigger event. After rendering is complete, if the user triggers the first object, the terminal device, in response to the preset trigger event for the first object, can execute the preset operation procedure bound to the preset trigger event.

[0057] For example, the first object could be a video file in a cloud document, and the preset trigger event for the first object could be the action of dragging the video progress bar. The preset operation program could be a program that adjusts the video progress based on the action of dragging the video progress bar, and the action of dragging the video progress bar can be bound to the program that adjusts the video progress. After rendering is complete, if the user drags the video progress bar, the terminal device responds to the trigger event of dragging the video progress bar and can execute the program that adjusts the video progress.

[0058] Compared to web page components rendered by front-end controls, native components rendered by the client reside at a higher level. Therefore, the content of web page components rendered by front-end controls may be obscured by the content of native components rendered by the client, preventing them from properly responding to certain triggered events. This embodiment binds a preset triggered event to a preset operation procedure for the first object. This ensures that when a preset triggered event occurs for the first object, the preset operation procedure bound to the preset triggered event is executed, avoiding the problem of incorrect response to preset triggered events due to the overlap between native components and web page components.

[0059] It should be noted that although the operations of the methods of this disclosure embodiment are described in a specific order in the above embodiments, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowcharts may be executed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0060] Corresponding to the aforementioned document processing method embodiments, this disclosure also provides embodiments of document processing apparatus.

[0061] like Figure 3 As shown, Figure 3 This is a block diagram of a document processing apparatus according to an exemplary embodiment of the present disclosure. The apparatus may include: a receiving module 301, a first rendering module 302, and a second rendering module 303.

[0062] The receiving module 301 is used to receive the trigger operation on the target cloud document. The target cloud document is output by the target client and includes a first object and a second object. The first object includes the first content of the first component.

[0063] The first rendering module 302 is used to render the first object using front-end controls in the target client in response to the triggering operation.

[0064] The second rendering module 303 is used to render a second object using the target client. The second object includes the second content of the second component.

[0065] In some implementations, the first component includes a target content block in a target cloud document, and the first content includes a file embedded in the target content block.

[0066] In other embodiments, the first rendering module 302 is configured to: obtain target parsing data based on the target cloud document, the target parsing data including a first tag corresponding to the first object, the first tag being a custom target tag for the first object; and render the first object based on the target parsing data.

[0067] In other implementations, the first object corresponds to a target element in the target cloud document. The front-end control can obtain target parsing data based on the target cloud document in the following way: parse the target cloud document to obtain the string type corresponding to each element in the target cloud document. If a preset string type corresponding to the target element is obtained, a target web page component is created for the first object, the target tag corresponding to the target web page component is determined, and target parsing data is generated, in which the target parsing data embeds the target tag.

[0068] In other embodiments, the first rendering module 302 can create a target web page component for the first object by inheriting a specified web page element from the target cloud document.

[0069] In other embodiments, the device may also include a binding module (not shown in the figure).

[0070] The binding module is used to bind the preset trigger events and preset operation procedures for the first object after obtaining the target parsing data.

[0071] In other implementations, the target parsed data includes a DOM tree, and the preset triggering events include DOM events.

[0072] In other embodiments, the device may further include an execution module (not shown in the figure).

[0073] The execution module is used to execute a preset operation program bound to the preset trigger event in response to the preset trigger event for the first object after the first object is rendered.

[0074] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the embodiments of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0075] Figure 4 This is a schematic block diagram of an electronic device provided for some embodiments of this disclosure. For example... Figure 4 As shown, the electronic device 910 includes a processor 911 and a memory 912, and can be used to implement a client or server. The memory 912 stores computer-executable instructions (e.g., one or more computer program modules) non-transitoryly. The processor 911 executes the computer-executable instructions, which, when run by the processor 911, can perform one or more steps of the document processing method described above, thereby implementing the document processing method described above. The memory 912 and the processor 911 can be interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0076] For example, processor 911 can be a central processing unit (CPU), a graphics processing unit (GPU), or other form of processing unit with data processing and / or program execution capabilities. For example, the central processing unit (CPU) can be an x86 or ARM architecture. Processor 911 can be a general-purpose processor or a special-purpose processor, capable of controlling other components in electronic device 910 to perform desired functions.

[0077] For example, memory 912 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and processor 911 may run one or more computer program modules to implement various functions of electronic device 910. Various application programs and various data, as well as various data used and / or generated by the application programs, may also be stored in the computer-readable storage medium.

[0078] It should be noted that, in the embodiments of this disclosure, the specific functions and technical effects of the electronic device 910 can be referred to the description of the document processing method above, and will not be repeated here.

[0079] Figure 5 This is a schematic block diagram of another electronic device provided in some embodiments of this disclosure. The electronic device 920 is, for example, suitable for implementing the document processing method provided in the embodiments of this disclosure. The electronic device 920 can be a terminal device, etc., and can be used to implement a client or server. The electronic device 920 can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. It should be noted that... Figure 5 The illustrated electronic device 920 is merely an example and does not impose any limitation on the functionality and scope of use of the embodiments of this disclosure.

[0080] like Figure 5As shown, the electronic device 920 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923. The RAM 923 also stores various programs and data required for the operation of the electronic device 920. The processing unit 921, ROM 922, and RAM 923 are interconnected via a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.

[0081] Typically, the following devices can be connected to I / O interface 925: input devices 926 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 927 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 928 including, for example, magnetic tapes, hard disks, etc.; and communication devices 929. Communication device 929 allows electronic device 920 to communicate wirelessly or wiredly with other electronic devices to exchange data. Although Figure 5 An electronic device 920 with various devices is shown, but it should be understood that it is not required to implement or have all of the devices shown, and the electronic device 920 may alternatively implement or have more or fewer devices.

[0082] For example, according to embodiments of this disclosure, the document processing method described above can be implemented as a computer software program. For instance, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program including program code for performing the document processing method described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 929, or installed from a storage device 928, or installed from a ROM 922. When the computer program is executed by the processing device 921, the functions defined in the document processing method provided by embodiments of this disclosure can be implemented.

[0083] Figure 6 This is a schematic diagram of a storage medium provided for some embodiments of this disclosure. For example, such as... Figure 6 As shown, the storage medium 930 can be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. When the non-transitory computer-executable instructions 931 are executed by a processor, the document processing method described in the embodiments of this disclosure can be implemented. For example, when the non-transitory computer-executable instructions 931 are executed by a processor, one or more steps in the document processing method described above can be performed.

[0084] For example, the storage medium 930 can be used in the aforementioned electronic device, such as the storage medium 930 may include the memory in the electronic device.

[0085] For example, the storage medium may include a memory card for a smartphone, a storage component for a tablet computer, a hard disk for a personal computer, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), flash memory, or any combination of the above storage media, or other suitable storage media.

[0086] For example, the description of storage medium 930 can be found in the description of memory in the embodiments of the electronic device, and will not be repeated here. The specific functions and technical effects of storage medium 930 can be found in the description of document processing methods above, and will not be repeated here.

[0087] It should be noted that, in the context of this disclosure, a computer-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection 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 fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0088] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0089] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A document processing method, the method comprising: Receive a trigger operation on a target cloud document; the target cloud document is output by a target client, and the target cloud document includes a first object and a second object; the first object includes the first content of a first component; In response to the triggering operation, the target client utilizes a front-end control to obtain target parsing data based on the target cloud document, and renders the first object based on the target parsing data; wherein, the target parsing data includes a first tag corresponding to the first object; the first tag is a custom target tag for the first object; and The second object is rendered using the target client; the second object includes the second content of the second component; Wherein, the first object corresponds to the target element in the target cloud document; the front-end control obtains the target parsing data based on the target cloud document in the following manner: Parse the target cloud document to obtain the string type corresponding to each element in the target cloud document; If a preset string type corresponding to the target element is obtained, a target web page component is created for the first object; Determine the target tag corresponding to the target webpage component; The target parsing data is generated, and the target tag is embedded in the target parsing data.

2. The method according to claim 1, wherein, The first component includes a target content block in the target cloud document; the first content includes a file embedded in the target content block.

3. The method according to claim 1, wherein, The step of creating a target webpage component for the first object includes: creating the target webpage component for the first object by inheriting a specified webpage element from the target cloud document.

4. The method according to claim 1, wherein, After obtaining the target parsing data, the method further includes binding a preset trigger event for the first object with a preset operation procedure.

5. The method according to claim 4, wherein, The target parsed data includes the DOM tree; the preset triggering events include DOM events.

6. The method according to claim 4, wherein, The method further includes: After the first object is rendered, in response to a preset trigger event for the first object, the preset operation procedure bound to the preset trigger event is executed.

7. A document processing apparatus, the apparatus comprising: A receiving module is used to receive a trigger operation on a target cloud document; the target cloud document is output by a target client, and the target cloud document includes a first object and a second object; the first object includes the first content of a first component; The first rendering module is configured to respond to the triggering operation by using a front-end control in the target client to obtain target parsing data based on the target cloud document, and then rendering the first object based on the target parsing data; wherein the target parsing data includes a first tag corresponding to the first object; the first tag is a custom target tag for the first object; The second rendering module is used to render the second object using the target client; the second object includes the second content of the second component. Wherein, the first object corresponds to the target element in the target cloud document; the front-end control obtains the target parsing data based on the target cloud document in the following manner: Parse the target cloud document to obtain the string type corresponding to each element in the target cloud document; If a preset string type corresponding to the target element is obtained, a target web page component is created for the first object; Determine the target tag corresponding to the target webpage component; The target parsing data is generated, and the target tag is embedded in the target parsing data.

8. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-6.

9. An electronic device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Webpage processing method, device and equipment and readable storage medium

    CN111506848A

  • Rich text rendering method and device, terminal equipment and computer storage medium

    CN111724453A