CN111061686A - Resource processing method, device, server and storage medium - Google Patents

Resource processing method, device, server and storage medium Download PDF

Info

Publication number
CN111061686A
CN111061686A CN201911019104.6A CN201911019104A CN111061686A CN 111061686 A CN111061686 A CN 111061686A CN 201911019104 A CN201911019104 A CN 201911019104A CN 111061686 A CN111061686 A CN 111061686A
Authority
CN
China
Prior art keywords
resource
script
file
advertisement
format
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
CN201911019104.6A
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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN201911019104.6A priority Critical patent/CN111061686A/en
Publication of CN111061686A publication Critical patent/CN111061686A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0276Advertisement creation

Abstract

The embodiment of the invention relates to a resource processing method, a resource processing device, a server and a storage medium, wherein the method comprises the following steps: receiving resources for configuring AI advertisements; acquiring a preset script and a preset resource processing program; calling the resource processing program through the script, processing the resource and generating a resource file in a target format; and sending the resource file to a client so that the client loads the resource file and renders the resource in the resource file. Therefore, the resources for configuring the AI advertisement are processed by calling the resource processing program through the script, and a uniform resource file with a target format is generated, so that the problem of compatibility can be avoided.

Description

Resource processing method, device, server and storage medium
Technical Field
The embodiment of the invention relates to the technical field of resource processing, in particular to a resource processing method, a resource processing device, a server and a storage medium.
Background
With the rapid development of artificial intelligence, the artificial intelligence enables the advertisement marketing industry, the advertisement marketing industry is transformed towards technology and digitalization, and the combination of the artificial intelligence and the advertisement marketing industry is more mature. Along with the combination of Artificial Intelligence and the advertising marketing industry, a marketing model of AI (Artificial Intelligence) advertising has emerged, which aims to create an immersive gaming experience for each consumer.
In the related art, in the process of manufacturing the AI advertisement, different resources for configuring the AI advertisement need to be manufactured through different platforms. In the subsequent process of processing the resources, because the AI advertisement has different production platforms, the types of the resources for configuring the AI advertisement are different, and the resources for configuring the AI advertisement have compatibility problems.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, embodiments of the present invention provide a resource processing method, device, server, and storage medium.
In a first aspect, an embodiment of the present invention provides a resource processing method, where the method includes:
receiving resources for configuring AI advertisements;
acquiring a preset script and a preset resource processing program;
calling the resource processing program through the script, processing the resource and generating a resource file in a target format;
and sending the resource file to a client so that the client loads the resource file and renders the resource in the resource file.
In an optional implementation manner of the embodiment of the present invention, the invoking the resource processing program through the script to process the resource and generate the resource file in the target format includes:
acquiring a first storage path corresponding to the resource and a second storage path corresponding to the AI advertisement template;
creating a temporary folder through the script, and copying the AI advertisement template into the temporary folder according to the second storage path;
updating the AI advertisement template in the temporary folder according to the resource based on the first storage path through the script;
and calling the resource processing program through the script to process the updated temporary folder, and generating a resource file in a WebGL format.
In an optional implementation manner of the embodiment of the present invention, the loading, by the client, the resource file, and rendering the resource in the resource file includes:
the client receives a resource file in a WebGL format;
judging whether a local browser of the client is compatible with the WebGL format or not;
and if the local browser of the client is not compatible with the WebGL format, calling a target browser compatible with the WebGL format, loading the resource file by using a WebView component in the target browser, and rendering the resource in the resource file.
In an optional implementation of the embodiment of the present invention, the method further comprises:
and if the browser local to the client is compatible with the WebGL format, directly loading the resource file by using a WebView component in the browser local to the client, and rendering the resource in the resource file.
In an optional implementation manner of the embodiment of the present invention, the invoking the resource processing program through the preset script to process the resource includes:
determining a resource type corresponding to the resource;
extracting a resource identifier corresponding to the resource;
judging whether the resource identification is matched with the resource type;
and if the resource identifier is matched with the resource type, calling the resource processing program through the preset script to process the resource.
In an optional implementation manner of the embodiment of the present invention, the resource includes at least one of:
a 3D model resource, a picture type resource, an audio type resource, and a video type resource.
In a second aspect, an embodiment of the present invention provides a resource processing apparatus, where the apparatus includes:
the resource receiving module is used for receiving resources for configuring the AI advertisement;
the script and program acquisition module is used for acquiring a preset script and a preset resource processing program;
the resource processing module is used for calling the resource processing program through the script, processing the resource and generating a resource file in a target format;
and the file sending module is used for sending the resource file to a client so as to enable the client to load the resource file and render the resource in the resource file.
In an optional implementation manner of the embodiment of the present invention, the resource processing module is specifically configured to:
acquiring a first storage path corresponding to the resource and a second storage path corresponding to the AI advertisement template;
creating a temporary folder through the script, and copying the AI advertisement template into the temporary folder according to the second storage path;
updating the AI advertisement template in the temporary folder according to the resource based on the first storage path through the script;
and calling the resource processing program through the script to process the updated temporary folder, and generating a resource file in a WebGL format.
In a third aspect, an embodiment of the present invention provides a server, including: at least one processor, and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to call program instructions in the memory to perform the resource processing method of any of the first aspects.
In a fourth aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the resource processing method according to any one of the first aspects.
According to the technical scheme provided by the embodiment of the invention, for the received resources configured with the AI advertisement, the preset resource processing program is called through the preset script, the resources are processed, the resource file in the target format is generated, and the subsequent client can load the resource file and render the resources in the resource file. Therefore, the resources for configuring the AI advertisement are processed by calling the resource processing program through the script, and a uniform resource file with a target format is generated, so that the problem of compatibility can be avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart illustrating an implementation of a resource processing method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating another resource processing method according to an embodiment of the present invention;
fig. 3 is a schematic implementation flow diagram of an alternative implementation of generating a resource file in a WebGL format according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a resource processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, an implementation flow diagram of a resource processing method provided in an embodiment of the present invention is specifically applicable to a server, and specifically includes the following steps:
s101, receiving resources for configuring AI advertisements;
in the embodiment of the present invention, the resource configured with the AI advertisement may be a resource configured with the AI advertisement uploaded by the user through the AI advertisement management platform, and the embodiment of the present invention may receive the resource configured with the AI advertisement.
Of course, the resource for configuring the AI advertisement may also be a resource for configuring the AI advertisement sent by another AI advertisement platform (for example, an AI advertisement production platform), and the embodiment of the present invention may receive a resource for configuring the AI advertisement sent by another AI advertisement platform, which is not limited in this embodiment of the present invention.
In addition, for configuring resources of the AI advertisement, at least one of: a 3D model resource, a picture type resource, an audio type resource, and a video type resource. For convenience of the following description, the picture type resource, the audio type resource, the video type resource, and/or the like may be collectively referred to as other resources.
For example, the resources for configuring the AI advertisement include a 3D model resource, a picture type resource, an audio type resource, and a video type resource, wherein the 3D model resource includes: 3D grid, 3D model skeleton, 3D model animation, 3D model chartlet, 3D model material etc. and image type resource includes: still pictures, moving pictures, etc., video type assets include video, etc., and audio type assets include audio, etc.
Specifically, as the 3D model resources include more contents, the 3D model resources can be compressed into a customized compressed file, and other resources (picture type resources, audio type resources, and/or video type resources) exist as separate resources and are not compressed.
Based on the above, in the embodiment of the present invention, the received resource for configuring the AI advertisement may be as follows:
1. AdMats folder: saving all picture type resources;
2. AudioClips folder: saving all audio type resources;
3. VideoClips folder: storing all video type resources;
4. model compression package: all 3D model resources are saved.
It should be noted that the resources for configuring the AI advertisement may also include other types of resources, which is not limited in this embodiment of the present invention.
S102, acquiring a preset script and a preset resource processing program;
in the embodiment of the invention, a script and a resource processing program are preset. The preset script is used for calling the preset resource processing program, and the preset resource processing program is used for processing resources for configuring the AI advertisement so as to generate a resource file in a target format.
For example, in the embodiment of the present invention, the preset script may be a Shell script.
Under the condition that resources for configuring the AI advertisement need to be processed, the embodiment of the invention can obtain a preset script and a preset resource processing program.
S103, calling the resource processing program through the script, processing the resource and generating a resource file in a target format;
aiming at the resources for configuring the AI advertisement received in the above steps, the preset script and the preset resource processing program obtained in the above steps, the preset resource processing program can be called through the preset script, the resources for configuring the AI advertisement are processed, and the resource file in the target format is generated, that is, the preset resource processing program is called through the preset script, the resources for configuring the AI advertisement are packaged, and the resource file in the target format is generated uniformly.
For example, for resources (3D model resources, picture type resources, audio type resources, and video type resources) configuring the AI advertisement, the 3D model resources include: 3D mesh, 3D model skeleton, 3D model animation, 3D model chartlet, 3D model material etc. other resources include: and calling the preset resource processing program through the preset script, packaging the resources configured with the AI advertisement, and uniformly generating a resource file in a target format. Therefore, the resources for configuring the AI advertisement are processed by calling the resource processing program through the script, and a uniform resource file with a target format is generated, so that the problem of compatibility can be avoided.
In the embodiment of the present invention, the type of the AI advertisement may be determined, a target format may be determined according to the type of the AI advertisement, and then the preset resource processing program may be called through the preset script to process the resource configured with the AI advertisement, so as to generate the resource file in the target format. Thus, different resource files in target formats can be generated for different AI advertisement types.
As for the type of the AI advertisement, the AI advertisement may be a 3D type or a 2D type in the embodiment of the present invention, which is not limited in the embodiment of the present invention.
The type of the AI advertisement described above may be determined by the resources that configure the AI advertisement. For example, if the resources for configuring the AI advertisement include 3D model resources, the type of the AI advertisement may be determined to be a 3D type, otherwise the type of the AI advertisement may be determined to be a 2D type.
If the type of the AI advertisement is a 3D type, a target format may be determined: the resource file is in a WebGL format, and the preset resource processing program can be called through the preset script to process the resources for configuring the AI advertisement, so that the resource file in the WebGL format is generated; if the type of the AI advertisement is a 2D type, the preset resource processing program can be called through the preset script to process the resources for configuring the AI advertisement, and a resource file in an H5 format is generated.
And S104, sending the resource file to a client so that the client loads the resource file and renders the resource in the resource file.
For the resource file obtained in the above step, the resource file may be sent to the client.
On the client side, the resource file can be received and loaded, and the resource configured with the AI advertisement in the resource file is rendered, so that the AI advertisement can be played. The resource file can be loaded through the WebView component, and resources configured with the AI advertisement in the resource file are rendered.
Specifically, in the embodiment of the present invention, the resource file may be issued to an AI advertisement player in the client, and the AI advertisement player loads the resource file through the WebView component, and renders the resource configured with the AI advertisement in the resource file, thereby completing playing the AI advertisement.
Through the above description of the technical solution provided by the embodiment of the present invention, for the received resource configured with the AI advertisement, the preset resource processing program is called through the preset script, the resource is processed, a resource file in a target format is generated, and a subsequent client can load the resource file and render the resource in the resource file. Therefore, the resources for configuring the AI advertisement are processed by calling the resource processing program through the script, and a uniform resource file with a target format is generated, so that the problem of compatibility can be avoided.
As shown in fig. 2, an implementation flow diagram of another resource processing method provided in the embodiment of the present invention is shown, where the method specifically includes the following steps:
s201, receiving resources for configuring AI advertisements;
in the embodiment of the present invention, this step is similar to the step S101, and the details of the embodiment of the present invention are not repeated herein.
S202, acquiring a preset script and a preset resource processing program;
in the embodiment of the present invention, this step is similar to the step S102, and the details of the embodiment of the present invention are not repeated herein.
S203, determining a resource type corresponding to the resource;
in the embodiment of the invention, for the resources configured with the AI advertisement, validity check is required to ensure the validity of the resources configured with the AI advertisement.
Therefore, in the embodiment of the present invention, a resource type corresponding to a resource configuring the AI advertisement needs to be determined.
For example, resources for configuring AI advertisements include: the method includes the following steps that 3D model resources, picture type resources, audio type resources and video type resources are used, wherein the resource type corresponding to the 3D model resources can be determined to be the 3D model type, and the 3D model type comprises the following formats: fbx, obj, avatar, anim, png, jpg, tex, tif, mat, it may be determined that the resource type corresponding to the picture type resource is a picture type, and the format included in the picture type is as follows: png, jpg, gif, etc., and it may be determined that the resource type corresponding to the audio type resource may be an audio type, and the audio type includes the following format: ogg, mp3, wav, etc., it may be determined that the resource type corresponding to the video type resource may be a video type, and the video type includes the following format: mp4, avi, etc.
S204, extracting a resource identifier corresponding to the resource;
and aiming at the resources configured with the AI advertisement, extracting corresponding resource identifiers in the resources configured with the AI advertisement. In the embodiment of the present invention, the resource identifier may be a suffix name corresponding to a resource configured with the AI advertisement, that is, a corresponding format in the resource configured with the AI advertisement.
For example, for a 3D model resource required for an AI advertisement, extracting a corresponding suffix name in the 3D model resource required for the AI advertisement: obj (3D network), avatar (3D model skeleton), anim (3D model animation), png (3D model map), mat (3D model material);
aiming at the picture type resources required by the AI advertisement, extracting the corresponding suffix name in the picture type resources required by the AI advertisement: png (still picture), gif (moving picture);
aiming at the audio type resources required by the AI advertisement, extracting the corresponding suffix name in the audio type resources required by the AI advertisement: mp 3;
aiming at the video type resources required by the AI advertisement, extracting the corresponding suffix name in the video type resources required by the AI advertisement: mp 4.
S205, judging whether the resource identifier is matched with the resource type;
and judging whether the resource identifier is matched with the resource type or not according to the determined resource type and the extracted resource identifier in the step, and finishing the validity check of the resource configured with the AI advertisement according to the judgment result.
For example, the validity of the picture type resource required by the AI advertisement is checked, that is, whether the picture type resource is doped with the audio type resource or the video type resource is checked in the picture type resource, if the picture type resource is doped with the audio type resource or the video type resource, it indicates that the picture type resource required by the AI advertisement is illegal, otherwise, it indicates that the picture type resource required by the AI advertisement is legal.
Taking 3D model resources required by the AI advertisement as an example, for the 3D model resources required by the AI advertisement, extracting corresponding suffix names in the 3D model resources required by the AI advertisement: obj (3D network), avatar (3D model skeleton), anim (3D model animation), png (3D model map), mat (3D model material), where the 3D model resources include the following formats: fbx, obj, avatar, anim, png, jpg, tex, tif, mat, it is known through judgment that the format in the 3D model resource includes a suffix name corresponding to the 3D model resource required by the AI advertisement, that is, the resource identifier matches with the resource type, otherwise, it can be judged that the resource identifier does not match with the resource type.
For picture type resources, audio type resources, and video type resources required for the AI advertisement, the validity check is similar to the validity check of the 3D model resources required for the AI advertisement, and the embodiments of the present invention are not described herein any more.
In addition, for the picture type resource, the resolution of the picture type resource may be checked in the embodiment of the present invention to determine the resolution of the picture in the picture type resource.
S206, if the resource identifier is matched with the resource type, calling the resource processing program through the script to process the resource and generate a resource file in a target format;
as for the judgment result of the above step, if the resource identifier is matched with the resource type, it indicates that the resource configured with the AI advertisement is legal, and a preset resource processing program can be called through a preset script to process the resource and generate a resource file in a target format; if the resource identifier is not matched with the resource type, the resource configured with the AI advertisement is not legal, and the user can be prompted to upload the resource configured with the AI advertisement again.
In the embodiment of the invention, the preset script is used for calling the preset resource processing program to process the resource, so as to generate the resource file in the WebGL format.
In addition, as for an optional implementation manner in which a preset script calls a preset resource handler to process a resource and generate a resource file in a WebGL format, as shown in fig. 3:
s301, acquiring a first storage path corresponding to the resource and a second storage path corresponding to the AI advertisement template;
s302, creating a temporary folder through the script, and copying the AI advertisement template into the temporary folder according to the second storage path;
s303, updating the AI advertisement template in the temporary folder according to the resources based on the first storage path through the script;
s304, the updated temporary folder is processed by calling the resource processing program through the script, and a resource file in a WebGL format is generated.
For example, a first storage path corresponding to the resource configured with the AI advertisement and a second storage path of the AI advertisement template (or the AI advertisement item) are acquired, and the first storage path corresponding to the resource configured with the AI advertisement and the second storage path of the AI advertisement template (or the AI advertisement item) are passed to the Shell script as parameters.
Creating three temporary folders of Assets, ProjectSettings and Packages at a server side through the Shell script, and copying historical resources (or blank resources) of a corresponding directory in an AI advertisement template (or an AI advertisement project) into the three temporary folders;
taking the three temporary folders together as a new AI advertisement template (or AI advertisement item), updating the AI advertisement template in the temporary folders according to the resources based on the first storage path through the script: replacing historical resources (or blank resources) in the three temporary folders with resources corresponding to a first storage path and configured with AI advertisements through the Shell script;
and calling a resource processing program in an AI advertisement template (or AI advertisement project) through the Shell script to process the resources in the three temporary folders, namely calling a BuildWebGLForMobile () method of a packaging program MyBuildTool.cs in the AI advertisement template (or AI advertisement project) to compile, so that a resource file in a WebGL format can be generated.
And S207, sending the resource file to a client so that the client loads the resource file and renders the resource in the resource file.
In the embodiment of the invention, for the generated resource file in the WebGL format, the resource file can be compressed by a preset script and copied to the specified storage path, and then the compressed resource file in the WebGL format can be found according to the specified storage path and sent to the client.
For example, the obtained resource file in the WebGL format is compressed into a custom format by the Shell script and copied to the specified storage path, the Shell script feeds the specified storage path back to the server, the subsequent server can find the compressed resource file (WebGL. zip) in the WebGL format through the specified storage path, and the compressed resource file in the WebGL format is sent to the client.
Receiving a resource file in a WebGL format at the client side; judging whether a local browser of the client is compatible with a WebGL format or not; if the local browser of the client is compatible with the WebGL format, directly loading the resource file through a WebView component in the local browser of the client, and rendering the resource in the resource file; and if the local browser of the client is not compatible with the WebGL format, calling a target browser compatible with the WebGL format, loading the resource file through a WebView component in the target browser, and rendering the resource in the resource file.
For example, on the client side, a resource file (WebGL. zip) in a WebGL format is received, the resource file (WebGL. zip) in the WebGL format is decompressed, whether a browser local to the client is compatible with the WebGL format is determined, if the browser local to the client is not compatible with the WebGL format, a third-party browser (for example, a third-party browser is called from a server) can be called, the third-party browser is a target browser compatible with the WebGL format, and the resource file is loaded through a WebView component in the target browser, so as to render resources in the resource file.
In the embodiment of the invention, the compatibility problem can be avoided by processing various types of resources for configuring the AI advertisement into the resource file in the uniform WebGL format.
Corresponding to the foregoing method embodiment, an embodiment of the present invention further provides a resource processing apparatus, and as shown in fig. 4, the apparatus may specifically include the following modules: a resource receiving module 410, a script and program obtaining module 420, a resource processing module 430 and a file sending module 440.
A resource receiving module 410, configured to receive a resource for configuring the AI advertisement;
a script and program obtaining module 420, configured to obtain a preset script and a preset resource processing program;
the resource processing module 430 is configured to call the resource processing program through the script, process the resource, and generate a resource file in a target format;
the file sending module 440 is configured to send the resource file to a client, so that the client loads the resource file and renders the resource in the resource file.
In a specific implementation manner of the embodiment of the present invention, the resource processing module 430 is specifically configured to:
acquiring a first storage path corresponding to the resource and a second storage path corresponding to the AI advertisement template;
creating a temporary folder through the script, and copying the AI advertisement template into the temporary folder according to the second storage path;
updating the AI advertisement template in the temporary folder according to the resource based on the first storage path through the script;
and calling the resource processing program through the script to process the updated temporary folder, and generating a resource file in a WebGL format.
The resource processing apparatus includes a processor and a memory, the resource receiving module 410, the script and program obtaining module 420, the resource processing module 430, the file sending module 440, and the like are all stored in the memory as program modules, and the processor executes the program modules stored in the memory to implement corresponding functions.
As shown in fig. 5, which is a schematic structural diagram of a server provided in an embodiment of the present invention, the server shown in fig. 5 includes: a processor 51, a communication interface 52, a memory 53 and a communication bus 54, wherein the processor 51, the communication interface 52 and the memory 53 are communicated with each other through the communication bus 54,
a memory 53 for storing a computer program;
the processor 51 is configured to implement the following steps when executing the program stored in the memory 53:
receiving resources for configuring AI advertisements;
acquiring a preset script and a preset resource processing program;
calling the resource processing program through the script, processing the resource and generating a resource file in a target format;
and sending the resource file to a client so that the client loads the resource file and renders the resource in the resource file.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the resource processing method executed on the resource processing device side as described above is realized.
The processor is used for executing the resource processing program stored in the memory to realize the following steps of the resource processing method executed on the resource processing device side:
receiving resources for configuring AI advertisements;
acquiring a preset script and a preset resource processing program;
calling the resource processing program through the script, processing the resource and generating a resource file in a target format;
and sending the resource file to a client so that the client loads the resource file and renders the resource in the resource file.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a device includes one or more processors (CPUs), memory, and a bus. The device may also include input/output interfaces, network interfaces, and the like.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present invention, and are not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (10)

1. A method for processing resources, the method comprising:
receiving resources for configuring AI advertisements;
acquiring a preset script and a preset resource processing program;
calling the resource processing program through the script, processing the resource and generating a resource file in a target format;
and sending the resource file to a client so that the client loads the resource file and renders the resource in the resource file.
2. The method of claim 1, wherein said invoking the resource handler through the script to process the resource to generate a resource file in a target format comprises:
acquiring a first storage path corresponding to the resource and a second storage path corresponding to the AI advertisement template;
creating a temporary folder through the script, and copying the AI advertisement template into the temporary folder according to the second storage path;
updating the AI advertisement template in the temporary folder according to the resource based on the first storage path through the script;
and calling the resource processing program through the script to process the updated temporary folder, and generating a resource file in a WebGL format.
3. The method of claim 2, wherein the client loads the resource file and renders the resource in the resource file, and wherein the loading the resource file comprises:
the client receives a resource file in a WebGL format;
judging whether a local browser of the client is compatible with the WebGL format or not;
and if the local browser of the client is not compatible with the WebGL format, calling a target browser compatible with the WebGL format, loading the resource file by using a WebView component in the target browser, and rendering the resource in the resource file.
4. The method of claim 3, further comprising:
and if the browser local to the client is compatible with the WebGL format, directly loading the resource file by using a WebView component in the browser local to the client, and rendering the resource in the resource file.
5. The method according to claim 1, wherein the calling the resource handler through the preset script to process the resource comprises:
determining a resource type corresponding to the resource;
extracting a resource identifier corresponding to the resource;
judging whether the resource identification is matched with the resource type;
and if the resource identifier is matched with the resource type, calling the resource processing program through the preset script to process the resource.
6. The method of claim 1, wherein the resources comprise at least one of:
a 3D model resource, a picture type resource, an audio type resource, and a video type resource.
7. An apparatus for resource handling, the apparatus comprising:
the resource receiving module is used for receiving resources for configuring the AI advertisement;
the script and program acquisition module is used for acquiring a preset script and a preset resource processing program;
the resource processing module is used for calling the resource processing program through the script, processing the resource and generating a resource file in a target format;
and the file sending module is used for sending the resource file to a client so as to enable the client to load the resource file and render the resource in the resource file.
8. The apparatus of claim 7, wherein the resource processing module is specifically configured to:
acquiring a first storage path corresponding to the resource and a second storage path corresponding to the AI advertisement template;
creating a temporary folder through the script, and copying the AI advertisement template into the temporary folder according to the second storage path;
updating the AI advertisement template in the temporary folder according to the resource based on the first storage path through the script;
and calling the resource processing program through the script to process the updated temporary folder, and generating a resource file in a WebGL format.
9. A server, comprising: at least one processor, and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is used for calling the program instructions in the memory to execute the method of any one of claims 1-6.
10. A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the method of any one of claims 1-6.
CN201911019104.6A 2019-10-24 2019-10-24 Resource processing method, device, server and storage medium Pending CN111061686A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911019104.6A CN111061686A (en) 2019-10-24 2019-10-24 Resource processing method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911019104.6A CN111061686A (en) 2019-10-24 2019-10-24 Resource processing method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN111061686A true CN111061686A (en) 2020-04-24

Family

ID=70297647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911019104.6A Pending CN111061686A (en) 2019-10-24 2019-10-24 Resource processing method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111061686A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112004162A (en) * 2020-09-08 2020-11-27 宁波视睿迪光电有限公司 Online 3D content playing system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933018A (en) * 2014-03-19 2015-09-23 北京畅游天下网络技术有限公司 File processing method and apparatus
CN107291759A (en) * 2016-04-01 2017-10-24 腾讯科技(深圳)有限公司 The treating method and apparatus of browser page resource
CN108345790A (en) * 2017-12-31 2018-07-31 广东欧珀移动通信有限公司 Malicious requests detection method, device, mobile terminal and storage medium
CN109165369A (en) * 2018-07-12 2019-01-08 北京猫眼文化传媒有限公司 Webpage display process and device
CN110083383A (en) * 2019-03-18 2019-08-02 平安普惠企业管理有限公司 Browser style compatibility method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933018A (en) * 2014-03-19 2015-09-23 北京畅游天下网络技术有限公司 File processing method and apparatus
CN107291759A (en) * 2016-04-01 2017-10-24 腾讯科技(深圳)有限公司 The treating method and apparatus of browser page resource
CN108345790A (en) * 2017-12-31 2018-07-31 广东欧珀移动通信有限公司 Malicious requests detection method, device, mobile terminal and storage medium
CN109165369A (en) * 2018-07-12 2019-01-08 北京猫眼文化传媒有限公司 Webpage display process and device
CN110083383A (en) * 2019-03-18 2019-08-02 平安普惠企业管理有限公司 Browser style compatibility method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112004162A (en) * 2020-09-08 2020-11-27 宁波视睿迪光电有限公司 Online 3D content playing system and method
CN112004162B (en) * 2020-09-08 2022-06-21 宁波视睿迪光电有限公司 Online 3D content playing system and method

Similar Documents

Publication Publication Date Title
CN110704037B (en) Rule engine implementation method and device
CN109933350B (en) Method and device for embedding codes in application and electronic equipment
CN113885935A (en) Resource packaging method and device, electronic equipment and computer readable storage medium
CN111131352A (en) Theme switching method and device
CN108376066B (en) Code processing device and code processing method
WO2022262856A1 (en) Model loading method and apparatus for head-mounted display device, and head-mounted display device
CN114860269A (en) K8S-based product pushing method, device and medium
CN111784356A (en) Payment verification method, device, equipment and storage medium
CN111061686A (en) Resource processing method, device, server and storage medium
CN106648567B (en) Data acquisition method and device
CN109766123B (en) Application program packaging method and device
KR102141749B1 (en) APP program execution method and device
CN112230930A (en) Method and device for constructing and packaging hybrid technology stack and machine-readable storage medium
CN112035156A (en) E-commerce platform docking device, method, equipment and medium
CN107092601B (en) Resource file construction method, resource file application method and device
CN109542401B (en) Web development method and device, storage medium and processor
CN112162793B (en) Method, storage medium, electronic device and system for separating structured view services
CN110969461B (en) Method and device for processing public number information, storage medium and processor
CN111275553A (en) Data storage method of block chain and block chain system
CN112866354B (en) Resource packaging method and device and asset packaging method
CN106909408B (en) Method and device for calling APK plug-in of application program
CN107016003B (en) Method and device for displaying system output data
KR102324259B1 (en) Method and apparatus for providing platform-integrated sdk capable of developing multiple platforms with a single source code
CN113472840B (en) Cloud service dynamic management method and device
CN110968758B (en) Webpage data crawling method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.