Rendering method, device, system and equipment and storage medium
By processing the instructions and data of the rendering engine on the client side, generating instruction metadata and sending it to the server side, the problem of high server-side rendering cost and low efficiency is solved, and efficient image rendering consistency is achieved.
Patent Information
- Application Number
- CN202410620077.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-08-30
AI Technical Summary
In the existing technology, server-side rendering costs are high and efficiency is low, and the client needs to be frequently pulled up for image rendering to ensure image consistency.
The client determines that the rendering engine processes the instructions and data when rendering the template data, generates instruction metadata, and sends it to the server. The server renders based on the instruction metadata to ensure that the rendering result is consistent with the client, without Pull up the client again.
It improves the rendering efficiency of the server, reduces the rendering cost, and ensures image consistency between the server and the client.
Smart Images

Figure CN118570352A
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a rendering method, apparatus, system, device and storage medium. Background Art
[0002] In order to simplify the operation of professional drawing applications by ordinary users, the design files generated by professional drawing applications can be imported into the template system, and a template editor is provided based on the template system. Ordinary users can modify images based on the template editor loaded on the client, for example, they can modify images, replace images, add images, rotate and move layers, etc. Furthermore, the modified images can be downloaded or delivered.
[0003] In the prior art, in order to ensure image consistency between the server and the client, the server needs to pull up the client and render the image again. That is, it is necessary to pull up the client, load template data based on the client, and render the template data to obtain a rendering result that is consistent with the modified image.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art:
[0005] Server-side rendering is expensive and inefficient. Summary of the invention
[0006] The present invention provides a rendering method, apparatus, system, device and storage medium to improve the rendering efficiency of a server and reduce the rendering cost.
[0007] In a first aspect, an embodiment of the present invention provides a rendering method, which is applied to a client, and the method includes:
[0008] Determine a first rendering instruction and first instruction data called when the first rendering engine renders the template data;
[0009] Processing the first rendering instruction and the first instruction data to obtain instruction metadata;
[0010] After receiving the image acquisition request triggered by the user, the instruction metadata is sent to the server, so that the server determines the target rendering result according to the instruction metadata, wherein the target rendering result is consistent with the initial rendering result obtained by the client rendering the template data.
[0011] In a second aspect, an embodiment of the present invention further provides a rendering method, which is applied to a server, and the method includes:
[0012] Parsing the instruction metadata sent by the client to obtain a second rendering instruction and second instruction data, wherein the instruction metadata is obtained by processing the first rendering instruction and the first instruction data called by the client for the rendering template data;
[0013] The second rendering instruction and the second instruction data are rendered based on a second rendering engine to obtain a target rendering result.
[0014] In a third aspect, an embodiment of the present invention further provides a rendering device, which is configured on a client, and the device includes:
[0015] A determination module, used to determine a first rendering instruction and first instruction data called when the first rendering engine renders the template data;
[0016] A processing module, used for processing the first rendering instruction and the first instruction data to obtain instruction metadata;
[0017] A sending module is used to send the instruction metadata to the server after receiving an image acquisition request triggered by a user, so that the server determines a target rendering result according to the instruction metadata, wherein the target rendering result is consistent with an initial rendering result obtained by the client rendering the template data.
[0018] In a fourth aspect, an embodiment of the present invention further provides a rendering device, which is configured on a server side, and the device includes:
[0019] A parsing module, used for parsing the instruction metadata sent by the client to obtain a second rendering instruction and second instruction data, wherein the instruction metadata is obtained by processing the first rendering instruction and the first instruction data called by the client for the rendering template data;
[0020] A rendering module is used to render the second rendering instruction and the second instruction data based on a second rendering engine to obtain a target rendering result.
[0021] In a fifth aspect, an embodiment of the present invention further provides a rendering system, including a client and a server;
[0022] The client determines, based on the instruction interceptor, a first rendering instruction and first instruction data called when the first rendering engine renders the template data;
[0023] The client processes the first rendering instruction and the first instruction data based on the instruction recorder to obtain instruction metadata;
[0024] After receiving the image acquisition request triggered by the user, the client sends the instruction metadata to the server;
[0025] The server parses the instruction metadata sent by the client based on a parser to obtain a second rendering instruction and second instruction data;
[0026] The server renders the second rendering instruction and the second instruction data based on a second rendering engine to obtain a target rendering result, wherein the target rendering result is consistent with an initial rendering result obtained by the client rendering the template data.
[0027] In a sixth aspect, an embodiment of the present invention further provides a rendering device, including:
[0028] one or more processors;
[0029] a storage device for storing one or more programs,
[0030] When the one or more programs are executed by the one or more processors, the one or more processors implement the rendering method as described in any one of the first aspect or the second aspect.
[0031] In a seventh aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the rendering method as described in any one of the first aspect or the second aspect.
[0032] The embodiments of the above invention have the following advantages or beneficial effects:
[0033] An embodiment of the present invention provides a rendering method, which is applied to a client, including: determining a first rendering instruction and first instruction data called when a first rendering engine renders template data; processing the first rendering instruction and the first instruction data to obtain instruction metadata; after receiving an image acquisition request triggered by a user, sending the instruction metadata to a server, so that the server determines a target rendering result according to the instruction metadata, wherein the target rendering result is consistent with the initial rendering result obtained by the client rendering the template data. In the above technical solution, since the instruction metadata determined according to the first rendering instruction and the first instruction data contains the image attributes in the template data for generating the first rendering instruction and the first instruction data, after the instruction metadata is sent to the server, the target rendering result determined by the server according to the instruction metadata is consistent with the initial rendering result obtained by the client rendering the template data based on the first rendering instruction and the first instruction data, and the consistency of the rendering results of the server and the client is ensured without pulling up the client, thereby improving the rendering efficiency of the server and reducing the rendering cost of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1A flowchart of a rendering method provided by an embodiment of the present invention;
[0035] Figure 2 A flowchart of another rendering method provided by an embodiment of the present invention;
[0036] Figure 3 A flowchart of another rendering method provided by an embodiment of the present invention;
[0037] Figure 4 A flowchart of another rendering method provided by an embodiment of the present invention;
[0038] Figure 5 A schematic diagram of a flow chart of a rendering method provided by an embodiment of the present invention;
[0039] Figure 6 A schematic diagram of the structure of a rendering device provided by an embodiment of the present invention;
[0040] Figure 7 A schematic diagram of the structure of another rendering device provided by an embodiment of the present invention;
[0041] Figure 8 A schematic diagram of the structure of a rendering system provided by an embodiment of the present invention;
[0042] Fig. 9 A schematic diagram of a rendering system executing a rendering method provided by an embodiment of the present invention;
[0043] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0045] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.
[0046] After the client modifies the image, in order to ensure the image consistency between the server and the client, the server needs to render the image again. In the prior art, when the server renders the image, it needs to pull up the client, load the template data corresponding to the modified image based on the client, and render the template data to obtain a rendering result, which is consistent with the modified image.
[0047] When the server renders an image, it needs to pull up the client additionally, which increases resource consumption and response time, resulting in high server rendering costs and low efficiency.
[0048] Therefore, the present application proposes a rendering method to improve the rendering efficiency of the server and reduce the rendering cost.
[0049] The rendering method proposed in this application will be described in detail below with reference to diagrams and embodiments.
[0050] Figure 1 The flowchart of a rendering method provided by an embodiment of the present invention can be applied to a client, and is suitable for situations where the rendering efficiency of the server needs to be improved and the rendering cost needs to be reduced. The method can be executed by a rendering device, and the device can be implemented by software and / or hardware. Optionally, the rendering device can be configured in a user terminal, and the user terminal can be an electronic device such as a laptop, a smart tablet, a mobile phone, etc. Figure 1 The method specifically comprises the following steps:
[0051] Step 110: Determine a first rendering instruction and first instruction data called when the first rendering engine renders the template data.
[0052] The first rendering engine is a rendering engine loaded by the client, and the template data is template data corresponding to the modified image, including image attributes of each image.
[0053] Specifically, the first rendering engine has built-in rendering instructions and instruction data. When the first rendering engine renders the template data, the rendering instructions and instruction data can be called. At this time, the first rendering instructions and first instruction data can be generated according to the rendering instructions, rendering data and template data. Specifically, the image attributes in the template data can be substituted into the rendering instructions and instruction data built into the first rendering engine to obtain the first rendering instructions and first instruction data.
[0054] In actual applications, the first rendering engine may render the template data based on the first rendering instruction and the first instruction data to obtain a rendering result, which is the initial rendering result corresponding to the template data.
[0055] In the embodiment of the present invention, when the client renders the template data based on the first rendering engine, the first rendering instruction and the first instruction data called for rendering the template data are determined.
[0056] Step 120: Process the first rendering instruction and the first instruction data to obtain instruction metadata.
[0057] Among them, the instruction metadata may include an instruction name used to identify the instruction, such as "move", "rotate", "scale", etc.; instruction parameters used to specify the instruction, for example, the instruction parameters of "move" include the distance and direction of movement; used to specify the execution order of the instructions, for example, "move" is executed after "scale".
[0058] Specifically, after the first rendering instruction and the first instruction data are determined, the first rendering instruction and the first instruction data may be structured to obtain instruction metadata.
[0059] The instruction metadata corresponding to the first rendering instruction and the first instruction data includes the image attributes in the template data for generating the first rendering instruction and the first instruction data, and the instruction metadata can be read and analyzed to generate the rendering instruction and instruction data executable by the rendering engine. Therefore, the instruction metadata determined according to the first rendering instruction and the first instruction data can be used to generate other rendering instructions and other instruction data executable by other rendering engines, providing a data basis for generating other rendering instructions and other instruction data.
[0060] In the embodiment of the present invention, instruction metadata corresponding to the first rendering instruction and the first instruction data can be obtained by processing the first rendering instruction and the first instruction data, providing a data basis for generating other rendering instructions and other instruction data.
[0061] Step 130: After receiving the image acquisition request triggered by the user, the instruction metadata is sent to the server, so that the server determines the target rendering result according to the instruction metadata.
[0062] The target rendering result is consistent with an initial rendering result obtained by the client rendering the template data.
[0063] The user can trigger an image acquisition request based on the client clicking a download control or a delivery control. The user triggering the image acquisition request based on the download control indicates that the user needs to obtain the rendering result, and the user triggering the image acquisition request based on the delivery control indicates that the user needs to deliver the rendering result to the target server.
[0064] Specifically, in order to ensure that the rendering results stored by the server are consistent with the rendering results rendered by the client, after receiving an image acquisition request triggered by the user, the instruction metadata corresponding to the first rendering instruction and the first instruction data can be sent to the server, so that the server can determine the second rendering instruction and the second instruction data suitable for the second rendering engine loaded on the server based on the instruction metadata, and render the above-mentioned second rendering instruction and the second instruction data based on the second rendering engine to obtain the target rendering result.
[0065] Since the second rendering instruction and the second instruction data for rendering the target rendering result are determined by the instruction metadata, and the instruction metadata includes the image attributes in the template data, the target rendering result is consistent with the initial rendering result obtained by rendering the template data on the client.
[0066] In an embodiment of the present invention, after receiving an image acquisition request triggered by a user, instruction metadata can be sent to the server, so that the server can determine, based on the instruction metadata, a target rendering result that is consistent with an initial rendering result obtained by the client based on the first rendering instruction and the first instruction data rendering template data, thereby ensuring the consistency of the rendering results of the server and the client without having to start the client.
[0067] The rendering method provided by the embodiment of the present invention is applied to the client, including: determining the first rendering instruction and the first instruction data called by the first rendering engine when rendering the template data; processing the first rendering instruction and the first instruction data to obtain instruction metadata; after receiving the image acquisition request triggered by the user, sending the instruction metadata to the server, so that the server determines the target rendering result according to the instruction metadata, wherein the target rendering result is consistent with the initial rendering result obtained by the client rendering the template data. In the above technical scheme, since the instruction metadata determined according to the first rendering instruction and the first instruction data contains the image attributes in the template data for generating the first rendering instruction and the first instruction data, after sending the instruction metadata to the server, the target rendering result determined by the server according to the instruction metadata is consistent with the initial rendering result obtained by the client rendering the template data based on the first rendering instruction and the first instruction data, and the consistency of the rendering results of the server and the client is ensured without pulling up the client, thereby improving the rendering efficiency of the server and reducing the rendering cost of the server.
[0068] Figure 2 This is a flowchart of another rendering method provided by an embodiment of the present invention. The embodiment of the present invention can be applied to the client and is applicable to situations where the server rendering efficiency needs to be improved and the rendering cost needs to be reduced. The embodiment of the present invention is specific based on the above embodiment, and the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 2, the rendering method provided by the embodiment of the present invention includes:
[0069] Step 210: Render the template data based on the first rendering engine to obtain an initial rendering result.
[0070] Specifically, the client may render the received template data based on the first rendering engine loaded thereon to obtain an initial rendering result.
[0071] In the embodiment of the present invention, the template data is rendered based on the first rendering engine loaded in the client to obtain an initial rendering result.
[0072] Step 220: Determine the first rendering instruction and first instruction data called when the first rendering engine renders the template data.
[0073] Step 230: Process the first rendering instruction and the first instruction data to obtain instruction metadata.
[0074] In one implementation, step 230 may specifically include:
[0075] The first rendering instruction and the first instruction data are structured to obtain the instruction metadata.
[0076] Specifically, the first rendering instruction and the first instruction data are structured and converted into a unified structure to obtain instruction metadata, which may include moving distance, scaling ratio, image attributes, and the like.
[0077] The instruction metadata containing image attributes can be used to generate other rendering instructions and other instruction data executable by other rendering engines, providing a data basis for generating other rendering instructions and other instruction data, so that other rendering engines can generate rendering results consistent with the initial rendering results based on the instruction metadata.
[0078] In the embodiment of the present invention, instruction metadata including image attributes is obtained by structured processing of the first rendering instruction and the first instruction data, thereby providing a data basis for generating other rendering instructions and other instruction data executable by other rendering engines.
[0079] Step 240: After receiving the image acquisition request triggered by the user, the instruction metadata is sent to the server, so that the server determines the target rendering result according to the instruction metadata.
[0080] The target rendering result is consistent with an initial rendering result obtained by rendering the template data by the client.
[0081] Specifically, after receiving an image acquisition request triggered by the user, the client can send the first rendering instruction and the instruction metadata corresponding to the first instruction data to the server, so that the server can determine the second rendering instruction and the second instruction data suitable for the second rendering engine loaded by the server based on the first rendering instruction and the instruction metadata corresponding to the first instruction data. Then, the server can render the second rendering instruction and the second instruction data suitable for the second rendering engine loaded by it based on the second rendering engine loaded by it to obtain the target rendering result.
[0082] Since the second rendering instruction and second instruction data corresponding to the target rendering result are determined by the instruction metadata, and the instruction metadata includes the image attributes in the template data for generating the first rendering instruction and the first instruction data, the target rendering result is consistent with the initial rendering result obtained by the client by rendering the template data based on the first rendering instruction and the first instruction data.
[0083] In an embodiment of the present invention, after receiving an image acquisition request triggered by a user, instruction metadata can be sent to the server, so that the server determines, based on the instruction metadata, a target rendering result that is consistent with an initial rendering result obtained by the client based on the first rendering instruction and the first instruction data rendering template data. The server ensures the consistency of the rendering results of the server and the client without having to pull up the client.
[0084] The rendering method provided by the embodiment of the present invention includes: rendering the template data based on the first rendering engine to obtain the initial rendering result; determining the first rendering instruction and the first instruction data called by the first rendering engine when rendering the template data; processing the first rendering instruction and the first instruction data to obtain instruction metadata; after receiving the image acquisition request triggered by the user, sending the instruction metadata to the server, so that the server determines the target rendering result according to the instruction metadata, wherein the target rendering result is consistent with the initial rendering result obtained by the client rendering the template data. In the above technical scheme, since the instruction metadata obtained by structured processing of the first rendering instruction and the first instruction data contains the image attributes in the template data for generating the first rendering instruction and the first instruction data, after sending the instruction metadata to the server, the target rendering result determined by the server according to the instruction metadata is consistent with the initial rendering result obtained by the client rendering the template data based on the first rendering instruction and the first instruction data, and the consistency of the rendering results of the server and the client is ensured without pulling up the client, thereby improving the rendering efficiency of the server and reducing the rendering cost of the server.
[0085] Figure 3A flowchart of another rendering method provided by an embodiment of the present invention, which can be applied to a server, is suitable for situations where the rendering efficiency of the server needs to be improved and the rendering cost needs to be reduced. The method can be executed by a rendering device, which can be implemented by software and / or hardware. Optionally, the rendering device can be configured in a server. Figure 3 , the method specifically comprises the following steps:
[0086] Step 310: Parse the instruction metadata sent by the client to obtain a second rendering instruction and second instruction data.
[0087] The instruction metadata is obtained by processing the first rendering instruction and the first instruction data called by the client for the rendering template data.
[0088] Specifically, after receiving the instruction metadata sent by the client, the server may parse the instruction metadata to obtain the second rendering instruction and second instruction data that can be executed by the second rendering engine loaded by the server.
[0089] In the embodiment of the present invention, the server may parse the instruction metadata sent by the client to obtain the second rendering instruction and second instruction data adapted to the second rendering engine loaded on the server.
[0090] Step 320: Render the second rendering instruction and the second instruction data based on a second rendering engine to obtain a target rendering result.
[0091] Specifically, the server may render the second rendering instruction and the second instruction data adapted to the second rendering engine based on the second rendering engine loaded thereon to obtain a target rendering result.
[0092] As mentioned above, since the second rendering instruction and the second instruction data are determined by the instruction metadata, and the instruction metadata includes the image attributes in the template data, the target rendering result is consistent with the initial rendering result obtained by rendering the template data by the client.
[0093] In an embodiment of the present invention, the server renders the second rendering instruction and the second instruction data based on the second rendering engine to obtain a target rendering result. Compared with the prior art, the target rendering result consistent with the initial rendering result obtained by rendering the template data on the client is obtained without pulling up the client, thereby improving the rendering efficiency of the server and reducing the rendering cost of the server.
[0094] The rendering method provided by the embodiment of the present invention includes: parsing the instruction metadata sent by the client to obtain the second rendering instruction and the second instruction data, wherein the instruction metadata is obtained by the client processing the first rendering instruction and the first instruction data called by the rendering template data; rendering the second rendering instruction and the second instruction data based on the second rendering engine to obtain the target rendering result. In the above technical scheme, after the server parses the instruction metadata sent by the client to obtain the second rendering instruction and the second instruction data adapted to the second rendering engine loaded by the server, the second rendering instruction and the second instruction data can be rendered based on the second rendering engine to obtain the target rendering result. Compared with the prior art, the target rendering result consistent with the initial rendering result obtained by the client rendering template data is obtained under the premise of avoiding pulling up the client, thereby improving the rendering efficiency of the server and reducing the rendering cost of the server.
[0095] Figure 4 This is a flowchart of another rendering method provided by an embodiment of the present invention. The embodiment of the present invention can be applied to the server, and is applicable to situations where the rendering efficiency of the server needs to be improved and the rendering cost needs to be reduced. The embodiment of the present invention is specific based on the above embodiment, and the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here. Figure 4 , the rendering method provided by the embodiment of the present invention includes:
[0096] Step 410: Determine a parsing method corresponding to the second rendering engine according to the attribute information of the second rendering engine.
[0097] The attribute information of the second rendering engine may include type information, such as real-time rendering, offline rendering, cloud rendering, and hybrid rendering. Different types of rendering engines are adapted to different rendering instructions and instruction data.
[0098] Specifically, the parsing method can be understood as parsing the received instruction metadata to obtain a data parsing method adapted to the current server. Since different types of rendering engines are adapted to different rendering instructions and instruction data, it is necessary to parse the received instruction metadata based on the data parsing method corresponding to the second rendering engine loaded on the server in order to obtain the rendering instructions and instruction data adapted to the second rendering engine.
[0099] Therefore, the parsing method corresponding to the second rendering engine can be determined according to the type information in the attribute information of the second rendering engine, and the received instruction metadata can be parsed based on the parsing method to obtain rendering instructions and instruction data adapted to the second rendering engine loaded on the server.
[0100] Step 420: Parse the instruction metadata based on the parsing method corresponding to the second rendering engine to obtain the second rendering instruction and the second instruction data.
[0101] Specifically, after determining the parsing method corresponding to the second rendering engine, the instruction metadata may be parsed based on the parsing method corresponding to the second rendering engine to obtain the second rendering instruction and second instruction data adapted to the second rendering engine.
[0102] In an embodiment of the present invention, the server can determine a parsing method according to the second rendering engine loaded thereon, and parse the instruction metadata sent by the client based on the parsing method to obtain a second rendering instruction and second instruction data adapted to the second rendering engine loaded by the server.
[0103] Step 430: Render the second rendering instruction and the second instruction data based on a second rendering engine to obtain a target rendering result.
[0104] As mentioned above, the server renders the second rendering instruction and the second instruction data based on the second rendering engine to obtain the target rendering result. Compared with the existing technology, it avoids pulling up the client and obtains the target rendering result consistent with the initial rendering result obtained by the client rendering template data, thereby improving the rendering efficiency of the server and reducing the rendering cost of the server.
[0105] The rendering method provided by the embodiment of the present invention includes: determining the parsing method corresponding to the second rendering engine according to the attribute information of the second rendering engine; parsing the instruction metadata based on the parsing method corresponding to the second rendering engine to obtain the second rendering instruction and the second instruction data; rendering the second rendering instruction and the second instruction data based on the second rendering engine to obtain the target rendering result. In the above technical scheme, the server determines the parsing method according to the second rendering engine loaded by it, and parses the instruction metadata sent by the client based on the parsing method to obtain the second rendering instruction and the second instruction data adapted to the second rendering engine loaded by the server. Then, the second rendering instruction and the second instruction data can be rendered based on the second rendering engine to obtain the target rendering result. Compared with the prior art, the target rendering result consistent with the initial rendering result obtained by rendering the template data on the client is obtained without pulling up the client, thereby improving the rendering efficiency of the server and reducing the rendering cost of the server.
[0106] Figure 5The present invention provides a flowchart of a rendering method according to an embodiment of the present invention. The present invention can be applied to situations where the rendering efficiency of the server needs to be improved and the rendering cost needs to be reduced. Based on the above embodiment, the present invention mainly embodies the interaction process between the client and the server in the rendering method. Figure 5 , the method specifically comprises the following steps:
[0107] Step 510: The client renders the template data based on the first rendering engine to obtain an initial rendering result.
[0108] Step 520: The client determines the first rendering instruction and first instruction data called when the first rendering engine renders the template data.
[0109] Step 530: The client performs structured processing on the first rendering instruction and the first instruction data to obtain instruction metadata.
[0110] Step 540: After receiving the image acquisition request triggered by the user, the client sends the instruction metadata to the server.
[0111] Step 550: The server parses the instruction metadata to obtain a second rendering instruction and second instruction data.
[0112] Step 560: The server renders the second rendering instruction and the second instruction data based on the second rendering engine to obtain a target rendering result.
[0113] The target rendering result is consistent with the initial rendering result.
[0114] The rendering method provided in the embodiment of the present invention has the functional modules and beneficial effects corresponding to executing any of the aforementioned rendering methods.
[0115] Figure 6 The present invention provides a schematic diagram of a rendering device according to an embodiment of the present invention, which can be configured in a client. The rendering device and the rendering methods of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiments of the rendering device can refer to the embodiments of the above rendering methods.
[0116] The specific structure of the rendering device is as follows Figure 6 As shown, including:
[0117] A determination module 610 is used to determine a first rendering instruction and first instruction data called when the first rendering engine renders the template data;
[0118] A processing module 620, configured to process the first rendering instruction and the first instruction data to obtain instruction metadata;
[0119] The sending module 630 is used to send the instruction metadata to the server after receiving the image acquisition request triggered by the user, so that the server determines the target rendering result according to the instruction metadata, wherein the target rendering result is consistent with the initial rendering result obtained by the client rendering the template data.
[0120] Based on the above embodiment, the device further includes:
[0121] An execution module is used to render the template data based on the first rendering engine to obtain the target rendering result.
[0122] Based on the above embodiment, the processing module 620 is specifically used for:
[0123] The first rendering instruction and the first instruction data are structured to obtain the instruction metadata.
[0124] The rendering device provided in the embodiment of the present invention can execute the rendering method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the rendering method.
[0125] It is worth noting that in the embodiment of the above-mentioned rendering device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0126] Figure 7 This is a schematic diagram of the structure of another rendering device provided by an embodiment of the present invention, and the rendering device can be configured in a server. The device and the rendering methods of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiments of the rendering device can refer to the embodiments of the above rendering methods.
[0127] The specific structure of the rendering device is as follows Figure 7 As shown, including:
[0128] A parsing module 710 is used to parse the instruction metadata sent by the client to obtain a second rendering instruction and second instruction data, wherein the instruction metadata is obtained by processing the first rendering instruction and the first instruction data called by the client for the rendering template data;
[0129] The rendering module 720 is used to render the second rendering instruction and the second instruction data based on a second rendering engine to obtain a target rendering result.
[0130] Based on the above embodiment, the parsing module 710 is specifically used for:
[0131] Determining a parsing method corresponding to the second rendering engine according to the attribute information of the second rendering engine;
[0132] The instruction metadata is parsed based on the parsing method corresponding to the second rendering engine to obtain the second rendering instruction and the second instruction data.
[0133] The rendering device provided in the embodiment of the present invention can execute the rendering method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the rendering method.
[0134] It is worth noting that in the embodiment of the above-mentioned rendering device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0135] Figure 8 A schematic diagram of the structure of a rendering system provided in an embodiment of the present invention. The system and the rendering methods in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the rendering system, reference can be made to the embodiments of the above rendering methods.
[0136] The specific structure of the rendering system is as follows Figure 8 As shown, it includes: a client 810 and a server 820, the client includes an instruction interceptor and an instruction recorder, and the client is loaded with a first rendering engine, the server includes a parser, and the server is loaded with a second rendering engine. Fig. 9 A schematic diagram of a rendering system performing a rendering method provided by an embodiment of the present invention, such as Fig. 9 As shown, the rendering system performs any of the aforementioned rendering methods in the following manner based on the client and server included:
[0137] Step 910: The client renders the template data based on the first rendering engine to obtain an initial rendering result.
[0138] Step 920: The client determines, based on the instruction interceptor, the first rendering instruction and first instruction data called when the first rendering engine renders the template data.
[0139] Step 930: The client processes the first rendering instruction and the first instruction data based on the instruction recorder to obtain instruction metadata.
[0140] Step 940: After receiving the image acquisition request triggered by the user, the client sends the instruction metadata to the server.
[0141] Step 950: The server parses the instruction metadata sent by the client based on the parser to obtain a second rendering instruction and second instruction data.
[0142] Step 960: The server renders the second rendering instruction and the second instruction data based on the second rendering engine to obtain a target rendering result.
[0143] The target rendering result is consistent with the initial rendering result.
[0144] The rendering system provided by the embodiment of the present invention can execute the rendering method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the rendering method.
[0145] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Fig.10 A block diagram of an exemplary electronic device 10 suitable for use in implementing embodiments of the present invention is shown. Fig.10 The electronic device 10 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0146] like Fig.10 As shown, electronic device 10 is in the form of a general purpose computing electronic device. Components of electronic device 10 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting various system components (including system memory 28 and processing unit 16).
[0147] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0148] The electronic device 10 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 10, including volatile and non-volatile media, removable and non-removable media.
[0149] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 10 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig.10 not shown, usually called a "hard drive"). Although Fig.10 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0150] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0151] The electronic device 10 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the electronic device 10, and / or any device that enables the electronic device 10 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the electronic device 10 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. Fig.10 As shown, the network adapter 20 communicates with other modules of the electronic device 10 via the bus 18. It should be understood that although Fig.10 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 10, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0152] The processing unit 16 executes various functional applications and page displays by running the programs stored in the system memory 28, for example, implementing the rendering method provided in the embodiment of the present invention.
[0153] Wherein, when the method is applied to a client, the method includes:
[0154] Determine a first rendering instruction and first instruction data called when the first rendering engine renders the template data;
[0155] Processing the first rendering instruction and the first instruction data to obtain instruction metadata;
[0156] After receiving the image acquisition request triggered by the user, the instruction metadata is sent to the server, so that the server determines the target rendering result according to the instruction metadata, wherein the target rendering result is consistent with the initial rendering result obtained by the client rendering the template data.
[0157] When the method is applied to the server, the method includes:
[0158] Parsing the instruction metadata sent by the client to obtain a second rendering instruction and second instruction data, wherein the instruction metadata is obtained by processing the first rendering instruction and the first instruction data called by the client for the rendering template data;
[0159] The second rendering instruction and the second instruction data are rendered based on a second rendering engine to obtain a target rendering result.
[0160] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the rendering method provided by any embodiment of the present invention.
[0161] Embodiment 10 of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, for example, the rendering method provided in the embodiment of the present invention is implemented.
[0162] Wherein, when the method is applied to a client, the method includes:
[0163] Determine a first rendering instruction and first instruction data called when the first rendering engine renders the template data;
[0164] Processing the first rendering instruction and the first instruction data to obtain instruction metadata;
[0165] After receiving the image acquisition request triggered by the user, the instruction metadata is sent to the server, so that the server determines the target rendering result according to the instruction metadata, wherein the target rendering result is consistent with the initial rendering result obtained by the client rendering the template data.
[0166] When the method is applied to the server, the method includes:
[0167] Parsing the instruction metadata sent by the client to obtain a second rendering instruction and second instruction data, wherein the instruction metadata is obtained by processing the first rendering instruction and the first instruction data called by the client for the rendering template data;
[0168] The second rendering instruction and the second instruction data are rendered based on a second rendering engine to obtain a target rendering result.
[0169] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0170] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0171] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0172] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0173] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0174] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A rendering method, characterized in that: Applied to a client, the method comprises: Determine a first rendering instruction and first instruction data called when the first rendering engine renders the template data; Processing the first rendering instruction and the first instruction data to obtain instruction metadata; After receiving the image acquisition request triggered by the user, the instruction metadata is sent to the server, so that the server determines the target rendering result according to the instruction metadata, wherein the target rendering result is consistent with the initial rendering result obtained by the client rendering the template data.
2. The rendering method according to claim 1, characterized in that: Also includes: The template data is rendered based on the first rendering engine to obtain the initial rendering result.
3. The rendering method according to claim 2, characterized in that: It is characterized in that Processing the first rendering instruction and the first instruction data to obtain instruction metadata includes: The first rendering instruction and the first instruction data are structured to obtain the instruction metadata.
4. A rendering method, characterized in that: Applied to the server, the method includes: Parsing the instruction metadata sent by the client to obtain a second rendering instruction and second instruction data, wherein the instruction metadata is obtained by processing the first rendering instruction and the first instruction data called by the client for the rendering template data; The second rendering instruction and the second instruction data are rendered based on a second rendering engine to obtain a target rendering result.
5. The rendering method according to claim 4, characterized in that: Parse the instruction metadata sent by the client to obtain the second rendering instruction and the second instruction data, including: Determining a parsing method corresponding to the second rendering engine according to the attribute information of the second rendering engine; The instruction metadata is parsed based on the parsing method corresponding to the second rendering engine to obtain the second rendering instruction and the second instruction data.
6. A rendering device, characterized in that: Configured on the client, the device includes: A determination module, used to determine a first rendering instruction and first instruction data called when the first rendering engine renders the template data; A processing module, used for processing the first rendering instruction and the first instruction data to obtain instruction metadata; A sending module is used to send the instruction metadata to the server after receiving an image acquisition request triggered by a user, so that the server determines a target rendering result according to the instruction metadata, wherein the target rendering result is consistent with an initial rendering result obtained by the client rendering the template data.
7. A rendering device, characterized in that: Configured at the server end, the device includes: A parsing module, used for parsing the instruction metadata sent by the client to obtain a second rendering instruction and second instruction data, wherein the instruction metadata is obtained by processing the first rendering instruction and the first instruction data called by the client for the rendering template data; A rendering module is used to render the second rendering instruction and the second instruction data based on a second rendering engine to obtain a target rendering result.
8. A rendering system, characterized in that: Including client and server; The client determines, based on the instruction interceptor, a first rendering instruction and first instruction data called when the first rendering engine renders the template data; The client processes the first rendering instruction and the first instruction data based on the instruction recorder to obtain instruction metadata; After receiving the image acquisition request triggered by the user, the client sends the instruction metadata to the server; The server parses the instruction metadata sent by the client based on a parser to obtain a second rendering instruction and second instruction data; The server renders the second rendering instruction and the second instruction data based on a second rendering engine to obtain a target rendering result, wherein the target rendering result is consistent with an initial rendering result obtained by the client rendering the template data.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the rendering method as described in any one of claims 1-3 or 4-5.
10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to perform the rendering method as described in any one of claims 1-3 or 4-5 when executed by a computer processor.
