Method, device and equipment for data processing and readable medium
By automating the processing of the content data on the first page and creating image and rich text editor objects, the problem of low efficiency in manual uploading and copying is solved, and the consistency of the image and text order is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
- Filing Date
- 2024-10-30
- Publication Date
- 2026-05-05
AI Technical Summary
In online shopping scenarios, manually uploading and copying images and/or text from promotional materials is inefficient and makes it difficult to ensure consistency in the order of images and text.
By retrieving the content data from the first page, iterates through the data in a predetermined order and creates image objects and rich text editor objects on the second page. The preview is then presented based on the object order, and commands are sent to the server in response.
It improves upload and copy efficiency and ensures that the order of images and text in the new content data is consistent with the original content data.
Smart Images

Figure CN121982139A_ABST
Abstract
Description
Technical Field
[0001] The exemplary embodiments disclosed herein generally relate to the field of computer technology, and more specifically, to methods, apparatus, devices, and computer-readable storage media for data processing. Background Technology
[0002] With the development of internet technology, people are increasingly shopping online. In online shopping, products are promoted through advertising copy, which typically includes images and / or text. When mature and stable advertising copy already exists on certain channels, and the same copy needs to be used to promote the same product on other channels, the images and / or text in the advertising copy are usually uploaded and / or copied manually. Simultaneously, the images and / or text are manually checked for errors and consistency in order, leading to inefficiency and a high risk of errors. Summary of the Invention
[0003] In a first aspect of this disclosure, a method for data processing is provided, comprising: acquiring content data from a first page, the content data indicating images and / or text arranged in a predetermined order on the first page; traversing the content data in the predetermined order, wherein during the traversal, in response to determining that the currently traversed content data is an image, creating an image object corresponding to the image on a second page, the image object indicating the image path and image attributes of the image; in response to determining that the currently traversed content data is text, creating a rich text editor object corresponding to the text on the second page; presenting a preview of the content data on the second page based on the created image object, the created rich text editor object, and the order between the image object and the rich text editor object; and in response to receiving a first instruction, sending the content data presented on the second page to a server.
[0004] In a second aspect of this disclosure, an apparatus for data processing is provided, comprising: an acquisition module configured to acquire content data from a first page, the content data indicating images and / or text arranged in a predetermined order on the first page; a creation module configured to traverse the content data in a predetermined order, wherein during the traversal, in response to determining that the currently traversed content data is an image, an image object corresponding to the image is created on a second page, the image object indicating the image path and image attributes of the image; in response to determining that the currently traversed content data is text, a rich text editor object corresponding to the text is created on the second page; a presentation module configured to present a preview of the content data on the second page based on the created image object, the created rich text editor object, and the order between the image object and the rich text editor object; and a sending module configured to send the content data presented on the second page to a server in response to receiving a confirmation instruction.
[0005] In a third aspect of this disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method of the first aspect of this disclosure when executed by the at least one processing unit.
[0006] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program that can be executed by a processor to perform the method according to a first aspect of this disclosure.
[0007] In a fifth aspect of this disclosure, a computer program product is provided, including computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to a first aspect of this disclosure.
[0008] It should be understood that the description in the Summary of the Invention section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0009] The above and other features, advantages, and aspects of various implementations of this disclosure will become more apparent in the following detailed description, taken in conjunction with the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0010] Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure can be implemented is shown;
[0011] Figure 2A flowchart of a data processing procedure according to some embodiments of the present disclosure is shown;
[0012] Figure 3 A schematic diagram of content data in a first page according to some embodiments of the present disclosure is shown;
[0013] Figure 4 A swimlane diagram illustrating the process of creating group-buying products with one click according to some embodiments of the present disclosure;
[0014] Figure 5 A block diagram of an apparatus for data processing according to some embodiments of the present disclosure is shown; and
[0015] Figure 6 A block diagram of an electronic device in which one or more embodiments of the present disclosure may be implemented is shown. Detailed Implementation
[0016] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0017] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0018] It should be noted that the acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0019] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and user authorization should be obtained.
[0020] For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information, thereby enabling the user to choose whether to provide personal information to the software or hardware such as electronic devices, applications, servers or storage media that perform the operation of the technical solution disclosed herein, based on the prompt message.
[0021] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, for example, via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose whether to "agree" or "disagree" to provide personal information to the electronic device.
[0022] As briefly mentioned earlier, when mature and stable promotional copy already exists on certain channels, and the same copy needs to be used to promote the same product on other channels, the images and / or text in the promotional copy are usually uploaded and / or copied manually in sequence to generate new promotional copy for other channels. It is also necessary to manually check the images and / or text for errors and to ensure their order is consistent.
[0023] When faced with a large amount of promotional material, manually uploading and / or copying the images and / or text one by one will lead to problems such as low efficiency and high cost.
[0024] After uploading and / or copying the images and / or text in the promotional copy one by one to form a new promotional copy, it is necessary to manually check whether the images and / or text in the new promotional copy are correct compared to the original promotional copy. It is also necessary to check whether the order of the images and / or text in the new promotional copy is incorrect compared to the original promotional copy. This process relies heavily on human subjective judgment and cannot effectively guarantee the consistency between the new promotional copy and the original promotional copy.
[0025] The embodiments of this disclosure provide a scheme for data processing. In various embodiments of this disclosure, content data in a first page can be acquired, the content data indicating images and / or text arranged in a predetermined order on the first page. Further, the content data is traversed in the predetermined order, wherein during the traversal, in response to determining that the currently traversed content data is an image, an image object corresponding to the image is created in a second page, the image object indicating the image path and image attributes; in response to determining that the currently traversed content data is text, a rich text editor object corresponding to the text is created in the second page. Further, based on the created image object, the created rich text editor object, and the order between the image object and the rich text editor object, a preview of the content data is presented in the second page. Finally, in response to receiving a first instruction, the content data presented in the second page is sent to a server. In this way, manual uploading and / or copying of images and / or text in the first page can be avoided, improving efficiency. Simultaneously, generating new content data in the second page by traversing the acquired content data in a predetermined order ensures that the order of images and / or text in the new content data is consistent with the order in the original content data.
[0026] Some exemplary embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0027] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. In environment 100, an electronic device 110 may have a plug-in 130 and a web browser application 140 installed. In embodiments of the present disclosure, the web browser application 140 can access different shopping websites and present product information on the shopping websites in a graphic and textual format. When the web browser application 140 presents product information on the shopping websites in a graphic and textual format, the plug-in 130 can obtain the graphic and textual information (or "content data") presented on the web browser application 140, then generate a new page to present the obtained graphic and textual information, and finally, in response to receiving a confirmation instruction, the electronic device 110 sends the obtained graphic and textual information to the server 120.
[0028] Electronic device 110 can be any type of computing device, including electronic devices or server devices. Electronic devices can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. Server devices can include, for example, computing systems / servers, such as mainframes, edge computing nodes, electronic devices in cloud environments, etc.
[0029] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Server 120 may include, for example, computing systems / servers such as mainframes, edge computing nodes, computing devices in cloud environments, etc.
[0030] The communication connection between electronic device 110 and server 120 can be established via wired or wireless means. The communication connection may include, but is not limited to, Bluetooth, mobile network, Universal Serial Bus (USB), and Wireless Fidelity (WiFi) connections; the embodiments disclosed herein are not limited in this respect.
[0031] It should be understood that Figure 1 The components and arrangements shown in environment 100 are merely examples, and a computing system suitable for implementing the exemplary implementations described in this disclosure may include one or more different components, other components, and / or different arrangements. Implementations of this disclosure are not limited in this respect.
[0032] Figure 2 A flowchart of a data processing procedure 200 according to some embodiments of the present disclosure is shown. For ease of understanding, it can be referred to in conjunction with the above. Figure 1 For example, process 200 can be implemented by electronic device 110.
[0033] In box 210, electronic device 110 acquires content data from a first page. The content data indicates images and / or text arranged in a predetermined order on the first page.
[0034] In this embodiment of the disclosure, the first page may be the current page accessed by a web browser application 140 installed on the electronic device 110. The content data on the current page may be images and / or text describing one or more objects on the current page. For example, see... Figure 3 , Figure 3 A schematic diagram of content data in a first page 300 according to some embodiments of the present disclosure is shown. For example... Figure 3 As shown, images and text (i.e., content data) describing products 1 and 2 are exemplary displayed on the first page 300.
[0035] In some embodiments, the electronic device 110 can obtain content data from a first page via a plug-in 130. Specifically, in response to detecting a second instruction, the plug-in 130 obtains a first identifier of the first page. Further, the plug-in 130 injects a first script into the first page, causing the first script to obtain images and / or text from the first page in a predetermined order based on the first identifier to generate content data. Finally, the plug-in 130 receives the content data sent by the first script.
[0036] Specifically, after plugin 130 is installed on electronic device 110, it can automatically execute a background script and remain hosted in the background of web browser application 140. For example, plugin 130 may have a user interface (UI), on which trigger controls can be configured. Click events of the trigger controls can be listened for using `window.document.getElementById('xxx').addEventListener` in the user interface of plugin 130. When the trigger control is triggered (e.g., clicked), plugin 130 can call `chrome.runtime.sendMessage({type:'create'})` to send a message of type 'create' to the background script of plugin 130. The background script of plugin 130 can use chrome.runtime.onMessage.addListener to listen for all messages. When a message of type "create" is detected, plugin 130 can call chrome.tabs.query({currentWindow:true,active:true}) to obtain the first identifier corresponding to the first page, and then call chrome.scripting.executeScript to inject the first script into the first page. The first script, based on the first identifier, retrieves images and / or text from the first page in a predetermined order, and sends the retrieved images and / or text to plugin 130 to generate content data. In some embodiments, the predetermined order can be from top to bottom on the first page, or it can be another order (e.g., from bottom to top). This disclosure does not impose any limitations.
[0037] In some embodiments, when the first script retrieves images and / or text from the first page in a predetermined order, it can do so based on a minimum node approach. For example, images and / or text from the first page can be stored using containers, with each container storing an image and / or text that can serve as a minimum node. If nested containers exist, the image and / or text stored in the innermost or lowest-level container can be considered a minimum node.
[0038] For example, content data can be represented as follows:
[0039]
[0040]
[0041] It should be understood that the above content data is only an example, and any other representation method can be used according to the specific application and scenario requirements.
[0042] In box 220, the electronic device 110 traverses the content data in a predetermined order. The traversal process of the electronic device 110 may include boxes 221 and 222. In box 221, in response to determining that the currently traversed content data is an image, an image object corresponding to the image is created on the second page. The image object indicates the image path and image attributes of the image. In box 222, in response to determining that the currently traversed content data is text, a rich text editor object corresponding to the text is created on the second page.
[0043] In some embodiments, before traversing the content data in a predetermined order, the electronic device 110 may generate a second identifier for the content data. For example, the electronic device may generate a Universally Unique Identifier (UUID) as the second identifier for the content data. In some embodiments, the electronic device 110 may call chrome.storage.local.set to store the content data in the local data of the web browser application 140 using the UUID as the key field, so as to facilitate subsequent use of the content data.
[0044] Furthermore, the electronic device 110 creates a second page and a link to the second page, adding a second identifier to the link to the second page.
[0045] For example, plugin 130 in electronic device 110 can call chrome.tabs.create({url:'https: / / xxx.xxx.com / xxx / create.html?uuid=xxxx'}) to create a second page, specifying the link of the second page as https: / / xxx.xxx.com / xxx / create.html?uuid=xxxx. Here, uuid is the universally unique identifier generated from the content data.
[0046] In some embodiments, during the creation of the second page, the electronic device 110, in response to determining that a link on the second page satisfies a first predetermined condition, injects a second script into the second page. The second script, in response to the second predetermined condition being met by the link on the second page, retrieves content data based on a second identifier in the link on the second page. Further, the second script iterates through the retrieved content data in a predetermined order.
[0047] In some embodiments, the first predetermined condition indicates a predetermined link format. For example, the predetermined link format in the first predetermined condition may be https: / / *.xxx.com / *, where the content represented by "*" can be changed, while the other content remains fixed. The second predetermined condition indicates that the predetermined link format in the first predetermined condition and the link to the second page must include a second identifier.
[0048] For example, the second predefined condition could be to determine whether the link on the second page, https: / / xxx.xxx.com / xxx / create.html, satisfies the first predefined condition and whether it carries a universally unique identifier (UUID). If the link on the second page satisfies both the first and second predefined conditions, plugin 130 can call window.addEventListener('message',()=>{}) to listen for global messages on the second page.
[0049] In some embodiments, when the electronic device 110 causes the second script to traverse the acquired content data in a predetermined order, the plug-in 130 in the electronic device 110 can also cause the second script to traverse the acquired content data in a predetermined order. Specifically, the plug-in 130 can receive a request message sent by the second script, which indicates a second identifier. Then, based on the second identifier, the plug-in 130 sends the content data corresponding to the second identifier to the second script, so that the second script traverses the acquired content data in a predetermined order.
[0050] Specifically, after the second page is opened and loaded, plugin 130 can call `new URL(window.location.href).searchParams.get("uuid")` to retrieve the UUID parameter from the link of the second page, and simultaneously call `window.postMessage({type:'query',data:uuid},'*')` to send a message to the second script. After receiving the message from plugin 130, the second script can retrieve the UUID from the message and relay the message, that is, call `chrome.runtime.sendMessage({type:'bg-query',data:uuid})` to send a message to the background script of plugin 130 and wait for a response. After receiving the message from the second script, the background script in plugin 130 can retrieve the UUID from the message, call `chrome.storage.local.get(uuid)` to retrieve the stored content data, and then call `sendResponse` to return the content data to the second script. After receiving the response message from plugin 130, the second script retrieves the content data and calls window.top.postMessage({type:'init',data:groupData},'*') to send a message to the second page.
[0051] After receiving the `init` message sent by the second script using `window.top.postMessage({type:'init',data:groupData},'*')`, the second page can retrieve the content data from the message body and then iterate through the content data in a predetermined order. For example, it can iterate through the images and / or text in the content data sequentially.
[0052] In some embodiments, during the traversal of content data, the second script may, in response to determining that the currently traversed content data is an image, create an image object corresponding to the image on the second page. The image object indicates the image path and image attributes of the image. The second script may also, in response to determining that the currently traversed content data is text, create a rich text editor object corresponding to the text on the second page.
[0053] For example, the second script can determine whether the currently iterated content data is an image or text based on the `type` field of the content data in the `init` message. For instance, if the `type` field of the content data is `image`, then the currently iterated content data is an image. And if the `type` field of the content data is `data`, then the currently iterated content data is text.
[0054] When the currently iterated content data is an image, the second script can create the corresponding image object on the second page. For example, the second script can call `window.document.createElement('img')` to create an image node as an image object on the second page. When creating the image node, the `src` attribute of the image can be set to the `data` attribute in the image data, and the width, height, and other attributes of the image can also be set. The `src` attribute specifies the path and filename of the image file, and the `data` attribute can be used to implement lazy loading of the image. In this way, by defining the `data-src` attribute to point to the actual image resource, and then assigning the image to the `src` attribute when it is about to enter the visible area, page loading speed and performance are optimized.
[0055] When the currently iterated content data is text, the second script can create a rich text editor object corresponding to the text on the second page. For example, the second script can convert the text into JSON format data for the rich text editor. In one example, referring to the aforementioned content data example, the second script can convert the text in the content data into the following JSON format data:
[0056]
[0057] Here, "text" refers to the data in the image data. Other style attributes can be obtained, parsed, and converted from the styleProps in the image data. After concatenation, a rich text editor is created, and the initial data is set to the JSON format data of the rich text editor generated above.
[0058] It should be understood that the JSON format data mentioned above is just an example, and any other representation method can be used according to the specific application and scenario requirements.
[0059] In box 230, electronic device 110 presents a preview of the content data on the second page based on the created image object, the created rich text editor object, and the order between the image object and the rich text editor object.
[0060] For example, plugin 130 can use appendChild to present image objects and rich text editor objects in the order of image objects and rich text editor objects on the second page, so as to achieve a preview of content data on the second page.
[0061] In box 240, electronic device 110, in response to receiving the first instruction, sends the content data to be displayed on the second page to server 120.
[0062] In some embodiments, plugin 130 can cause a second script to call `window.document.createElement('div')` to create a confirmation button on the second page. After the previewed content data is correct, clicking the confirmation button can trigger the sending of the content data presented on the second page to server 120. For example, the second script can call the interface of server 120 via a POST service to write the content data into the request and send the request to the called interface of server 120.
[0063] To further explain the data processing solutions provided in some embodiments of this disclosure, the following description uses the example of one-click creation of group-buying products. It is understood that the embodiments of this disclosure are not limited to this application scenario.
[0064] Figure 4 A swimlane diagram illustrating a process 400 for one-click creation of group-buying items according to some embodiments of the present disclosure is shown. For example, process 200 can be implemented by electronic device 110. Figure 4 In this context, both the other channel group-buying system 150 and the target group-buying system 160 can run on the electronic device 110. The plugin 130 may include a user interface, background running scripts, and statically injected scripts.
[0065] In box 401, the web traffic generator application 140 in electronic device 110 accesses the group-buying product page in other channel group-buying system 150.
[0066] In box 402, plug-in 130 in electronic device 110 runs and presents the user interface. When a trigger control in the user interface is triggered, a create message is sent to the background script of plug-in 130, and the window ID of the current group-buying product page is obtained. The background script injects dynamic scripts into the current group-buying product page.
[0067] In box 403, the dynamic script retrieves the smallest group-buying node on the current group-buying product page. This smallest group-buying node can be the group-buying data stored in the innermost or lowest-level container mentioned above.
[0068] In box 404, the dynamic script parses the smallest group-buying node, obtains the group-buying data, and sends the group-buying data to the background running script.
[0069] In box 405, a script runs in the background to generate a UUID for the group-buying data, caches the data based on the UUID, and then creates a new page. Simultaneously, a link is generated for the new page, and the UUID parameter is appended to the link.
[0070] In box 406, the static script injection listens for pages that meet the link format https: / / *.xxx.com / *, and injects the static script into the newly created page after the format is met.
[0071] In box 407, a static script opens the newly created page.
[0072] In box 408, after the newly created page has finished loading, the static script obtains the UUID parameter and sends a query message to the statically injected script.
[0073] In box 409, the statically injected script listens for query messages, obtains the UUID parameter, and sends a bg-query message to the background script.
[0074] In box 410, a background script listens for bg-query messages, retrieves the group-buying data from the UUID query cache, and returns the group-buying data to the statically injected script.
[0075] In box 411, after the statically injected script obtains the group-buying data, it sends an init message to the static script, which carries the group-buying data.
[0076] In box 412, a static script listens for the init message, retrieves and iterates through the group-buying data.
[0077] In box 413, the static script generates the image object and the rich text editor object in sequence.
[0078] In box 414, after receiving the confirmation information, the static script calls the server 110 interface to send the group purchase data to the server 120 interface to complete the group purchase.
[0079] In summary, in the embodiments of this disclosure, content data from a first page can be obtained, whereby the content data indicates images and / or text arranged in a predetermined order on the first page. Further, the content data is traversed in the predetermined order, wherein during the traversal, in response to determining that the currently traversed content data is an image, an image object corresponding to the image is created on the second page, the image object indicating the image path and image attributes; in response to determining that the currently traversed content data is text, a rich text editor object corresponding to the text is created on the second page. Further, based on the created image object, the created rich text editor object, and the order between the image object and the rich text editor object, a preview of the content data is presented on the second page. Finally, in response to receiving a first instruction, the content data presented on the second page is sent to the server. In this way, manual uploading and / or copying of images and / or text from the first page can be avoided, improving efficiency. Simultaneously, generating new content data on the second page by traversing the obtained content data in a predetermined order ensures that the order of images and / or text in the new content data is consistent with the order in the original content data.
[0080] Figure 5 A block diagram of an apparatus 500 for data processing according to some embodiments of the present disclosure is shown. The apparatus 500 may be implemented as or include a plug-in 130.
[0081] The device 500 includes an acquisition module 510 configured to acquire content data from a first page, the content data indicating images and / or text arranged in a predetermined order on the first page. The device 500 also includes a creation module 520 configured to traverse the content data in a predetermined order, wherein during traversal, in response to determining that the currently traversed content data is an image, an image object corresponding to the image is created on a second page, the image object indicating the image path and image attributes; in response to determining that the currently traversed content data is text, a rich text editor object corresponding to the text is created on the second page. The device 500 also includes a presentation module 530 configured to present a preview of the content data on the second page based on the created image object, the created rich text editor object, and the order between the image object and the rich text editor object. The device 500 also includes a sending module 540 configured to send the content data presented on the second page to a server in response to receiving a confirmation command.
[0082] In some embodiments, the acquisition module 510 is further configured to, in response to detecting a second instruction, acquire a first identifier of a first page; inject a first script into the first page, causing the first script to acquire images and / or text in the first page in a predetermined order based on the first identifier to generate content data; and receive content data sent by the first script.
[0083] In some embodiments, the creation module 520 is further configured to generate a second identifier for content data; create a second page and a link between the second page; and add the second identifier to the link of the second page.
[0084] In some embodiments, the creation module 520 is further configured to, during the creation of the second page, in response to determining that a link on the second page satisfies a first predetermined condition, inject a second script into the second page, causing the second script to, in response to the link on the second page satisfying the second predetermined condition, obtain content data based on a second identifier in the link on the second page; and to cause the second script to traverse the obtained content data in a predetermined order.
[0085] In some embodiments, a first predetermined condition indicates a predetermined link format, a second predetermined condition indicates a predetermined link format, and the link on the second page includes a second identifier.
[0086] In some embodiments, the creation module 520 is further configured to receive a request message sent by a second script, the request message indicating a second identifier; and based on the second identifier, to send content data corresponding to the second identifier to the second script.
[0087] In some embodiments, the presentation module 530 is further configured to cause the second script to present a preview of the content data in the second page based on the image object, the rich text editor object, and the order between the image object and the rich text editor object.
[0088] The modules included in device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine-executable instructions stored on a storage medium. In addition to or as an alternative to machine-executable instructions, some or all of the units in device 500 can be implemented at least partially by one or more hardware logic components. By way of example, and not limitation, exemplary types of hardware logic components that can be used include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chips (SoCs), complex programmable logic devices (CPLDs), and so on.
[0089] Figure 6 A block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that... Figure 6 The electronic device 600 shown is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein.
[0090] like Figure 6As shown, electronic device 600 is in the form of a general-purpose computing device. Components of electronic device 600 may include, but are not limited to, one or more processors or processing units 610, memory 620, storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. Processing unit 610 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 600.
[0091] Electronic device 600 typically includes multiple computer storage media. Such media can be any available media accessible to electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 620 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 630 can be a removable or non-removable medium and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data (e.g., training data for training) and can be accessed within electronic device 600.
[0092] Electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 6 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 620 may include computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.
[0093] The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 600 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 600 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.
[0094] Input device 650 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 660 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 600 can also communicate with one or more external devices (not shown) via communication unit 640 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 600, or with any device that enables electronic device 600 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).
[0095] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores one or more computer instructions, wherein the one or more computer instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transient computer-readable medium and includes computer-executable instructions that are executed by a processor to implement the methods described above.
[0096] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0097] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0098] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0099] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0100] Various implementations of this disclosure have been described above. The foregoing description is exemplary and not exhaustive, nor is it limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the implementations disclosed herein.
Claims
1. A method for data processing, comprising: Obtain content data from a first page, wherein the content data indicates images and / or text arranged in a predetermined order on the first page; The content data is traversed according to the predetermined order, wherein during the traversal... In response to determining that the currently traversed content data is the image, an image object corresponding to the image is created in the second page, the image object indicating the image path and image attributes of the image; In response to determining that the currently traversed content data is the text, a rich text editor object corresponding to the text is created in the second page; Based on the created image object, the created rich text editor object, and the order between the image object and the rich text editor object, a preview of the content data is presented on the second page; and In response to receiving the first instruction, the content data presented on the second page is sent to the server.
2. The method according to claim 1, wherein obtaining the content data in the first page includes: In response to the detection of a second instruction, the first identifier of the first page is obtained; A first script is injected into the first page, and the first script, based on the first identifier, acquires the images and / or the text in the first page in the predetermined order to generate the content data; as well as Receive the content data sent by the first script.
3. The method of claim 1, wherein before traversing the content data in the predetermined order, the method further comprises: A second identifier is generated for the content data; Create a link between the second page and the second page; as well as Add the second identifier to the link on the second page.
4. The method according to claim 3, wherein traversing the content data in the predetermined order comprises: During the creation of the second page, in response to determining that a link on the second page satisfies a first predetermined condition, a second script is injected into the second page, causing the second script to retrieve the content data based on the second identifier in the link on the second page in response to the link satisfying the second predetermined condition; as well as The second script then iterates through the acquired content data in the predetermined order.
5. The method of claim 4, wherein the first predetermined condition indicates a predetermined link format, and the second predetermined condition indicates that the predetermined link format and the link of the second page contains the second identifier.
6. The method of claim 4, wherein causing the second script to acquire the content data comprises: Receive a request message sent by the second script, the request message indicating the second identifier; as well as Based on the second identifier, the content data corresponding to the second identifier is sent to the second script.
7. The method of claim 4, wherein the preview of the content data presented on the second page includes: The second script presents a preview of the content data on the second page based on the image object, the rich text editor object, and the order between the image object and the rich text editor object.
8. An apparatus for data processing, comprising: The acquisition module is configured to acquire content data from a first page, the content data indicating images and / or text arranged in a predetermined order on the first page; A module is created and configured to traverse the content data in the predetermined order, wherein during the traversal... In response to determining that the currently traversed content data is the image, an image object corresponding to the image is created in the second page, the image object indicating the image path and image attributes of the image; In response to determining that the currently traversed content data is the text, a rich text editor object corresponding to the text is created in the second page; The presentation module is configured to present a preview of the content data on the second page based on the created image object, the created rich text editor object, and the order between the image object and the rich text editor object; as well as The sending module is configured to send the content data presented on the second page to the server in response to receiving a confirmation instruction.
9. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 7 when executed by the at least one processing unit.
10. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 7.
11. A computer program product comprising computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 7.