[go: up one dir, main page]

CN104104645A - Cross-platform resource management method and system - Google Patents

Cross-platform resource management method and system Download PDF

Info

Publication number
CN104104645A
CN104104645A CN201310111506.5A CN201310111506A CN104104645A CN 104104645 A CN104104645 A CN 104104645A CN 201310111506 A CN201310111506 A CN 201310111506A CN 104104645 A CN104104645 A CN 104104645A
Authority
CN
China
Prior art keywords
resource
resources
dynamic
loaded
application
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.)
Granted
Application number
CN201310111506.5A
Other languages
Chinese (zh)
Other versions
CN104104645B (en
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.)
Beijing Changyou Tianxia Network Technologies Co Ltd
Original Assignee
Beijing Changyou Tianxia Network Technologies 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 Beijing Changyou Tianxia Network Technologies Co Ltd filed Critical Beijing Changyou Tianxia Network Technologies Co Ltd
Priority to CN201310111506.5A priority Critical patent/CN104104645B/en
Publication of CN104104645A publication Critical patent/CN104104645A/en
Application granted granted Critical
Publication of CN104104645B publication Critical patent/CN104104645B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明实施例提供了一种跨平台资源管理方法和系统,以解决通过同一个平台管理时,在资源管理过程中由于存储空间、网络、带宽等问题而影响应用正常运行的问题。本发明实施例通过将应用中需要调用的资源划分为固定资源和动态资源,其中固定资源以本地客户端为平台进行处理,动态资源以IE缓存为平台进行处理,形成跨平台的资源管理方式。从而可以在应用的加载过程和运行过程中分别从两个平台获取资源,避免了通过单一平台进行资源管理时,由于存储空间、网络、带宽等问题而影响应用正常运行的问题。

The embodiment of the present invention provides a cross-platform resource management method and system to solve the problem that the normal operation of the application is affected due to storage space, network, bandwidth and other problems during the resource management process when managed through the same platform. The embodiment of the present invention divides the resources that need to be called in the application into fixed resources and dynamic resources, wherein the fixed resources are processed by the local client as the platform, and the dynamic resources are processed by the IE cache as the platform, forming a cross-platform resource management method. In this way, resources can be obtained from the two platforms during the loading and running of the application, avoiding the problem of affecting the normal operation of the application due to problems such as storage space, network, and bandwidth when managing resources through a single platform.

Description

一种跨平台资源管理方法和系统A cross-platform resource management method and system

技术领域technical field

本发明实施例涉及网络数据处理技术领域,特别是涉及一种跨平台资源管理方法和系统。The embodiments of the present invention relate to the technical field of network data processing, in particular to a cross-platform resource management method and system.

背景技术Background technique

应用中需要调用的资源主要可以分为两种:客户端资源和IE缓存资源。其中,客户端资源是指下载并安装在本地计算机上的文件;IE缓存资源是指使用IE、Opera、遨游等浏览器进行上网浏览时,产生的临时文件。The resources that need to be called in the application can be mainly divided into two types: client resources and IE cache resources. Among them, the client resource refers to the files downloaded and installed on the local computer; the IE cache resource refers to the temporary files generated when browsing the Internet with browsers such as IE, Opera, and Aoyou.

以游戏资源为例,目前游戏资源的管理方式主要包括以下两种:Taking game resources as an example, the current management methods of game resources mainly include the following two types:

1、网页游戏的完全下载方式1. The complete download method of web games

网页游戏的通用方式是:以IE缓存为平台,将游戏中需要调用的资源全部作为IE缓存资源,即将需要调用的所有资源文件全部存储在IE缓存中。在用户第一次加载时下载所有资源。The general method of web games is: use IE cache as the platform, and use all the resources that need to be called in the game as IE cache resources, that is, all resource files that need to be called are all stored in the IE cache. Download all assets on user load for the first time.

但是,如果用户设置了缓存存储上限或者由于杀毒软件等自带功能自动清理缓存,则游戏再次运行时需要重新下载全套资源,并重新加载。并且此种方式在下载资源时会浪费大量的用户带宽,每一次加载时间漫长,中途容易出现异常的断开或下载失败等情况。However, if the user sets the upper limit of cache storage or automatically clears the cache due to built-in functions such as anti-virus software, the game needs to re-download the full set of resources and reload them when the game runs again. And this method will waste a lot of user bandwidth when downloading resources, each time the loading time is long, and it is prone to abnormal disconnection or download failure in the middle.

2、客户端游戏的完全内置方式2. The fully built-in method of the client game

客户端游戏的通用方式是:以客户端为平台,将游戏中需要调用的资源全部作为客户端资源,即将需要调用的所有资源文件全部以固定的文件形式存储在用户磁盘空间的固定路径中。每一次游戏产生资料更新时,用户需要在游戏进入前下载所有更新的资料内容。The general method of client games is: use the client as the platform, and use all the resources that need to be called in the game as client resources, that is, all resource files that need to be called are stored in the fixed path of the user's disk space in the form of fixed files. Every time the game generates a data update, the user needs to download all updated data content before entering the game.

但是,此种方式会由于资料的不断更新而不断侵蚀用户的磁盘空间,且每一次更新时间漫长、更新量巨大,中途也会由于网络问题、带宽问题、磁盘空间等问题而出现异常。However, this method will continuously erode the user's disk space due to the continuous updating of data, and each update takes a long time and the amount of updating is huge, and abnormalities may occur due to network problems, bandwidth problems, disk space and other problems in the middle.

综上所述,上述两种资源管理方式都是通过同一个平台(IE缓存或者客户端)管理应用中需要调用的资源,在资源管理过程中会由于存储空间、网络、带宽等问题而影响应用的正常运行。To sum up, the above two resource management methods use the same platform (IE cache or client) to manage the resources that need to be called in the application. During the resource management process, the application will be affected due to problems such as storage space, network, and bandwidth. of normal operation.

发明内容Contents of the invention

本发明实施例所要解决的技术问题是提供一种跨平台资源管理方法和系统,以解决通过同一个平台管理时,在资源管理过程中由于存储空间、网络、带宽等问题而影响应用正常运行的问题。The technical problem to be solved by the embodiments of the present invention is to provide a cross-platform resource management method and system to solve the problem of affecting the normal operation of applications due to problems such as storage space, network, and bandwidth during the resource management process when managed through the same platform. question.

为了解决上述问题,本发明公开了一种跨平台资源管理方法,其特征在于,包括:In order to solve the above problems, the present invention discloses a cross-platform resource management method, which is characterized in that it includes:

将应用中需要调用的资源划分为固定资源和动态资源;Divide the resources that need to be called in the application into fixed resources and dynamic resources;

以本地客户端为平台,将所述固定资源存储至本地客户端;Using the local client as a platform, storing the fixed resource in the local client;

启动应用加载进程,通过所述应用加载进程加载所述本地客户端中的固定资源和本地客户端中预先设置的替代资源,所述替代资源用于替代所述动态资源;Start an application loading process, and load fixed resources in the local client and substitute resources preset in the local client through the application loading process, and the substitute resources are used to replace the dynamic resources;

当所述固定资源和替代资源加载完成后,启动应用运行进程,运行所述应用;并启动队列管理进程,通过所述队列管理进程从资源服务器下载所述动态资源;After the loading of the fixed resource and the alternative resource is completed, start an application running process to run the application; and start a queue management process to download the dynamic resource from the resource server through the queue management process;

以IE缓存为平台,将下载完成的动态资源存储至IE缓存;Use the IE cache as the platform to store the downloaded dynamic resources in the IE cache;

应用运行进程加载所述IE缓存中的动态资源,并用加载的动态资源替换所述替代资源。The application running process loads the dynamic resource in the IE cache, and replaces the substitute resource with the loaded dynamic resource.

可选地,所述动态资源包括一个或多个确定加载的动态资源,每个动态资源对应一个标识,Optionally, the dynamic resources include one or more dynamic resources that are determined to be loaded, and each dynamic resource corresponds to an identifier,

在通过所述队列管理进程从资源服务器下载所述动态资源之前,还包括:Before downloading the dynamic resource from the resource server through the queue management process, it also includes:

获取所述每个确定加载的动态资源对应的功能优先级和显示区域规则;Obtain the function priority and display area rules corresponding to each dynamic resource determined to be loaded;

根据所述每个确定加载的动态资源对应的功能优先级和显示区域规则,设定所述每个确定加载的动态资源的下载权重值;According to the function priority and display area rules corresponding to each dynamic resource determined to be loaded, the download weight value of each dynamic resource determined to be loaded is set;

按照所述确定加载的动态资源的下载权重值从高到低的顺序将所述确定加载的动态资源的标识加入资源下载队列。The identifiers of the dynamic resources determined to be loaded are added to the resource download queue in descending order of the download weight values of the dynamic resources determined to be loaded.

可选地,所述通过所述队列管理进程从资源服务器下载所述动态资源,包括:Optionally, downloading the dynamic resource from the resource server through the queue management process includes:

所述队列管理进程依次判断所述IE缓存中是否包括所述资源下载队列中的标识对应的动态资源;The queue management process sequentially judges whether the IE cache includes the dynamic resource corresponding to the identifier in the resource download queue;

若不包括,则所述队列管理进程向资源服务器发送包括所述标识的资源下载请求;If not included, the queue management process sends a resource download request including the identifier to the resource server;

所述队列管理进程从资源服务器下载所述资源下载请求中的标识对应的动态资源;The queue management process downloads the dynamic resource corresponding to the identifier in the resource download request from the resource server;

若包括,则不再重新下载所述标识对应的动态资源。If included, the dynamic resource corresponding to the identifier will not be re-downloaded.

可选地,所述动态资源还包括临时加载的动态资源,所述方法还包括:Optionally, the dynamic resources also include temporarily loaded dynamic resources, and the method further includes:

在应用运行过程中,当需要下载临时加载的动态资源时,所述应用运行进程向所述队列管理进程发送包括所述临时加载的动态资源标识的资源下载请求;During application running, when a temporarily loaded dynamic resource needs to be downloaded, the application running process sends a resource download request including the temporarily loaded dynamic resource identifier to the queue management process;

所述队列管理进程判断所述资源下载队列中是否存在所述临时加载的动态资源的标识;The queue management process judges whether there is an identifier of the temporarily loaded dynamic resource in the resource download queue;

若不存在,则根据所述临时加载的动态资源对应的功能优先级和显示区域规则,设定所述临时加载的动态资源的下载权重值;If not, set the download weight value of the temporarily loaded dynamic resource according to the function priority and display area rules corresponding to the temporarily loaded dynamic resource;

所述队列管理进程按照所述临时加载的动态资源的下载权重值将所述临时加载的动态资源的标识插入到资源下载队列中。The queue management process inserts the identifier of the temporarily loaded dynamic resource into the resource download queue according to the download weight value of the temporarily loaded dynamic resource.

可选地,所述将应用中需要调用的资源划分为固定资源和动态资源,包括:Optionally, dividing the resources that need to be called in the application into fixed resources and dynamic resources includes:

获取所述应用中需要调用的资源的变更频率;Obtain the change frequency of the resource that needs to be called in the application;

将所述应用中需要调用的资源中变更频率小于或等于预设阈值的资源确定为固定资源;Determining resources whose change frequency is less than or equal to a preset threshold among the resources that need to be called in the application as fixed resources;

将所述应用中需要调用的资源中变更频率大于所述预设阈值的资源确定为动态资源。Among the resources that need to be invoked in the application, resources whose change frequency is greater than the preset threshold are determined as dynamic resources.

另一方面,本发明还公开了一种跨平台资源管理系统,其特征在于,包括:On the other hand, the present invention also discloses a cross-platform resource management system, which is characterized in that it includes:

划分模块,用于将应用中需要调用的资源划分为固定资源和动态资源;以本地客户端为平台,将所述固定资源存储至本地客户端;A division module, configured to divide the resources that need to be called in the application into fixed resources and dynamic resources; using the local client as a platform, storing the fixed resources in the local client;

启动加载模块,用于启动应用加载进程,通过所述应用加载进程加载所述本地客户端中的固定资源和本地客户端中预先设置的替代资源,所述替代资源用于替代所述动态资源;The startup loading module is used to start the application loading process, and load the fixed resource in the local client and the substitute resource preset in the local client through the application loading process, and the substitute resource is used to replace the dynamic resource;

运行下载模块,用于当所述固定资源和替代资源加载完成后,启动应用运行进程,运行所述应用;并启动队列管理进程,通过所述队列管理进程从资源服务器下载所述动态资源;以IE缓存为平台,将下载完成的动态资源存储至IE缓存;The running download module is used to start the application running process and run the application after the loading of the fixed resource and the substitute resource is completed; and start the queue management process to download the dynamic resource from the resource server through the queue management process; IE cache is the platform, and the downloaded dynamic resources are stored in the IE cache;

运行加载模块,用于应用运行进程加载所述IE缓存中的动态资源,并用加载的动态资源替换所述替代资源。The running loading module is used to load the dynamic resource in the IE cache by the application running process, and replace the substitute resource with the loaded dynamic resource.

可选地,所述动态资源包括一个或多个确定加载的动态资源,每个动态资源对应一个标识,Optionally, the dynamic resources include one or more dynamic resources that are determined to be loaded, and each dynamic resource corresponds to an identifier,

所述系统还包括:The system also includes:

获取模块,用于在通过所述队列管理进程从资源服务器下载所述动态资源之前,获取所述每个确定加载的动态资源对应的功能优先级和显示区域规则;An acquisition module, configured to acquire the function priority and display area rules corresponding to each dynamic resource determined to be loaded before downloading the dynamic resource from the resource server through the queue management process;

第一设定模块,用于根据所述每个确定加载的动态资源对应的功能优先级和显示区域规则,设定所述每个确定加载的动态资源的下载权重值;The first setting module is configured to set the download weight value of each dynamic resource that is determined to be loaded according to the function priority and display area rules corresponding to each dynamic resource that is determined to be loaded;

第一加入模块,用于按照所述确定加载的动态资源的下载权重值从高到低的顺序将所述确定加载的动态资源的标识加入资源下载队列。The first adding module is configured to add the identifiers of the dynamic resources determined to be loaded into the resource download queue in descending order of the download weight values of the dynamic resources determined to be loaded.

可选地,所述运行下载模块包括:Optionally, the running download module includes:

资源判断子模块,用于所述队列管理进程依次判断所述IE缓存中是否包括所述资源下载队列中的标识对应的动态资源;The resource judging sub-module is used for the queue management process to sequentially judge whether the dynamic resource corresponding to the identifier in the resource download queue is included in the IE cache;

发送子模块,用于当所述资源判断子模块的判断结果为不包括时,所述队列管理进程向资源服务器发送包括所述标识的资源下载请求;A sending submodule, configured to send a resource download request including the identifier to the resource server by the queue management process when the judgment result of the resource judging submodule is not included;

下载子模块,用于所述队列管理进程从资源服务器下载所述资源下载请求中的标识对应的动态资源。The download submodule is used for the queue management process to download the dynamic resource corresponding to the identifier in the resource download request from the resource server.

可选地,所述动态资源还包括临时加载的动态资源,所述系统还包括:Optionally, the dynamic resources also include temporarily loaded dynamic resources, and the system further includes:

发送模块,用于在应用运行过程中,当需要下载临时加载的动态资源时,所述应用运行进程向所述队列管理进程发送包括所述临时加载的动态资源标识的资源下载请求;A sending module, configured to send a resource download request including the identifier of the temporarily loaded dynamic resource to the queue management process when the temporarily loaded dynamic resource needs to be downloaded during the application running process;

标识判断模块,用于所述队列管理进程判断所述资源下载队列中是否存在所述临时加载的动态资源的标识;An identifier judging module, used for the queue management process to judge whether there is an identifier of the temporarily loaded dynamic resource in the resource download queue;

第二设定模块,用于当所述标识判断模块的判断结果为不存在时,根据所述临时加载的动态资源对应的功能优先级和显示区域规则,设定所述临时加载的动态资源的下载权重值;The second setting module is used to set the temporarily loaded dynamic resource according to the function priority and display area rules corresponding to the temporarily loaded dynamic resource when the judgment result of the identification judging module is non-existent download weight value;

第二加入模块,用于所述队列管理进程按照所述临时加载的动态资源的下载权重值将所述临时加载的动态资源的标识插入到资源下载队列中。The second adding module is used for the queue management process to insert the identifier of the temporarily loaded dynamic resource into the resource download queue according to the download weight value of the temporarily loaded dynamic resource.

可选地,所述划分模块包括:Optionally, the division module includes:

频率获取子模块,用于获取所述应用中需要调用的资源的变更频率;A frequency acquisition submodule, configured to acquire the change frequency of the resources that need to be called in the application;

划分子模块,用于将所述应用中需要调用的资源中变更频率小于或等于预设阈值的资源确定为固定资源;将所述应用中需要调用的资源中变更频率大于所述预设阈值的资源确定为动态资源。Dividing sub-modules, used to determine resources that need to be called in the application with a change frequency less than or equal to a preset threshold as fixed resources; among the resources that need to be called in the application, the resources that need to be called The resource is determined to be a dynamic resource.

与现有技术相比,本发明实施例包括以下优点:Compared with the prior art, the embodiments of the present invention include the following advantages:

首先,本发明实施例通过将应用中需要调用的资源划分为固定资源和动态资源,其中固定资源以本地客户端为平台进行处理,动态资源以IE缓存为平台进行处理,形成跨平台的资源管理方式。从而可以在应用的加载过程和运行过程中分别从两个平台获取资源,避免了通过单一平台进行资源管理时,由于存储空间、网络、带宽等问题而影响应用正常运行的问题。First of all, the embodiment of the present invention divides the resources that need to be called in the application into fixed resources and dynamic resources, wherein the fixed resources are processed by the local client as the platform, and the dynamic resources are processed by the IE cache as the platform, forming cross-platform resource management Way. In this way, resources can be obtained from the two platforms during the loading process and running process of the application, avoiding the problem of affecting the normal operation of the application due to problems such as storage space, network, and bandwidth when managing resources through a single platform.

其次,本发明实施例在以IE缓存为平台管理动态资源时,利用排队逻辑对动态资源依据下载权重值进行排序,从而形成符合应用运行需求的资源下载队列,下载权重值高的动态资源优先下载,提升了用户的体验。Secondly, when managing dynamic resources on the platform of IE cache, the embodiment of the present invention uses queuing logic to sort the dynamic resources according to the download weight value, thereby forming a resource download queue that meets the application operation requirements, and the dynamic resources with high download weight values are downloaded first. , which improves the user experience.

附图说明Description of drawings

图1是本发明实施例一所述的一种跨平台资源管理方法的流程图;FIG. 1 is a flowchart of a cross-platform resource management method according to Embodiment 1 of the present invention;

图2是本发明实施例二所述的客户端游戏和网页游戏结合的整体结构图;FIG. 2 is an overall structural diagram of the combination of the client game and the web game described in Embodiment 2 of the present invention;

图3是本发明实施例二所述的跨平台资源管理的流程图;FIG. 3 is a flow chart of cross-platform resource management described in Embodiment 2 of the present invention;

图4是本发明实施例二所述的动态资源下载队列管理的流程图;FIG. 4 is a flow chart of dynamic resource download queue management described in Embodiment 2 of the present invention;

图5是本发明实施例三所述的一种跨平台资源管理系统的结构框图。FIG. 5 is a structural block diagram of a cross-platform resource management system according to Embodiment 3 of the present invention.

具体实施方式Detailed ways

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

实施例一:Embodiment one:

目前,对于应用中需要调用的资源的管理方式主要可以分为以下两种:At present, the management methods for the resources that need to be called in the application can be mainly divided into the following two types:

①以IE缓存为平台,将应用中需要调用的资源全部作为IE缓存资源,即将需要调用的所有资源文件全部存储在IE缓存中。在用户第一次加载应用时下载所有资源。①Using IE cache as the platform, all resources that need to be called in the application are used as IE cache resources, that is, all resource files that need to be called are stored in the IE cache. Download all resources when the user loads the app for the first time.

②以客户端为平台,将游戏中需要调用的资源全部作为客户端资源,即将需要调用的所有资源文件全部以固定的文件形式存储在用户磁盘空间的固定路径中。每一次应用产生资料更新时,用户需要在进入应用前下载所有更新的资料内容。②Using the client as the platform, all the resources that need to be called in the game are used as client resources, that is, all resource files that need to be called are stored in the fixed path of the user's disk space in the form of fixed files. Every time the application generates a data update, the user needs to download all updated data content before entering the application.

可见,上述两种资源管理方式都是通过同一个平台(IE缓存或者客户端)管理应用中需要调用的资源。但是这两种方式在资源管理过程中均会由于外界因素而影响应用的正常运行。It can be seen that the above two resource management methods use the same platform (IE cache or client) to manage the resources that need to be called in the application. However, these two methods will affect the normal operation of the application due to external factors during the resource management process.

例如,对于以IE缓存为平台的资源管理方式,如果用户设置了缓存存储上限或者由于杀毒软件等自带功能自动清理缓存,则应用再次运行时需要重新下载全套资源,并重新加载,并且此种方式在下载资源时会浪费大量的用户带宽,每一次加载时间漫长,中途容易出现异常的断开或下载失败等情况;对于以客户端为平台的资源管理方式,则会由于资料的不断更新而不断侵蚀用户的磁盘空间,且每一次更新时间漫长、更新量巨大,中途也会由于网络问题、带宽问题、磁盘空间等问题而出现异常。For example, for the resource management method based on the IE cache, if the user sets the upper limit of the cache storage or automatically clears the cache due to built-in functions such as antivirus software, the application needs to re-download and reload the entire set of resources when it runs again, and such This method will waste a lot of user bandwidth when downloading resources, and each time the loading time is long, it is prone to abnormal disconnection or download failure in the middle; It constantly erodes the user's disk space, and each update takes a long time and has a huge amount of updates. In the middle, there will be abnormalities due to network problems, bandwidth problems, disk space and other problems.

因此,针对上述问题,本发明实施例提出了一种跨平台资源管理方法,该方法可以通过将应用中需要调用的资源进行拆分,并且将拆分后的资源分别以本地客户端和IE缓存为平台进行资源管理,从而形成跨平台的资源管理形式。Therefore, in response to the above problems, the embodiment of the present invention proposes a cross-platform resource management method, which can split the resources that need to be called in the application, and cache the split resources in the local client and IE respectively Resource management is carried out for the platform, thus forming a cross-platform resource management form.

参照图1,示出了本发明实施例一所述的一种跨平台资源管理方法的流程图,所述方法可以包括:Referring to FIG. 1 , it shows a flow chart of a cross-platform resource management method according to Embodiment 1 of the present invention. The method may include:

步骤101,将应用中需要调用的资源划分为固定资源和动态资源。Step 101, divide the resources that need to be invoked in the application into fixed resources and dynamic resources.

本发明实施例中,首先可以将应用中需要调用的资源进行划分,具体可以划分为固定资源和动态资源,然后分别通过不同的平台对这两种资源进行管理。In the embodiment of the present invention, the resources that need to be called in the application can be divided firstly, specifically can be divided into fixed resources and dynamic resources, and then these two kinds of resources can be managed through different platforms respectively.

本发明实施例可以按照资源的变更频率对应用中需要调用的资源进行划分。具体的,该步骤101可以包括:The embodiments of the present invention can divide the resources that need to be called in the application according to the change frequency of the resources. Specifically, this step 101 may include:

a1,获取所述应用中需要调用的资源的变更频率。a1, obtaining the change frequency of the resource that needs to be called in the application.

a2,将所述应用中需要调用的资源中变更频率小于或等于预设阈值的资源确定为固定资源。a2. Among the resources that need to be invoked in the application, resources whose change frequency is less than or equal to a preset threshold are determined as fixed resources.

a3,将所述应用中需要调用的资源中变更频率大于所述预设阈值的资源确定为动态资源。a3. Determining, among the resources that need to be invoked in the application, a resource whose change frequency is greater than the preset threshold as a dynamic resource.

当然,还可以通过其他方式确定固定资源和动态资源,例如,通过资源的加载次数确定等等,本发明实施例对此并不加以限制。Certainly, the fixed resource and the dynamic resource may also be determined in other ways, for example, by determining the loading times of the resource, etc., which is not limited in this embodiment of the present invention.

步骤102,以本地客户端为平台,将所述固定资源存储至本地客户端。Step 102, using the local client as a platform, storing the fixed resource in the local client.

在对资源进行划分之后,可以以本地客户端为平台,将其中的固定资源存储至本地客户端。因此,在应用加载时,可以直接从本地客户端中获取固定资源,而不用再进行下载。After the resources are divided, the local client can be used as a platform to store the fixed resources in the local client. Therefore, when the application loads, the fixed resources can be obtained directly from the local client without further downloading.

步骤103,启动应用加载进程,通过所述应用加载进程加载所述本地客户端中的固定资源和本地客户端中预先设置的替代资源,所述替代资源用于替代所述动态资源。Step 103, start an application loading process, and load fixed resources in the local client and substitute resources preset in the local client through the application loading process, and the substitute resources are used to replace the dynamic resources.

经过上述步骤101和步骤102对应用中需要调用的资源进行处理之后,在应用启动时,可以首先启动应用加载进程,通过所述应用加载进程可以直接加载所述本地客户端中的固定资源和本地客户端中预先设置的替代资源。此时,可以暂时不加载动态资源,由于所述固定资源和替代资源可从本地客户端直接加载,因此,可以提高应用的加载速率,在固定资源和替代资源加载完成之后,即可先运行所述应用,然后在应用运行过程中,再边运行边加载动态资源。After the above-mentioned steps 101 and 102 are performed on the resources that need to be called in the application, when the application is started, the application loading process can be started first, and the fixed resources and local resources in the local client can be directly loaded through the application loading process. Alternative resources pre-set in the client. At this time, the dynamic resource may not be loaded temporarily, because the fixed resource and the substitute resource can be loaded directly from the local client, therefore, the loading rate of the application can be improved, and after the fixed resource and the substitute resource are loaded, the all resources can be run first Describe the application, and then load dynamic resources while the application is running.

其中,所述替代资源用于替代所述动态资源,主要起显示作用。加载替代资源主要是为了使加载动态资源之前,应用在显示时并不是只显示固定资源,还可以显示替代资源。Wherein, the substitute resource is used to replace the dynamic resource and mainly plays a display role. The main purpose of loading alternative resources is to make the application display not only fixed resources but also alternative resources before loading dynamic resources.

步骤104,当所述固定资源和替代资源加载完成后,启动应用运行进程,运行所述应用;并启动队列管理进程,通过所述队列管理进程从资源服务器下载所述动态资源。Step 104: After the loading of the fixed resource and the alternative resource is completed, start an application running process to run the application; and start a queue management process to download the dynamic resource from the resource server through the queue management process.

当所述固定资源和替代资源加载完成后,即可启动应用运行进程,运行所述应用。并且此时可以启动队列管理进程,在应用运行的过程中,通过所述队列管理进程从资源服务器下载所述动态资源。After the loading of the fixed resource and the substitute resource is completed, the application running process can be started to run the application. And at this time, a queue management process can be started, and the dynamic resources can be downloaded from the resource server through the queue management process during the running of the application.

本发明实施例中,可以通过资源下载队列的形式控制动态资源的下载,其中,每个动态资源可以对应一个标识。因此,在通过所述队列管理进程从资源服务器下载所述动态资源之前,还要首先将要下载的动态资源的标识加入到资源下载队列中。In the embodiment of the present invention, the download of dynamic resources can be controlled in the form of a resource download queue, wherein each dynamic resource can correspond to an identifier. Therefore, before the dynamic resource is downloaded from the resource server through the queue management process, the identifier of the dynamic resource to be downloaded must first be added to the resource download queue.

本发明实施例中,所述动态资源可以包括一个或多个确定加载的动态资源,所述确定加载的动态资源可以代表在应用运行时,这些动态资源是确定要加载的,因此,首先可以把这些确定加载的动态资源的标识加入到下载队列中,在应用运行过程中实时动态下载这些动态资源。In the embodiment of the present invention, the dynamic resources may include one or more dynamic resources that are determined to be loaded, and the dynamic resources that are determined to be loaded may represent that these dynamic resources are determined to be loaded when the application is running. Therefore, firstly, the The identifiers of the dynamic resources determined to be loaded are added to the download queue, and these dynamic resources are dynamically downloaded in real time during the running of the application.

具体的,在通过所述队列管理进程从资源服务器下载所述动态资源之前,还可以包括:Specifically, before downloading the dynamic resource from the resource server through the queue management process, it may also include:

(1)获取所述每个确定加载的动态资源对应的功能优先级和显示区域规则。(1) Obtain the function priority and display area rules corresponding to each dynamic resource determined to be loaded.

应用在运行过程中,可能有多个应用子模块,这些应用子模块代表了应用中的不同功能,每个应用子模块在运行时,都要请求该应用子模块运行所需的动态资源,并且,每个应用子模块都可以具有一个功能优先级,根据功能优先级的不同确定不同应用子模块的运行顺序。During the running of the application, there may be multiple application sub-modules. These application sub-modules represent different functions in the application. When each application sub-module is running, it must request the dynamic resources required by the application sub-module to run, and , each application sub-module may have a function priority, and the running sequence of different application sub-modules is determined according to the difference in function priority.

因此,本发明实施例中,所述动态资源对应的功能优先级可以指请求该动态资源的应用子模块的功能优先级,所述动态资源对应的显示区域规则可以指请求该动态资源的应用子模块在运行时资源的显示顺序。Therefore, in the embodiment of the present invention, the function priority corresponding to the dynamic resource may refer to the function priority of the application sub-module requesting the dynamic resource, and the display area rule corresponding to the dynamic resource may refer to the application sub-module requesting the dynamic resource. The order in which modules display resources at runtime.

(2)根据所述每个确定加载的动态资源对应的功能优先级和显示区域规则,设定所述每个确定加载的动态资源的下载权重值。(2) According to the function priority and display area rule corresponding to each dynamic resource that is determined to be loaded, the download weight value of each dynamic resource that is determined to be loaded is set.

对于具体的计算方法,本领域技术人员根据实际经验进行相关处理即可,本发明实施例在此不再详细论述。另外,本发明实施例中并不限定于通过上述方法计算动态资源的下载权重值,采用其他任意一种可以计算下载权重值的方法均是可行的。For a specific calculation method, those skilled in the art may perform relevant processing based on actual experience, and the embodiments of the present invention will not be discussed in detail here. In addition, the embodiment of the present invention is not limited to calculating the download weight value of the dynamic resource through the above method, and it is feasible to use any other method that can calculate the download weight value.

(3)按照所述确定加载的动态资源的下载权重值从高到低的顺序将所述确定加载的动态资源的标识加入资源下载队列。(3) Add the identifiers of the dynamic resources that are determined to be loaded into the resource download queue in descending order of the download weight values of the dynamic resources that are determined to be loaded.

另外,在通过所述队列管理进程从资源服务器下载所述动态资源的过程中还可能会请求一些临时资源,因此,本发明实施例中,所述动态资源还可以包括临时加载的动态资源,对于这些临时加载的动态资源也要加入到资源下载队列中。In addition, some temporary resources may also be requested during the process of downloading the dynamic resources from the resource server through the queue management process. Therefore, in the embodiment of the present invention, the dynamic resources may also include temporarily loaded dynamic resources. These temporarily loaded dynamic resources are also added to the resource download queue.

因此,本发明实施例所述的资源管理方法还可以包括:Therefore, the resource management method described in the embodiment of the present invention may further include:

(i)在应用运行过程中,当需要下载临时加载的动态资源时,所述应用运行进程向所述队列管理进程发送包括所述临时加载的动态资源标识的资源下载请求。(i) During application running, when a temporarily loaded dynamic resource needs to be downloaded, the application running process sends a resource download request including the temporarily loaded dynamic resource identifier to the queue management process.

(ii)所述队列管理进程判断所述资源下载队列中是否存在所述临时加载的动态资源的标识。(ii) The queue management process judges whether there is an identifier of the temporarily loaded dynamic resource in the resource download queue.

(iii)若不存在,则根据所述临时加载的动态资源对应的功能优先级和显示区域规则,设定所述临时加载的动态资源的下载权重值。(iii) If it does not exist, setting the download weight value of the temporarily loaded dynamic resource according to the function priority and display area rules corresponding to the temporarily loaded dynamic resource.

(iv)所述队列管理进程按照所述临时加载的动态资源的下载权重值将所述临时加载的动态资源的标识插入到资源下载队列中。(iv) The queue management process inserts the identifier of the temporarily loaded dynamic resource into the resource download queue according to the download weight value of the temporarily loaded dynamic resource.

本发明实施例中,所述通过所述队列管理进程从资源服务器下载所述动态资源的步骤,可以包括:In the embodiment of the present invention, the step of downloading the dynamic resource from the resource server through the queue management process may include:

b1,所述队列管理进程依次判断所述IE缓存中是否包括所述资源下载队列中的标识对应的动态资源。b1. The queue management process sequentially judges whether the IE cache includes the dynamic resource corresponding to the identifier in the resource download queue.

b2,若不包括,则所述队列管理进程向资源服务器发送包括所述标识的资源下载请求;b2, if not included, the queue management process sends a resource download request including the identifier to the resource server;

b3,所述队列管理进程从资源服务器下载所述资源下载请求中的标识对应的动态资源;b3. The queue management process downloads the dynamic resource corresponding to the identifier in the resource download request from the resource server;

b4,若包括,则不再重新下载所述标识对应的动态资源。b4, if included, the dynamic resource corresponding to the identifier will not be re-downloaded.

步骤105,以IE缓存为平台,将下载完成的动态资源存储至IE缓存。Step 105, using the IE cache as a platform, storing the downloaded dynamic resource in the IE cache.

步骤106,应用运行进程加载所述IE缓存中的动态资源,并用加载的动态资源替换所述替代资源。Step 106, the application running process loads the dynamic resource in the IE cache, and replaces the substitute resource with the loaded dynamic resource.

当动态资源下载完成后,即可将下载完成的动态资源存储至IE缓存,然后应用运行进程即可加载所述IE缓存中的动态资源,并用加载的动态资源替换所述替代资源,此时加载的动态资源即可正常显示。After the dynamic resources are downloaded, the downloaded dynamic resources can be stored in the IE cache, and then the application running process can load the dynamic resources in the IE cache, and replace the replacement resources with the loaded dynamic resources. The dynamic resource can be displayed normally.

本发明实施例中,所述替代资源与所述动态资源可以是一一对应的,替换时使用加载的动态资源替换与该动态资源对应的替代资源。In the embodiment of the present invention, the replacement resource may have a one-to-one correspondence with the dynamic resource, and the loaded dynamic resource is used to replace the replacement resource corresponding to the dynamic resource during replacement.

本发明实施例通过将应用中需要调用的资源划分为固定资源和动态资源,其中固定资源以本地客户端为平台进行处理,动态资源以IE缓存为平台进行处理,形成跨平台的资源管理方式。从而可以在应用的加载过程和运行过程中分别从两个平台获取资源,避免了通过单一平台进行资源管理时,由于存储空间、网络、带宽等问题而影响应用正常运行的问题。其次,本发明实施例在以IE缓存为平台管理动态资源时,利用排队逻辑对动态资源依据下载权重值进行排序,从而形成符合应用运行需求的资源下载队列,下载权重值高的动态资源优先下载,提升了用户的体验。The embodiment of the present invention divides the resources that need to be called in the application into fixed resources and dynamic resources, wherein the fixed resources are processed by the local client as the platform, and the dynamic resources are processed by the IE cache as the platform, forming a cross-platform resource management method. In this way, resources can be obtained from the two platforms during the loading process and running process of the application, avoiding the problem of affecting the normal operation of the application due to problems such as storage space, network, and bandwidth when managing resources through a single platform. Secondly, when managing dynamic resources on the platform of IE cache, the embodiment of the present invention uses queuing logic to sort the dynamic resources according to the download weight value, thereby forming a resource download queue that meets the application operation requirements, and the dynamic resources with high download weight values are downloaded first. , which improves the user experience.

实施例二:Embodiment two:

在本发明实施例中,主要以游戏为例,介绍游戏运行时的跨平台资源管理方法。In the embodiment of the present invention, a game is mainly taken as an example to introduce a cross-platform resource management method when the game is running.

首先介绍一下应用本发明实施例所述的跨平台资源管理方法进行资源管理的整体结构。Firstly, the overall structure of resource management by applying the cross-platform resource management method described in the embodiment of the present invention is introduced.

客户端游戏是指官方搭建服务器,用户下载安装文件安装客户端后通过互联网连接到服务器后进行多人交互的网络游戏。网页游戏(WEB游戏)是指通过浏览器打开网页就可以进行,只需要少量点击即可以完成的游戏。Client game refers to an online game in which the official server is set up, and the user downloads the installation file to install the client and connects to the server through the Internet for multiplayer interaction. Web games (WEB games) refer to games that can be played by opening a web page through a browser, and can be completed with only a few clicks.

持续时间化网络游戏(简称“持续时间游戏”)是指玩家需要花费较长时间持续体验的网络游戏,例如大部分的客户端游戏。碎片时间化网络游戏(简称“碎片时间游戏”)是指玩家可以利用少量时间即可以得到丰富体验的网络游戏,例如社区类网页游戏。Duration-based online games (referred to as "duration games") refer to online games that players need to spend a long time continuously experiencing, such as most client games. Fragmented time-based online games (referred to as "fragmented time games") refer to online games in which players can enjoy a rich experience in a small amount of time, such as community web games.

本发明实施例中,可以将客户端游戏的时间持续化和网页游戏的时间碎片化结合起来,让玩家可以充分利用这些碎片时间,在持续时间化网络游戏的碎片时间中得到碎片时间化网络游戏的游戏体验。In the embodiment of the present invention, the time continuation of client games and the time fragmentation of web games can be combined, so that players can make full use of these fragmented times, and obtain fragmented time online games in the fragmented time of continuous online games gaming experience.

其中,将客户端游戏称为持续时间游戏,对应的服务器称为持续时间服务器,对应的客户端称为持续时间客户端,游戏中的数据称为持续时间数据;将网页游戏称为碎片时间游戏,对应的客户端称为碎片时间客户端,游戏中的数据称为碎片时间数据。Among them, the client game is called the duration game, the corresponding server is called the duration server, the corresponding client is called the duration client, and the data in the game is called the duration data; the web game is called the fragmented time game , the corresponding client is called fragment time client, and the data in the game is called fragment time data.

首先可以在持续时间游戏中开发一个碎片时间游戏,所述碎片时间游戏可以采用网页游戏的开发方式进行开发(因此,本发明实施例可以将所开发的碎片时间游戏认为是网页游戏)。这两类游戏可以使用同一套数据进行不同的游戏体验,碎片时间游戏可以是不同于持续时间游戏的一种新的场景。例如,如果玩家在持续时间游戏中的场景为A,角色为a,玩家数据为b,则该玩家在碎片时间游戏中的场景可以为B,角色也为a,玩家数据同样为b,从而可以通过这两类游戏同步进行角色的养成。First, a fragmented time game can be developed in the duration game, and the fragmented time game can be developed in the way of developing a web game (thus, the embodiment of the present invention can consider the developed fragmented time game as a web game). These two types of games can use the same set of data for different game experiences, and fragmented time games can be a new scene different from continuous time games. For example, if the player's scene in the duration game is A, the character is a, and the player data is b, then the player's scene in the fragmented time game can be B, the character is also a, and the player data is also b, so that Through these two types of games, the development of characters is carried out simultaneously.

具体的,如图2所示,为本发明实施例二中客户端游戏和网页游戏结合的整体结构图。Specifically, as shown in FIG. 2 , it is an overall structural diagram of the combination of the client game and the browser game in Embodiment 2 of the present invention.

从图2中可以看出,持续时间游戏和碎片时间游戏结合之后,即可以在持续时间游戏的过程中进行碎片时间游戏。可以在原有的持续时间服务器和持续时间客户端的基础上,开发一个碎片时间客户端,并且可以在原有的持续时间服务器上开发一个碎片时间数据处理模块,用于处理碎片时间游戏中的碎片时间数据。As can be seen from Figure 2, after the duration game and the fragment time game are combined, the fragment time game can be played during the duration game. A fragmented time client can be developed on the basis of the original duration server and duration client, and a fragmented time data processing module can be developed on the original duration server to process the fragmented time data in the fragmented time game .

其中,持续时间客户端和碎片时间客户端可以通过同一个客户端软件实现,当用户在下载客户端软件之后,可以同时具有持续时间客户端和碎片时间客户端。碎片时间客户端可以为一些插件,这些插件可以临时存放,例如,如果玩家在加载之后可以将其删除,当然,也可以进行保存,本发明实施例对此并不加以限制。Wherein, the duration client and the fragment time client can be implemented by the same client software, and after the user downloads the client software, he can have the duration client and the fragment time client at the same time. Fragment time clients can be some plug-ins, which can be temporarily stored, for example, if the player can delete them after loading them, of course, they can also be saved, which is not limited in the embodiment of the present invention.

可以开发一个用于承载所述碎片时间客户端的子进程。当玩家在进行持续时间游戏的过程中,在持续时间客户端内可以以某种方式触发该承载子进程启动,通过该子进程可以展现碎片时间客户端;然后碎片时间客户端即可以持续时间客户端为中介(进程间通信的方式),与持续时间服务器进行数据交互,通过持续时间服务器中的碎片时间数据处理模块对碎片时间客户端的碎片时间数据进行处理。A subprocess for hosting the fragmented time client can be developed. When the player is playing the duration game, the host sub-process can be triggered in some way in the duration client to start, and the fragment time client can be displayed through this sub-process; then the fragment time client can be used for the duration client The terminal is an intermediary (the way of inter-process communication), which interacts with the duration server for data, and processes the fragment time data of the fragment time client through the fragment time data processing module in the duration server.

本发明实施例中,主要是针对上述碎片时间游戏中需要调用的资源进行管理的过程。In the embodiment of the present invention, it is mainly the process of managing the resources that need to be called in the fragmented time game.

目前游戏资源的管理方式主要包括网页游戏的完全下载方式(以IE缓存为平台)和客户端游戏的完全内置方式(以客户端为平台)两种,但是这两种方式均存在诸多缺陷。At present, the management methods of game resources mainly include the complete download method of web games (using IE cache as the platform) and the complete built-in method of client games (using the client as the platform), but both methods have many defects.

例如,客户端游戏的完全内置方式主要存在以下缺陷:For example, the completely built-in approach of the client game mainly has the following defects:

a、客户端文件太大:a. The client file is too large:

目前的大部分客户端游戏,由于使用的美术模型资源越来越多,对于用户计算机的硬盘容量也占用越来越大。例如,对于天龙八部来讲,由于是一个运营多年的游戏,随着资料片不断的推出客户端资源文件所占用的硬盘空间也越来越大。因此在有新的大型资料片上线时,如果新的资料片所涉及的资源增量过大,则会极大的挑战用户本地客户端的磁盘空间。Most of the current client games use more and more art model resources, which also occupy more and more hard disk capacity of the user's computer. For example, for Tianlong Babu, since it is a game that has been in operation for many years, the hard disk space occupied by client resource files is also increasing with the continuous release of expansion packs. Therefore, when a new large-scale expansion is launched, if the resource increment involved in the new expansion is too large, it will greatly challenge the disk space of the user's local client.

b、下载量冗余过高:b. The download volume is too redundant:

当进行客户端游戏版本更新时,如果版本所涉及新资源过多,在更新时会遇到下载占用带宽过高、下载更新时间过长、下载中途由于意外而中断导致下载失败等情况。When updating the client game version, if there are too many new resources involved in the version, you will encounter situations such as excessive download bandwidth usage, long download update time, and download failure due to unexpected interruption in the middle of the download.

c、文件更新不易维护:c. File update is not easy to maintain:

当游戏版本更新时,由于会对部分基础文件或细节进行处理,因此需要经常性的进行版本升级,并要求客户端进行文件更新。而对于部分增量型的文件修改,用户只需要进行新的资源下载而不需要对现有文件进行修改。因此对于此类文件更新,无论从运营方角度或用户角度,减少在版本更新时的维护操作都具有较高的要求。When the game version is updated, some basic files or details will be processed, so frequent version upgrades are required, and the client is required to update the files. For partial incremental file modification, the user only needs to download new resources without modifying existing files. Therefore, for this type of file update, no matter from the operator's perspective or the user's perspective, reducing maintenance operations during version update has a high requirement.

网页游戏的完全下载方式主要存在以下缺陷:The full download method of web games mainly has the following defects:

如果用户设置了缓存存储上限或者由于杀毒软件等自带功能自动清理缓存,则游戏再次运行时需要重新下载全套资源,并重新加载。并且此种方式在下载资源时会浪费大量的用户带宽,每一次加载时间漫长,中途容易出现异常的断开或下载失败等情况。If the user sets the cache storage limit or the cache is automatically cleared due to built-in functions such as anti-virus software, the game needs to re-download the full set of resources and reload them when the game runs again. And this method will waste a lot of user bandwidth when downloading resources, each time the loading time is long, and it is prone to abnormal disconnection or download failure in the middle.

因此,本发明实施例提出了将上述碎片时间游戏中需要调用的资源进行拆分,分别通过本地客户端和IE缓存这两个平台管理拆分后的资源。Therefore, the embodiment of the present invention proposes to split the resources that need to be called in the fragmented time game, and manage the split resources through the two platforms of the local client and the IE cache respectively.

具体的,本发明实施例所述的跨平台资源管理方法主要可以包括以下四个过程,下面的描述中所提到的游戏均可以指上述的碎片时间游戏。Specifically, the cross-platform resource management method described in the embodiment of the present invention may mainly include the following four processes, and the games mentioned in the following description may all refer to the fragmented time games mentioned above.

1、资源划分1. Resource division

该过程主要是将游戏中需要调用的资源按照资源的变更频率划分为固定资源和动态资源。This process is mainly to divide the resources that need to be called in the game into fixed resources and dynamic resources according to the frequency of resource changes.

固定资源类:Fixed resource class:

将需要调用的资源中,变更频率较低的资源设定为固定资源,在版本更新时进行直接下载。同时,固定资源在游戏启动时将会作为首要加载项进行资源加载。固定资源主要以本地客户端为平台进行处理。Among the resources that need to be called, the resources with low change frequency are set as fixed resources, and they are directly downloaded when the version is updated. At the same time, fixed resources will be loaded as the first load item when the game starts. Fixed resources are mainly processed on the local client platform.

例如,游戏中的场景资源(如城市、建筑物等)的变更频率较低,基本上是固定的,因此可以把这些资源划分为固定资源。For example, scene resources in games (such as cities, buildings, etc.) change less frequently and are basically fixed, so these resources can be classified as fixed resources.

动态资源类:Dynamic resource class:

将需要调用的资源中,变更频率较高的文件设定为实时动态资源,在版本更新时不进行直接下载,而是在游戏运行过程中,通过下载队列控制动态的进行资源下载并进行加载。动态资源主要以IE缓存为平台进行处理。Among the resources that need to be called, the files with high frequency of change are set as real-time dynamic resources. When the version is updated, they are not directly downloaded, but are dynamically downloaded and loaded through the download queue control during the running of the game. Dynamic resources are mainly processed on the platform of IE cache.

例如,某个场景中的人物资源的变更频率较高,则可以把这些资源划分为动态资源。For example, if character resources in a certain scene change frequently, these resources can be classified as dynamic resources.

2、在游戏启动时,根据资源分类进行加载2. When the game starts, load according to resource classification

固定资源类:Fixed resource class:

当在启动游戏或在游戏中加载某个大型功能时,首先可以启动游戏加载进程,优先从本地客户端加载固定资源,以最快速的方式进行资源加载。当此部分资源加载完成后,启动游戏运行进程,开始正常运行游戏。When starting the game or loading a large-scale function in the game, the game loading process can be started first, and fixed resources are loaded from the local client first, and resources are loaded in the fastest way. When this part of resources is loaded, start the game running process and start running the game normally.

动态资源类:Dynamic resource class:

在游戏运行进程中,根据游戏中所运行的数据,动态获取所述数据对应的动态资源,并将所述动态资源保存至IE缓存,游戏运行进程从IE缓存中加载动态资源。During the running process of the game, dynamically obtain the dynamic resources corresponding to the data according to the data running in the game, and save the dynamic resources to the IE cache, and the game running process loads the dynamic resources from the IE cache.

3、下载队列监控3. Download queue monitoring

对于动态资源,可以通过队列管理进程进行管理,具体的可以通过资源下载队列进行监控,并按照如下规则进行逻辑处理:For dynamic resources, it can be managed through the queue management process. Specifically, it can be monitored through the resource download queue and logically processed according to the following rules:

对于确定加载的动态资源,根据当前的资源需求情况,设定资源的下载权重值;For dynamic resources that are determined to be loaded, set the download weight value of the resource according to the current resource demand;

对于所有确定加载的动态资源按照下载权重值进行排序,并将排序后的动态资源的标识加入到资源下载队列中,下载权重值高的动态资源会被优先向服务器提出资源下载请求,下载权重值低的动态资源会自动顺序排队;For all dynamic resources that are determined to be loaded, they are sorted according to the download weight value, and the identifiers of the sorted dynamic resources are added to the resource download queue. Dynamic resources with high download weight values will be given priority to resource download requests to the server, and the download weight value Low dynamic resources will be automatically queued sequentially;

当出现临时加载的动态资源需求时,根据该需求的情况,为该动态资源设定资源下载权重值,并由资源下载队列进行下载安排,根据下载权重值的大小将该动态资源的标识插入到队列中的对应位置。When there is a demand for temporarily loaded dynamic resources, according to the situation of the demand, set the resource download weight value for the dynamic resource, and arrange the download by the resource download queue, and insert the identifier of the dynamic resource into the resource according to the size of the download weight value The corresponding position in the queue.

4、实时动态资源管理4. Real-time dynamic resource management

对于已经被下载下来的动态资源,利用IE缓存进行存储,并通过动态资源管理模块对该部分资源的使用以及下载情况进行处理,游戏运行过程中,可以从IE缓存中加载所述动态资源。The downloaded dynamic resources are stored in the IE cache, and the use and download of the resources are processed through the dynamic resource management module. During the running of the game, the dynamic resources can be loaded from the IE cache.

综上所述,本发明实施例主要涉及以下两个管理规则:In summary, the embodiment of the present invention mainly involves the following two management rules:

I、资源拆分后,本地客户端资源与IE缓存资源的加载规则:I. After resources are split, the loading rules of local client resources and IE cache resources:

在资源拆分之后,需要对资源加载规则进行调整,放弃原有游戏常用的加载完成后再显示的规则,使用动态的边加载边下载边显示的方式进行资源加载处理。After the resources are split, the resource loading rules need to be adjusted, abandoning the rules commonly used in the original game to display after loading, and use the dynamic loading, downloading and displaying method for resource loading processing.

在游戏启动时,仅加载固定资源、替代资源、以及基础游戏逻辑内容,等等,并将动态资源加入到资源下载队列中。上述资源加载完成后已经被加载的固定资源和替代资源即可用于显示,且用户可进行对应的操作。此时启动队列管理进程,该进程跨越当前客户端平台使用IE缓存平台进行资源管理。队列管理进程根据资源下载队列中的下载顺序,判断所需的动态资源是否已经被下载完成,如果所需的动态资源已经被下载完成,则将该部分动态资源进行动态加载,并替换原有用于替代该动态资源的替代资源,此时即可实现正常的动态资源的显示。When the game starts, only load fixed resources, alternative resources, and base game logic content, etc., and add dynamic resources to the resource download queue. After the above resources are loaded, the loaded fixed resources and alternative resources can be displayed, and the user can perform corresponding operations. At this time, the queue management process is started, and the process uses the IE cache platform for resource management across the current client platform. The queue management process judges whether the required dynamic resources have been downloaded according to the download order in the resource download queue, and if the required dynamic resources have been downloaded, dynamically load the dynamic resources and replace the original By replacing the substitute resource of the dynamic resource, the display of the normal dynamic resource can be realized at this time.

II、资源下载队列的监控方法与排队规则II. Monitoring method and queuing rules of resource download queue

在将动态资源放入到资源下载队列中时,需要根据该动态资源对应的不同功能优先级以及显示区域规则对资源的下载权重值进行参数设定。不同的下载权重值将会直接的影响到游戏运行时动态资源的显示顺序与加载状态。同时,当用户在不断地进行游戏时,资源会根据游戏的进程而不断发生变化,此时需对下载权重值进行动态调整,并实时调整资源下载队列中的内容。When putting a dynamic resource into the resource download queue, it is necessary to set parameters for the download weight value of the resource according to different function priorities corresponding to the dynamic resource and display area rules. Different download weight values will directly affect the display order and loading status of dynamic resources when the game is running. At the same time, when the user is continuously playing the game, the resources will continue to change according to the progress of the game. At this time, it is necessary to dynamically adjust the download weight value and adjust the content in the resource download queue in real time.

最终通过以上几个部分的逻辑结合,对游戏中所调用的资源进行了拆分,通过跨平台的方式进行管理,将固定资源进行常规的逻辑处理,通过资源下载队列来控制游戏运行中对动态资源的实时下载与加载。利用跨平台的管理方式,解决了本地客户端资源过大的问题;通过动态下载机制解决了游戏资源更新期间所遇到的下载量过大的问题;通过实时下载队列监控,解决了文件更新的维护以及实际的资源显示问题。Finally, through the logical combination of the above several parts, the resources called in the game are split, managed in a cross-platform way, the fixed resources are processed in a conventional logic, and the resource download queue is used to control the dynamics of the game during operation. Real-time download and load of resources. Using the cross-platform management method, the problem of excessive local client resources is solved; the problem of excessive download volume encountered during the update of game resources is solved through the dynamic download mechanism; the problem of file update is solved through real-time download queue monitoring Maintenance as well as actual resource display issues.

下面,根据图3和图4介绍一下本发明实施例二所述的跨平台资源管理的过程。Next, according to FIG. 3 and FIG. 4 , the process of cross-platform resource management described in Embodiment 2 of the present invention will be introduced.

如图3所示,为本发明实施例二所述的跨平台资源管理的流程图,该过程可以包括:As shown in FIG. 3, it is a flowchart of the cross-platform resource management described in Embodiment 2 of the present invention, and the process may include:

A1,游戏模块初始化。A1, game module initialization.

首先,在游戏启动时,要对游戏模块进行初始化,对于具体的初始化过程,本发明实施例在此不在详细论述。First, when the game is started, the game module needs to be initialized, and the specific initialization process will not be discussed in detail in this embodiment of the present invention.

A2,游戏模块基础进程加载(即游戏加载进程)。A2, the game module basic process loading (that is, the game loading process).

在该过程中,要修改游戏加载进程,在加载进程中只加载固定资源及基础游戏逻辑内容,并加载替代资源。During this process, the game loading process needs to be modified so that only fixed resources and basic game logic content are loaded during the loading process, and alternative resources are loaded.

A3,进入游戏模块(即游戏运行进程)。A3, enter the game module (that is, the game running process).

当上述步骤A2中的资源加载完成后,即可进入游戏模块运行游戏。After the resources in the above step A2 are loaded, you can enter the game module to run the game.

A4,游戏模块运行中。A4, the game module is running.

在游戏模块运行中,可以运行正常游戏逻辑;并且启动队列管理进程,通过动态资源下载队列进行动态资源的下载管理工作;游戏运行进程对已经下载完成的动态游戏资源进行动态加载,实时将加载的动态资源替换原有用于显示的替代资源。During the running of the game module, the normal game logic can be run; and the queue management process can be started to manage the downloading of dynamic resources through the dynamic resource download queue; the game running process can dynamically load the downloaded dynamic game resources, and the loaded dynamic game resources will be loaded in real time A dynamic resource replaces a replacement resource that was originally used for display.

参照图4,示出了本发明实施例二所述的动态资源下载队列管理的流程图。该流程主要描述了接收到临时加载的动态资源时的处理过程,但是需要说明的是,在通过所述队列管理进程从资源服务器下载动态资源之前,还包括将确定加载的动态资源的标识加入到资源下载队列中的过程,该过程具体可以参照上述实施例以中的相关描述。Referring to FIG. 4 , it shows a flowchart of dynamic resource download queue management described in Embodiment 2 of the present invention. This process mainly describes the processing process when receiving a temporarily loaded dynamic resource, but it should be noted that before downloading the dynamic resource from the resource server through the queue management process, it also includes adding the identifier of the dynamic resource that is determined to be loaded to the For the process in the resource download queue, for the process, please refer to the relevant descriptions in the foregoing embodiments.

该流程可以包括:The process can include:

B1,接收到临时加载的动态资源请求。B1, receiving a temporarily loaded dynamic resource request.

当有新的游戏模块启动时,游戏运行进程对队列管理进程发起请求,将该模块所需的动态资源下载需求发送给队列管理进程。When a new game module is started, the game running process initiates a request to the queue management process, and sends the dynamic resource download requirement required by the module to the queue management process.

B2,判断资源下载队列中是否存在临时加载的动态资源标识。B2, judging whether there is a temporarily loaded dynamic resource identifier in the resource download queue.

若是,则队列不做处理;若否,则执行步骤B3。If yes, the queue does not process; if not, step B3 is executed.

B3,判断临时加载的动态资源的下载权重值。B3, judging the download weight value of the temporarily loaded dynamic resource.

B4,根据下载权重值将临时加载的动态资源的标识插入资源下载队列。B4. Insert the identifier of the temporarily loaded dynamic resource into the resource download queue according to the download weight value.

如果资源下载队列中不存在临时加载的动态资源标识,则队列管理进程自动判断该模块发送的请求对应动态资源的下载权重值,并将该动态资源的标识插入队列中的对应位置。If there is no temporarily loaded dynamic resource identifier in the resource download queue, the queue management process automatically judges that the request sent by the module corresponds to the download weight value of the dynamic resource, and inserts the dynamic resource identifier into the corresponding position in the queue.

B5,判断资源下载队列中的标识对应的动态资源是否下载完成。B5, judging whether the download of the dynamic resource corresponding to the identifier in the resource download queue is completed.

若是,则执行步骤B7;若否,则执行步骤B6。If yes, execute step B7; if not, execute step B6.

资源下载队列按照动态资源的下载权重值从高到低的顺序进行排列,下载权重值高的优先将资源下载需求推送给IE逻辑接口,并向资源服务器发送资源下载请求。The resource download queue is arranged in descending order of the download weight values of dynamic resources. Those with higher download weight values will push resource download requirements to the IE logic interface first, and send resource download requests to the resource server.

B6,显示替代资源。B6, display alternative resources.

如果所述动态资源没有下载完成,则继续显示替代资源。If the dynamic resource has not been downloaded, continue to display the alternative resource.

B7,加载动态资源进行显示。B7, loading dynamic resources for display.

当资源下载队列中的标识对应的动态资源被下载完成后,可以直接存入IE缓存中,利用IE缓存直接进行动态资源的临时管理与保存工作,并通知游戏模块进行动态资源的加载,此时游戏模块将会进行对应动态资源的实时加载。When the dynamic resource corresponding to the identifier in the resource download queue is downloaded, it can be directly stored in the IE cache, and the IE cache can be used to directly manage and save the dynamic resource temporarily, and notify the game module to load the dynamic resource. The game module will load the corresponding dynamic resources in real time.

本发明实施例首先通过对游戏资源进行拆分,形成跨平台的资源管理方法。同时利用客户端本身的管理以及IE缓存中的文件管理,在游戏加载过程以及运行过程中动态的从两个平台中进行资源读取,并可以根据游戏进程需求向两个平台同时发起资源请求操作。In the embodiment of the present invention, firstly, a cross-platform resource management method is formed by splitting game resources. At the same time, use the management of the client itself and the file management in the IE cache to dynamically read resources from the two platforms during the game loading process and running process, and can initiate resource request operations to the two platforms at the same time according to the game process requirements .

其次,通过资源下载队列管理方式,利用IE缓存的暂存功能以及资源服务器请求机制完成动态资源的下载,并利用资源下载队列的排队算法逻辑对动态资源进行优先级排序,形成符合游戏运行需求的资源下载队列。Secondly, through the resource download queue management method, the temporary storage function of IE cache and the resource server request mechanism are used to complete the download of dynamic resources, and the queuing algorithm logic of resource download queue is used to prioritize the dynamic resources to form a game that meets the running requirements of the game. Resource download queue.

再次,利用固定资源进行游戏基础加载并直接进入游戏,而在游戏运行过程中进行动态资源的下载并加载,提升了用户体验。Thirdly, use fixed resources to load the game base and directly enter the game, and download and load dynamic resources during the running of the game, which improves the user experience.

以上是以游戏为例,当然本发明的保护范围不限定于游戏这种应用,也可以是其他应用领域的资源管理,如聊天工具等等。The above is an example of a game. Of course, the scope of protection of the present invention is not limited to the application of games, and can also be resource management in other application fields, such as chat tools and so on.

对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。For the aforementioned method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, Certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

实施例三:Embodiment three:

参照图5,示出了本发明实施例三所述的一种跨平台资源管理系统的结构框图,所述系统可以包括:划分模块501、启动加载模块502、运行下载模块503、获取模块504、第一设定模块505、第一加入模块506、运行加载模块507、发送模块508、标识判断模块509、第二设定模块510和第二加入模块511。Referring to FIG. 5 , it shows a structural block diagram of a cross-platform resource management system according to Embodiment 3 of the present invention. The system may include: a division module 501, a startup loading module 502, a running download module 503, an acquisition module 504, The first setting module 505 , the first adding module 506 , the running loading module 507 , the sending module 508 , the identification judging module 509 , the second setting module 510 and the second adding module 511 .

其中,in,

划分模块501,用于将应用中需要调用的资源划分为固定资源和动态资源;以本地客户端为平台,将所述固定资源存储至本地客户端;A dividing module 501, configured to divide the resources that need to be called in the application into fixed resources and dynamic resources; using the local client as a platform, storing the fixed resources in the local client;

所述划分模块可以包括:The division module may include:

频率获取子模块,用于获取所述应用中需要调用的资源的变更频率;A frequency acquisition submodule, configured to acquire the change frequency of the resources that need to be called in the application;

划分子模块,用于将所述应用中需要调用的资源中变更频率小于或等于预设阈值的资源确定为固定资源;将所述应用中需要调用的资源中变更频率大于所述预设阈值的资源确定为动态资源。Dividing sub-modules, used to determine resources that need to be called in the application with a change frequency less than or equal to a preset threshold as fixed resources; among the resources that need to be called in the application, the resources that need to be called The resource is determined to be a dynamic resource.

启动加载模块502,用于启动应用加载进程,通过所述应用加载进程加载所述本地客户端中的固定资源和本地客户端中预先设置的替代资源,所述替代资源用于替代所述动态资源;The startup loading module 502 is configured to start an application loading process, and load the fixed resources in the local client and the preset substitute resources in the local client through the application loading process, and the substitute resources are used to replace the dynamic resources ;

运行下载模块503,用于当所述固定资源和替代资源加载完成后,启动应用运行进程,运行所述应用;并启动队列管理进程,通过所述队列管理进程从资源服务器下载所述动态资源;以IE缓存为平台,将下载完成的动态资源存储至IE缓存;The running download module 503 is used to start an application running process to run the application after the loading of the fixed resource and the alternative resource is completed; and start a queue management process to download the dynamic resource from the resource server through the queue management process; Use the IE cache as the platform to store the downloaded dynamic resources in the IE cache;

其中,所述动态资源包括一个或多个确定加载的动态资源,每个动态资源对应一个标识。Wherein, the dynamic resource includes one or more dynamic resources determined to be loaded, and each dynamic resource corresponds to an identifier.

获取模块504,用于在通过所述队列管理进程从资源服务器下载所述动态资源之前,获取所述每个确定加载的动态资源对应的功能优先级和显示区域规则;An acquisition module 504, configured to acquire the function priority and display area rules corresponding to each dynamic resource determined to be loaded before downloading the dynamic resource from the resource server through the queue management process;

第一设定模块505,用于根据所述每个确定加载的动态资源对应的功能优先级和显示区域规则,设定所述每个确定加载的动态资源的下载权重值;The first setting module 505 is configured to set the download weight value of each dynamic resource that is determined to be loaded according to the function priority and display area rules corresponding to each dynamic resource that is determined to be loaded;

第一加入模块506,用于按照所述确定加载的动态资源的下载权重值从高到低的顺序将所述确定加载的动态资源的标识加入资源下载队列;The first adding module 506 is configured to add the identifiers of the dynamic resources that are determined to be loaded into the resource download queue according to the order of the download weight values of the dynamic resources that are determined to be loaded from high to low;

所述运行下载模块可以包括:The running download module can include:

资源判断子模块,用于所述队列管理进程依次判断所述IE缓存中是否包括所述资源下载队列中的标识对应的动态资源;The resource judging sub-module is used for the queue management process to sequentially judge whether the dynamic resource corresponding to the identifier in the resource download queue is included in the IE cache;

发送子模块,用于当所述资源判断子模块的判断结果为不包括时,所述队列管理进程向资源服务器发送包括所述标识的资源下载请求;A sending submodule, configured to send a resource download request including the identifier to the resource server by the queue management process when the judgment result of the resource judging submodule is not included;

下载子模块,用于所述队列管理进程从资源服务器下载所述资源下载请求中的标识对应的动态资源。The download submodule is used for the queue management process to download the dynamic resource corresponding to the identifier in the resource download request from the resource server.

运行加载模块507,用于应用运行进程加载所述IE缓存中的动态资源,并用加载的动态资源替换所述替代资源。The running loading module 507 is used for loading the dynamic resource in the IE cache by the application running process, and replacing the substitute resource with the loaded dynamic resource.

本发明实施例中,所述动态资源还可以包括临时加载的动态资源,所述系统还可以包括:In the embodiment of the present invention, the dynamic resources may also include temporarily loaded dynamic resources, and the system may also include:

发送模块508,用于在应用运行过程中,当需要下载临时加载的动态资源时,所述应用运行进程向所述队列管理进程发送包括所述临时加载的动态资源标识的资源下载请求;The sending module 508 is configured to send a resource download request including the identifier of the temporarily loaded dynamic resource to the queue management process when the temporarily loaded dynamic resource needs to be downloaded during the running process of the application;

标识判断模块509,用于所述队列管理进程判断所述资源下载队列中是否存在所述临时加载的动态资源的标识;An identifier judging module 509, configured for the queue management process to judge whether there is an identifier of the temporarily loaded dynamic resource in the resource download queue;

第二设定模块510,用于当所述标识判断模块的判断结果为不存在时,根据所述临时加载的动态资源对应的功能优先级和显示区域规则,设定所述临时加载的动态资源的下载权重值;The second setting module 510 is configured to set the temporarily loaded dynamic resource according to the function priority and display area rules corresponding to the temporarily loaded dynamic resource when the judgment result of the identification judging module is non-existent The download weight value of ;

第二加入模块511,用于所述队列管理进程按照所述临时加载的动态资源的下载权重值将所述临时加载的动态资源的标识插入到资源下载队列中。The second adding module 511 is used for the queue management process to insert the identifier of the temporarily loaded dynamic resource into the resource download queue according to the download weight value of the temporarily loaded dynamic resource.

本发明实施例通过将应用中需要调用的资源划分为固定资源和动态资源,其中固定资源以本地客户端为平台进行处理,动态资源以IE缓存为平台进行处理,形成跨平台的资源管理方式。从而可以在应用的加载过程和运行过程中分别从两个平台获取资源,避免了通过单一平台进行资源管理时,由于存储空间、网络、带宽等问题而影响应用正常运行的问题。其次,本发明实施例在以IE缓存为平台管理动态资源时,利用排队逻辑对动态资源依据下载权重值进行排序,从而形成符合应用运行需求的资源下载队列,下载权重值高的动态资源优先下载,提升了用户的体验。The embodiment of the present invention divides the resources that need to be called in the application into fixed resources and dynamic resources, wherein the fixed resources are processed by the local client as the platform, and the dynamic resources are processed by the IE cache as the platform, forming a cross-platform resource management method. In this way, resources can be obtained from the two platforms during the loading process and running process of the application, avoiding the problem of affecting the normal operation of the application due to problems such as storage space, network, and bandwidth when managing resources through a single platform. Secondly, when managing dynamic resources on the platform of IE cache, the embodiment of the present invention uses queuing logic to sort the dynamic resources according to the download weight value, thereby forming a resource download queue that meets the application operation requirements, and the dynamic resources with high download weight values are downloaded first. , which improves the user experience.

对于系统实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the related parts, please refer to the part of the description of the method embodiment.

本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.

本发明实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本发明,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。Embodiments of the invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first and second etc. are only used to distinguish one entity or operation from another, and do not necessarily require or imply that these entities or operations, any such actual relationship or order exists. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of, or also include elements inherent in, such a process, method, commodity, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

以上对本发明所提供的一种跨平台资源管理方法和系统,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The above is a detailed introduction to a cross-platform resource management method and system provided by the present invention. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only used to help understand the present invention. The method of the invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, the content of this specification should not be understood To limit the present invention.

Claims (10)

1. A cross-platform resource management method is characterized by comprising the following steps:
dividing resources needing to be called in an application into fixed resources and dynamic resources;
storing the fixed resources to a local client by taking the local client as a platform;
starting an application loading process, loading fixed resources in the local client and substitute resources preset in the local client through the application loading process, wherein the substitute resources are used for substituting the dynamic resources;
after the fixed resources and the alternative resources are loaded, starting an application running process to run the application; starting a queue management process, and downloading the dynamic resource from a resource server through the queue management process;
storing the downloaded dynamic resources to an IE cache by taking the IE cache as a platform;
and the application running process loads the dynamic resources in the IE cache and replaces the substitute resources with the loaded dynamic resources.
2. The method of claim 1, wherein the dynamic resource comprises one or more dynamic resources that are determined to be loaded, each dynamic resource corresponding to an identifier,
before downloading the dynamic resource from a resource server through the queue management process, the method further comprises:
acquiring function priority and display area rule corresponding to each dynamic resource which is determined to be loaded;
setting a downloading weight value of each dynamic resource to be loaded according to the function priority and the display area rule corresponding to each dynamic resource to be loaded;
and adding the identifier of the dynamic resource to be loaded into a resource downloading queue according to the sequence of the downloading weight value of the dynamic resource to be loaded from high to low.
3. The method of claim 2, wherein said downloading the dynamic resource from a resource server by the queue management process comprises:
the queue management process sequentially judges whether the IE cache comprises the dynamic resources corresponding to the identifiers in the resource downloading queue;
if not, the queue management process sends a resource downloading request comprising the identifier to a resource server;
the queue management process downloads the dynamic resource corresponding to the identifier in the resource downloading request from the resource server;
and if so, not downloading the dynamic resource corresponding to the identifier again.
4. The method of claim 2, wherein the dynamic resource further comprises a temporarily loaded dynamic resource, the method further comprising:
in the application running process, when the temporarily loaded dynamic resource needs to be downloaded, the application running process sends a resource downloading request comprising the temporarily loaded dynamic resource identifier to the queue management process;
the queue management process judges whether the identifier of the temporarily loaded dynamic resource exists in the resource downloading queue;
if not, setting a downloading weight value of the temporarily loaded dynamic resource according to the function priority and the display area rule corresponding to the temporarily loaded dynamic resource;
and the queue management process inserts the identifier of the temporarily loaded dynamic resource into a resource downloading queue according to the downloading weight value of the temporarily loaded dynamic resource.
5. The method according to claim 1, wherein the dividing of the resources that need to be called in the application into fixed resources and dynamic resources comprises:
acquiring the change frequency of resources needing to be called in the application;
determining the resources with the change frequency less than or equal to a preset threshold value in the resources needing to be called in the application as fixed resources;
and determining the resources with the change frequency larger than the preset threshold value in the resources needing to be called in the application as dynamic resources.
6. A cross-platform resource management system, comprising:
the dividing module is used for dividing resources needing to be called in the application into fixed resources and dynamic resources; storing the fixed resources to a local client by taking the local client as a platform;
the starting loading module is used for starting an application loading process, loading fixed resources in the local client and substitute resources preset in the local client through the application loading process, wherein the substitute resources are used for substituting the dynamic resources;
the running downloading module is used for starting an application running process and running the application after the fixed resource and the alternative resource are loaded; starting a queue management process, and downloading the dynamic resource from a resource server through the queue management process; storing the downloaded dynamic resources to an IE cache by taking the IE cache as a platform;
and the running loading module is used for loading the dynamic resources in the IE cache by applying a running process and replacing the substitute resources by the loaded dynamic resources.
7. The system of claim 6, wherein the dynamic resource comprises one or more dynamic resources that are determined to be loaded, each dynamic resource corresponding to an identifier,
the system further comprises:
an obtaining module, configured to obtain, before downloading the dynamic resource from a resource server through the queue management process, a function priority and a display area rule corresponding to each dynamic resource that is determined to be loaded;
the first setting module is used for setting a downloading weight value of each dynamic resource which is determined to be loaded according to the function priority and the display area rule corresponding to each dynamic resource which is determined to be loaded;
and the first adding module is used for adding the identifier of the dynamic resource which is determined to be loaded into the resource downloading queue according to the sequence from high to low of the downloading weight value of the dynamic resource which is determined to be loaded.
8. The system of claim 7, wherein the run download module comprises:
a resource judgment submodule, configured to sequentially judge, by the queue management process, whether the IE cache includes a dynamic resource corresponding to the identifier in the resource download queue;
the sending submodule is used for sending a resource downloading request comprising the identifier to a resource server by the queue management process when the judgment result of the resource judgment submodule is that the resource is not included;
and the downloading submodule is used for downloading the dynamic resource corresponding to the identifier in the resource downloading request from the resource server by the queue management process.
9. The system of claim 7, wherein the dynamic resource further comprises a temporarily loaded dynamic resource, the system further comprising:
a sending module, configured to send, in an application running process, a resource downloading request including an identifier of a temporarily loaded dynamic resource to the queue management process when the temporarily loaded dynamic resource needs to be downloaded;
an identifier determining module, configured to determine, by the queue management process, whether an identifier of the temporarily loaded dynamic resource exists in the resource download queue;
the second setting module is used for setting a downloading weight value of the temporarily loaded dynamic resource according to the function priority and the display area rule corresponding to the temporarily loaded dynamic resource when the judgment result of the identification judgment module is that the temporary loaded dynamic resource does not exist;
and the second adding module is used for inserting the identifier of the temporarily loaded dynamic resource into a resource downloading queue by the queue management process according to the downloading weight value of the temporarily loaded dynamic resource.
10. The system of claim 6, wherein the partitioning module comprises:
the frequency acquisition submodule is used for acquiring the change frequency of the resource needing to be called in the application;
the division submodule is used for determining the resources of which the change frequency is less than or equal to a preset threshold value in the resources needing to be called in the application as fixed resources; and determining the resources with the change frequency larger than the preset threshold value in the resources needing to be called in the application as dynamic resources.
CN201310111506.5A 2013-04-01 2013-04-01 A kind of cross-platform method for managing resource and system Expired - Fee Related CN104104645B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310111506.5A CN104104645B (en) 2013-04-01 2013-04-01 A kind of cross-platform method for managing resource and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310111506.5A CN104104645B (en) 2013-04-01 2013-04-01 A kind of cross-platform method for managing resource and system

Publications (2)

Publication Number Publication Date
CN104104645A true CN104104645A (en) 2014-10-15
CN104104645B CN104104645B (en) 2017-08-25

Family

ID=51672449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310111506.5A Expired - Fee Related CN104104645B (en) 2013-04-01 2013-04-01 A kind of cross-platform method for managing resource and system

Country Status (1)

Country Link
CN (1) CN104104645B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104503784A (en) * 2014-12-16 2015-04-08 珠海金山网络游戏科技有限公司 Method and system for controlling micro-client downloading by using script
CN105635264A (en) * 2016-03-28 2016-06-01 庄铭宇 File system based on network game application
CN109513213A (en) * 2018-11-13 2019-03-26 广州互爱信息科技有限公司 A kind of hand trip subpackage download technology method
CN109814884A (en) * 2018-12-27 2019-05-28 珠海西山居互动娱乐科技有限公司 A kind of method and system carrying out resource management according to game resource type
CN109889608A (en) * 2019-03-29 2019-06-14 北京金山安全软件有限公司 Dynamic resource loading method and device, electronic equipment and storage medium
CN112988284A (en) * 2021-05-13 2021-06-18 太平金融科技服务(上海)有限公司 Application program starting method and device, computer equipment and storage medium
CN113111078A (en) * 2021-06-15 2021-07-13 深圳华锐金融技术股份有限公司 Resource data processing method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7207041B2 (en) * 2001-06-28 2007-04-17 Tranzeo Wireless Technologies, Inc. Open platform architecture for shared resource access management
CN102081650A (en) * 2010-12-29 2011-06-01 上海网达软件有限公司 Method for rapidly displaying user interface of embedded type platform
CN102081528A (en) * 2009-11-26 2011-06-01 冼剑光 Method for running large-scale software being loaded
CN102238156A (en) * 2010-05-07 2011-11-09 盛乐信息技术(上海)有限公司 Online game client side resource downloading method
CN102368250A (en) * 2011-09-26 2012-03-07 奇智软件(北京)有限公司 Page downloading control method and system for IE (Internet Explore) kernel browser
CN102831182A (en) * 2012-07-31 2012-12-19 北京天神互动科技有限公司 Web resource data real-time loading system and web resource data real-time loading method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7207041B2 (en) * 2001-06-28 2007-04-17 Tranzeo Wireless Technologies, Inc. Open platform architecture for shared resource access management
CN102081528A (en) * 2009-11-26 2011-06-01 冼剑光 Method for running large-scale software being loaded
CN102238156A (en) * 2010-05-07 2011-11-09 盛乐信息技术(上海)有限公司 Online game client side resource downloading method
CN102081650A (en) * 2010-12-29 2011-06-01 上海网达软件有限公司 Method for rapidly displaying user interface of embedded type platform
CN102368250A (en) * 2011-09-26 2012-03-07 奇智软件(北京)有限公司 Page downloading control method and system for IE (Internet Explore) kernel browser
CN102831182A (en) * 2012-07-31 2012-12-19 北京天神互动科技有限公司 Web resource data real-time loading system and web resource data real-time loading method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104503784A (en) * 2014-12-16 2015-04-08 珠海金山网络游戏科技有限公司 Method and system for controlling micro-client downloading by using script
CN105635264A (en) * 2016-03-28 2016-06-01 庄铭宇 File system based on network game application
CN109513213A (en) * 2018-11-13 2019-03-26 广州互爱信息科技有限公司 A kind of hand trip subpackage download technology method
CN109814884A (en) * 2018-12-27 2019-05-28 珠海西山居互动娱乐科技有限公司 A kind of method and system carrying out resource management according to game resource type
CN109889608A (en) * 2019-03-29 2019-06-14 北京金山安全软件有限公司 Dynamic resource loading method and device, electronic equipment and storage medium
CN109889608B (en) * 2019-03-29 2021-12-10 北京金山安全软件有限公司 Dynamic resource loading method and device, electronic equipment and storage medium
CN112988284A (en) * 2021-05-13 2021-06-18 太平金融科技服务(上海)有限公司 Application program starting method and device, computer equipment and storage medium
CN113111078A (en) * 2021-06-15 2021-07-13 深圳华锐金融技术股份有限公司 Resource data processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN104104645B (en) 2017-08-25

Similar Documents

Publication Publication Date Title
CN104104645B (en) A kind of cross-platform method for managing resource and system
US8533714B2 (en) Dynamic virtual machine domain configuration and virtual machine relocation management
US20100287280A1 (en) System and method for cloud computing based on multiple providers
US8793684B2 (en) Optimized deployment and replication of virtual machines
CN106331065B (en) Proxy application and system for host system with service container
US20170168797A1 (en) Model-driven updates distributed to changing topologies
US7539762B2 (en) Method, system and program product for determining an initial number of connections for a multi-source file download
US20110276695A1 (en) Continuous upgrading of computers in a load balanced environment
US9710249B2 (en) Dynamic configuration of virtual appliances
US20140274408A1 (en) Methods and systems for provisioning a game container within a cloud computing system
CN103269347B (en) Method for optimizing resources, server, client and system are carried out based on server end
CN111045715A (en) A hot update method, system and readable storage medium for cloud games
US10466991B1 (en) Computing instance software package installation
CN104038520A (en) Multi-version distributed resource management method and multi-version distributed resource management system
CN109960579B (en) Method and device for adjusting service container
US10684840B1 (en) Software package installation and monitoring
US9934268B2 (en) Providing consistent tenant experiences for multi-tenant databases
Wu et al. Jump‐start cloud: efficient deployment framework for large‐scale cloud applications
CN105635264B (en) A File System Based on Network Game Application
JP5804192B2 (en) Information processing apparatus, information processing method, and information processing system
US20220188091A1 (en) Automatic self-adjusting software image recommendation
CN110740192A (en) A kind of image distribution method and system in a virtualized environment based on P2P network
WO2017031045A1 (en) Dynamically provisioning, managing, and executing tasks
CN113297158A (en) Cloud security product management method, device, equipment and storage medium
KR20110034083A (en) System for installing and updating games using P2P technology

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170825