CN107071007B - Method, device and client for obtaining configuration resources - Google Patents

Method, device and client for obtaining configuration resources Download PDF

Info

Publication number
CN107071007B
CN107071007B CN201710189356.8A CN201710189356A CN107071007B CN 107071007 B CN107071007 B CN 107071007B CN 201710189356 A CN201710189356 A CN 201710189356A CN 107071007 B CN107071007 B CN 107071007B
Authority
CN
China
Prior art keywords
static file
configuration
resource
server
storage space
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.)
Active
Application number
CN201710189356.8A
Other languages
Chinese (zh)
Other versions
CN107071007A (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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710189356.8A priority Critical patent/CN107071007B/en
Publication of CN107071007A publication Critical patent/CN107071007A/en
Application granted granted Critical
Publication of CN107071007B publication Critical patent/CN107071007B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Abstract

The invention discloses a method for acquiring configuration resources, which comprises the steps that a static file configuration server receives a configuration resource request message of a client, wherein the configuration resource request message comprises identification information of target configuration resources; searching a first storage space of the static file configuration server according to the identification information; obtaining a first static file in a static file set generated by the static file configuration server in advance from the first storage space, wherein the first static file comprises a target configuration resource; and sending the URL of the first static file to the client so that the client can call the target configuration resource through the URL. The method for acquiring the configuration resources solves the technical problems that the method for acquiring the configuration resources in the prior art cannot resist concurrency and easily causes memory cache penetration, and achieves the technical effect of acquiring the configuration resources with high concurrency.

Description

Method, device and client for obtaining configuration resources
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a client for acquiring configuration resources.
Background
With the development of live broadcast technology, the configuration requirements of clients on the background are higher and higher, and at present, many client configuration resources need to be available in the background, and the background needs to be configured in advance and changed regularly to meet the requirements of the clients, for example, in a live broadcast system, the resource configurations of various holiday logos, player animations, and broadcast gifts of a gifts system need to be configured in the background.
In the prior art, configuration resources required by a client are generally set in a background and then stored in a memory cache, a corresponding cache interface is provided for the client to call, and the client reads the configuration resources in the memory through the upper cache interface.
However, the applicant finds that, in the above method, when a large number of clients simultaneously need to request for resource allocation, the memory cache cannot satisfy the concurrent requests, and the memory cache is easily penetrated. Therefore, the method for acquiring the configuration resources in the prior art has the technical problems that concurrency cannot be resisted and memory cache penetration is easily caused.
Disclosure of Invention
The invention provides a method, a device and a client for acquiring configuration resources, which are used for solving the technical problems that the concurrent amount cannot be resisted and the penetration of a memory cache is easily caused in the method for acquiring the configuration resources in the prior art.
In a first aspect, an embodiment of the present invention provides a method for acquiring configuration resources, including:
a static file configuration server receives a configuration resource request message of a client, wherein the configuration resource request message comprises identification information of a target configuration resource;
searching a first storage space of the static file configuration server according to the identification information;
obtaining a first static file in a static file set generated by the static file configuration server in advance from the first storage space, wherein the first static file comprises a target configuration resource;
and sending the URL of the first static file to the client so that the client can call the target configuration resource through the URL.
Optionally, before the obtaining, according to the identification information, a first static file in a static file set generated by the static file configuration server in advance, the method further includes:
searching whether a second static file corresponding to the identification information exists in a second storage space of the static file configuration server, wherein the second static file is a backup of the first static file;
if the second static file exists, the URL of the second static file is sent to a client;
if not, searching the first storage space of the static file configuration server.
Optionally, after sending the URL of the first static file to the client, the method further includes:
and sending the first static file to a CDN server.
Based on the same inventive concept, another method for acquiring configuration resources is provided in the embodiments of the present invention, including:
a CDN server receives a configuration resource request message sent by a client;
sending the configuration resource request message to a static file configuration server, wherein the configuration resource request message comprises identification information of a target configuration resource;
and receiving a first static file sent by the static file configuration server, wherein the first static file comprises a target configuration resource corresponding to the identification information.
Optionally, before the sending the configuration resource request message to the static file configuration server, the method further includes:
searching whether the static file corresponding to the identification information exists in a third storage space of the CND server or not;
if the static file exists, the URL of the static file is sent to the client;
and if the static file does not exist, sending the configuration resource request message to the static file configuration server.
Based on the same inventive concept, an embodiment of the present invention provides another method for acquiring configuration resources, including:
a client sends a configuration resource request message to a CDN server so that the CDN server forwards the configuration resource to a static file configuration server, wherein the configuration resource request message comprises identification information of a target configuration resource;
the client receives a URL of a first static file in a static file set generated by the static file configuration server in advance, wherein the first static file comprises a target configuration resource corresponding to the identification information;
based on the URL, the target configuration resource is invoked.
Based on the same inventive concept, an embodiment of the present invention provides an apparatus for acquiring configuration resources, where the apparatus is a static file configuration server, and the apparatus includes:
a first receiving module, configured to receive a configuration resource request message of a client, where the configuration resource request message includes identification information of a target configuration resource;
the first searching module is used for searching the first storage space of the static file configuration server according to the identification information;
an obtaining module, configured to obtain a first static file in a static file set generated by the static file configuration server in advance from the first storage space, where the first static file includes a target configuration resource;
and the first sending module is used for sending the URL of the first static file to the client so that the client can call the target configuration resource through the URL.
Optionally, the static file configuration server further includes:
a second searching module, configured to search whether a second static file corresponding to the identification information exists in a second storage space of the static file configuration server before obtaining a first static file in a static file set generated by the static file configuration server in advance according to the identification information, where the second static file is a backup of the first static file; if the second static file exists, returning the URL of the second static file to the client; if not, searching the first storage space of the static file configuration server.
Based on the same inventive concept, an embodiment of the present invention provides an apparatus for obtaining configured resources, where the apparatus is a CDN server, and the apparatus includes:
the second receiving module is used for receiving a resource configuration request message sent by the client;
a second sending module, configured to send the resource configuration request message to a static file configuration server, where the resource configuration request message includes identification information of a target configuration resource;
a third receiving module, configured to receive a first static file sent by the static file configuration server, where the first static file includes a target configuration resource corresponding to the identification information.
Based on the same inventive concept, an embodiment of the present invention provides a client, including:
a third sending module, configured to send a resource configuration request message to a CDN server, so that the CDN server forwards the configuration resource to a static file configuration server, where the resource configuration request message includes identification information of a target configuration resource;
a fourth receiving module, configured to receive a URL of a first static file in a static file set generated in advance by a static file configuration server, where the first static file includes a target configuration resource corresponding to the identification information;
and the calling module is used for calling the target configuration resource based on the URL.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
according to the method provided by the embodiment of the invention, the static file set is pre-stored in the first storage space of the static file configuration server, and then the URL of the first static file is sent to the client, so that the client can call the target configuration resource through the URL. The static file configuration server accesses the static file configuration server instead of the memory cache after receiving the configuration resource request message, so that the problem that the memory cache is easy to penetrate is solved, and after the static file configuration server receives the configuration resource request message of the client, the first storage space of the static file configuration server is searched according to the identification information in the configuration resource request; obtaining a first static file corresponding to the identification information from the first storage space, wherein the first static file comprises a target configuration resource; therefore, when a large number of clients request to configure resources, the static file configuration server can provide corresponding static files, and the technical effect of high-concurrency resource configuration acquisition is achieved. The method solves the technical problems that the concurrency cannot be resisted and the penetration of the memory cache is easily caused in the acquisition mode of the configuration resources in the prior art.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for acquiring configuration resources according to an embodiment of the present invention;
FIG. 2 is a flow chart of static file configuration according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for obtaining configured resources according to an embodiment of the present invention;
FIG. 4 is a flowchart of another method for acquiring configuration resources according to an embodiment of the present invention;
FIG. 5 is an interaction flow diagram of a method for obtaining configuration resources according to an embodiment of the present invention;
FIG. 6 is a logical block diagram of a static file configuration server according to an embodiment of the present invention;
FIG. 7 is a logical block diagram of a CDN server in an embodiment of the present invention;
fig. 8 is a logical structure diagram of the client in the embodiment of the present invention.
Detailed Description
The embodiment of the application provides a method, a device and a client for acquiring configured resources, solves the technical problems that the method for acquiring configured resources in the prior art cannot resist concurrency and is easy to cause memory cache penetration, and achieves the technical effect of high-concurrency acquisition.
The technical scheme in the embodiment of the application has the following general idea:
a static file configuration server receives a configuration resource request message of a client, wherein the configuration resource request message comprises identification information of a target configuration resource; searching a first storage space of the static file configuration server according to the identification information; obtaining a first static file in a static file set generated by the static file configuration server in advance from the first storage space, wherein the first static file comprises a target configuration resource; and sending the URL of the first static file to the client so that the client can call the target configuration resource through the URL.
According to the method, after the static file configuration server receives the configuration resource request message of the client, the first static file corresponding to the identification information in the configuration resource request message is searched in the first storage space, the first static file comprises the target configuration resource, and then the URL of the first static file is sent to the client, so that the client can call the target configuration resource through the URL. The method solves the technical problems that the concurrency cannot be resisted and the penetration of the memory cache is easily caused in the acquisition mode of the configuration resources in the prior art.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The present embodiment provides a method for acquiring configuration resources, please refer to fig. 1, where the method includes:
s101: a static file configuration server receives a configuration resource request message of a client, wherein the configuration resource request message comprises identification information of a target configuration resource;
s102: searching a first storage space of the static file configuration server according to the identification information;
s103: obtaining a first static file in a static file set generated by the static file configuration server in advance from the first storage space, wherein the first static file comprises a target configuration resource;
s104: and sending the URL of the first static file to the client so that the client can call the target configuration resource through the URL.
The following describes in detail, with reference to fig. 1, specific implementation steps of a method for acquiring configuration resources according to an embodiment of the present application:
first, step S101 is executed, in which the static file configuration server receives a configuration resource request message of a client, where the configuration resource request message includes identification information of a target configuration resource.
In the embodiment of the present application, the resource configuration request message received by the static file configuration server may be directly sent by the client, or may be sent by the client to the CDN server first, and then forwarded to the static file configuration server by the CDN server. The configuration resources comprise logos of various festivals, player animations and the like, and the identification information is information which can uniquely determine the configuration resources. Of course, in the specific implementation process, a person skilled in the art may set the specific content of the configuration resource according to the actual requirement, and the present invention is not limited thereto.
Then, step S102 is executed to search the first storage space of the static file configuration server according to the identification information.
In this embodiment of the application, the first storage space is a part of space in the static file configuration server, and may be, for example, a folder, and preferably, when the first storage space is a folder, the first storage space may be classified according to a site, a service, an item, a module, a function, and the like of the configuration resource, so as to improve the acquisition speed.
Then, step S103 is executed to obtain a first static file in a static file set generated by the static file configuration server in advance from the first storage space, where the first static file includes a target configuration resource.
It should be noted that, in the existing method, after a client sends a configuration resource request message, a corresponding target configuration resource needs to be called in a memory cache, and only some configuration resources that need to be frequently used are stored in the memory cache, when a large number of clients send configuration resource request messages at the same time, because of different requirements of different clients, when one client requests configuration resource a, it is first searched for whether the configuration resource a exists in the memory cache, if so, it returns, if not, the memory cache needs to send a request to a background database, when the memory cache sends a request, there are different clients requesting configuration resources B, C, and so on; at this time, whether the configuration resource B, C exists in the memory cache is also searched, and the memory cache needs to do the same operation, which may cause a large number of links in the memory cache, for example, when the background database returns the configuration resource B, a part of the contents of the memory cache is covered, so the configuration resource A, C may not respond, and thus a problem of memory cache penetration is easily caused, that is, the memory cache does not work, an operation of sending a data request to the database is always performed, which is not favorable for concurrent requests of a large number of clients.
In an embodiment of the present application, a static file set is generated in advance by a static file configuration server, and the static file set is stored in the first storage space, and the static file set is set in advance and includes all required target configuration resources. Therefore, after receiving a resource configuration request of a client, the static file configuration server does not call required configuration resources in the memory cache, but returns a corresponding static file according to identification information of the resource configuration request when a large number of clients send the resource configuration request, and since the static file contains target configuration resources, the speed of reading the static file is far higher than that of reading a background database, the technical effect of high concurrency is achieved macroscopically, and the technical problems that the concurrency cannot be resisted and the memory cache is easy to penetrate in an acquisition mode of the configuration resources in the prior art are solved.
In a specific implementation process, a process of setting a static file by a static file configuration server is shown in fig. 2, a configuration resource can be configured manually from a background, and then the configuration resource is saved in data for backup, a static file configuration system receives request parameters of the background, writes the configuration resource in the static file, and saves the configuration resource in a folder, wherein the static file can be saved in a jason file form, and JSON (JavaScript Object notification, JSON Object tag) is a lightweight data exchange format. It stores and represents data in a text format that is completely independent of the programming language, based on a subset of the ECMAScript specification. When a static file is set, the size of a single static file is controlled within 100kb, when the static file is set, in order to ensure the security, the written configuration information needs to be examined, and illegal sensitive information is prevented from being filled, and in order to prevent malicious attacks, when the static file is set, strict Cross Site Scripting (Cross Site Scripting) is required.
And finally, executing the step S104, and sending the URL of the first static file to the client so that the client can call the target configuration resource through the URL.
In a specific implementation process, the static file configuration server may directly send the URL of the first static file to the client, or may forward the URL through another server, where the URL of the first static file may be a path or a storage address of the static file, and the URL includes information that the corresponding static file can be found, which is not limited specifically herein.
As can be seen from the above description, after receiving the resource configuration request message, the static file configuration server sends the static file containing the target configuration resource to the client, the client does not call the configuration resource in the memory-free cache, and when a large number of clients request the configuration resource, the static file configuration server can provide the corresponding static file, thereby achieving the technical effect of obtaining the highly concurrent configuration resource. The method solves the technical problems that the concurrency cannot be resisted and the penetration of the memory cache is easily caused in the acquisition mode of the configuration resources in the prior art. Practice proves that the query rate per second QPS of a single server is above 50000, the requirement of a total station can be met, and the configuration resources can be acquired at high concurrency.
Optionally, in a method for obtaining configured resources provided in an embodiment of the present application, before obtaining, according to the identification information, a first static file in a static file set generated by the static file configuration server in advance, the method further includes:
searching whether a second static file corresponding to the identification information exists in a second storage space of the static file configuration server, wherein the second static file is a backup of the first static file;
if the second static file exists, the URL of the second static file is sent to a client;
if not, searching the first storage space of the static file configuration server.
In this embodiment of the present application, a second storage space may be added to store a static file, specifically, the second storage space is a cache of the first storage space, and stores a part of the static file set in the first storage space, the cache mechanism may be set according to an existing cache mechanism, the update time of the cache may also be designed as needed, and the speed of obtaining the configuration resource may be increased through the second storage space.
Optionally, in the method for acquiring configuration resources provided in an embodiment of the present application, after sending the URL of the first static file to the client, the method further includes:
and sending the first static file to a CDN server.
In the embodiment of the application, because the first static file is accessed latest, the first static file is sent to the CDN server to update the storage of the CDN server, so that the first static file can be directly sent to the client by the CDN server when the client requests the first static file next time, thereby improving the acquisition speed of the configuration resource.
Example two
Based on the same inventive concept as the first embodiment of the present invention, the second embodiment provides a method for obtaining configuration resources from the perspective of a CDN server, please refer to fig. 3, where the method includes:
s201: a CDN server receives a configuration resource request message sent by a client;
s202: sending the configuration resource request message to a static file configuration server, wherein the configuration resource request message comprises identification information of a target configuration resource;
s203: and receiving a first static file sent by the static file configuration server, wherein the first static file comprises a target configuration resource corresponding to the identification information.
In this embodiment of the application, the CDN server is configured to forward a resource configuration request message sent by the client to the static file configuration server, and features such as the first static file are the same as those in the first embodiment and are not described herein again.
In the method provided in this embodiment, before sending the resource configuration request message to the static file configuration server, the method further includes:
searching whether the static file corresponding to the identification information exists in a third storage space of the CND server or not;
if the static file exists, the URL of the static file is sent to the client;
and if the static file does not exist, sending the configuration resource request message to the static file configuration server.
In the embodiment of the application, the CDN server may first search whether the static file corresponding to the identification information exists in a third storage space, and if so, the CDN server directly sends the URL of the static file to the client; and the static file configuration server is not required to be passed through, and if the static file configuration server does not exist, the configuration resource request message is sent to the static file configuration server. As can be seen from the above, the static file configuration server can be accessed as a source return of the CDN server, so that the pressure of returning to the source through a memory in the prior art can be relieved, and the speed and efficiency of acquiring the configuration resource can be improved.
Based on the same inventive concept as the implementation of the present invention, the third embodiment provides a method for acquiring configuration resources from the perspective of a client, please refer to fig. 4, where the method includes:
s301: a client sends a configuration resource request message to a CDN server so that the CDN server forwards the configuration resource to a static file configuration server, wherein the configuration resource request message comprises identification information of a target configuration resource;
s302: the client receives a URL of a first static file in a static file set generated by the static file configuration server in advance, wherein the first static file comprises a target configuration resource corresponding to the identification information;
s303: based on the URL, the target configuration resource is invoked.
After the method for acquiring configuration resources provided by the present application is introduced from the perspective of the static file configuration server, the CDN server, and the client, the present application further provides a system for acquiring configuration resources, which includes the static file configuration server, the CDN server, and the client, and a specific flow of the method for acquiring configuration resources in a preferred embodiment of the present application is described below by using an integrated interaction example, specifically referring to fig. 5:
the client sends out a resource configuration request message, the CDN server receives the resource configuration request message from the client and searches whether a static file corresponding to the resource configuration request message exists in a third storage space, if so, the URL of the static file in the third storage space is sent to the client, if not, the resource configuration request message is forwarded to a static file configuration server, at the moment, the static file configuration server firstly searches whether a second static file corresponding to the identification information exists in a second storage space of the static file configuration server, and if so, the URL of the second static file is sent to the client; if the static file configuration server does not exist, the first storage space of the static file configuration server is searched, a first static file in a static file set generated by the static file configuration server in advance is obtained from the first storage space, and then the URL of the first static file is sent to the client, so that the client can call the target configuration resource through the URL and display the target configuration resource at the client.
Example four
Based on the same inventive concept as the first embodiment of the present invention, a fourth embodiment provides a device for acquiring configured resources, where the device is a static file configuration server, please refer to fig. 6, and the device includes:
a first receiving module 101, configured to receive a configuration resource request message of a client, where the configuration resource request message includes identification information of a target configuration resource;
a first searching module 102, configured to search the first storage space of the static file configuration server according to the identification information;
an obtaining module 103, configured to obtain, from the first storage space, a first static file in a static file set generated by the static file configuration server in advance, where the first static file includes a target configuration resource;
a first sending module 104, configured to send the URL of the first static file to the client, so that the client can call the target configuration resource through the URL.
The foregoing static file configuration server provided by the present application further includes:
a second searching module, configured to search whether a second static file corresponding to the identification information exists in a second storage space of the static file configuration server before obtaining a first static file in a static file set generated by the static file configuration server in advance according to the identification information, where the second static file is a backup of the first static file; if the second static file exists, returning the URL of the second static file to the client; if not, searching the first storage space of the static file configuration server.
EXAMPLE five
Based on the same concept as the second embodiment of the present invention, the fourth embodiment provides a device for acquiring configured resources, where the device is a CDN server, and please refer to fig. 7, where the device includes:
a second receiving module 201, configured to receive a configuration resource request message sent by a client;
a second sending module 202, configured to send the configuration resource request message to a static file configuration server, where the configuration resource request message includes identification information of a target configuration resource;
a third receiving module 203, configured to receive a first static file sent by the static file configuration server, where the first static file includes a target configuration resource corresponding to the identification information.
EXAMPLE six
Based on the same inventive concept as the third embodiment of the present invention, the sixth embodiment provides a client, please refer to fig. 8, which includes:
a third sending module 301, configured to send a resource configuration request message to a CDN server, so that the CDN server forwards the configuration resource to a static file configuration server, where the resource configuration request message includes identification information of a target configuration resource;
a fourth receiving module 302, configured to receive a URL of a first static file in a static file set generated in advance by a static file configuration server, where the first static file includes a target configuration resource corresponding to the identification information;
and the calling module 303 is configured to call the target configuration resource based on the URL.
Various changes and specific examples of the method for obtaining configuration resources in embodiments 1 to 3 are also applicable to the static file configuration server, the CDN server and the client in this embodiment, and through the foregoing detailed description of the method for obtaining configuration resources, those skilled in the art can clearly know the static file configuration server, the CDN server and the client in this embodiment, so for the sake of brevity of the description, detailed descriptions are not provided here.
One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
according to the method provided by the embodiment of the invention, the static file set is pre-stored in the first storage space of the static file configuration server, and then the URL of the first static file is sent to the client, so that the client can call the target configuration resource through the URL. The static file configuration server accesses the static file configuration server instead of the memory cache after receiving the configuration resource request message, so that the problem that the memory cache is easy to penetrate is solved, and after the static file configuration server receives the configuration resource request message of the client, the first storage space of the static file configuration server is searched according to the identification information in the configuration resource request; obtaining a first static file corresponding to the identification information from the first storage space, wherein the first static file comprises a target configuration resource; therefore, when a large number of clients request to configure resources, the static file configuration server can provide corresponding static files, and the technical effect of high-concurrency resource configuration acquisition is achieved. The method solves the technical problems that the concurrency cannot be resisted and the penetration of the memory cache is easily caused in the acquisition mode of the configuration resources in the prior art.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the spirit or scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (10)

1. A method for obtaining configuration resources, comprising:
a static file configuration server receives a configuration resource request message of a client, wherein the configuration resource request message comprises identification information of a target configuration resource;
searching a first storage space of the static file configuration server according to the identification information;
obtaining a first static file in a static file set generated by the static file configuration server in advance from the first storage space, wherein the first static file comprises a target configuration resource, and the static file set is set in the following way: receiving request parameters of a background, writing configuration resources configured manually by the background into a static file, and storing the static file written into the configuration resources into the first storage space, wherein the configuration resources comprise holiday logos and player animations of a live broadcast system;
and sending the URL of the first static file to the client so that the client can call the target configuration resource through the URL.
2. The method according to claim 1, wherein before obtaining the first static file in the static file set generated by the static file configuration server in advance according to the identification information, the method further comprises:
searching whether a second static file corresponding to the identification information exists in a second storage space of the static file configuration server, wherein the second static file is a backup of the first static file;
if the second static file exists, the URL of the second static file is sent to a client;
if not, searching the first storage space of the static file configuration server.
3. The method of claim 1, after sending the URL of the first static file to a client, further comprising:
and sending the first static file to a CDN server.
4. A method for obtaining configuration resources, comprising:
a CDN server receives a configuration resource request message sent by a client;
sending the configuration resource request message to a static file configuration server, wherein the configuration resource request message includes identification information of a target configuration resource, the static file configuration server searches a first storage space of the static file configuration server according to the identification information, and obtains a first static file in a static file set generated by the static file configuration server in advance from the first storage space, and the static file set is set in the following way: receiving request parameters of a background, writing configuration resources configured manually by the background into a static file, and storing the static file written into the configuration resources into the first storage space, wherein the configuration resources comprise holiday logos and player animations of a live broadcast system;
and receiving a first static file sent by the static file configuration server, wherein the first static file comprises a target configuration resource corresponding to the identification information.
5. The method of claim 4, prior to said sending the configure resource request message to a static file configuration server, further comprising:
searching whether the static file corresponding to the identification information exists in a third storage space of the CDN server or not;
if the static file exists, the URL of the static file is sent to the client;
and if the static file does not exist, sending the configuration resource request message to the static file configuration server.
6. A method for obtaining configuration resources, comprising:
a client sends a resource configuration request message to a CDN server, so that the CDN server forwards the resource configuration request message to a static file configuration server, where the resource configuration request message includes identification information of a target configuration resource, and the static file configuration server searches a first storage space of the static file configuration server according to the identification information, and obtains a first static file in a static file set generated by the static file configuration server in advance from the first storage space, where the static file set is set in the following manner: receiving request parameters of a background, writing configuration resources configured manually by the background into a static file, and storing the static file written into the configuration resources into the first storage space, wherein the configuration resources comprise holiday logos and player animations of a live broadcast system;
the client receives a URL of a first static file in a static file set generated by the static file configuration server in advance, wherein the first static file comprises a target configuration resource corresponding to the identification information;
based on the URL, the target configuration resource is invoked.
7. An apparatus for obtaining configuration resources, the apparatus being a static file configuration server, comprising:
a first receiving module, configured to receive a configuration resource request message of a client, where the configuration resource request message includes identification information of a target configuration resource;
the first searching module is used for searching a first storage space of the static file configuration server according to the identification information;
an obtaining module, configured to obtain, from the first storage space, a first static file in a static file set generated by the static file configuration server in advance, where the first static file includes a target configuration resource, and the static file set is set in the following manner: receiving request parameters of a background, writing configuration resources configured manually by the background into a static file, and storing the static file written into the configuration resources into the first storage space, wherein the configuration resources comprise holiday logos and player animations of a live broadcast system;
and the first sending module is used for sending the URL of the first static file to the client so that the client can call the target configuration resource through the URL.
8. The apparatus of claim 7, further comprising:
a second searching module, configured to search whether a second static file corresponding to the identification information exists in a second storage space of the static file configuration server before obtaining a first static file in a static file set generated by the static file configuration server in advance according to the identification information, where the second static file is a backup of the first static file; if the second static file exists, returning the URL of the second static file to the client; if not, searching the first storage space of the static file configuration server.
9. An apparatus for obtaining configured resources, the apparatus being a CDN server, comprising:
the second receiving module is used for receiving a resource configuration request message sent by the client;
a second sending module, configured to send the resource configuration request message to a static file configuration server, where the resource configuration request message includes identification information of a target configuration resource, and the static file configuration server searches a first storage space of the static file configuration server according to the identification information, and obtains a first static file in a static file set generated by the static file configuration server in advance from the first storage space, where the static file set is set in the following manner: receiving request parameters of a background, writing configuration resources configured manually by the background into a static file, and storing the static file written into the configuration resources into the first storage space, wherein the configuration resources comprise holiday logos and player animations of a live broadcast system;
a third receiving module, configured to receive a first static file sent by the static file configuration server, where the first static file includes a target configuration resource corresponding to the identification information.
10. A client, comprising:
a third sending module, configured to send a resource configuration request message to a CDN server, so that the CDN server forwards the resource configuration request message to a static file configuration server, where the resource configuration request message includes identification information of a target configuration resource, and the static file configuration server searches a first storage space of the static file configuration server according to the identification information, and obtains a first static file in a static file set generated by the static file configuration server in advance from the first storage space, where the static file set is set in the following manner: receiving request parameters of a background, writing configuration resources configured manually by the background into a static file, and storing the static file written into the configuration resources into the first storage space, wherein the configuration resources comprise holiday logos and player animations of a live broadcast system;
a fourth receiving module, configured to receive a URL of a first static file in a static file set generated in advance by a static file configuration server, where the first static file includes a target configuration resource corresponding to the identification information;
and the calling module is used for calling the target configuration resource based on the URL.
CN201710189356.8A 2017-03-27 2017-03-27 Method, device and client for obtaining configuration resources Active CN107071007B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710189356.8A CN107071007B (en) 2017-03-27 2017-03-27 Method, device and client for obtaining configuration resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710189356.8A CN107071007B (en) 2017-03-27 2017-03-27 Method, device and client for obtaining configuration resources

Publications (2)

Publication Number Publication Date
CN107071007A CN107071007A (en) 2017-08-18
CN107071007B true CN107071007B (en) 2020-09-08

Family

ID=59620647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710189356.8A Active CN107071007B (en) 2017-03-27 2017-03-27 Method, device and client for obtaining configuration resources

Country Status (1)

Country Link
CN (1) CN107071007B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108566411A (en) * 2018-02-07 2018-09-21 链家网(北京)科技有限公司 Static resource acquisition methods, electronic equipment and storage medium
CN110381386A (en) * 2018-04-12 2019-10-25 武汉斗鱼网络科技有限公司 A kind of methods of exhibiting and relevant device of stage property present
CN109660859A (en) * 2018-12-25 2019-04-19 北京潘达互娱科技有限公司 A kind of animated show method and mobile terminal
CN110868320A (en) * 2019-11-13 2020-03-06 武汉微派网络科技有限公司 Dynamic configuration distribution method, device, apparatus and system
CN111865676B (en) * 2020-07-10 2023-05-23 深圳市欢太科技有限公司 Method, device, server and storage medium for updating and checking configuration file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799817A (en) * 2009-12-15 2010-08-11 北京乐途游网络科技有限责任公司 Method and system for exhibiting static files by means of cross-server
US20150081835A1 (en) * 2012-05-21 2015-03-19 Tencent Technology (Shenzhen) Company Limited Method and apparatus for speeding up web page access
CN105871994A (en) * 2015-12-15 2016-08-17 乐视网信息技术(北京)股份有限公司 Static file service method and unit
CN106327550A (en) * 2016-08-18 2017-01-11 乐视控股(北京)有限公司 Icon generation method and device for recommendation website on browser homepage

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101799817A (en) * 2009-12-15 2010-08-11 北京乐途游网络科技有限责任公司 Method and system for exhibiting static files by means of cross-server
US20150081835A1 (en) * 2012-05-21 2015-03-19 Tencent Technology (Shenzhen) Company Limited Method and apparatus for speeding up web page access
CN105871994A (en) * 2015-12-15 2016-08-17 乐视网信息技术(北京)股份有限公司 Static file service method and unit
CN106327550A (en) * 2016-08-18 2017-01-11 乐视控股(北京)有限公司 Icon generation method and device for recommendation website on browser homepage

Also Published As

Publication number Publication date
CN107071007A (en) 2017-08-18

Similar Documents

Publication Publication Date Title
CN107071007B (en) Method, device and client for obtaining configuration resources
CN109032691B (en) Applet running method and device and storage medium
CN107948314B (en) Business processing method and device based on rule file and server
CN108984170B (en) H5 page multi-language rendering method and device
CN106021421B (en) method and device for accelerating webpage rendering
US11262883B2 (en) Associating browser with application
CN105843819B (en) Data export method and device
CN106528578B (en) Information display method and device
EP3345114A1 (en) Disabling malicious browser extensions
CN109802919B (en) Web page access intercepting method and device
CN107038194B (en) Page jump method and device
US10979532B2 (en) Resource download method, electronic device, and apparatus
CN106649301B (en) Data query method, device and system
CN103078945A (en) Method and system for processing browser crash data
CN111913738A (en) Access request processing method, device, computing equipment and medium
CN104268229A (en) Resource obtaining method and device based on multi-process browser
CN105743945A (en) Method and system for downloading files on the basis of switching download sources
EP3557437A1 (en) Systems and methods for search template generation
CN104516885A (en) Implementation method and device of browse program double-kernel assembly
JP2019519849A (en) Method and device for preventing attacks on servers
CN103338233B (en) Load-balancing device, Web server and solicited message processing method and system
CN109325192B (en) Advertisement anti-shielding method and device
CN111383038A (en) Advertisement display method and device of mobile terminal, mobile terminal and storage medium
CN113343312A (en) Page tamper-proofing method and system based on front-end point burying technology
US9805177B1 (en) Processing large data sets from heterogeneous data sources using federated computing resources

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant