Method and apparatus for combining graphics and text
By parsing and rendering image and text description rules on the client side and combining them with dynamic data information, the performance bottleneck and high cost of image and text synthesis on the server side are solved, achieving efficient and low-cost image and text synthesis and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI 100 METERS NETWORK TECH CO LTD
- Filing Date
- 2023-01-18
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies suffer from performance bottlenecks and high costs when performing image-text compositing on the server side. In particular, large-scale concurrent compositing requires server cluster support, and the underlying Linux system file packages are only applicable to the server side and not to the client side.
On the client side, image and text compositing is performed. The image and text description rules are parsed and rendered through the image and text description protocol. Dynamic data information is obtained by combining data completion service. The image and text description rules and basic pages are stored using the content delivery network. The server pre-generates the basic pages in case the client rendering fails.
Implementing image-text compositing on the client side solves the server-side performance bottleneck and high cost issues, reduces operation and maintenance costs, and ensures user experience and compositing efficiency.
Smart Images

Figure CN115982502B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and in particular to a method and apparatus for image and text synthesis, a computing device, and a computer-readable storage medium. Background Technology
[0002] With the continuous development of technology, image and text synthesis technology has been increasingly widely used, especially in the booming e-commerce industry. In daily operations and advertising, real-time and non-real-time image and text synthesis is used to provide services to users, such as the graphic and text materials needed by relevant enterprises for daily online and offline operations or advertising.
[0003] Existing image and text compositing technologies primarily involve server-side image and text compositing. However, server-side image and text compositing can lead to performance bottlenecks during large-scale concurrent compositing and requires a server cluster, resulting in high costs. Therefore, to address these issues, this application provides a method for image and text compositing. Summary of the Invention
[0004] This application provides a method and apparatus for image and text compositing, which effectively solves the performance bottleneck and high cost problems caused by image and text compositing on the server side, and greatly saves resources.
[0005] In a first aspect, this application provides a method for combining text and images, comprising: based on a webpage display operation triggered by a user on the client, the client determines the webpage corresponding to the webpage display operation; the client obtains the text and image description rules corresponding to the webpage from the server; the text and image description rules are used to describe the layers corresponding to the webpage; the client parses, renders, and displays the webpage based on the text and image description protocol.
[0006] In the above technical solution, during the image-text compositing process, the client retrieves the corresponding webpage from the server based on the user's triggered webpage display operation. Then, it obtains the corresponding image-text description rules based on the webpage, and finally renders the image-text composite image on the client side based on these rules. The rendered result is the composite image-text image required by the user, which is the webpage displayed on the client. This client-side rendering solves the performance bottleneck of existing technologies that only render on the server side and the high cost caused by the need for cluster support. The client parses the image-text description rules based on the image-text description protocol to render the composite image. Implementing image-text compositing based on image-text description rules is simpler and saves on maintenance costs. In other words, the client only needs to obtain the required image-text description rules to perform image-text compositing, thus enabling rapid processing of massive amounts of composite images. The server does not need to process massive amounts of composite images or require server cluster support, significantly reducing costs. Among them, the image description rule is a specific rule that conforms to the image description protocol. It can be understood that each image description rule corresponds to a specific web page. That is, the web page display operation triggered by the user corresponds to an image description rule, and different triggering operations correspond to different image description rules. In the existing technology, when the server performs image-text composite image, it needs to continuously call the underlying file package of the Linus (Linux) system. However, the underlying file package is not applicable on the client. Therefore, all image-text composite images need to be processed on the server, which has a high cost problem. By using the image description protocol to render image description rules, it can be used by both the client and the server. That is to say, the image-text composite image we need can be rendered directly on the client, reducing costs.
[0007] In one possible design, the client parses and renders the graphic description rules based on the graphic description protocol, including: the client parses the graphic description rules based on the graphic description protocol; the client obtains the first dynamic data information of the webpage from the data completion service according to the parsing result; and the client renders the parsing result and the first dynamic data information.
[0008] The client parses the obtained image and text description rules. Because these rules define the relationships between layers, the parsed results may lack real-time data. Therefore, it needs to retrieve the initial dynamic data information of the webpage from the data completion service. The client then renders the webpage based on the image and text description rules and this initial dynamic data information. Retrieving the initial dynamic data information from the data completion service provides the user with a real-time composite image (the webpage) for their triggered actions, ensuring the accuracy of the webpage received by the user.
[0009] In one possible design, the following steps are also included: the client obtains the base page corresponding to the webpage from the server; the base page is pre-rendered by the server according to the image and text description rules; if the client fails to parse and render the image and text description rules, the base page is displayed.
[0010] When a user triggers a webpage display operation, the client, in addition to obtaining the image and text description rules and the first dynamic data information, also retrieves the corresponding base page for the webpage. The base page is a pre-rendered page on the server based on the image and text description rules, used to prevent rendering failures on the client side. When the client fails to render the composite image based on the image and text description protocol and the first dynamic data information, the client will retrieve the base page from the server to display it, ensuring a blank webpage is presented to the user when client-side rendering fails, thus improving the user experience.
[0011] In one possible design, the client obtains the image and text description rules corresponding to the webpage from the server, and / or, the client obtains the base page corresponding to the webpage from the server, including: the client obtains the image and text description rules corresponding to the webpage from the Content Delivery Network (CDN) based on the Uniform Resource Locator (URL) corresponding to the webpage, and / or, the base page corresponding to the webpage; the image and text description rules and / or the base pages stored in the CDN are generated and stored by the server.
[0012] In the above scheme, the CDN stores various image / text description rules and basic pages. Whether the client retrieves image / text description rules or basic pages, it does so through the Uniform Resource Locator (URL) corresponding to the webpage. Each URL corresponds to a different image / text description protocol and basic page for a given webpage. In other words, the CDN stores the relationship between URLs, image / text description rules, and basic pages. Therefore, after obtaining the URL, the corresponding image / text description protocol and basic page can be directly retrieved. Retrieving the image / text description rules and basic pages based on the URL is a relatively simple operation.
[0013] In one possible design, each graphic description rule and / or each base page is generated by the server, including: for any graphic description rule, determining the layers corresponding to the graphic description rule and the relationships between the layers based on the server's visual editor, thereby obtaining the graphic description rule; for any base page, obtaining the second dynamic data information corresponding to the graphic description rule based on the server's image compositing service, and generating the base page according to the graphic description rule and the second dynamic data information.
[0014] The generation of image and text description rules is determined through a visual editor. Specifically, the editor defines the layers and their relationships as metadata for image and text compositing, from which the image and text description rules are derived. The image and text compositing method is based on these rules, which in turn are implemented using an image and text description protocol. These rules, generated based on the protocol, are applicable to both the client and server sides, significantly reducing the server's workload. The acquisition of the base page follows a similar process. The image compositing service retrieves the second dynamic data information corresponding to the image and text description rules. Based on these rules and the second dynamic data information, the base page is obtained. The server only needs to generate one image for the base page, greatly reducing resource waste and saving costs.
[0015] Secondly, this application provides a method for image and text compositing, comprising: the server obtaining the settings operation of the creator through a visual editor; the server generating image and text description rules corresponding to the settings operation based on each layer in the settings operation and the relationship between each layer; the image and text description rules being used by the client to parse and render the corresponding web page; the server obtaining the second dynamic data information corresponding to the image and text description rules based on the image compositing service, and generating a basic page based on the image and text description rules and the second dynamic data information.
[0016] After the settings are configured in the visual editor, the server retrieves the corresponding text and image description rules for rendering the webpage. Secondly, the server obtains second-level dynamic data information. Based on the text and image description rules and the second-level dynamic data information, a base page is generated. Base page generation is implemented on the server side to ensure that the client can retrieve and display the base page to the user if rendering fails, thus guaranteeing a good user experience.
[0017] In one possible design, the server publishes the image and text description rules and the basic page to the CDN and obtains the corresponding URL publication address in the CDN.
[0018] The generated image and text description rules and basic pages will be published on CDN, where the corresponding URL will be obtained. The client can obtain the required image and text description rules and basic pages based on the URL. Publishing to CDN can effectively ensure that the client can retrieve them in real time when needed, without occupying the space of the server and the client.
[0019] Thirdly, embodiments of this application provide a graphic composition device, including: a triggering unit, used to determine the webpage corresponding to the webpage display operation based on a webpage display operation triggered by a user on a client;
[0020] The acquisition unit is used to acquire the image and text description rules corresponding to the webpage from the server; the image and text description rules are used to describe each layer corresponding to the webpage.
[0021] The rendering unit is used to parse, render, and display the webpage based on the graphic description rules according to the graphic description protocol.
[0022] In one possible design, the rendering unit is specifically used to parse the graphic description rules based on the graphic description protocol;
[0023] The rendering unit is specifically used to obtain the first dynamic data information of the webpage from the data completion service based on the parsing result;
[0024] The rendering unit is specifically used to render the parsing result and the first dynamic data information;
[0025] In one possible design, it also includes: a display unit;
[0026] The acquisition unit is further configured to acquire the base page corresponding to the webpage from the server; the base page is pre-rendered by the server according to the graphic description rules.
[0027] The display unit is also used to display the basic page if the parsing and rendering of the graphic description rules fails.
[0028] In one possible design, the acquisition unit is specifically used to obtain the graphic description rules corresponding to the webpage and / or the base page corresponding to the webpage from the content delivery network CDN based on the Uniform Resource Locator URL corresponding to the webpage; the graphic description rules and / or base pages stored in the CDN are generated and stored by the server.
[0029] In one possible design, the acquisition unit is specifically used to determine, for any given text-image description rule, each layer corresponding to the text-image description rule and the relationship between the layers based on the server-side visual editor, thereby obtaining the text-image description rule; and for any given base page, to obtain the second dynamic data information corresponding to the text-image description rule based on the server-side image compositing service, and to generate the base page according to the text-image description rule and the second dynamic data information.
[0030] Fourthly, this application provides a graphic composition apparatus, including: an acquisition unit for acquiring settings operations performed by the creator through a visual editor;
[0031] The generation unit is used to generate graphic description rules corresponding to the setting operation based on each layer in the setting operation and the relationship between each layer; the graphic description rules are used by the client to parse and render the corresponding web page;
[0032] The generation unit is further configured to obtain the second dynamic data information corresponding to the image and text description rules based on the image synthesis service, and generate the basic page according to the image and text description rules and the second dynamic data information.
[0033] The beneficial effects of the graphic synthesis apparatus provided in the third and fourth aspects described above can be found in the beneficial effects of the various possible designs of the first and second aspects, and will not be repeated here.
[0034] Fifthly, this application also provides a computing device, comprising:
[0035] Memory, used to store program instructions;
[0036] The processor is used to call program instructions stored in memory and execute the above image processing method according to the obtained program.
[0037] Sixthly, this application also provides a computer-readable non-volatile storage medium including computer-readable instructions, which, when read and executed by a computer, cause the computer to perform the above-described image processing method.
[0038] The technical effects that can be achieved by any of the fifth to sixth aspects mentioned above can be referred to the descriptions of the beneficial effects in the first and second aspects mentioned above, and will not be repeated here. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 A system architecture diagram of a text-image synthesis method provided in this application embodiment;
[0041] Figure 2 A schematic flowchart of a text-image synthesis method provided in an embodiment of this application;
[0042] Figure 3 This application provides a schematic diagram of a webpage illustrating a method for combining text and images, as shown in the embodiments of the present application.
[0043] Figure 4This application provides a schematic flowchart of a method for obtaining graphic description rules in accordance with embodiments of the present application.
[0044] Figure 5 This application provides a schematic diagram for determining each layer and the relationship between each layer in its embodiments;
[0045] Figure 6 This application provides a schematic flowchart of a method for parsing and rendering graphic description rules in an embodiment of the present application.
[0046] Figure 7 This application provides a schematic flowchart of a method for combining images and text in an embodiment.
[0047] Figure 8 A schematic diagram of a graphic synthesis device is also provided as an embodiment of this application;
[0048] Figure 9 Another schematic diagram of a graphic synthesis device is also provided for embodiments of this application;
[0049] Figure 10 A computing device is also provided as an embodiment of this application. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0051] The application scenarios described in the embodiments of this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. Those skilled in the art will understand that with the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems. In the description of this invention, unless otherwise stated, "multiple" means two or more.
[0052] Image and text compositing technology, applicable to internet and related enterprises, is receiving increasing attention. Existing image and text compositing technologies are mostly server-side based. Server-side compositing primarily relies on low-level file packages within the Linux system. However, server-side compositing suffers from performance bottlenecks under large-scale concurrent processing and requires server cluster support for accessing the low-level file packages, resulting in high costs. Furthermore, the low-level file packages of the Linux system are only compatible with the server side, not the client side, meaning current compositing technologies cannot be implemented on the client side. Additionally, server-side image and text compositing on a virtual shared cloud platform requires deployment, such as virtual file system technology, which incurs deployment costs.
[0053] To address the aforementioned problems, this application provides a method for combining images and text.
[0054] like Figure 1 As shown, Figure 1 This application provides a system architecture diagram for a text and image synthesis method. The system architecture may include a client (C-end) 101, a back-end management system (B-end) 102, and a server (S-end) 103.
[0055] C-end 101 refers to the program that corresponds to the server and provides local services to the user. It is the interface presented to the user, where the user can perform certain operations to meet their own needs. In this application, the C-end also includes a program that synthesizes the web pages required by the user.
[0056] B-end 102 is a backend management system, mainly a material creation platform. It is a platform that uses a visual editor to determine the rules for graphic and text descriptions by defining the layers and the relationships between them.
[0057] S-side 103 is the backend program, which is a program specifically designed for the C-side, providing the foundation for the implementation of C-side functions.
[0058] The connection between C-end 101 and B-end 102, and between B-end 102 and S-end 103, can be wireless or through other means, which is not limited in this application.
[0059] Specific image and text compositing methods for C-end users, such as Figure 2 , Figure 2 A flowchart illustrating a text-image compositing method provided in this application includes:
[0060] S201. Based on the webpage display operation triggered by the user on the client, the client determines the webpage page corresponding to the webpage display operation.
[0061] In real-world scenarios of image-text compositing, user feedback plays a crucial role. Based on the user's actual needs, real-time image-text compositing is used to display web pages, allowing the user to obtain the information they require. The web page is the interface displayed to the user when they interact with the client; for example, on a shopping platform, the corresponding web page might be a page for a particular garment. Specifically, this involves receiving web page display actions triggered by the user on the client side, and the client determining the appropriate web page based on these actions. Obtaining the corresponding web page based on the user's web page display actions effectively provides users with real-time and accurate information.
[0062] In one example, the client receives a webpage display operation 'a' triggered by the user, and then the client determines the corresponding webpage A based on 'a'.
[0063] S202. The client obtains the image and text description rules corresponding to the webpage from the server; the image and text description rules are used to describe the various layers corresponding to the webpage.
[0064] In real-world applications, there are massive amounts of composite images. Therefore, when a client needs to obtain the required composite image, it must follow specific rules, known as image description rules. The client retrieves the image description rules corresponding to the webpage from the server. These rules are specifically generated according to the image description protocol, and each rule typically describes a single image. This single image is the webpage displayed to the user on the client side, and the rules represent the layer information corresponding to each layer of the webpage. The client then uses these retrieved image description rules to describe the information of each layer on the webpage.
[0065] It should be understood that the information about each layer described in the graphic description protocol can be the sequential relationship between the layers, the positional relationship between the layers, or other relationship information, without being specifically limited here.
[0066] In one example, such as Figure 3 As shown, Figure 3 This is a schematic diagram of a webpage illustrating a text-image compositing method provided in this application. The webpage A obtained by the client from the server is a shopping webpage for "a certain brand of spicy braised snails with Sichuan peppercorns." The corresponding text-image description rules will contain information about each layer in webpage A, such as the price layer being placed in the lower half of the webpage. It should be noted that the layers on the webpage can be image layers, text layers, or functional layers, such as sharpening operation layers; the specific layer type is not limited.
[0067] Specific methods for retrieving image and text descriptions for web pages from the client side are as follows: Figure 4 , Figure 4 This application provides a flowchart illustrating a method for obtaining graphic description rules, including:
[0068] S401. The client obtains the image and text description rules corresponding to the webpage from the Content Delivery Network (CDN) based on the Uniform Resource Locator (URL) corresponding to the webpage.
[0069] A Uniform Resource Locator (URL), also known as a webpage address, is a standard address for resources on the Internet, used to specify the location of information. The principle behind retrieving image and text description rules is based on the URL corresponding to the webpage; that is, there is a one-to-one linear relationship between webpages, URLs, and image and text description rules. Therefore, the client retrieves the corresponding image and text description rules from the Content Delivery Network (CDN) based on the URL of the webpage.
[0070] In one example, the Uniform Resource Locator (URL) corresponding to web page A is A. 1 and graphic description rule A 2 These are all about the correspondence between A and B. The client retrieves the corresponding A for webpage A. 1 According to A 1 Get A from CDN 2 .
[0071] The text and image description rules stored in S402.CDN are generated and stored by the server.
[0072] The S401 section above also mentions a Content Delivery Network (CDN). The purpose of a CDN is to allow users to access the content they need from the nearest node. It can be simply understood as a network node used to store text and image description rules. CDN storage is used because its inherent characteristics avoid bottlenecks in data transmission speed and stability, making content transmission faster and more stable. In this application, the text and image description protocol stored on the CDN is generated on the server side and stored on the CDN, facilitating client retrieval while ensuring transmission speed and resolving performance bottlenecks.
[0073] In one example, image and text description rule 1, image and text description rule 2, and image and text description rule 3 are generated on the server side, and the CDN will store image and text description rule 1, image and text description rule 2, and image and text description rule 3 generated on the server side.
[0074] The text and image description rules are generated by the server. Specifically, for any text and image description rule, the server's visual editor determines the layers corresponding to the text and image description rule and the relationships between the layers, thereby obtaining the text and image description rule.
[0075] When generating graphic description rules, editing operations are performed in a visual editor to determine the layers and their relationships. The graphic description rules are then determined based on these relationships. For example,... Figure 5 , Figure 5 This application provides a schematic diagram for determining the relationship between each layer and each layer. When generating a beer webpage with the corresponding graphic description rules, the background layer is placed at the bottom, followed by the beer image layer, and then the text layer is superimposed on top of it. A beer icon layer and a price layer are superimposed on the text layer.
[0076] S203. The client uses the image and text description protocol to parse, render, and display the image and text description rules and web page.
[0077] After the S202 client obtains the image and text description rules corresponding to the webpage from the server, the client parses and renders the image and text description rules based on the image and text description protocol. The resulting parsing and rendering result is the webpage, which is displayed to the user. Specifically, the image and text description protocol defines how to describe the various layers of a composite image. The relationship between the image and text description protocol and the image and text description rules is as follows: the image and text description protocol is the foundation of a type of webpage, and the image and text description rules are one of the images on that type of webpage.
[0078] In one example, suppose the image and text description protocol is a webpage for shopping for alcoholic beverages, and the image and text description rule corresponds to a specific webpage for shopping for alcoholic beverages, such as the webpage for Wahaha mineral water. Based on the image and text description rule corresponding to the Wahaha mineral water webpage, the Wahaha mineral water webpage can be parsed and rendered at this time and displayed to the user.
[0079] For clients using a graph-text description protocol, the specific operations for parsing and rendering graph-text description rules are as follows: Figure 6 As shown, Figure 6 This application provides a flowchart illustrating a method for parsing and rendering graphic description rules, comprising:
[0080] S601. The client parses the graphic description rules based on the graphic description protocol.
[0081] When performing actual image and text synthesis on the client side, the image and text description rules obtained from the client are parsed according to the image and text description protocol. Only by parsing according to the image and text description protocol can the information of the server and the client be compatible.
[0082] In one example, the graphic description protocol corresponds to A at the bottom layer, B at the middle layer, and C at the top layer. The client parses the graphic description rules according to the graphic description protocol. The graphic description rules correspond to the background layer, image layer, and text layer. When the graphic description rules are parsed according to the graphic description protocol, the background layer corresponds to A; the image layer corresponds to B; and the text layer corresponds to C.
[0083] S602. Based on the parsing results, the client obtains the first dynamic data information of the webpage from the data completion service.
[0084] According to the parsing of the image and text description rules according to the image and text description protocol, after the client obtains the parsing result, it needs to complete the data in real time. This is because the parsed image and text description rules are about the relationship between layers and do not contain specific real-time data. Therefore, in order to ensure the completeness and accuracy of the webpage finally presented to the user, it is necessary to obtain the first dynamic data information of the webpage in real time from the data completion service.
[0085] It should be understood that the data completion service is located in other backends alongside the client and server, or it can be located directly in the server; no specific restrictions are imposed here.
[0086] Continuing with the S601 example, after obtaining the parsing result, the client retrieves the required first dynamic data information from the background layer, image layer, and text layer based on the parsing result. Specifically, the image layer retrieves the corresponding real-time image, such as an image containing three bottles of water or an image containing four bottles of water; the text layer retrieves real-time text information, such as the unit price of three bottles of water being 3 yuan, or the unit price of four bottles of water being 2.99 yuan, and so on.
[0087] S603. The client renders the parsed results and the first dynamic data information.
[0088] After obtaining the parsing result and the first dynamic data information required in the current image and text description rules, the client will render the parsing result and the first dynamic data information. In other words, the client takes the parsing result and the first dynamic data information as input, and after rendering by the client, the output is the required image and text composite image, which is the corresponding web page.
[0089] In one example, the parsing result corresponds to the image and text description rules for the product mineral water. The first dynamic data information obtained at this time is a price of 3 yuan and an inventory of 500 bottles. The client renders this to display an image of mineral water and related price and inventory information on the webpage.
[0090] When implementing image-text composite images on the client side, image-text composite image synthesis may fail due to computer operation errors. When image-text composite image synthesis fails on the client side, a blank page should not be displayed to the user. Therefore, a base page needs to be generated in this situation. The specific operations include: the client obtains the base page corresponding to the web page from the server; the base page is pre-rendered and generated by the server according to the image-text description rules; if the client fails to parse and render the image-text description rules, the base page is displayed.
[0091] In real-world scenarios involving image and text compositing, the client may fail to obtain the initial dynamic data, or the obtained initial dynamic data may not match the corresponding webpage, resulting in client-side rendering failure. In such cases, to ensure a good user experience, a basic page is presented to the user. Specifically, the client retrieves the basic page corresponding to the webpage pre-rendered according to the image and text description rules from the server. This ensures that when the client fails to render according to the image and text description rules, the basic page is displayed to the user, preventing the client's webpage from appearing blank.
[0092] In one example, if the client fails to render the text and image description rules, the client will send a request to the server to retrieve the base page. The server will then send the pre-generated base page to the client, and the client will display the retrieved base page as a webpage to the user.
[0093] It should be understood that the base page can be pre-generated on the server when the image and text description rules are determined in the visual editor; or it can be rendered on the server in real time when the client fails to render the image and text description rules, and the client then obtains the base page from the server. No specific restrictions are imposed here.
[0094] Specifically, for clients retrieving the base pages corresponding to web pages from the server, the client obtains the base pages corresponding to the web pages from the Content Delivery Network (CDN) based on the Uniform Resource Locator (URL) of the web page; the base pages stored in the CDN are generated and stored by the server.
[0095] In addition to retrieving the image and text description rules based on the Uniform Resource Locator (URL) as mentioned in S401 above, retrieving the base page also relies on the URL to obtain the corresponding base page from the Content Delivery Network (CDN). Therefore, from the CDN's perspective, besides storing the image and text description rules, it also stores the base page, and the base page on the CDN is generated and stored from the server.
[0096] In one example, the Uniform Resource Locator (URL) corresponding to web page A is A. 1 and basic page A11 The client obtains the A corresponding to webpage A. 1 According to A 1 Get A from CDN 11 .
[0097] In this process, each basic page is generated on the server side. For any basic page, based on the image compositing service on the server side, the second dynamic data information corresponding to the image and text description rules is obtained, and the basic page is generated according to the image and text description rules and the second dynamic data information.
[0098] When generating the base page, the image compositing service on the server side is used to obtain the image and text description rules and the corresponding second dynamic data information. The base page is then pre-rendered based on the two variables: the image and text description rules and the second dynamic data information.
[0099] Based on the same technical concept, this embodiment of the invention also provides a schematic diagram of a method for image and text synthesis from the perspective of the server, such as... Figure 7 As shown, it includes:
[0100] S701. The server obtains the settings operations of the creator through the visual editor.
[0101] From the server's perspective, it's another entity involved in the interaction. Before the client performs the image-text compositing operation, it needs to generate an image-text description protocol. Therefore, the server retrieves the settings made by the creator in the visual editor. In one example, the creator makes settings in the visual editor, resulting in B, and the server retrieves setting B.
[0102] S702. The server generates graphic description rules corresponding to the setting operation based on the layers in the setting operation and the relationships between the layers; the graphic description rules are used by the client to parse and render the corresponding web page.
[0103] After receiving the settings operation, the server generates corresponding graphic description rules based on the layers and relationships between them. These rules are then used by the client to parse and render the webpage. In one example, the server identifies the layers and their relationships as background, text, image, and function layers based on the settings operation. Based on this layer order, graphic description rule 1 is determined.
[0104] S703. The server obtains the second dynamic data information corresponding to the image and text description rules based on the image and text description rules and the second dynamic data information, and generates the basic page according to the image and text description rules and the second dynamic data information.
[0105] In addition to generating graphic description rules for the setting operation based on the layers and relationships between them, as mentioned in S702 above, the server also obtains the second dynamic data information corresponding to the graphic description rules based on the image compositing service. Based on the graphic description rules and the second dynamic data information, a basic page is generated and sent to CDN storage. This makes it convenient for clients to retrieve the basic page as a webpage in case of rendering failure.
[0106] Continuing with the example of S702 above, the server obtains the image and text description rule 1, obtains the second dynamic data information B corresponding to the image and text description rule 1 based on the image compositing service, and renders and generates the basic page based on the obtained image and text description rule 1 and the second dynamic data information B.
[0107] After the server generates the basic page and image / text description rules, the process also includes: the server publishes the image / text description rules and basic page to the CDN and obtains the corresponding URL publication address in the CDN.
[0108] The Content Delivery Network (CDN) stores various text and image description rules and basic pages. After the server generates the basic pages and text and image description rules, it publishes them to the CDN. The CDN receives and stores them, and then publishes them to the corresponding URLs in the CDN to provide addresses for clients to access.
[0109] In one example, the server generates image and text description rule 1, image and text description rule 2, and image and text description rule 3; basic page 1, basic page 2, and basic page 3; and stores image and text description rule 1, image and text description rule 2, and image and text description rule 3; basic page 1, basic page 2, and basic page 3 on the content delivery network CDN, and retrieves the corresponding URL 1, URL 2, and URL 3.
[0110] The overall process for this application is as follows:
[0111] In the visual editor, i.e., the image creation platform, the creator requests the server to complete information, edits the layers and their relationships, and determines the text and image description rules. Based on these rules, the server obtains the second dynamic data information and generates the corresponding basic page according to the text and image description rules and the second dynamic data information. The server then publishes the text and image description rules and the basic page to the CDN, forming the corresponding publishing URL. The client obtains the URL required for the user-triggered webpage display operation from the CDN. Based on the URL, the client obtains the corresponding text and image description rules and the corresponding first dynamic data information. Finally, based on the text and image description rules and the first dynamic data information, the client parses and renders the webpage required by the user.
[0112] Based on the same technical concept, this invention also provides a schematic diagram of a graphic-text synthesis device, such as... Figure 8 As shown, it includes: a triggering unit 801, used to determine the webpage page corresponding to the webpage display operation based on the webpage display operation triggered by the user on the client;
[0113] The acquisition unit 802 is used to acquire the image and text description rules corresponding to the web page from the server; the image and text description rules are used to describe each layer corresponding to the web page.
[0114] The rendering unit 803 is used to parse, render, and display the web page based on the graphic description rules according to the graphic description protocol.
[0115] In one optional implementation, the rendering unit 803 is specifically used to parse the graphic description rules based on the graphic description protocol;
[0116] The rendering unit 803 is specifically used to obtain the first dynamic data information of the web page from the data completion service based on the parsing result;
[0117] The rendering unit 803 is specifically used to render the parsing result and the first dynamic data information.
[0118] In one optional embodiment, it further includes: a display unit 804;
[0119] The acquisition unit 802 is further configured to allow the client to acquire the base page corresponding to the webpage from the server; the base page is pre-rendered and generated by the server according to the graphic description rules.
[0120] The display unit 804 is also used to display the basic page if the client fails to parse and render the graphic description rules.
[0121] In one optional implementation, the acquisition unit 802 is specifically used to acquire the graphic description rules corresponding to the webpage and / or the base page corresponding to the webpage from the content delivery network CDN based on the Uniform Resource Locator URL corresponding to the webpage; the graphic description rules and / or base pages stored in the CDN are generated and stored by the server.
[0122] In one optional embodiment, the acquisition unit 802 is specifically used to determine, for any graphic description rule, each layer corresponding to the graphic description rule and the relationship between each layer based on the server-side visual editor, thereby obtaining the graphic description rule; and for any base page, to obtain the second dynamic data information corresponding to the graphic description rule based on the server-side image compositing service, and to generate the base page according to the graphic description rule and the second dynamic data information.
[0123] Based on the same technical concept, embodiments of the present invention also provide another schematic diagram of a graphic-text synthesis device, such as... Figure 9 As shown, it includes: an acquisition unit 901, used to acquire the settings operations performed by the creator through the visual editor;
[0124] The generation unit 902 is used to generate graphic description rules corresponding to the setting operation based on each layer in the setting operation and the relationship between each layer; the graphic description rules are used by the client to parse and render the corresponding web page;
[0125] The generation unit 902 is further configured to obtain the second dynamic data information corresponding to the image and text description rules based on the image synthesis service, and generate the basic page according to the image and text description rules and the second dynamic data information.
[0126] In one optional implementation, it further includes: a publishing unit 903;
[0127] The publishing unit 903 is used to publish the image and text description rules and the basic page to the CDN, and obtain the corresponding URL publishing address in the CDN.
[0128] Based on the same technical concept, embodiments of the present invention also provide a computing device, such as... Figure 10 As shown, it includes at least one processor 1001 and a memory 1002 connected to at least one processor. In this embodiment of the invention, the specific connection medium between the processor 1001 and the memory 1002 is not limited. Figure 10 Taking the connection between processor 1001 and memory 1002 via a bus as an example. The bus can be divided into address bus, data bus, control bus, etc.
[0129] In this embodiment of the invention, the memory 1002 stores instructions that can be executed by at least one processor 1001. By executing the instructions stored in the memory 1002, at least one processor 1001 can perform the steps included in the aforementioned image-text synthesis method.
[0130] The processor 1001 is the control center of the computing device, and can connect to various parts of the computing device using various interfaces and lines. It performs data processing by running or executing instructions stored in the memory 1002 and accessing data stored in the memory 1002. Optionally, the processor 1001 may include one or more processing units. The processor 1001 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles issuing instructions. It is understood that the modem processor may not be integrated into the processor 1001. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip; in some embodiments, they may be implemented on separate chips.
[0131] Processor 1001 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the combined text and graphics method can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0132] Memory 1002, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1002 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 1002 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In embodiments of the present invention, memory 1002 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0133] Based on the same technical concept, embodiments of the present invention also provide a computer-readable storage medium storing a computer program executable by a computing device, which, when run on the computing device, causes the computing device to perform the steps described above based on the image-text synthesis method.
[0134] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0135] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. 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 program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0136] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0137] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0138] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for combining text and images, characterized in that, include: Based on the webpage display operation triggered by the user on the client, the client determines the webpage page corresponding to the webpage display operation; The client obtains the graphic description rules corresponding to the webpage from the server; the graphic description rules are used to describe each layer of the webpage. The client parses, renders, and displays the webpage based on the image and text description protocol. The client, based on a graphic description protocol, parses and renders the graphic description rules, including: The client parses the image description rules based on the image description protocol; wherein, the image description protocol is used to define how to describe each layer of the image composite image, the image description protocol is the basis of a type of web page, and the image description rule is one of the images of a type of web page; The client obtains the first dynamic data information of the webpage from the data completion service based on the parsing result; The client renders the parsing result and the first dynamic data information.
2. The method as described in claim 1, characterized in that, Also includes: The client obtains the base page corresponding to the webpage from the server; the base page is pre-rendered and generated by the server according to the graphic description rules. If the client fails to parse and render the graphic description rules, it will display the basic page.
3. The method as described in claim 2, characterized in that, The client obtains the image and text description rules corresponding to the webpage from the server, and / or the client obtains the base page corresponding to the webpage from the server, including: the client obtains the image and text description rules corresponding to the webpage from the Content Delivery Network (CDN) based on the Uniform Resource Locator (URL) corresponding to the webpage, and / or the base page corresponding to the webpage; the image and text description rules and / or base pages stored in the CDN are generated and stored by the server.
4. The method as described in claim 3, characterized in that, Each text and image description rule and / or each base page is generated by the server, including: For any given graphic description rule, the layers corresponding to the graphic description rule and the relationships between the layers are determined based on the server-side visual editor, thereby obtaining the graphic description rule. For any base page, based on the image compositing service of the server, the second dynamic data information corresponding to the image and text description rules is obtained, and the base page is generated according to the image and text description rules and the second dynamic data information.
5. A method for combining text and images, characterized in that, include: The server retrieves the settings and operations performed by the creator through the visual editor; The settings operation is used to generate a graphic description protocol, which defines how to describe the various layers of a composite image. This graphic description protocol forms the basis of a type of webpage. The server generates a graphic description rule corresponding to the setting operation based on the layers and the relationships between them; the graphic description rule is used by the client to parse and render the corresponding web page; the graphic description rule is one of the images of a web page of a certain type. The server obtains the second dynamic data information corresponding to the image and text description rules based on the image compositing service, and generates a basic page according to the image and text description rules and the second dynamic data information.
6. The method as described in claim 5, characterized in that, Also includes: The server publishes the image and text description rules and the basic page to the CDN and obtains the corresponding URL publishing address in the CDN.
7. A graphic-text synthesis device, characterized in that, include: The triggering unit is used to determine the webpage corresponding to the webpage display operation based on the webpage display operation triggered by the user on the client. The acquisition unit is used to acquire the image and text description rules corresponding to the webpage from the server; the image and text description rules are used to describe each layer corresponding to the webpage. The rendering unit is used to parse, render, and display the webpage based on the graphic description protocol and the graphic description rules. The rendering unit is specifically used to parse the image and text description rules based on the image and text description protocol; wherein, the image and text description protocol is used to define how to describe each layer of the image and text composite image, the image and text description protocol is the basis of a type of web page, and the image and text description rule is one of the images of a type of web page; according to the parsing result, the first dynamic data information of the web page is obtained from the data completion service; and the parsing result and the first dynamic data information are rendered.
8. A computing device, characterized in that, It includes at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, It stores a computer program executable by a computing device, which, when run on the computing device, causes the computing device to perform the method as described in any one of claims 1 to 6.