CN118092922A - Compiling method, device and equipment of image rendering program and readable storage medium - Google Patents

Compiling method, device and equipment of image rendering program and readable storage medium Download PDF

Info

Publication number
CN118092922A
CN118092922A CN202211501879.9A CN202211501879A CN118092922A CN 118092922 A CN118092922 A CN 118092922A CN 202211501879 A CN202211501879 A CN 202211501879A CN 118092922 A CN118092922 A CN 118092922A
Authority
CN
China
Prior art keywords
compiling
program
data
compiled
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211501879.9A
Other languages
Chinese (zh)
Inventor
刘京洋
赵新达
杨衍东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211501879.9A priority Critical patent/CN118092922A/en
Publication of CN118092922A publication Critical patent/CN118092922A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a compiling method, a compiling device, compiling equipment and a readable storage medium of an image rendering program, wherein the method comprises the following steps: when a first compiling request of a business application for a to-be-compiled program is obtained, matching the identification of the first compiling request with the identifications of a plurality of compiling programs; if a to-be-compiled program with the identification matched with the identification of the to-be-compiled program exists in the plurality of compiling programs, compiling data corresponding to the to-be-compiled program is determined to be target compiling data for carrying out image rendering on the business application; if no compiler program with the identification matched with the identification of the to-be-compiled program exists in the plurality of compiler programs, obtaining estimated compiling loss of the to-be-compiled program; and if the estimated compiling loss is greater than or equal to the target compiling loss, sending a second compiling request to the server, and determining compiling data of the program to be compiled returned by the server as target compiling data. By adopting the application, the compiling efficiency of the image rendering program can be improved, and the blocking of the image display picture can be reduced.

Description

Compiling method, device and equipment of image rendering program and readable storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a compiling method, device, equipment and readable storage medium for an image rendering program.
Background
At present, along with the development of technology, people also put forward higher demands on the image visual effect of terminals such as smart phones, computers and the like. Compared with a two-dimensional image, a three-dimensional image is visually distinct in gradation and bright in color, has a strong visual impact, and is thus widely used in various end applications. For example, in order to pursue more realistic visual effects of images, terminal applications such as games and three-dimensional drawing software may use three-dimensional image technology to render images, and typically, the image rendering data may be compiled by a graphics processor of the terminal to implement rendering and display of three-dimensional images.
The inventor of the application finds out in research and actual process that games, three-dimensional drawing software or other terminal applications for displaying three-dimensional images in real time have higher requirements on image rendering efficiency, meanwhile, the visual effect of the images is more abundant and changeable, and the compiling capability of a graphic processor on the image rendering program is limited. In the game running process, a graphic processor of the terminal needs to carry out a large amount of calculation when compiling the image rendering data, and the probability of compiling delay is high, so that the image rendering is blocked, and the applicability is poor.
Disclosure of Invention
The embodiment of the application provides a compiling method, a compiling device, computer equipment and a readable storage medium of an image rendering program, which can improve the compiling efficiency of the image rendering program, enhance the experience of image rendering and have high applicability.
An embodiment of the present application provides a compiling method of an image rendering program, where the method includes:
When a first compiling request of a business application for a to-be-compiled program is obtained, matching an identifier of the to-be-compiled program carried in the first compiling request with identifiers of a plurality of compiling programs included in a target compiling data set, wherein the target compiling data set comprises compiling data of the plurality of compiling programs generated by a server, and the compiling data is received from the server and stored in a designated storage space;
if the plurality of compiling programs have the compiling programs with the identifiers matched with the identifiers of the compiling programs, determining the compiling data of the matched compiling programs as the compiling data of the compiling programs, and taking the compiling data as the target compiling data of the image rendering program of the business application;
if no compiler program with the identification matched with the identification of the to-be-compiled program exists in the plurality of compiler programs, obtaining estimated compiling loss of the to-be-compiled program;
And if the estimated compiling loss is greater than or equal to the target compiling loss, sending a second compiling request to the server, and determining compiling data of the to-be-compiled program, which is generated and returned by the server based on the second compiling request, as target compiling data of the image rendering program of the service application.
Wherein, the method further comprises the following steps:
And if the estimated compiling loss of the program to be compiled is smaller than the target compiling loss, compiling the program to be compiled and determining compiling data obtained by compiling as target compiling data of the image rendering program of the business application.
Before the matching of the identifier of the to-be-compiled program carried in the first compiling request with the identifiers of the plurality of compiling programs included in the target compiling data set, the method further includes:
Sending a compiled data pulling request to a server, wherein the compiled data pulling request is used for requesting compiled data of a plurality of compiled programs to the server;
and receiving the compiling data of the plurality of compilers and the identifiers of the plurality of compilers generated by the server from the server, generating the target compiling data set based on the compiling data and the identifiers of the plurality of compilers, and storing the target compiling data set in the designated storage space.
The obtaining the estimated compiling loss of the to-be-compiled program includes:
And acquiring the compiling data size of the to-be-compiled program based on the first compiling request, and acquiring the estimated compiling loss of the to-be-compiled program based on the compiling data size of the to-be-compiled program.
A second aspect of an embodiment of the present application provides a compiling method of an image rendering program, the method including:
When a compiling data pulling request sent by a terminal is received, compiling data and identifiers of a plurality of compiling programs are generated and sent to the terminal;
When a compiling request for a to-be-compiled program sent by the terminal is received, compiling data of the to-be-compiled program is obtained from a compiling program set or the to-be-compiled program is compiled to obtain the compiling data of the to-be-compiled program, and the compiling data of the to-be-compiled program is sent to the terminal.
The generating the compiling data and the identifiers of the plurality of compiling programs and transmitting the compiling data and the identifiers of the plurality of compiling programs to the terminal includes:
Acquiring a plurality of image rendering programs required by business application, generating identifiers of the plurality of image rendering programs, compiling the plurality of image rendering programs to generate a plurality of compiling data of the plurality of image rendering programs, and sending the plurality of compiling data to the terminal after being used as the compiling data of the plurality of compiling programs and being correlated with the identifiers of the plurality of image rendering programs.
Wherein, the method further comprises the following steps:
the compiling data are used as compiling data of a plurality of compiling programs, and a compiling program set is generated and stored in a compiling storage space after the compiling data are associated with the identifiers of the plurality of image rendering programs;
The method further includes, after compiling the to-be-compiled program to obtain compiled data of the to-be-compiled program and transmitting the compiled data of the to-be-compiled program to the terminal, the steps of:
And establishing association between the compiling data of the to-be-compiled program and the identification of the to-be-compiled program, and adding the association into the compiler set to update the compiler set.
After the compiling program set is generated by associating the compiling data of the plurality of compiling programs with the identifiers of the plurality of image rendering programs, the method includes:
When a compiling update request of any one image rendering program of the plurality of image rendering programs is received, generating an update identifier of the any one image rendering program based on compiling update data carried in the compiling update request;
Updating the corresponding identifier of any image rendering program in the compiler set based on the update identifier to update the compiler set, wherein the update identifier added in the compiler set is used for instructing a server to compile and update any image rendering program based on compiling update data to obtain compiling update data of any image rendering program when receiving a compiling data pulling request or a compiling request, updating and transmitting the compiling data of any image rendering program in the compiler set.
The generating the update identifier of any image rendering program based on the compiling update request carrying compiling update data includes:
Calculating a hash value corresponding to any one of the image rendering programs based on compiling update data carried in the compiling update request, and taking the hash value corresponding to any one of the image rendering programs as an update identifier of any one of the image rendering programs.
An aspect of an embodiment of the present application provides an image rendering program compiling apparatus, including:
The compiling request acquisition module is used for acquiring a first compiling request of a service application for a to-be-compiled program, matching the identification of the to-be-compiled program carried in the first compiling request with the identifications of a plurality of compiling programs included in a target compiling data set, wherein the target compiling data set comprises compiling data of the plurality of compiling programs generated by a server, and the compiling data is received from the server and stored in a designated storage space;
The first compiling data determining module is used for determining compiling data corresponding to the matched compiling program as compiling data of the to-be-compiled program when the compiling program with the identification matched with the to-be-compiled program exists in the plurality of compiling programs, and the compiling data is used as target compiling data of an image rendering program of the business application;
The loss acquisition module is used for acquiring estimated compiling loss of the to-be-compiled program when no compiler program with the identification matched with the identification of the to-be-compiled program exists in the plurality of compiler programs;
And the second compiling data determining module is used for sending a second compiling request to the server when the estimated compiling loss is larger than or equal to the target compiling loss, and determining the compiling data of the program to be compiled, which is generated and returned by the server based on the second compiling request, as the target compiling data of the image rendering program of the business application.
And the second compiling data determining module is further configured to compile the to-be-compiled program and determine compiling data obtained by compiling as target compiling data of the image rendering program of the service application if the estimated compiling loss of the to-be-compiled program is smaller than the target compiling loss.
The compiling request obtaining module includes:
a compiled data pull request unit configured to send a compiled data pull request to a server, where the compiled data pull request is configured to request compiled data of a plurality of compilers to the server;
And a target compilation data set acquisition unit configured to receive compilation data of the plurality of compilers and identification of the plurality of compilers generated by the server from the server, generate the target compilation data set based on the compilation data and identification of the plurality of compilers, and store the target compilation data set in the designated storage space.
Wherein, loss acquisition module is still used for:
and acquiring the compiling data size of the to-be-compiled program based on the first compiling request, and acquiring the estimated compiling loss of the to-be-compiled program based on the compiling data size of the to-be-compiled program. An aspect of an embodiment of the present application provides an image rendering program compiling apparatus, including:
The compiling request acquisition module is used for generating compiling data and identifiers of a plurality of compiling programs and transmitting the compiling data and identifiers of the plurality of compiling programs to the terminal when receiving a compiling data pulling request sent by the terminal;
and the compiling data determining module is used for acquiring the compiling data of the to-be-compiled program from the compiling program set or compiling the to-be-compiled program to obtain the compiling data of the to-be-compiled program when receiving the compiling request for the to-be-compiled program sent by the terminal, and sending the compiling data of the to-be-compiled program to the terminal.
The compiling request obtaining module is further configured to:
Acquiring a plurality of image rendering programs required by business application, generating identifiers of the plurality of image rendering programs, compiling the plurality of image rendering programs to generate a plurality of compiling data of the plurality of image rendering programs, and sending the plurality of compiling data to the terminal after being used as the compiling data of the plurality of compiling programs and being correlated with the identifiers of the plurality of image rendering programs.
Wherein, the image rendering program compiling device further comprises:
The compiler set determining module is used for generating a compiler set by associating the compiling data of the plurality of compiling programs with the identifiers of the plurality of image rendering programs and storing the compiler set into a compiling storage space;
The compiling program set determining module is further configured to compile the to-be-compiled program in the compiling request obtaining module to obtain compiling data of the to-be-compiled program, send the compiling data of the to-be-compiled program to the terminal, and then build a correlation between the compiling data of the to-be-compiled program and the identifier of the to-be-compiled program and add the correlation to the compiling program set to update the compiling program set.
Wherein, the compiling data determining module comprises:
An update identifier obtaining unit, configured to generate, when receiving a compiling update request of any one of the plurality of image rendering programs, an update identifier of the any one image rendering program based on compiling update data carried in the compiling update request;
and a compiling data updating unit, configured to update an identifier corresponding to the any one of the image rendering programs in the compiler set based on the update identifier, where the update identifier added to the compiler set is used to instruct the server to obtain compiling update data of the any one of the image rendering programs after compiling and updating the any one of the image rendering programs based on compiling update data when receiving a compiling data pull request or a compiling request, and update and send the compiling update data of the any one of the image rendering programs in the compiler set.
Wherein, the update identification acquisition unit is further configured to:
Calculating a hash value corresponding to any one of the image rendering programs based on compiling update data carried in the compiling update request, and taking the hash value corresponding to any one of the image rendering programs as an update identifier of any one of the image rendering programs.
In one aspect, an embodiment of the present application provides a computer device, where the device includes: a processor, a memory, and a network interface;
The processor is connected to a memory, and a network interface, wherein the network interface is configured to provide a data communication function, the memory is configured to store program codes, and the processor is configured to call the program codes to perform the method according to the first aspect of the embodiment of the present application.
In one aspect, an embodiment of the present application provides a computer device, where the device includes: a processor, a memory, and a network interface;
The processor is connected to a memory, and a network interface, wherein the network interface is configured to provide a data communication function, the memory is configured to store program code, and the processor is configured to call the program code to perform a method according to the second aspect of the embodiment of the present application.
An aspect of an embodiment of the present application provides a computer readable storage medium storing a computer program, the computer program comprising program instructions which, when executed by a processor, perform a method as provided in the first aspect or the second aspect of the embodiment of the present application.
In the embodiment of the application, the terminal can receive the compiling data and the identifiers of the plurality of compiling programs sent by the server, generate a target compiling data set according to the compiling data and the identifiers of the plurality of compiling programs, and store the target compiling data set in the appointed storage space. When the terminal receives a compiling request of the business application for the to-be-compiled program, the terminal can search whether the compiling program with the identification matched with the identification of the to-be-compiled program carried by the first compiling request exists in the target compiling data set according to the identification of the to-be-compiled program carried by the first compiling request. If the identification of the compiler program in the plurality of compiler programs in the target compiling dataset is matched with the identification of the to-be-compiled program carried by the first compiling request, determining the compiling data of the compiler program matched with the identification of the first compiling request as target compiling data to complete compiling of the to-be-compiled program. After the compiling of the to-be-compiled program is completed, the to-be-compiled program can be formed into a compiling program, the terminal can run target compiling data of the to-be-compiled program to run the compiled program, and further, the image rendering of the business application can be performed based on the program to obtain a target image, so that the image rendering efficiency is high, the data processing amount is small, and the applicability amount is low. Optionally, when the identifier of the compiler program does not exist in the plurality of compilers in the target compiling dataset of the terminal and the identifier of the to-be-compiled program carried by the first compiling request are matched, the terminal may estimate the compiling loss of the to-be-compiled program to obtain an estimated compiling loss, and it is understood that the larger the estimated compiling loss is, the larger the loss representing the compiling of the to-be-compiled loss is. When the estimated compiling loss is greater than or equal to the target compiling loss, the terminal may send a compiling request to the server to request the server to compile the program to be compiled. The server may generate and return compiled data of the to-be-compiled program based on the compiling request. The terminal can determine the compiling data of the to-be-compiled program as target compiling data, and perform image rendering based on the running of the target compiling data, so that the compiling efficiency of the image rendering program can be improved, the compiling calculation amount of the terminal is reduced, the situation of image display blocking is avoided, and the applicability is high.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
fig. 2 is an application scenario schematic diagram of a compiling method of an image rendering program according to an embodiment of the present application;
Fig. 3 is a flow chart of a compiling method of an image rendering program according to an embodiment of the present application;
Fig. 4 is another flow chart of a compiling method of an image rendering program according to an embodiment of the present application;
fig. 5 is a flow chart of a compiling method of an image rendering program according to an embodiment of the present application;
fig. 6 is another flow chart of a compiling method of an image rendering program according to an embodiment of the present application;
fig. 7 is a schematic diagram of another application scenario of a compiling method of an image rendering program according to an embodiment of the present application;
fig. 8 is another flow chart of a compiling method of an image rendering program according to an embodiment of the present application;
fig. 9 is another flow chart of a compiling method of an image rendering program according to an embodiment of the present application;
fig. 10 is another flow chart of a compiling method of an image rendering program according to an embodiment of the present application;
FIG. 11 is another flow chart of a compiling method of an image rendering program according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a compiling apparatus for an image rendering program according to an embodiment of the present application;
FIG. 13 is a schematic diagram of a computer device according to an embodiment of the present application;
fig. 14 is a schematic structural view of another image rendering program compiling apparatus according to an embodiment of the application;
fig. 15 is a schematic structural diagram of another computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to fall within the scope of the present application.
Cloud gaming (Cloud gaming), which may also be referred to as game on demand, is an online gaming technology based on Cloud computing technology. Cloud gaming technology enables lightweight devices (THIN CLIENT) with relatively limited graphics processing and data computing capabilities to run high quality games. In a cloud game scene, the game is not run in a player game terminal, but is run in a cloud server, and the cloud server renders the game scene into a video stream or an audio stream and transmits the video stream or the audio stream to the player game terminal through a network. The player game terminal does not need to have strong graphic operation and data processing capability, and only needs to have basic streaming media playing capability and the capability of acquiring player input instructions and sending the player input instructions to the cloud server.
The application provides a compiling method, a compiling device, compiling equipment and a readable storage medium of an image rendering program, which can improve the compiling efficiency of the image rendering program and reduce the blocking of an image display picture.
Referring to fig. 1, fig. 1 is a schematic diagram of a system architecture according to an embodiment of the application. As shown in fig. 1, the system may include a service server 10a and a terminal cluster, where the terminal cluster may include a terminal 10b, a terminal 10c, a terminal 10d, …, and a terminal 10e, where a communication connection may exist between the terminal clusters, for example, a communication connection exists between the terminal 10b and the terminal 10c, a communication connection exists between the terminal 10b and the terminal 10d, and any terminal in the terminal cluster may exist between the terminal and the service server 10a, for example, a communication connection exists between the terminal 10b and the service server 10a, and a communication connection exists between the terminal 10c and the service server 10 a.
As shown in fig. 1, each terminal in the terminal cluster may be integrally provided with a service application, and when the service application runs in each terminal, data interaction may be performed between the service application and the service server 10a shown in fig. 1. The service application may be understood as an application capable of loading and displaying a target image, which may be image-rendered by the terminal or the service server 10a for the program to be compiled, according to an operation of the operation object. Specifically, the service application may include a plurality of compilers, and each of the compilers may obtain corresponding compiled data after being compiled by the terminal or the service server 10 a. The program to be compiled and the compiling program are both image rendering programs (for convenience of description or simply referred to as programs), and the target image can be obtained by rendering image rendering data by the image rendering programs. When the terminal runs the compiling data of the compiling program, the compiling program (namely, the image rendering program) can be opened to perform image rendering on the image required to be rendered by the business application through the image rendering program so as to obtain the target image. The terminal can respond to the compiling request of the business application for at least one to-be-compiled program, and image rendering is carried out by compiling the to-be-compiled program and running the business application. It will be appreciated that a graphics processor may be included in the terminal for compiling a program to be compiled for image rendering to obtain a target image. The graphics processor is used as a chip, and the computing capacity is limited by hardware conditions, so that when a complex program to be compiled is compiled, the graphics processor of the terminal has excessive computing capacity, thereby causing delay of rendering a target image and image display blocking. For this reason, in the embodiment of the present application, the terminal may send a compiling request to the service server 10a to request the service server 10a to compile the to-be-compiled program, and return the compiling result of the to-be-compiled program to the terminal, so that the terminal may operate the compiling result of the to-be-compiled program to operate the to-be-compiled program, so as to implement image rendering of the terminal and display the target image on the operation object interface. It can be understood that each terminal of the terminal cluster in fig. 1 may respond to a compiling request of a service application, compile a program to be compiled to obtain compiling data of the program to be compiled, and send the compiling request for the program to be compiled to the service server 10a to obtain compiling data compiled and returned by the service server 10a, so as to implement compiling of an image rendering program provided by the embodiment of the present application, and improve compiling speed of the image rendering program.
The compiling method of the image rendering program provided by the embodiment of the application can be suitable for compiling image rendering programs of various types of business applications, wherein the compiling method comprises compiling the image rendering program of any type of multi-type business application or compiling the image rendering program of the multi-type business application, and the compiling method is not limited. Among the various types of business applications (e.g., computer applications) described above include, but are not limited to: game-type applications, drawing-type applications, multimedia-type applications, educational-type applications, and the like, are not limited herein. The same type of service application may include multiple service applications, which are not limited herein. For example, the above-described game-type applications include, but are not limited to, various types of chess games, multiplayer online tactical games, simulated games, virtual reality games, augmented reality games, and the like. The multimedia applications may include video players, music players, photographic applications, beauty applications, audio entry applications, and the like. The drawing class applications described above may include three-dimensional drawing software, three-dimensional design applications, and the like. For convenience of understanding, a service application to which the compiling method of the image rendering program provided by the embodiment of the present application is applicable will be described by taking a game application (game for short) as an example, that is, the compiling method of the image rendering program provided by the embodiment of the present application may be a compiling method of a game image compiling program. Correspondingly, the compiling method of the image rendering program provided by the embodiment of the application can be suitable for application scenes of various services, wherein the compiling method can comprise compiling of the image rendering program of any game, and can also be suitable for compiling of the image rendering program in any service application, and is not limited herein. In the following, an application scenario is taken as an example of compiling a game image rendering program, and a specific process of compiling the image rendering program by a terminal integrated with a game application through communication with the service server 10a is described in conjunction with fig. 2.
Referring to fig. 2, fig. 2 is a schematic view of an application scenario of a compiling method of an image rendering program according to an embodiment of the application. The terminal shown in fig. 2 may be the terminal 10B in the terminal cluster shown in fig. 1, the service application a, the service application B, the service application C and the like shown in fig. 2 may be understood as different types of service applications running on the terminal 10B, and the interface 1 and the interface 2 shown in fig. 2 may be understood as operation object interfaces of the terminal. As shown in fig. 1, when the operation object clicks on the service application a on the terminal interface 1, the terminal may be triggered to start the operation object interface of the service application a, as shown in the interface 2. Specifically, the terminal may detect an operation instruction (for example, a click operation for the service application a) on an operation object interface of the terminal, determine, according to a click position of the operation object operation instruction, that the operation object selects the service application that triggers the start as the service application a, and generate a compiling request of a to-be-compiled program of the service application a. The terminal may run the compiled data of the program to be compiled to start the program, and render the target image (i.e., the interface 2) of the business application a based on the program. The terminal may compile the to-be-compiled program based on the compiling request of the to-be-compiled program to obtain compiling data of the to-be-compiled program, start the program by running the compiling data of the to-be-compiled program, perform image rendering on the service application by the program, and display the obtained image on the interface 2. In addition, the terminal may send a compiling request for the to-be-compiled program to the service server 10a, the service server 10a compiles the to-be-compiled program based on the compiling request of the to-be-compiled program to obtain compiling data of the to-be-compiled program, and the service server 10a returns the compiling data of the to-be-compiled program to the terminal. It can be understood that when the operation object clicks on a different service application on the interface 1, the terminal may generate a corresponding compiling request according to the operation object selection trigger started service application, where the compiling request may be understood as a to-be-compiled program for requesting to compile the different service application, so as to obtain an interface 2 corresponding to the operation object triggered service application. Similarly, the terminal can compile and run the corresponding program to be compiled according to the compiling request to obtain a starting interface of the triggered business application. Meanwhile, as shown in fig. 1, the terminal may send a compiling request to the service server 10a, so that after the service server 10a compiles the program to be compiled, the compiling data of the program to be compiled is returned to the terminal to perform the operation of the image rendering program, so that the terminal may respond to the operation of the operation object to obtain the operation object interface triggered by the operation instruction.
Further, it is assumed that the service application a is a game application, where the game application may be understood as an application capable of loading and displaying a corresponding game scene according to a requirement of an operation object. For example, a multi-player online tactical competition game or a multi-player shooting game can show a plurality of different game scenes when running, and the terminal can load and show corresponding game scenes according to the progress of the game, the operation of an operation object on the game or other modes in the game process. Wherein, the game scene can comprise terrain information, environment information and the like. Specifically, in response to a first operation (for example, a clicking operation) made by an operation object for a game, the game determines a game image rendering program corresponding to the first operation as a program to be compiled, and for different operations that can be performed on the game based on the operation object, a terminal where the game is located may request a corresponding image rendering program from a service server 10a shown in fig. 2, and a corresponding image may be loaded to be provided to the operation object. The interface 2 in fig. 2 is a starting interface of the game application, and the starting interface includes a game map option 1, a game map option 2, a game map option 3, …, and the like, and it can be understood that each game map option corresponds to a different game map type. When the operation object clicks the game map option 1 on the trigger interface 2, the game application generates a corresponding compiling request based on the clicking operation of the operation object, where the compiling request can be understood as a request for compiling the game map program corresponding to the game map option 1, the terminal can compile the game map program corresponding to the game map option 1 according to the compiling request to obtain compiling data of the game map program, and render the operation object interface by running the game map program to obtain a display interface corresponding to the game map, for example, an interface 3 shown in fig. 1, and on the interface 3, topography, characters and the like in the game map can be displayed. The specific process of the terminal obtaining the target compiling data for image rendering of the service application may refer to the following embodiments corresponding to fig. 3 to 11.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a compiling method of an image rendering program according to an embodiment of the application. As shown in fig. 3, the method may be suitable for compiling an image rendering program in a terminal, and the method at least includes the following steps:
Step S110, when a first compiling request of the business application for the to-be-compiled program is obtained, the identification of the to-be-compiled program carried in the first compiling request is matched with the identifications of a plurality of compiling programs included in the target compiling data set.
In some possible implementations, when the business application is running on the terminal, the business application may request rendering from the terminal to obtain the target image to load and display the target image on the operation object interface. Specifically, the service application may generate a first compiling request for the to-be-compiled program, where the first compiling request is used for requesting the terminal to compile the to-be-compiled program, and the first compiling request includes an identifier of the to-be-compiled program. After the terminal obtains a first compiling request of the service application for the to-be-compiled program, the identifiers of the plurality of compiling programs in the target compiling data set can be matched according to the identifier of the to-be-compiled program carried by the first compiling request. The target compiling data set is composed of compiling data and identifiers of a plurality of compiling programs which are generated by the server and sent to the terminal, and the terminal can store the target compiling data set into a designated storage space. According to the embodiment of the application, the terminal stores the compiling data and the identifiers of the plurality of compiling programs generated by the server in the target compiling data set, when the business application requests the compiling of the to-be-compiled programs, the compiling data of the to-be-compiled programs can be quickly searched in the target compiling data set based on the identifiers of the to-be-compiled programs carried in the compiling request (such as the first compiling request), so that the compiling efficiency of the image rendering data (to-be-compiled programs) is improved, and the applicability is high.
In some possible embodiments, the terminal may send a compiled data pull request to the server at the start of the service application to obtain the target compiled data set. Wherein the target compiled data set is a set of compiled data and identifications for storing a plurality of compilers. As can be seen from the above, the compiler refers to a compiler for rendering a target image when a target service application runs on a terminal. When the target business application runs, the terminal can run the compiling data of the compiling program in the target compiling data set so as to run the compiling program, and the terminal is used for realizing the rendering of the image and obtaining the corresponding target image. It can be understood that the target compiling data set of one business application can comprise a plurality of different compiling programs, and the terminal can run different image rendering programs by running the compiling data of the different compiling programs, so as to meet the requirement of the business application on the richness of the images.
In some possible embodiments, the terminal may send a compiled data pull request to the server, where the compiled data pull request may carry a compiler identifier matched with the service application, that is, the terminal may generate, for different service applications, a compiled data pull request with a corresponding compiler identifier, and after receiving the compiled data pull request, the server may send, to the terminal, compiled data and identifiers of a plurality of compilers associated with the service application according to the compiler identifier in the compiled data pull request. The terminal receives the compiling data and the identifications of the plurality of compiling programs, generates a target compiling data set based on the compiling data of the plurality of compiling programs and the identifications of the plurality of compiling programs, and stores the target compiling data set in a designated storage space.
In some possible embodiments, assuming that the service application responds to the operation of the operation object, the request terminal loads and displays a first target image on the operation object interface, the service application determines a to-be-compiled program according to the operation instruction, the to-be-compiled program is used for performing image rendering on an image required by the service application to obtain the first target image, the service application generates a first compiling request of the to-be-compiled program, and the first compiling request carries an identifier of the to-be-compiled program. It can be understood that after determining the program to be compiled, the terminal can directly compile and operate the program to be compiled, however, as known from the above, the terminal has limited compiling capability for the image rendering program, so when the image rendering program requested to be compiled by the service application is complex, the terminal needs to perform a large amount of compiling calculation on the image rendering program to obtain corresponding compiling data, and operate the compiling data, so that the compiling and blocking of the image rendering program are easy to occur, the speed of image rendering of the service application is easy to be reduced, and the image display screen of the operation object interface is easy to be blocked. Therefore, in the embodiment of the application, after the terminal acquires the first compiling request of the data to be compiled, the compiling calculation amount of the terminal can be reduced by searching the compiling program matched with the identification of the compiling program in the target compiling data set.
Step S120, when there is a compiler whose identification matches with the identification of the compiler among the plurality of compilers, determining the compiling data of the matched compiler as the compiling data of the compiler to be used as the target compiling data of the image rendering program of the business application.
In some possible embodiments, the terminal may match the identities of the plurality of compilers in the target compiling dataset according to the identities of the to-be-compiled programs carried in the first compiling request. When the identifier of the compiler program existing in the target compilation data set is matched with the identifier of the to-be-compiled program carried by the first compilation request, the terminal can determine the compilation data of the compiler program matched with the identifier of the first compilation request as the compilation data of the to-be-compiled program, namely, the target compilation data of the image rendering program of the business application. When the terminal runs the compiling data of the to-be-compiled program, the to-be-compiled program is run, so that the terminal performs image rendering based on the to-be-compiled program. According to the embodiment of the application, the terminal can directly obtain the compiling data of the to-be-compiled program by matching the identifier of the to-be-compiled program carried by the first compiling request with the identifiers of a plurality of compiling programs in the target compiling data set, so that the compiling of the to-be-compiled program is avoided, the calculated amount of the service application in operation is reduced, the target image of the service application can be quickly rendered in operation of the service application, and the picture delay of operation of the service application is reduced.
Step S130, when no compiler with the identification matched with the identification of the to-be-compiled program exists in the plurality of compilers, obtaining estimated compiling loss of the to-be-compiled program.
In some possible embodiments, when the terminal does not find a compiler program matching with the to-be-compiled program associated with the first compiling request in the plurality of compilers of the target compiling set, the terminal characterizes that the compiling data of the to-be-compiled program is not stored in the target compiling data set, that is, the terminal cannot directly obtain the target compiling data for running. At this time, the terminal may acquire the estimated compiling loss of the program to be compiled.
In some possible embodiments, the terminal may predict the data size required for compiling the to-be-compiled program according to the content of the to-be-compiled program, and obtain the corresponding estimated compiling loss according to the data size, that is, the estimated compiling loss may be understood as a compiling loss required for representing compiling the to-be-compiled program into the compiled data. In addition, the terminal can also estimate the length of the character string after compiling the to-be-compiled program according to the content of the to-be-compiled program, and obtain corresponding estimated compiling loss according to the length of the character string. It will be appreciated that the string length characterizes the compilation loss required to compile the program to be compiled into compiled data. In addition, in the embodiment of the present application, the terminal may obtain the estimated compiling loss of the to-be-compiled program through other data, which is not illustrated herein.
And step 140, when the estimated compiling loss is greater than or equal to the target compiling loss, a second compiling request is sent to the server, and compiling data of the program to be compiled, which is generated and returned by the server based on the second compiling request, is determined to be the target compiling data of the image rendering program of the business application.
In some possible embodiments, the operation object compares the estimated compiling loss of the to-be-compiled program with the target compiling loss, if the estimated compiling loss is smaller than the target compiling loss, and if the estimated compiling loss is smaller than the target compiling loss, the representation of compiling the to-be-compiled program only needs to be less in compiling loss, the terminal locally compiles the to-be-compiled program to obtain target compiling data of the to-be-compiled program, and returns the target compiling data to the terminal for running and starting the image rendering program.
In some possible embodiments, when the estimated compiling loss is greater than the target compiling loss, it is necessary to characterize the compiling loss that is greater for compiling the to-be-compiled program, and at this time, if the terminal compiles the to-be-compiled program, the compiling speed of the image rendering program is easily reduced, and the image loading of the service application is slow. Therefore, when the estimated compiling loss is larger than the target compiling loss, the terminal generates a second compiling request and sends the second compiling request to the server so as to request the server to return the target compiling data to the terminal based on the second compiling request, the terminal operates the target compiling data, the operation of an image rendering program of the terminal is realized, and a target image loaded by the service application request is obtained.
In summary, when no compiling data whose identifier matches with the identifier of the to-be-compiled program carried by the first compiling request exists in the target compiling dataset of the terminal, the terminal may calculate the estimated compiling loss generated by the to-be-compiled program, compare the estimated compiling loss with the target compiling loss, and characterize that the compiling loss of the to-be-compiled program is smaller when the estimated compiling loss is smaller than the target compiling loss, so that the terminal may directly compile and render the to-be-compiled program to obtain the target image of the service application request.
Further, referring to fig. 4, fig. 4 is another flow chart of a compiling method of an image rendering program according to an embodiment of the application. As shown in fig. 4, the method may be suitable for compiling an image rendering program in a server, and at least includes the following steps:
step S210, when a compiled data pulling request sent by the terminal is received, compiled data and identifiers of a plurality of compiled programs are generated and sent to the terminal.
In some possible embodiments, when the server receives the compiled data pull request sent by the terminal, it can be known from the foregoing that the compiled data pull request includes compiler identifiers associated with a plurality of to-be-compiled programs, and the server may screen a plurality of to-be-compiled programs associated with the compiled data pull request from the set of compiled programs according to the compiler identifiers carried by the compiled data pull request. The compiler set may be understood as a set comprising a plurality of compilers, wherein a plurality of image rendering programs may be uploaded to a server by a plurality of terminals to obtain the compiler set. It is understood that each image rendering program in the compiler set is a source code for performing image rendering, and the compiling data in binary format of the image rendering program can be obtained by compiling the source code of the image rendering program. As can be seen from the foregoing, the compiler identifier carried by the compiled data pull request is matched with the to-be-compiled program, so that the server may match the identifier of each image rendering program in the compiler set with the compiler identifier of the compiled data pull request according to the compiler identifier, and determine a plurality of image rendering programs, whose image rendering program identifiers are matched with the compiler identifier of the compiled data pull request, as a plurality of compilers, thereby determining a plurality of compilers associated with the target service application.
In some possible implementations, the server may obtain multiple compiled data and identifications of multiple image rendering programs required by the business application. Specifically, the server may further associate compilations and identifications of the plurality of image rendering programs to generate a compiler set, and store the compiler set in the compiling storage space. When the server receives a compiled data pull request sent by the terminal, the compiled data pull request may be understood as a request to pull compiled data and identification of a plurality of compilers from the server. The server determines compiling data of a plurality of image rendering programs matched with the compiling program identifiers of the plurality of compiling programs in the plurality of image rendering programs of the compiling program set based on the compiling program identifiers of the plurality of compiling programs carried by the compiling data pulling request as compiling data of the plurality of compiling programs, and sends the compiling data and the identifiers of the plurality of compiling programs to the terminal. The server may associate the identification of the plurality of image rendering programs with the plurality of compilers and add the plurality of image rendering programs to the set of compilers.
Step S220, when a compiling request for the to-be-compiled program sent by the terminal is received, compiling data of the to-be-compiled program is obtained from the compiling program set or compiled by the to-be-compiled program to obtain the compiling data of the to-be-compiled program, and the compiling data of the to-be-compiled program is sent to the terminal.
In some possible embodiments, the set of compilers includes a plurality of compilers and an identifier, and the server may match the plurality of compilers of the set of compilers based on the identifier of the to-be-compiled program carried by the compiling request (i.e., the second compiling request), and determine the compiling data of the compiler whose identifier matches the identifier of the compiling request as the compiling data of the to-be-compiled program.
Alternatively, in some possible embodiments, if the identification of the compiler that does not exist in the set of compilers matches the identification of the compiling request, the server may compile the to-be-compiled program to obtain the compiling data.
Optionally, in some possible embodiments, the server may further add the compiled data compiled by the to-be-compiled program to the set of compiled programs to update the set of compiled programs. Specifically, the server may associate the compiling data of the to-be-compiled program with the identifier of the to-be-compiled program, and add the compiling data of the to-be-compiled program as the compiling data of the compiler program to the compiler program set. It can be understood that the server can expand the number of compiled programs in the compiled program set by storing the compiled data and the identifier of the compiled program in the compiled program set, so as to improve the efficiency of the server in requesting the compiled data of the program to be compiled from the terminal.
Further, the compiler set may be stored in a compiling storage space of the server. The server according to the embodiment of the application can also receive a compiling and updating request of any one of the plurality of image rendering programs, and update the corresponding image rendering program based on the compiling and updating request.
In some possible embodiments, when the server receives a compiling update request for any one of the plurality of image rendering programs, the compiling update request may be understood as a request for updating the corresponding image rendering program, and the compiling update request includes an update identifier for the target image rendering program (the image rendering program for which updating is requested) and compiling update data, which refers to data for updating the target image rendering program. Further, the server may determine, from a plurality of compilers of the compiler set associated with the image rendering program, that one compiler is the target image rendering program based on the update identifier carried in the compile update request, and generate the update identifier of the target image rendering program according to the compile update data carried in the compile update request.
Further, the server may update the identification corresponding to the target image rendering program in the compiler set based on the update identification to update the compiler set. The update identifier added to the compiler set is used for indicating that when the server receives a compilation data pull request or a compilation request, compilation update data of the target image rendering program is obtained after compilation update is performed on the target image rendering program based on the compilation update data, and the compilation update data of the target image rendering program in the compiler set is updated and sent.
Further, referring to fig. 5, fig. 5 is another flow chart of a compiling method of an image rendering program according to an embodiment of the application. As shown in fig. 5, the method relates to data interaction between a terminal and a server, and the method can be applied to compiling an image rendering program in the terminal and the server, and at least comprises:
step S101, the terminal sends a compiled data pulling request to the server.
In some possible embodiments, the terminal may send a compiled data pulling request to the server when the service application is started, so as to request the server to pull the compiled data of a plurality of compilers. In addition, the terminal can also send a compiled data pulling request to the server according to the triggering operation of the operation object on the operation object interface to the business application. It will be appreciated that the manner in which the terminal generates and transmits the compiled data pull request may be determined according to different practical situations, and the application is not limited herein.
In some possible embodiments, the compiled data pull request may carry a compiler identifier matched with the service application, that is, the terminal may generate, for different service applications, a compiled data pull request with a corresponding compiler identifier, and after receiving the compiled data pull request, the server may send, to the terminal, compiled data of a plurality of compilers associated with the service application according to the compiler identifier in the compiled data pull request. For example, assuming that the service application a shown in fig. 2 is a game application, based on game content applied by the game application, the terminal may run compiled data of an image rendering program associated with the game content when the game application is running, start the image rendering program by running the compiled data, and perform image rendering on the game application by the image rendering program so that the game application may load and display a corresponding game interface (i.e., the above-mentioned target image). It will be appreciated that the service application B, the service application C, etc. as shown in fig. 2 may be a different type of service application from the service application a, and based on the operation content of each type of service application, the terminal may operate based on the compiled data of the image rendering program associated with the operation content when the service application is operated. The manner in which the image rendering program is run is different for each type of service application, and thus, the compilation data of the image rendering program compiled by the terminal is also different for different types of service applications. As can be seen from the above, the compiling capability of the terminal for the image rendering program is limited, so in the embodiment of the present application, the terminal may request to pull the compiled data of the plurality of compiled programs (image rendering programs) to be compiled from the server when the service application is started. When the business application runs, the terminal can directly run the image rendering program based on the compiled data of the compiled multiple programs to be compiled, so that the compiling process is reduced, and the compiling speed of the image rendering program is improved. Specifically, the terminal may perform a clicking operation on a target area of the operation object interface in response to the operation object, for example, click an icon of any business application on the operation object interface, where the clicking operation performed on the target area may be referred to as a first operation by the terminal. Meanwhile, the terminal may respond to a first operation triggered by the target area on the operation object interface, call the service application bound in advance for the target area as the service application corresponding to the first operation, and determine the service application corresponding to the first operation as the target service application. The terminal generates a compiled data pulling request associated with the target service application, and compiler identifications carried by the compiled data pulling request are associated with a plurality of to-be-compiled programs of the target service application. That is, the compiled data pull request matches the plurality of target image rendering data compiled by the terminal at the target business application runtime. The terminal generates corresponding compiled data pulling requests for different types of service applications, and sends the compiled data pulling requests to the server, and the server is triggered to execute step S102.
Step S102, the server acquires a plurality of compilers associated with the target business application based on the compiled data pulling request.
In some possible embodiments, when the server receives the compiled data pulling request sent by the terminal, it can be known from the foregoing that the compiled data pulling request includes compiler identifiers associated with a plurality of to-be-compiled programs, and the server screens a plurality of to-be-compiled programs associated with the compiled data pulling request from the compiler set according to the compiler identifiers carried by the compiled data pulling request, so as to determine the plurality of to-be-compiled programs. The compiler set may be understood as a set comprising a plurality of compilers, wherein a plurality of image rendering programs may be uploaded to a server by a plurality of terminals to obtain the compiler set. It will be appreciated that each image rendering program in the compiler set is a source code for performing image rendering, and that by compiling the source code of the image rendering program, compiled data in binary format can be obtained. As can be seen from the foregoing, the compiler identifier carried by the compiled data pull request is matched with the to-be-compiled program, so that the server may match the identifier of each image rendering program in the compiler set with the compiler identifier of the compiled data pull request according to the compiler identifier, and determine a plurality of image rendering programs whose image rendering program identifiers are matched with the compiler identifier of the compiled data pull request as a plurality of to-be-compiled programs, thereby determining a plurality of to-be-compiled programs associated with the target service application, so that step S103 may be further performed subsequently.
Step S103, the server returns compiling data and identifiers of the plurality of compiling programs to the terminal.
In some possible embodiments, after the server obtains the plurality of to-be-compiled programs associated with the compiler identifications of the compiled data pull requests, the plurality of to-be-compiled programs may be compiled and processed to obtain the compiled data and identifications of the plurality of to-be-compiled programs. It is understood that the server may be provided with online compiling functionality. Specifically, when receiving a compiled data pulling request sent by a terminal, the server acquires a plurality of compilers associated with the compiler identifications from the set of compilers according to the compiler identifications of the compiled data request, and determines the plurality of compilers associated with the compiler identifications as the programs to be compiled. At this time, the server may perform an online compiling function to compile a plurality of programs to be compiled, so as to obtain compiled data and identifiers of the plurality of programs to be compiled. The compiling data of each to-be-compiled program can be understood as binary data obtained after the server compiles the to-be-compiled program. And the server sends the compiling data and the identifiers of the plurality of programs to be compiled to the terminal.
Optionally, in some possible embodiments, the server may further have an offline processing function, and the server may receive compilers sent by the plurality of terminals, and store a plurality of compilers into a compiler set in a compiling storage space of the server. Further, the server may compile a plurality of compilers in the set of compilers to obtain compiled data and identification of the plurality of compilers. It can be understood that, when the server receives the compiled data pull request sent by the terminal, the server determines, according to the compiler identifier of the compiled data pull request, a plurality of compilers associated with the compiler identifier from a plurality of compilers in the compiler set as the to-be-compiled program. Furthermore, because the compiling programs of the compiling program set are compiled by the server to obtain corresponding compiling data and identifiers, after the server determines a plurality of to-be-compiled programs, the compiling and identifiers of the plurality of to-be-compiled programs can be directly pulled and sent to the service terminal. Because the server does not need to compile each program to be compiled after determining a plurality of programs to be compiled, the processing time of the server can be saved, and the pulling efficiency of the terminal on compiled data can be improved.
In some possible embodiments, the above identification may be understood as being used to mark each compiler (including the one to be compiled). It is assumed that the business application may compile and render a plurality of first compilers (i.e., the above-mentioned to-be-compiled programs) in the running process, so as to obtain a plurality of operation object interfaces in the running process. At the start of the service application, the terminal may generate a first compiled data pull request for the plurality of first compilers, where it is understood that the first compiled data pull request includes compiler identifications associated with the plurality of first compilers. The terminal sends the first compiling data pulling request to a server, and the server determines that a plurality of compiling programs are a plurality of to-be-compiled programs from the compiling program set according to the compiling program identification carried by the first compiling data pulling request, and acquires the compiling and identification of each to-be-compiled program. For example, the plurality of to-be-compiled programs may be a first to-be-compiled program a, a second to-be-compiled program b, a third to-be-compiled program c, …, etc., where a, b, c are identifiers of the first to-be-compiled program, the second to-be-compiled program, and the third to-be-compiled program, respectively. It will be appreciated that each program to be compiled is associated with a respective identity such that the terminal or terminals can determine the respective program to be compiled by the identity, for example, the terminal determines the first compiler from a plurality of programs to be compiled by querying whether the identity of the program to be compiled is a.
In summary, the server may return, to the terminal, the compiled data and the identification of the plurality of programs to be compiled based on the compiled data pull request of the terminal, where the plurality of programs to be compiled are associated with the compiled data pull request, so that step S104 may be further performed subsequently.
Step S104, the terminal generates a target compiling data set based on compiling data and identifiers of the plurality of compiling programs.
In some possible embodiments, the server may send the compiling data and the identifier of the to-be-compiled program to the terminal, so that the terminal may further generate the target compiling data set according to the compiling data and the identifiers of the plurality of to-be-compiled programs. The terminal may be the terminal 10b in the embodiment corresponding to fig. 1.
In some possible embodiments, the target compiled data set is a set of compiled data and identifiers for storing a plurality of compilers. As is apparent from the above, the compiler refers to a compiler for performing image rendering to obtain a target image when a target service application is running on a terminal. When the target business application runs, the terminal can run the compiling data of the compiling program in the target compiling data set and perform image rendering based on the running of the compiling data so as to obtain a corresponding target image. It can be understood that the target compiling data set of one business application can include a plurality of different compiling programs, and the terminal can realize different types of image rendering by running the compiling data of the different compiling programs, and display different target images on the operation object interface so as to meet the requirement of the business application on the richness of the images. In addition, the target images displayed on the operation object interfaces of different types of service applications are also different, for example, the game interfaces of different game applications are different, and the target compiled data set pulled from the server by the terminal for each type of game application is also different.
In some possible embodiments, assuming that the target compilation data set of the target service application includes a first compiler a, a second to-be-compiled program b, a third to-be-compiled program c, …, and so on (a, b, c are identifiers of the first compiler, the second to-be-compiled program, and the third to-be-compiled program, respectively), when the target service application is started under the triggering operation of the operation object, the target service application may request the terminal to render the first target image, and the terminal searches the compilation program corresponding to the first target image in the target compilation data set according to the request of the target service application, that is, the first compilation program. Specifically, the terminal may match a plurality of compilers in the target compilation data set according to the identifier a of the first compiler, and determine the compiler having the identifier a as the first compiler. In summary, after receiving the compiling data of the plurality of compilers and the identifiers of the plurality of compilers returned by the server, the terminal may generate a target compiling data set based on the plurality of compilers and the identifiers thereof, so that step S105 may be further performed subsequently.
Step S105, the terminal stores the target data set in the designated storage space.
In some possible embodiments, after the terminal generates the target compiled data set, the obtained target compiled data set may be stored in a designated storage space of the terminal. Further, assuming that the target compilation data set includes compilation data and an identifier of a first compiler, when the service application requests the terminal to render the first target image in a subsequent running process, the terminal may match a plurality of compilers in the target compilation data set according to the identifier of the compiler to obtain the first compiler, and implement image rendering based on the compilation data of the first compiler, thereby obtaining the first target image. It can be understood that the terminal pulls the target compiling data set of the service application from the server and stores the target compiling data set in the appointed storage space, so that the compiling calculation amount of the terminal to the compiling program can be reduced, the communication times with the server are reduced, and the compiling efficiency of the image rendering program is improved.
For easy understanding, refer to fig. 6, where fig. 6 is another flow chart of a compiling method of an image rendering program according to an embodiment of the present application. The method can be applied to the terminal, and at least comprises the following steps:
step 201, the terminal obtains a first compiling request of the service application for the to-be-compiled program.
In some possible embodiments, when the business application runs on the terminal, the business application may request rendering of the target image from the terminal to load and display the corresponding application interface on the operation object interface. When the operation object performs a clicking operation on the terminal with respect to the target area of the operation object interface, the clicking operation triggered with respect to the operation object interface may be referred to as a first operation. Meanwhile, the business application may generate a first operation instruction in response to the first operation triggered for the target area, and the first operation instruction may be understood as a function for causing the business application to load and display a corresponding first target image in response to the first operation. Specifically, the business application determines a compiler of the first target image bound in advance for the first operation instruction as a to-be-compiled program, and the to-be-compiled program can be understood as a program for image rendering and needs to be compiled. After the business application determines a to-be-compiled program corresponding to the first operation instruction, a first compiling request aiming at the to-be-compiled program is generated, and the first compiling request is used for being sent to the terminal so as to request the terminal to compile the to-be-compiled program. In summary, when the operation object triggers the first operation, the service application may determine a to-be-compiled program corresponding to the first operation, and generate a first compiling instruction for the to-be-compiled program, so that step S202 may be further performed subsequently.
Step S202, the terminal matches the identification of the to-be-compiled program carried in the first compiling request with the identifications of the plurality of compiling programs contained in the target compiling data set.
In some possible embodiments, the terminal obtains a first compiling request for a to-be-compiled program, which is a program for image rendering that the business application requests to compile during running to obtain the target image. As is clear from the above, the terminal stores the target compiled data set including a plurality of compiled data in the designated storage space. The terminal may match the identifier of the to-be-compiled program carried in the first compiling request with identifiers of a plurality of compiled programs in the target compiling data set, so as to determine the first compiled program.
In some possible embodiments, assuming that the service application responds to the operation object operation, the request terminal loads and displays the first target image on the operation object interface, and the service application determines the program to be compiled according to the operation instruction. The business application generates a first compiling request of the to-be-compiled program, and the first compiling request carries an identification of the to-be-compiled program. It can be understood that, if the terminal determines the to-be-compiled program, the to-be-compiled program may be directly compiled and run to implement image rendering of the service application to obtain the first target image, however, as known from the above, the terminal has limited compiling capability for the image rendering program, so when the first target image requested to be compiled by the service application is complex, the terminal needs to perform a large amount of compiling calculation on the to-be-compiled program to obtain corresponding compiling data, which is easy to reduce the speed of rendering the first target image, resulting in a stuck interface of the operation object. Therefore, in the embodiment of the application, after the terminal acquires the first compiling request of the data to be compiled, the compiling calculation amount of the terminal can be reduced by searching the compiling program matched with the identification of the compiling program in the target compiling data set.
Further, referring to fig. 7, fig. 7 is a schematic view of a scenario application of a compiling method of an image rendering program according to an embodiment of the present application. As shown in fig. 7, the target compiled dataset of the terminal includes at least a first compiler A1, a second compiler A2, a third compiler A3, …, and so on. When the terminal obtains a first compiling request of the business application for the to-be-compiled program, namely, the business application requests the terminal to render a first target image on the operation object interface, the terminal matches the identification of the to-be-compiled program carried in the first compiling request with the identifications of a plurality of compiling programs in the target compiling data set. Assuming that the identifier A1 of the first compiler A1 of the target compiled data set in fig. 7 matches the identifier of the to-be-compiled program carried by the first compiling request, it is determined that the first compiler A1 is the to-be-compiled program. At this time, the terminal may run the compiled data of the first compiler A1 to perform image rendering to obtain the first target image.
In some possible embodiments, when the service application requests to render the target image to the terminal, that is, the service application sends a first compiling request for the data to be compiled to the terminal, compared with compiling and rendering the program to be compiled by the terminal, in the embodiment of the application, the terminal can directly obtain the compiling data of the program to be compiled by matching the identifier of the program to be compiled carried by the first compiling request with the identifiers of a plurality of compiling programs in the target compiling data set, thereby avoiding the compiling of the program to be compiled, reducing the calculation amount of the service application in operation, rapidly rendering the target image of the service application in operation of the service application, and reducing the picture delay of the service application in operation.
In addition, in some possible embodiments, when the terminal does not find a compiler program matching with the to-be-compiled program associated with the first compiling request in the plurality of compilers of the target compiling set, the terminal characterizes that the compiling data of the to-be-compiled program is not stored in the target compiling data set, that is, the terminal cannot directly run the to-be-compiled program, at this time, the terminal may further execute step S203.
Step S203, the terminal obtains estimated compiling loss of the to-be-compiled program.
In some possible embodiments, the terminal matches the identifiers of the plurality of compilers of the target compiling dataset with the identifiers of the first compiling request, and if no compiler whose identifier matches with the identifier of the to-be-compiled program carried by the first compiling request exists in the plurality of compilers of the target compiling dataset, the terminal predicts the compiling loss of the to-be-compiled program to obtain the estimated compiling loss of the to-be-compiled program.
Optionally, in some possible embodiments, the terminal may predict the data size required for compiling the data to be compiled according to the content of the program to be compiled, and obtain the corresponding estimated compiling loss according to the data size, that is, the estimated compiling loss may be understood as a compiling loss required for representing compiling the program to be compiled into the compiled data. In addition, the terminal can also estimate the length of the character string after compiling the to-be-compiled program according to the content of the to-be-compiled program, and obtain corresponding estimated compiling loss according to the length of the character string. It will be appreciated that the string length characterizes the compilation loss required to compile the program to be compiled into compiled data. In addition, in the embodiment of the present application, the terminal may obtain the estimated compiling loss of the to-be-compiled program through other data, which is not illustrated herein. In summary, the terminal may estimate the compiling loss of the to-be-compiled program to obtain the estimated loss value, so as to further execute step S204.
And step S204, the terminal compares the estimated compiling loss with the target compiling loss.
In some possible embodiments, the terminal may calculate the estimated compiling loss of the to-be-compiled program. Further, the terminal is further configured to compare the estimated coding loss with the target coding loss. Referring to fig. 8, fig. 8 is a flowchart illustrating a compiling method of an image rendering program according to an embodiment of the application. As shown in fig. 8, when a terminal receives a first compiling request of a service application for a to-be-compiled program, the terminal first searches in a target compiling data set to determine whether a compiling program with an identifier matched with an identifier of the to-be-compiled program carried by the first compiling request exists in a plurality of compiling programs of the target compiling data set, if the compiling program with the identifier matched with the identifier of the to-be-compiled program carried by the first compiling request exists, determines compiling data of the compiling program matched with the first compiling request as target compiling data, and returns the target compiling data to the terminal to run, so as to realize image rendering to obtain a target image. If no compiler program with the identification matched with the identification of the to-be-compiled program carried by the first compiling request exists in the target compiling data set, calculating estimated compiling loss of the to-be-compiled program. And comparing the estimated compiling loss of the to-be-compiled program with the target compiling loss, if the estimated compiling loss is smaller than the target compiling loss, representing that the to-be-compiled program only needs to spend smaller compiling loss, locally compiling the to-be-compiled program by the terminal to obtain target compiling data of the to-be-compiled program, returning the target compiling data to the terminal to perform image rendering, and obtaining a target image rendered by the to-be-compiled program compiled by the service application request.
In summary, when no compiling data whose identifier matches with the identifier of the to-be-compiled program carried by the first compiling request exists in the target compiling dataset of the terminal, the terminal may calculate the estimated compiling loss generated by the to-be-compiled program, compare the estimated compiling loss with the target compiling loss, and characterize that the compiling loss of the to-be-compiled program is smaller when the estimated compiling loss is smaller than the target compiling loss, so that the terminal may directly compile and render the to-be-compiled program to obtain the target image of the service application request.
Step S205, the terminal sends a second compiling request to the server.
In some possible embodiments, please refer to fig. 8 again, when the estimated compiling loss is greater than the target compiling loss, it is necessary to characterize the compiling to-be-compiled program to have a greater compiling loss, and at this time, if the terminal performs image rendering based on the to-be-compiled program, the image rendering speed is easily reduced, and the image loading of the service application is slow. Therefore, when the estimated compiling loss is larger than the target compiling loss, the terminal generates a second compiling request and sends the second compiling request to the server so as to request the server to return the target compiling data to the terminal based on the second compiling request, and the terminal performs image rendering based on the target compiling data to obtain a target image loaded by the service application request. In summary, when the estimated compiling loss is greater than the target compiling loss, the terminal generates a second compiling request and sends the second compiling request to the server, so that the server may further execute step S206. The server may be the service server 10a in the embodiment corresponding to fig. 1.
Step S206, the server acquires the compiler associated with the to-be-compiled program based on the second compiling request.
In some possible embodiments, the terminal may send a second compilation request to the server requesting the server to obtain a compilation program associated with the program to be compiled. The second compilation request may be understood as a request carrying an identification of the program to be compiled, wherein the second compilation request and the first compilation request may be requests of the same form or of different forms.
In some possible embodiments, it is known from the foregoing that the second compiling request includes an identifier of the to-be-compiled program, so the server may determine, from a plurality of compiling programs in the set of compiling programs of the server, a compiling program that matches the second compiling request according to the identifier of the to-be-compiled program carried by the second compiling request, and call compiling data of the compiling program that matches the second compiling request as compiling data of the to-be-compiled program. That is, the server may acquire the compiled data of the program to be compiled in the set of compilers based on the second compiling request. It can be understood that, because the server searches the compiler set and determines the compiling data of the compiler in the compiler set as the compiling data of the to-be-compiled program, the compiling process of the to-be-compiled program can be reduced, and the speed of feeding back the compiling data can be improved.
Optionally, in some possible embodiments, when there is no compiler in the set of compilers of the server, the compiler is characterized in that there is no compiled data of the compiler to be compiled in the set of compilers, and the compiler is matched with the identifier of the compiler to be compiled carried by the second compiling request. At this time, the server may compile the program to be compiled based on the second compilation request, and obtain compilation data of the program to be compiled, so as to further execute step S207 later.
In step S207, the server returns the compiling data of the program to be compiled associated with the second compiling request to the terminal.
It may be appreciated that in the embodiment of the present application, the server may determine the compiling data of the compiler associated with the second compiling request as the compiling data of the compiler to be compiled, and return the compiling data to the terminal, so that the terminal may further execute step S208. The terminal may be understood as the above-mentioned terminal that sends the second compiling request to the server.
Step S208, the terminal determines the compiling data of the to-be-compiled program as target compiling data of the image rendering program of the business application.
In some possible embodiments, the terminal has a function of reading the compiling data, that is, after the terminal receives the compiling data of the to-be-compiled program for the second compiling request, the terminal may read the compiling data of the to-be-compiled program to run the to-be-compiled program, that is, the terminal performs image rendering based on the image rendering program to obtain the target image.
In some possible embodiments, the terminal determines the compiling data of the compiler returned by the server as target compiling data. The terminal can run the target compiling data to obtain a target image of the service application request display on the operation object interface.
The terminal in the embodiment of the application sends the compiled data pulling request to the server when the service application is started, so that the server matches the compiler identification carried by the compiled data pulling request with the identifications of a plurality of compilers of the compiler set, and determines the plurality of compilers matched with the compiler identification of the compiled data pulling request as a plurality of to-be-compiled programs of the service application. The server compiles the multiple programs to be compiled to obtain compiling data and identifiers of the multiple programs to be compiled, and the server returns the compiling data and identifiers of the multiple programs to be compiled to the terminal. And the terminal receives the compiling data and the identifiers of the plurality of programs to be compiled and generates a target compiling data set. Further, when the business application is started and runs, the business application can respond to the operation of the operation object to generate a first compiling request aiming at the operation of the operation object, wherein the first compiling request is used for requesting compiling and rendering of a program to be compiled associated with the operation object operation so as to obtain a target image. Specifically, the first compiling request includes an identifier of the to-be-compiled program, and the terminal may search the target compiling dataset according to the identifier of the to-be-compiled program carried by the first compiling request. If the identification of the compiler program in the plurality of compiler programs in the target compilation data set is matched with the identification of the to-be-compiled program carried by the first compilation request, the compilation data of the compiler program matched with the identification of the first compilation request is determined to be target compilation data, and the terminal performs image rendering based on the target compilation data, so that a target image can be obtained. When the identification of the compiler program which does not exist in the plurality of compiler programs of the target compiling data set of the terminal is matched with the identification of the to-be-compiled program carried by the first compiling request, the terminal estimates the compiling loss of the to-be-compiled program to obtain estimated compiling loss. Specifically, the terminal may calculate the size of the compiled data of the to-be-compiled program, and determine the estimated compiling loss of the to-be-compiled program according to the size of the compiled data. It will be appreciated that the larger the estimated compilation loss, the larger the loss characterizing the compilation of the program to be compiled. Therefore, in the embodiment of the application, the terminal can compare the estimated compiling loss with the target compiling loss. Further, when the estimated compiling loss is smaller than the target compiling loss, the terminal may compile the to-be-compiled program to obtain the target compiling data, so as to avoid efficiency degradation caused by requesting compiling from the server when the estimated compiling loss is smaller. When the estimated compiling loss is greater than or equal to the target compiling loss, the loss of compiling the to-be-compiled program is larger, and at this time, the terminal can send a second compiling request to the server to request the server to compile the to-be-compiled program. Specifically, since the second compiling request carries the identifier of the to-be-compiled program, the server may match a plurality of compiled programs in the set of compiled programs based on the identifier of the second compiling request. And if the compiler programs of the compiler set have the compiler programs with the identification matched with the identification of the second compiling request, determining the compiling data of the compiler programs matched with the second compiling request as the compiling data of the to-be-compiled program. If no compiler whose identification matches with the identification of the second compiling request exists among the plurality of compilers in the compiler set, the server may compile the to-be-compiled program to obtain compiling data of the to-be-compiled program. The server returns the obtained compiling data of the to-be-compiled program to the terminal, and the terminal can determine the compiling data of the to-be-compiled program as target compiling data. Further, the server may update the compiling data of the compiling program to be compiled generated to the compiler set. The compiling method of the image rendering program can improve the compiling efficiency of the image rendering program, reduce the compiling calculation amount of the terminal and avoid the situation of image display blocking.
For easy understanding, refer to fig. 9, where fig. 9 is another flow chart of a compiling method of an image rendering program according to an embodiment of the application. The method can be applied to a server, and at least comprises the following steps:
Step S301, the server acquires a plurality of image rendering programs required by the service application.
In some possible embodiments, the plurality of image rendering programs may be obtained by uploading a plurality of terminals to a server. Each image rendering program is a source code for performing image rendering, and binary compiled data can be obtained by compiling the source code of the image rendering program. The business application may request to acquire a target image obtained after the image rendering program is compiled and rendered, to load and display the target image on the operation object interface.
In particular, the specific process of the server acquiring the plurality of image rendering programs required by the service application may refer to the description of step S101 to step S102 in the embodiment corresponding to fig. 5, and will not be further described herein.
Step S302, the server acquires a plurality of compiled data and identifiers of a plurality of image rendering programs.
In some possible embodiments, the server may compile each image rendering program to obtain compiled data and identifications of the plurality of image rendering programs, it being understood that the server may look up the plurality of image rendering programs based on the identifications of the image rendering programs. When the business application is started to run, the terminal can store the image rendering program corresponding to the target image loaded and displayed during running into the appointed storage space of the terminal in advance, so that the compiling and rendering of the image rendering program are requested to the terminal when the business application runs.
The specific process of the server obtaining the plurality of compiled data and the identifier of the plurality of image rendering programs may be referred to the description of step S101 to step S102 in the embodiment corresponding to fig. 5, and will not be further described herein.
Step S303, the terminal sends a compiled data pulling request to the server.
In some possible embodiments, the compiled data pull request includes compiler identifiers of a plurality of compilers. A compiled data pull request may be understood as a request to pull compiled data and identification of multiple compilers from a server.
Specifically, the specific process of the terminal sending the compiled data pull request to the server may refer to the description of step S101 in the embodiment corresponding to fig. 5, and will not be further described herein.
Step S304, the server matches the identities of the plurality of image rendering programs based on the compiled data pull request, so as to associate the plurality of compiled data of the plurality of image rendering programs with the plurality of compiled data of the plurality of compiled programs to generate a compiled program set.
In some possible embodiments, it may be known from the foregoing that the compiled data pull request includes the compiler identifiers of the plurality of compilers, and after receiving the compiled data pull request, the server may match the identifiers of the plurality of compilers carried by the compiled data pull request with the identifiers of the plurality of image rendering programs, and call the compiled data of the plurality of image renderings, in which the identifiers of the image rendering programs match with the compiled data pull request, as compiled data of the plurality of compilers, so as to further execute step S305. In addition, the server may also generate a corresponding set of compilers based on the compiled data and the identification of the plurality of compilers.
The specific process of the server matching the identifiers of the plurality of image rendering programs based on the compiled data pull request may be referred to the description of step S101 to step S102 in the embodiment corresponding to fig. 5, and will not be further described herein.
In step S305, the server returns the compiled data and the identification of the plurality of compilers to the terminal.
In some possible embodiments, the server may return the compiled data and the identification of the plurality of compilers to the terminal. The terminal can run the compiling data of the compiling program so as to realize the image rendering function of the terminal and obtain the corresponding target image.
The specific process of the server returning the compiling data and the identifiers of the plurality of compilers to the terminal may refer to the description of step S103 in the embodiment corresponding to fig. 5, and will not be further described herein.
For easy understanding, referring to fig. 10, fig. 10 is another flow chart of a compiling method of an image rendering program according to an embodiment of the application. The method can be applied to a server, and at least comprises the following steps:
Step S401, the server receives a compiling request for a to-be-compiled program sent by the terminal.
In some possible embodiments, when the business application is started and runs, the business application may respond to the operation of the operation object, and generate a first compiling request for the operation of the operation object, where the first compiling request is used for requesting to compile and render a program to be compiled associated with the operation object operation so as to obtain a target image. Specifically, the first compiling request includes an identifier of the to-be-compiled program, and the terminal may search the target compiling dataset according to the identifier of the to-be-compiled program carried by the first compiling request. If the identification of the compiler program in the plurality of compiler programs in the target compilation data set is matched with the identification of the to-be-compiled program carried by the first compilation request, the compilation data of the compiler program matched with the identification of the first compilation request is determined to be target compilation data, and the terminal performs image rendering based on the target compilation data, so that a target image can be obtained. When the identification of the compiler program which does not exist in the plurality of compiler programs of the target compiling data set of the terminal is matched with the identification of the to-be-compiled program carried by the first compiling request, the terminal estimates the compiling loss of the to-be-compiled program to obtain estimated compiling loss. Specifically, the terminal may calculate the size of the compiled data of the to-be-compiled program, and determine the estimated compiling loss of the to-be-compiled program according to the size of the compiled data. It will be appreciated that the larger the estimated compilation loss, the larger the loss that characterizes the compilation of the loss to be compiled. Therefore, in the embodiment of the application, the terminal can compare the estimated compiling loss with the target compiling loss. Further, when the estimated compiling loss is smaller than the target compiling loss, the terminal may compile the to-be-compiled program to obtain the target compiling data, so as to avoid efficiency degradation caused by requesting compiling from the server when the estimated compiling loss is smaller. When the estimated compiling loss is greater than or equal to the target compiling loss, the loss of compiling the to-be-compiled program is larger, and at this time, the terminal may send a second compiling request to the server, so as to further execute step S402.
Step S402, the server acquires the compiling data of the to-be-compiled program from the compiling program set or compiles the to-be-compiled program to acquire the compiling data of the to-be-compiled program.
In some possible embodiments, the set of compilers includes a plurality of compilers and an identifier, and the server may match the plurality of compilers of the set of compilers based on the identifier of the to-be-compiled program carried by the compiling request (i.e., the second compiling request), and determine the compiling data of the compiler whose identifier matches the identifier of the compiling request as the compiling data of the to-be-compiled program.
Alternatively, in some possible embodiments, if the identification of the compiler that does not exist in the set of compilers matches the identification of the compiling request, the server may compile the to-be-compiled program to obtain the compiling data.
Optionally, in some possible embodiments, the server may further add the compiled data compiled by the to-be-compiled program to the set of compiled programs to update the set of compiled programs. Specifically, the server may associate the compiling data of the to-be-compiled program with the identifier of the to-be-compiled program, and add the compiling data of the to-be-compiled program as the compiling data of the compiler program to the compiler program set. It can be understood that the server can expand the number of compiled programs in the compiled program set by storing the compiled data and the identifier of the compiled program in the compiled program set, so as to improve the efficiency of the server in requesting the compiled data of the program to be compiled from the terminal.
The specific process of the server obtaining the compiling data of the to-be-compiled program from the set of compiling programs or compiling the to-be-compiled program to obtain the compiling data of the to-be-compiled program may refer to the description of step S206 in the embodiment corresponding to fig. 6, which will not be described in detail here.
Step S403, the server sends the compiling data of the to-be-compiled program to the terminal.
In some possible embodiments, the service may send the compiling data of the to-be-compiled program to the terminal, so that the terminal determines the compiling data of the compiling program returned by the server as target compiling data. The terminal can perform image rendering based on the target compiling data to obtain a target image of the service application request display on the operation object interface.
The specific process of the server sending the compiled data of the to-be-compiled program to the terminal may be referred to the description of step S207-step S208 in the embodiment corresponding to fig. 6, and will not be further described herein.
Further, in some possible embodiments, the compiler set may be stored in a compiled memory space of the server. The server according to the embodiment of the application can also receive a compiling and updating request of any image rendering program in the plurality of image rendering programs, and update the corresponding image rendering program based on the compiling and updating request.
In some possible embodiments, when the server receives a compiling update request for any one of the plurality of image rendering programs, the compiling update request may be understood as a request for updating the corresponding image rendering program, and the compiling update request includes an update identifier for the target image rendering program (the image rendering program for which updating is requested) and compiling update data, which refers to data for updating the target image rendering program. Further, the server may determine, from a plurality of compilers of the compiler set associated with the image rendering program, that one compiler is the target image rendering program based on the update identifier carried in the compile update request, and generate the update identifier of the target image rendering program according to the compile update data carried in the compile update request.
Further, the server may update the identification corresponding to the target image rendering program in the compiler set based on the update identification to update the compiler set. The update identifier added to the compiler set is used for indicating that when the server receives a compilation data pull request or a compilation request, compilation update data of the target image rendering program is obtained after compilation update is performed on the target image rendering program based on the compilation update data, and the compilation update data of the target image rendering program in the compiler set is updated and sent.
Further, referring to fig. 11, fig. 11 is another flow chart of a compiling method of an image rendering program according to an embodiment of the application. As shown in fig. 11, when the server receives a compiling request for a to-be-compiled program, the server may query the set of compiled programs, whether the identifier of the compiled program matching the identifier carried by the compiling request is an update identifier, and if the identifier of the compiled program matching the compiling request is an update identifier, characterize that the compiled program has an update. At this time, the server may compile the program to be compiled based on the above-described compile update data to obtain updated compile data of the program to be compiled. And if the compiler does not have the update identification, the image rendering program corresponding to the compiler is characterized as not updated. At this time, the server may return the compiling data of the compiling program to the terminal as the compiling data of the compiling program to be compiled, or when the server does not query the compiling program matching with the compiling request of the compiling program in the compiling program set, the server translates the compiling program to be compiled, so as to return the compiling data of the compiling program to be compiled to the terminal for rendering the target image.
In the embodiment of the application, the server can receive a plurality of image rendering programs sent by a plurality of terminals, compile the plurality of image rendering programs to obtain compiling data and identifiers of the plurality of image rendering programs, generate a compiling program set after associating the compiling and identifiers of the plurality of image rendering programs, and store the compiling program set in a compiling storage space. When the server receives a compiled data pull request sent by the terminal, the compiled data pull request may be understood as a request to pull compiled data and identification of a plurality of compilers from the server. The server determines compiling data of a plurality of image rendering programs matched with the compiling program identifiers of the plurality of compiling programs in the plurality of image rendering programs of the compiling program set based on the compiling program identifiers of the plurality of compiling programs carried by the compiling data pulling request as compiling data of the plurality of compiling programs, and sends the compiling data and the identifiers of the plurality of compiling programs to the terminal. The server may associate the identification of the plurality of image rendering programs with the plurality of compilers and add the plurality of image rendering programs to the set of compilers. When the server receives a compiling request for a to-be-compiled program sent by the terminal, the compiling request carries an identifier of the to-be-compiled program, the server can search image rendering programs matched with the compiling request in the compiling program set, and determine compiling data of the image rendering programs as compiling data of the to-be-compiled program. When the image rendering program with the identification matched with the compiling request does not exist in the compiling program set, the server is further used for compiling the program to be compiled to obtain compiling data and the identification, the server can add the compiling data and the identification of the program to be compiled into the compiling program set, further, the server can update any one image rendering program in the compiling program set based on the updating request, and when the terminal requests to compile the program to be compiled, the updating content of the program to be compiled is queried and updated according to the updating identification, the image rendering program of the service application can be updated in time, and the method is easy to realize and high in applicability.
Further, referring to fig. 12, fig. 12 is a schematic structural diagram of a compiling apparatus for an image rendering program according to an embodiment of the application. The image rendering program compiling apparatus 1 may be applied to the above-described terminal, which may be the terminal 10b in the embodiment corresponding to fig. 1 described above. It may be understood that the compiling apparatus of the image rendering program may be specifically integrated in a server, where the server may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The compiling device of the image rendering program can be integrated in a terminal, and the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart sound box, a smart watch and the like, but is not limited to the smart phone, the tablet computer, the notebook computer, the desktop computer, the smart sound box, the smart watch and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein. Further, the image rendering program compiling apparatus 1 may include:
A compiling request obtaining module 10, configured to obtain a first compiling request of a service application for a to-be-compiled program, and match an identifier of the to-be-compiled program carried in the first compiling request with identifiers of a plurality of compiled programs included in a target compiling dataset, where the target compiling dataset includes compiling data of the plurality of compiled programs generated by a server, where the compiling data is received from the server and stored in a specified storage space;
A first compiling data determining module 20, configured to determine, when a to-be-compiled program whose identifier matches with the identifier of the to-be-compiled program exists in the plurality of compiling programs, compiling data of the to-be-compiled program that matches with the to-be-compiled program as target compiling data of an image rendering program of the service application;
a wear-off obtaining module 30, configured to obtain estimated wear-off of the to-be-compiled program, where no compiler program whose identifier matches with the identifier of the to-be-compiled program exists in the plurality of compilers;
and a second compiling data determining module 40, configured to send a second compiling request to the server when the estimated compiling loss is greater than or equal to the target compiling loss, and determine the compiling data of the to-be-compiled program generated and returned by the server based on the second compiling request as the target compiling data of the image rendering program of the service application.
The second compiling data determining module 40 is further configured to compile the to-be-compiled program and determine compiling data obtained by compiling as target compiling data for image rendering of the service application when the estimated compiling loss of the to-be-compiled program is less than the target compiling loss.
The compiling request obtaining module 10 includes:
A compiled data pull request unit 11 configured to send a compiled data pull request to a server, the compiled data pull request requesting compiled data of a plurality of compilers to the server;
and a target compilation data set acquisition unit 12 configured to receive compilation data of the plurality of compilers and identification of the plurality of compilers generated by the server from the server, generate the target compilation data set based on the compilation data and identification of the plurality of compilers, and store the target compilation data set in the designated storage space.
Wherein the loss acquisition module 30 is further configured to:
And acquiring the compiling data size of the to-be-compiled program based on the first compiling request, and acquiring the estimated compiling loss of the to-be-compiled program based on the compiling data size of the to-be-compiled program.
The specific implementation manner of the compiling request obtaining module 10, the first compiling data determining module 20, the loss obtaining module 30, the second compiling data determining module 40, the compiling data pulling requesting unit 11, and the target compiling data set obtaining unit 12 may refer to the description of the terminal in the embodiment corresponding to fig. 5, and will not be further described herein.
Further, referring to fig. 13, fig. 13 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 13, the computer device 1000 may be applied to a terminal, which may be the terminal 10b in the embodiment corresponding to fig. 1 described above. The computer device 1000 may include: processor 1001, network interface 1004, and memory 1005, in addition, the computer device 1000 may further comprise: a user interface 1003, and at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 13, an operating system, a network communication module, a user interface module, and a device control application program may be included in the memory 1005, which is one type of computer-readable storage medium.
The network interface 1004 in the computer device 1000 may also be connected to a server in the embodiment corresponding to fig. 1, and the optional user interface 1003 may further include a Display screen (Display) and a Keyboard (Keyboard). In the computer device 1000 shown in FIG. 13, the network interface 1004 may provide network communication functions; while the user interface 1003 is mainly an interface for providing input to an operation object; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
When a first compiling request of a business application for a to-be-compiled program is obtained, matching an identifier of the to-be-compiled program carried in the first compiling request with identifiers of a plurality of compiling programs included in a target compiling data set, wherein the target compiling data set comprises compiling data of the plurality of compiling programs generated by a server, and the compiling data is received from the server and stored in the designated storage space;
if the plurality of compiling programs have the to-be-compiled programs with the identifications matched with the to-be-compiled programs, determining target compiling data of the image rendering program of the service application according to the compiling data of the compiling programs matched with the to-be-compiled programs;
If no compiler program with the identification matched with the identification of the to-be-compiled program exists in the plurality of compiler programs, obtaining estimated compiling loss of the to-be-compiled program;
And if the estimated compiling loss is greater than or equal to the target compiling loss, sending a second compiling request to the server, and determining compiling data of the program to be compiled, which is generated and returned by the server based on the second compiling request, as target compiling data of the image rendering program of the service application.
It should be understood that the computer device 1000 described in the embodiment of the present application may perform the description of the terminal in the embodiment corresponding to fig. 5, and may also perform the description of the image rendering program compiling apparatus 1 in the embodiment corresponding to fig. 12, which is not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer readable storage medium, in which a computer program executed by the image rendering program compiling apparatus 1 mentioned above is stored, and the computer program includes program instructions, when the processor executes the program instructions, a description of a compiling method of the image rendering program in the embodiment corresponding to fig. 5 can be executed, and therefore, a description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application.
Further, referring to fig. 14, fig. 14 is a schematic structural diagram of another image rendering program compiling apparatus according to an embodiment of the application. The image rendering program compiling apparatus 2 may be applied to the server, which may be the service server 10a in the embodiment corresponding to fig. 1. It may be understood that the compiling apparatus of the image rendering program may be specifically integrated in a server, where the server may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and basic cloud computing services such as big data and artificial intelligence platforms. The compiling device of the image rendering program can be integrated in a terminal, and the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart sound box, a smart watch and the like, but is not limited to the smart phone, the tablet computer, the notebook computer, the desktop computer, the smart sound box, the smart watch and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein. Further, the image rendering program compiling apparatus 2 may include:
A compiling request obtaining module 100, configured to generate compiling data and identifiers of a plurality of compiling programs and send the compiling data and identifiers of the plurality of compiling programs to the terminal when receiving a compiling data pulling request sent by the terminal;
And the compiling data determining module 200 is configured to, when receiving a compiling request for a to-be-compiled program sent by the terminal, obtain compiling data of the to-be-compiled program from a set of compiling programs or compile the to-be-compiled program to obtain the compiling data of the to-be-compiled program, and send the compiling data of the to-be-compiled program to the terminal.
The compiling request obtaining module is further configured to:
Acquiring a plurality of image rendering programs required by business application, generating identifiers of the plurality of image rendering programs, compiling the plurality of image rendering programs to generate a plurality of compiling data of the plurality of image rendering programs, and sending the plurality of compiling data to the terminal after being used as the compiling data of the plurality of compiling programs and being correlated with the identifiers of the plurality of image rendering programs.
Wherein, the image rendering program compiling device further comprises:
A compiler set determining module 300, configured to associate the plurality of compiled data as compiled data of a plurality of compiled programs with the identifiers of the plurality of image rendering programs, generate a compiler set, and store the generated compiler set in a compiled storage space;
The compiler set determining module 300 is further configured to compile the to-be-compiled program in the compile request obtaining module to obtain compiled data of the to-be-compiled program, send the compiled data of the to-be-compiled program to the terminal, and then associate the compiled data of the to-be-compiled program with the identifier of the to-be-compiled program and add the created compiled data to the compiler set to update the compiler set.
Wherein, the compiling data determining module 200 comprises:
An update identifier obtaining unit 210, configured to generate, when receiving a compiling update request of any one of the plurality of image rendering programs, an update identifier of the any one image rendering program based on compiling update data carried in the compiling update request;
and a compiling data updating unit 220, configured to update the identifier corresponding to the any one of the image rendering programs in the compiler set based on the update identifier, where the update identifier added to the compiler set is used to instruct the server to obtain compiling update data of the any one of the image rendering programs after compiling and updating the any one of the image rendering programs based on compiling update data when receiving a compiling data pull request or a compiling request, and update and send the compiling update data of the any one of the image rendering programs in the compiler set.
Wherein, the update identifier obtaining unit 210 is further configured to:
Calculating a hash value corresponding to any one of the image rendering programs based on compiling update data carried in the compiling update request, and taking the hash value corresponding to any one of the image rendering programs as an update identifier of any one of the image rendering programs.
The specific implementation manner of the compiling request obtaining module 100, the compiling data determining module 200, the compiler set determining module 300, the update identifier obtaining unit 210, and the compiling data updating unit 220 may refer to the description of the server in the embodiment corresponding to fig. 9, and will not be described in detail here.
Further, referring to fig. 15, fig. 15 is a schematic structural diagram of another computer device according to an embodiment of the present application. As shown in fig. 15, the computer device 2000 may be applied to a server, which may be the service server 2000 in the embodiment corresponding to fig. 1. The computer device 2000 may include: processor 2001, network interface 2004 and memory 2005, in addition, the computer device may further include: a user interface 2003, and at least one communication bus 2002. Wherein a communication bus 2002 is used to enable connected communications between these components. The user interface 2003 may include a Display screen (Display), a Keyboard (Keyboard), and the optional user interface 2003 may further include a standard wired interface, a wireless interface, among others. The network interface 2004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 2005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 2005 may also optionally be at least one storage device located remotely from the aforementioned processor 2001. As shown in fig. 15, an operating system, a network communication module, a user interface module, and a device control application program may be included in the memory 2005 as one type of computer-readable storage medium.
The network interface 2004 in the computer device 2000 may also be connected to a terminal in the embodiment corresponding to fig. 1, and the optional user interface 2003 may further include a Display screen (Display) and a Keyboard (Keyboard). In the computer device 2000 illustrated in fig. 15, the network interface 2004 may provide network communication functions; while the user interface 2003 is mainly an interface for providing input to an operation object; and processor 2001 may be used to invoke device control applications stored in memory 2005 to implement:
When a compiling data pulling request sent by a terminal is received, compiling data and identifiers of a plurality of compiling programs are generated and sent to the terminal;
When a compiling request for a to-be-compiled program sent by the terminal is received, compiling data of the to-be-compiled program is obtained from a compiling program set or the to-be-compiled program is compiled to obtain the compiling data of the to-be-compiled program, and the compiling data of the to-be-compiled program is sent to the terminal.
It should be understood that the computer device 2000 described in the embodiment of the present application may perform the description of the compiling method of the image rendering program in the embodiment corresponding to fig. 5 or fig. 12, and may also perform the description of the compiling apparatus 2 of the image rendering program in the embodiment corresponding to fig. 14, which is not repeated herein. In addition, the description of the beneficial effects of the same method is omitted.
Furthermore, it should be noted here that: the embodiment of the present application further provides a computer readable storage medium, in which the computer program executed by the image rendering program compiling apparatus 2 mentioned above is stored, and the computer program includes program instructions, when the processor executes the program instructions, the processor can execute the compiling method of the image rendering program in the embodiment corresponding to fig. 5 or fig. 12, and therefore, a description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer-readable storage medium according to the present application, please refer to the description of the method embodiments of the present application.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.
The principles and embodiments of the present application have been described herein with reference to specific examples, the description of the above embodiments being only for the purpose of aiding in the understanding of the core concept of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (14)

1. A compiling method of an image rendering program, the method comprising:
When a first compiling request of a business application for a to-be-compiled program is obtained, matching an identifier of the to-be-compiled program carried in the first compiling request with identifiers of a plurality of compiling programs included in a target compiling data set, wherein the target compiling data set comprises compiling data of the plurality of compiling programs generated by a server, and the compiling data is received from the server and stored in a designated storage space;
If the plurality of compiling programs have the compiling programs with the identifications matched with the identification of the to-be-compiled program, determining the compiling data of the matched compiling program as the compiling data of the to-be-compiled program, and taking the compiling data as the target compiling data of the image rendering program of the business application;
If no compiler with the identification matched with the identification of the to-be-compiled program exists in the plurality of compilers, obtaining estimated compiling loss of the to-be-compiled program;
And if the estimated compiling loss is greater than or equal to the target compiling loss, sending a second compiling request to the server, and determining compiling data of the program to be compiled, which is generated and returned by the server based on the second compiling request, as target compiling data of the image rendering program of the service application.
2. The method according to claim 1, wherein the method further comprises:
And if the estimated compiling loss of the program to be compiled is smaller than the target compiling loss, compiling the program to be compiled and determining compiling data obtained by compiling as target compiling data of the image rendering program of the business application.
3. The method according to claim 1 or 2, wherein before the matching the identification of the to-be-compiled program carried in the first compiling request with the identifications of the plurality of compiled programs included in the target compiling dataset, the method further comprises:
Sending a compiled data pulling request to a server, wherein the compiled data pulling request is used for requesting compiled data of a plurality of compilers from the server;
And receiving compiling data of the plurality of compilers and the identifiers of the plurality of compilers generated by the server from the server, generating the target compiling data set based on the compiling data and the identifiers of the plurality of compilers, and storing the target compiling data set in the designated storage space.
4. The method of claim 3, wherein the obtaining the estimated compilation loss of the program to be compiled comprises:
And acquiring the compiling data size of the to-be-compiled program based on the first compiling request, and acquiring the estimated compiling loss of the to-be-compiled program based on the compiling data size of the to-be-compiled program.
5. A compiling method of an image rendering program, the method comprising:
When a compiling data pulling request sent by a terminal is received, compiling data and identifiers of a plurality of compiling programs are generated and sent to the terminal;
When a compiling request for a to-be-compiled program sent by the terminal is received, compiling data of the to-be-compiled program is obtained from a compiling program set or the to-be-compiled program is compiled to obtain the compiling data of the to-be-compiled program, and the compiling data of the to-be-compiled program is sent to the terminal.
6. The method of claim 5, wherein generating and transmitting the compiled data and identification of the plurality of compilers to the terminal comprises:
Acquiring a plurality of image rendering programs required by service application, generating identifiers of the plurality of image rendering programs, compiling the plurality of image rendering programs to generate a plurality of compiling data of the plurality of image rendering programs, associating the plurality of compiling data serving as compiling data of the plurality of compiling programs with the identifiers of the plurality of image rendering programs, and sending the compiling data to the terminal.
7. The method of claim 6, wherein the method further comprises:
The compiling data serving as compiling data of a plurality of compiling programs are associated with the identifiers of the image rendering programs to generate a compiling program set and stored in a compiling storage space;
After compiling the to-be-compiled program to obtain the compiled data of the to-be-compiled program and sending the compiled data of the to-be-compiled program to the terminal, the method further comprises:
And establishing association between the compiling data of the to-be-compiled program and the identification of the to-be-compiled program and adding the association to the compiler set so as to update the compiler set.
8. The method of claim 7, wherein after associating the plurality of compiled data as compiled data of a plurality of compilers with the identities of the plurality of image rendering programs to generate a set of compilers, the method comprises:
When a compiling update request of any image rendering program in the plurality of image rendering programs is received, generating an update identifier of the any image rendering program based on compiling update data carried in the compiling update request;
Updating the corresponding identifier of any image rendering program in the compiler set based on the update identifier to update the compiler set, wherein the update identifier added in the compiler set is used for indicating a server to compile and update any image rendering program based on compiling update data to obtain compiling update data of any image rendering program when receiving a compiling data pulling request or a compiling request, updating and transmitting the compiling data of any image rendering program in the compiler set.
9. The compiling method for an image rendering program according to claim 8, wherein generating the update identifier of the any image rendering program based on compiling update data carried in the compiling update request comprises:
calculating a hash value corresponding to any image rendering program based on compiling update data carried in the compiling update request, and taking the hash value corresponding to any image rendering program as an update identifier of any image rendering program.
10. An image rendering program compiling apparatus, characterized by comprising:
the compiling request acquisition module is used for acquiring a first compiling request of a service application for a to-be-compiled program, matching the identification of the to-be-compiled program carried in the first compiling request with the identifications of a plurality of compiling programs included in a target compiling data set, wherein the target compiling data set comprises compiling data of the plurality of compiling programs generated by a server, and the compiling data is received from the server and stored in a designated storage space;
The first compiling data determining module is used for determining compiling data corresponding to the matched compiling program as compiling data of the to-be-compiled program when the compiling program with the identification matched with the to-be-compiled program exists in the plurality of compiling programs, and the compiling data is used as target compiling data of an image rendering program of the business application;
the loss acquisition module is used for acquiring estimated compiling loss of the to-be-compiled program when no compiler program with the identification matched with the identification of the to-be-compiled program exists in the plurality of compiler programs;
And the second compiling data determining module is used for sending a second compiling request to the server when the estimated compiling loss is greater than or equal to the target compiling loss, and determining the compiling data of the program to be compiled, which is generated and returned by the server based on the second compiling request, as the target compiling data of the image rendering program of the business application.
11. An image rendering program compiling apparatus, characterized by comprising:
The compiling request acquisition module is used for generating compiling data and identifiers of a plurality of compiling programs and sending the compiling data and identifiers of the plurality of compiling programs to the terminal when receiving a compiling data pulling request sent by the terminal;
And the compiling data determining module is used for acquiring the compiling data of the to-be-compiled program from a compiling program set or compiling the to-be-compiled program to obtain the compiling data of the to-be-compiled program when receiving the compiling request for the to-be-compiled program sent by the terminal, and sending the compiling data of the to-be-compiled program to the terminal.
12. A computer device, comprising: a processor, a memory, and a network interface;
The processor is connected to the memory, the network interface for providing data communication functions, the memory for storing program code, the processor for invoking the program code to perform the method of any of claims 1-4.
13. A computer device, comprising: a processor, a memory, and a network interface;
The processor is connected to the memory, the network interface for providing data communication functions, the memory for storing program code, the processor for invoking the program code to perform the method of any of claims 5-9.
14. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method of any of claims 1-9.
CN202211501879.9A 2022-11-28 2022-11-28 Compiling method, device and equipment of image rendering program and readable storage medium Pending CN118092922A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211501879.9A CN118092922A (en) 2022-11-28 2022-11-28 Compiling method, device and equipment of image rendering program and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211501879.9A CN118092922A (en) 2022-11-28 2022-11-28 Compiling method, device and equipment of image rendering program and readable storage medium

Publications (1)

Publication Number Publication Date
CN118092922A true CN118092922A (en) 2024-05-28

Family

ID=91141055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211501879.9A Pending CN118092922A (en) 2022-11-28 2022-11-28 Compiling method, device and equipment of image rendering program and readable storage medium

Country Status (1)

Country Link
CN (1) CN118092922A (en)

Similar Documents

Publication Publication Date Title
US20180307300A1 (en) Detecting an Event Within Interactive Media
US20110313550A1 (en) Selection system for gaming
JP7397094B2 (en) Resource configuration method, resource configuration device, computer equipment, and computer program
US20230306694A1 (en) Ranking list information display method and apparatus, and electronic device and storage medium
CN111672111A (en) Interface display method, device, equipment and storage medium
US20170185567A1 (en) User interface control layout method and electronic device
CN111359220B (en) Game advertisement generation method and device and computer equipment
CN111494942A (en) Animation playing method, device, terminal and storage medium
CN112023402A (en) Game data processing method, device, equipment and medium
CN112295234B (en) Method and device for obtaining game props
US20120089908A1 (en) Leveraging geo-ip information to select default avatar
CN114073100B (en) Mapping view of digital content
CN113144606B (en) Skill triggering method of virtual object and related equipment
CN118092922A (en) Compiling method, device and equipment of image rendering program and readable storage medium
CN114257827B (en) Game live broadcast room display method, device, equipment and storage medium
CN110891194B (en) Comment information display method and device, terminal and storage medium
CN113318441A (en) Game scene display control method and device, electronic equipment and storage medium
CN114073056A (en) Contextual layer of digital content
CN111494955A (en) Game-based role interaction method, device, server and medium
CN115671734B (en) Virtual object control method and device, electronic equipment and storage medium
CN113440842B (en) Content display method, device, terminal and storage medium
US11607613B2 (en) Method and apparatus for switching game mode, and electronic device
CN117753004A (en) Message display method, device, equipment, medium and program product
CN114887325B (en) Data processing method, display method, device and storage medium
WO2024067168A1 (en) Message display method and apparatus based on social scene, and device, medium and product

Legal Events

Date Code Title Description
PB01 Publication