Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Channel static resource loading method and device

A technology of static resources and channels, which is applied in the computer field, can solve problems such as the inability to evaluate and modify the scope of influence of business codes, and the interdependence between business JS files and channels is not clear, so as to achieve the effect of reducing the degree of coupling

Pending Publication Date: 2021-01-29
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] In view of this, the embodiment of the present invention provides a method and device for channel static resource loading, which can solve the problem that the reference relationship between the service JS file and the channel and the interdependence relationship between the services are not clear and clear, and the impact of modifying the service code cannot be evaluated range problem

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Channel static resource loading method and device
  • Channel static resource loading method and device
  • Channel static resource loading method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037]以下结合附图对本发明的示范性实施例做出说明,其中包括本发明实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本发明的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。

[0038]图1是现有技术中频道对业务JS文件的引用示意图,如图1所示,现有技术在管理后台的频道配置头部中使用标签引用该频道下所需要的业务JS文件,频道1通过标签表明频道1中需要引用业务1、业务3和业务4,频道2通过标签表明频道2中需要引用业务2、业务3和业务5,频道3通过标签表明频道3中需要引用业务1、业务3和业务6,只能通过具象的示意图而无法在频道配置的文件中明确获知频道1、频道2和频道3都需要引用业务3。通过标签在配置页面的前后位置来体现业务之间的依赖关系,例如,业务A依赖业务B,则业务B的业务JS文件的标签就要写在业务A的业务js文件的标签之前。

[0039]图2是现有技术中平台对频道配置的管理示意图。如图2所示,开发人员直接在管理后台修改频道信息,生成频道配置文件,将频道配置文件存入数据库中,从数据库中即时获取最新的频道配置文件,并根据修改后的频道信息更新该频道的页面,包含正在线上运营的页面。

[0040]图3是根据本发明实施例的频道静态资源加载的方法的基本流程的示意图。如图3所示,本发明实施例提供了一种频道静态资源加载的方法,包括:

[0041]步骤S301.基于频道的入口文件引入预设的静态资源配置文件;

[0042]步骤S302.根据所述频道的名称,从所述静态资源配置文件中确定所述频道的静态资源文件数组;其中,所述静态资源文件数组中包含频道与静态资源之间的引用关系和静态资源之间的依赖关系;

[0043]步骤S303.若所述静态资源文件数组包含设定字符,则依据所述频道与静态资源之间的引用关系和静态资源之间的依赖关系,遍历所述静态资源文件数组,并采用异步加载方式依次加载所述静态资源。

[0044]本发明实施例因为采用预先设置包含频道与静态资源之间的引用关系和静态资源之间的依赖关系的静态资源配置文件的技术手段,所以克服了静态资源与频道的引用关系和静态资源之间的相互依赖关系不清晰明确,且无法评估修改静态资源的影响范围的技术问题,进而达到业务对全部频道开放,降低业务与频道之...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a channel static resource loading method and device, and relates to the technical field of computers. One specific embodiment of the method comprises the following steps: introducing a preset static resource configuration file based on an entrance file of a channel; determining a static resource file array of the channel from the static resource configuration file accordingto the name of the channel, wherein the static resource file array comprises a reference relationship between the channel and the static resources and a dependency relationship between the static resources; and if the static resource file array contains the set characters, traversing the static resource file array according to the reference relationship between the channel and the static resources and the dependency relationship between the static resources, and sequentially loading the static resources by adopting an asynchronous loading mode. According to the embodiment, the technical effects that the service is open to all channels, and the coupling degree between the service and the channels is reduced are achieved, and the influence range of service code maintenance can also be quickly confirmed by adopting the configuration file to maintain the reference and dependency relationship.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for loading channel static resources. Background technique [0002] Usually there are many independent channels on the website platform, and each channel has its own interface (UI) style and page content, so the channel information such as the head, navigation, tail, and service of each channel is very different. , you can decorate the channel's activity page through the channel information. Currently, channel information files are maintained in the management background in a static HyperText Markup Language (HTML) manner, which is called channel configuration. In order to separate the static and dynamic front and back ends, the business code in the channel configuration is managed by the static resource server. There will be the same business between some channels, there will also be different business, and there is even a situation that the business is r...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/958
CPCG06F16/958
Inventor 李乔军
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products