CN113742076A - Method, device, equipment, server and medium for acquiring data resources - Google Patents

Method, device, equipment, server and medium for acquiring data resources Download PDF

Info

Publication number
CN113742076A
CN113742076A CN202111048212.3A CN202111048212A CN113742076A CN 113742076 A CN113742076 A CN 113742076A CN 202111048212 A CN202111048212 A CN 202111048212A CN 113742076 A CN113742076 A CN 113742076A
Authority
CN
China
Prior art keywords
data resource
target data
acquiring
server
processing server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111048212.3A
Other languages
Chinese (zh)
Inventor
杨晓华
蒋剑锋
黎剑恩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Umouse Technology Development Co Ltd
Original Assignee
Shenzhen Umouse Technology Development 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 Shenzhen Umouse Technology Development Co Ltd filed Critical Shenzhen Umouse Technology Development Co Ltd
Priority to CN202111048212.3A priority Critical patent/CN113742076A/en
Publication of CN113742076A publication Critical patent/CN113742076A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5055Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering software capabilities, i.e. software resources associated or available to the machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a device, equipment, a server and a medium for acquiring data resources. The method comprises the following steps: sending a data resource acquisition request to a processing server, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment; when the processing server responds to the data resource acquisition request, acquiring the effectiveness of the target data resource from the processing server; and if the target data resource is effective, acquiring the target data resource from the processing server, and if the target data resource is effective, acquiring the target data resource in the processing server from a cache server. By using the method, the access pressure of the database server can be effectively reduced, and the database server can be ensured to continuously provide high-performance service.

Description

Method, device, equipment, server and medium for acquiring data resources
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, a server, and a medium for acquiring data resources.
Background
With the rapid development of the internet technology, more and more systems need to be built based on a database, and the database has a function of storing data.
In the prior art, when data needs to be acquired, the required data is usually acquired directly from the database server by directly accessing the database server. However, the method can lead to more and more access times and higher access concurrency of the database server along with accumulation of users in the system, so that the access pressure of the database server is higher and higher, and further the performance of the database server is easily reduced, even the database server is directly down.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment, a server and a medium for acquiring data resources, which can effectively reduce the access pressure of a database server and further ensure that the database server can continuously provide high-performance service.
In a first aspect, an embodiment of the present invention provides a method for acquiring a data resource, which is applied to a terminal device, and includes:
sending a data resource acquisition request to a processing server, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment;
when the processing server responds to the data resource acquisition request, acquiring the effectiveness of the target data resource from the processing server;
and if the target data resource is effective, acquiring the target data resource from the processing server, and if the target data resource is effective, acquiring the target data resource in the processing server from a cache server.
In a second aspect, an embodiment of the present invention further provides a method for acquiring a data resource, which is applied to a processing server, and includes:
receiving a data resource acquisition request sent by terminal equipment, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment;
responding to the request for acquiring the data resource, and determining the effectiveness of the target data resource according to the identifier of the target data resource;
and if the target data resource is effective, acquiring the target data resource from a cache server, and sending the target data resource to the terminal equipment so that the terminal equipment acquires the target data resource.
In a third aspect, an embodiment of the present invention further provides an apparatus for acquiring a data resource, configured in a terminal device, and including:
a sending module, configured to send a request for obtaining data resources to a processing server, where the request for obtaining data resources includes an identifier of a target data resource that needs to be requested by the terminal device;
the first obtaining module is used for obtaining the effectiveness of the target data resource from the processing server after the processing server responds to the data resource obtaining request;
a second obtaining module, configured to obtain the target data resource from the processing server if the target data resource is valid, and obtain the target data resource in the processing server from a cache server when the target data resource is valid.
In a fourth aspect, an embodiment of the present invention further provides an apparatus for acquiring a data resource, where the apparatus is configured in a processing server, and the apparatus includes:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a data resource obtaining request sent by terminal equipment, and the data resource obtaining request comprises an identifier of a target data resource required to be requested by the terminal equipment;
a determining module, configured to determine, in response to the request for obtaining data resources, validity of the target data resource according to the identifier of the target data resource;
and the acquisition module is used for acquiring the target data resource from a cache server and sending the target data resource to the terminal equipment if the target data resource is effective, so that the terminal equipment acquires the target data resource.
In a fifth aspect, an embodiment of the present invention further provides a terminal device, including:
one or more processors;
storage means for storing one or more programs;
the one or more programs are executed by the one or more processors, so that the one or more processors are used for realizing the method for acquiring the data resources in any embodiment of the invention.
In a sixth aspect, an embodiment of the present invention further provides a processing server, including:
one or more processors;
storage means for storing one or more programs;
the one or more programs are executed by the one or more processors, so that the one or more processors are used for realizing the method for acquiring the data resources in any embodiment of the invention.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for acquiring a data resource as provided in any embodiment of the present invention.
The embodiment of the invention provides a method, a device, equipment, a server and a medium for acquiring data resources, which comprises the steps of firstly sending a data resource acquisition request to a processing server, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by terminal equipment; then, after the processing server responds to the request for obtaining the data resource, the effectiveness of the target data resource is obtained from the processing server; and finally, if the target data resource is effective, acquiring the target data resource from the processing server, and when the target data resource is effective, acquiring the target data resource in the processing server from a cache server. By utilizing the technical scheme, the access pressure of the database server can be effectively reduced, and the database server can be ensured to continuously provide high-performance service.
Drawings
Fig. 1 is a schematic flowchart illustrating a method for acquiring data resources according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for acquiring data resources according to a second embodiment of the present invention;
fig. 3 is a flowchart illustrating an example of a method for acquiring data resources according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for acquiring data resources according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for acquiring data resources according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal device according to a sixth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a processing server according to a seventh embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in the present invention are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present invention are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Example one
Fig. 1 is a flowchart of a method for acquiring a data resource according to an embodiment of the present invention, where the method is applicable to a case of acquiring a data resource, and the method may be executed by an apparatus for acquiring a data resource, where the apparatus may be implemented by software and/or hardware and is generally integrated on a terminal device, and in this embodiment, the terminal device may be a terminal device of a client, such as a smart phone, a computer, and a smart tablet.
As shown in fig. 1, a method for acquiring a data resource according to an embodiment of the present invention includes the following steps:
s110, sending a data resource acquisition request to a processing server, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment.
The processing server may be any server having data processing and data forwarding functions, and the processing server is not particularly limited in this embodiment. The target data resource may be a data resource that the user wants to acquire, and the content of the data resource is not particularly limited herein. The identifier of the target data resource may be any symbol capable of identifying the target data resource, and may be, for example, a key that is a keyword of the target data resource, or a string of character strings or numbers. The manner in which the target data resource is identified is not limited herein.
In this embodiment, the client sends the request for obtaining the data resource to the processing server, and simultaneously sends the first identifier of the target data resource included in the request for obtaining the data resource to the processing server, so that the processing server can determine the target data resource corresponding to the identifier according to the identifier of the target data resource, and further can determine the validity of the target data resource.
It should be noted that the client may forward the request for obtaining data resources to the processing server through the website server, that is, the terminal device of the client may first send the request for obtaining data resources to the website server, and then the website server sends the request for obtaining data resources to the processing server.
S120, after the processing server responds to the data resource acquisition request, the effectiveness of the target data resource is acquired from the processing server.
In this embodiment, after receiving the request for obtaining data resources sent by the client, the processing server may respond to the request for obtaining data resources, where the response manner is not limited, and an exemplary response manner may be to send a response instruction to the client.
Optionally, the method for determining the validity of the target data resource by the processing server may be: and the processing server inquires whether the target data resource exists in the cache server or not in a cache matching mode. The cache matching mode may be that a data resource having the same key as the target data resource is queried from the cache server by the key of the target data resource. It should be noted that the target data resource includes a key-value pair, that is, one target data resource has a corresponding key-value pair, that is, key and value, and in this embodiment, the value comparison can be performed only by comparing the key values.
S130, if the target data resource is valid, the target data resource is obtained from the processing server, and when the target data resource is valid, the target data resource in the processing server is obtained from a cache server.
The target data resource is effective, which can be understood as the target data resource which the user wants to obtain is stored in the cache server. The disks in the cache server can be read and written by IO, and the IO speed is higher compared with the disk IO speed of the database server.
In this embodiment, when the target data resource is valid, the target data resource may be acquired from the cache server through the processing server, and after acquiring the target data resource, the processing server may first send the target data resource to the web server, so that the web server may send the target data resource to the client.
It should be noted that, when the target data resource is valid, the cache server only needs to return the value of the target data resource to the processing server, and does not need to return the key corresponding to the value to the processing server, that is, the client may only obtain the value of the target data resource, so that data transmission may be further reduced.
The method for acquiring data resources provided by the embodiment of the invention comprises the steps of firstly sending a request for acquiring data resources to a processing server, wherein the request for acquiring data resources comprises an identifier of a target data resource required to be requested by terminal equipment; then, after the processing server responds to the request for obtaining the data resource, the effectiveness of the target data resource is obtained from the processing server; and finally, if the target data resource is effective, acquiring the target data resource from the processing server, and when the target data resource is effective, acquiring the target data resource in the processing server from a cache server. According to the method, the cache server is added as the middleware, so that direct requests for the database server are reduced, and the concurrent processing capacity of the database server is indirectly increased.
Further, if the target data resource is invalid, acquiring the target data resource from a database server; and caching the target data resource to a cache server after the target data resource is acquired by the processing server.
In this embodiment, when the target data is invalid, that is, when the target data resource that the user wants to obtain is stored in the cache server, the processing server may request the database server for the target data resource, and further send the target data resource obtained from the database server to the client through the web server.
In addition, after the target data resource is obtained from the database server, the target data resource can be further cached in the cache server, so that the target data resource can be directly obtained from the cache server when the target data resource needs to be obtained subsequently, the target data resource does not need to be obtained from the database server, and the cache pressure of the database server can be relieved.
Example two
Fig. 2 is a flowchart illustrating a method for acquiring a data resource according to a second embodiment of the present invention, where the method is applicable to the case of acquiring a data resource, and the method can be performed by a device for acquiring a data resource, where the device can be implemented by software and/or hardware and is generally integrated on a processing server.
As shown in fig. 2, a method for acquiring a data resource according to a second embodiment of the present invention includes the following steps:
s210, receiving a data resource acquisition request sent by a terminal device, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal device.
In this embodiment, the terminal device may be a terminal device of a client, and the terminal device may include a computer, a smart phone, a smart tablet, and the like. The identifier of the target data resource may be any character or number capable of identifying the target data resource, and may be, for example, a keyword of the target data resource.
S220, responding to the data resource acquisition request, and determining the effectiveness of the target data resource according to the identification of the target data resource.
In this embodiment, if the identifier of the target data resource is a keyword of the target data resource, determining the validity of the target data resource according to the identifier of the target data resource includes: comparing the keywords of the target data resources with the keywords of the data resources in the cache server; if the cache server has the data resource with the same keyword as the target data resource, determining that the target data resource is valid; and if the data resource which is the same as the key word of the target data resource does not exist in the cache server, determining that the target data resource is invalid.
And S230, if the target data resource is effective, acquiring the target data resource from a cache server, and sending the target data resource to the terminal equipment so that the terminal equipment can acquire the target data resource.
Optionally, after obtaining the target data resource, the processing server may send the target data resource to the terminal device of the client through the website server.
Further, if the target data resource is invalid, acquiring the target data resource from a database server; and caching the target data resource into a cache server.
In this embodiment, after obtaining the target data resource from the database server, the value of the target data resource may be sent to the terminal device of the client through the website server, and the key value pair of the target data resource may be cached in the cache server, so that the key value pair cached in the cache server includes the key value pair of the target data resource.
The second method for acquiring data resources provided by the embodiment of the invention comprises the steps of firstly receiving a request for acquiring data resources sent by terminal equipment, wherein the request for acquiring data resources comprises an identifier of target data resources required to be requested by the terminal equipment; then responding to the request for obtaining the data resource, and determining the effectiveness of the target data resource according to the identification of the target data resource; and finally, if the target data resource is effective, acquiring the target data resource from a cache server, and sending the target data resource to the terminal equipment so that the terminal equipment acquires the target data resource. According to the method, the cache server is added as the middleware, so that direct requests for the database server are reduced, and the concurrent processing capacity of the database server is indirectly increased.
EXAMPLE III
Fig. 3 is an exemplary flowchart of a method for acquiring data resources according to a third embodiment of the present invention, and as shown in fig. 3, a web server, that is, a website server, is first built and configured; then, a cgi processing program server, namely a processing server, is built and configured; then building and configuring a database server; and finally, constructing and configuring a cache server. After the web server, the cgi processing program server, the database server and the cache server are built and configured, the following processes are performed.
The client sends a resource acquisition request, namely a target data resource acquisition request, to the web server, and the web server forwards the request of the client to the cgi processing program server. The cig processing program server firstly inquires whether the target data resource requested by the client exists from the cache server, if so, directly obtaining the target data resource from the cache server and returning the target data resource to the web server, returning the target data resource to the client by the web server, if the target data resource does not exist, the cgi handler server may initiate a request to the database server to obtain the target data resource, the database server may return the target data resource to the cgi handler server upon receiving the request, the cgi handler server may cache the target data resource returned by the database server to the cache server, and meanwhile, the target data resource is returned to the web server, and the web server can return the target data resource requested by the client to the client so that the client can acquire the target data resource.
According to the method for acquiring the data resources provided by the third embodiment of the invention, the number of times of direct access to the database server can be reduced by adding the cache server, so that the pressure of the database server can be reduced, and the database server can be ensured to continuously provide high-performance services.
Example four
Fig. 4 is a schematic structural diagram of an apparatus for acquiring a data resource according to a fourth embodiment of the present invention, where the apparatus is applicable to the case of acquiring a data resource, and the apparatus may be implemented by software and/or hardware and is generally integrated on a terminal device.
As shown in fig. 4, the apparatus includes: a sending module 410, a first obtaining module 420, and a second obtaining module 430.
A sending module 410, configured to send a request for obtaining data resources to a processing server, where the request for obtaining data resources includes an identifier of a target data resource that needs to be requested by the terminal device;
a first obtaining module 420, configured to obtain, after the processing server responds to the request for obtaining data resources, validity of the target data resources from the processing server;
a second obtaining module 430, configured to obtain the target data resource from the processing server if the target data resource is valid, and obtain the target data resource in the processing server from a cache server when the target data resource is valid.
In this embodiment, the apparatus first sends a request for obtaining data resources to a processing server through a sending module 410, where the request for obtaining data resources includes an identifier of a target data resource that needs to be requested by the terminal device; then, after the processing server responds to the request for obtaining the data resource, the first obtaining module 420 obtains the validity of the target data resource from the processing server; finally, if the target data resource is valid, the second obtaining module 430 obtains the target data resource from the processing server, and when the target data resource is valid, the target data resource in the processing server is obtained from the cache server.
The embodiment provides a device for acquiring data resources, which can effectively reduce the access pressure of a database server, and further ensure that the database server can continuously provide high-performance services.
Further, the apparatus for acquiring data resources further includes a third acquiring module, configured to: if the target data resource is invalid, acquiring the target data resource from a database server; and caching the target data resource to a cache server after the target data resource is acquired by the processing server.
The device for acquiring the data resources can execute the method for acquiring the data resources provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an apparatus for acquiring a data resource according to a fifth embodiment of the present invention, which is applicable to the case of acquiring a data resource, wherein the apparatus may be implemented by software and/or hardware and is generally integrated on a processing server.
As shown in fig. 5, the apparatus includes: a receiving module 510, a determining module 520, and an obtaining module 530.
A receiving module 510, configured to receive a request for obtaining data resources sent by a terminal device, where the request for obtaining data resources includes an identifier of a target data resource that the terminal device needs to request;
a determining module 520, configured to determine, in response to the request for obtaining data resources, validity of the target data resource according to the identifier of the target data resource;
an obtaining module 530, configured to obtain the target data resource from a cache server if the target data resource is valid, and send the target data resource to the terminal device, so that the terminal device obtains the target data resource.
In this embodiment, the apparatus first receives, through a receiving module 510, a request for obtaining data resources sent by a terminal device, where the request for obtaining data resources includes an identifier of a target data resource that the terminal device needs to request; then, responding to the request for obtaining the data resource through a determining module 520, and determining the effectiveness of the target data resource according to the identification of the target data resource; finally, if the target data resource is valid, the obtaining module 530 obtains the target data resource from the cache server, and sends the target data resource to the terminal device, so that the terminal device obtains the target data resource.
The embodiment provides a device for acquiring data resources, which can effectively reduce the access pressure of a database server, and further ensure that the database server can continuously provide high-performance services.
Further, the apparatus for acquiring data resources further includes a cache module, configured to: if the target data resource is invalid, acquiring the target data resource from a database server; and caching the target data resource into a cache server.
Further, the identifier of the target data resource includes a keyword of the target data resource, and correspondingly, the determining module 520 is specifically configured to: comparing the keywords of the target data resources with the keywords of the data resources in the cache server; if the cache server has the data resource with the same keyword as the target data resource, determining that the target data resource is valid; and if the data resource which is the same as the key word of the target data resource does not exist in the cache server, determining that the target data resource is invalid.
The device for acquiring the data resources can execute the method for acquiring the data resources provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 6 is a schematic structural diagram of a terminal device according to a sixth embodiment of the present invention. As shown in fig. 6, a terminal device provided in the sixth embodiment of the present invention includes: one or more processors 61 and storage 62; the processor 61 in the terminal device may be one or more, and one processor 61 is taken as an example in fig. 6; storage 62 is used to store one or more programs; the one or more programs are executed by the one or more processors 61, so that the one or more processors 61 implement the method for acquiring data resources according to any of the embodiments of the present invention.
The terminal device may further include: an input device 63 and an output device 64.
The processor 61, the storage device 62, the input device 63 and the output device 64 in the terminal equipment may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 6.
The storage device 62 in the terminal device, as a computer-readable storage medium, may be used to store one or more programs, which may be software programs, computer-executable programs, and modules, and program instructions/modules corresponding to the method for acquiring data resources according to an embodiment of the present invention (for example, the modules in the device for acquiring data resources shown in fig. 4 include a sending module 410, a first acquiring module 420, and a second acquiring module 430). The processor 61 executes various functional applications and data processing of the terminal device by running software programs, instructions and modules stored in the storage device 62, that is, implements the method for acquiring data resources in the above method embodiments.
The storage device 62 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the storage device 62 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage device 62 may further include memory located remotely from the processor 61, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 63 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 64 may include a display device such as a display screen.
And when the one or more programs comprised by the above-mentioned apparatus are executed by the one or more processors 61, the programs perform the following operations:
sending a data resource acquisition request to a processing server, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment;
when the processing server responds to the data resource acquisition request, acquiring the effectiveness of the target data resource from the processing server;
and if the target data resource is effective, acquiring the target data resource from the processing server, and if the target data resource is effective, acquiring the target data resource in the processing server from a cache server.
EXAMPLE seven
Fig. 7 is a schematic structural diagram of a processing server according to a seventh embodiment of the present invention. As shown in fig. 7, a processing server according to a seventh embodiment of the present invention includes: one or more processors 71 and storage 72; the processor 71 in the processing server may be one or more, and fig. 7 illustrates one processor 71; the storage device 72 is used to store one or more programs; the one or more programs are executed by the one or more processors 71, so that the one or more processors 71 implement the method for acquiring data resources according to any of the embodiments of the present invention.
The processing server may further include: an input device 73 and an output device 74.
The processor 71, the storage device 72, the input device 73 and the output device 74 in the processing server may be connected by a bus or other means, and the bus connection is exemplified in fig. 7.
The storage device 72 in the processing server is used as a computer-readable storage medium for storing one or more programs, which may be software programs, computer-executable programs, and modules, and program instructions/modules corresponding to the method for acquiring data resources according to the second embodiment of the present invention (for example, the modules in the device for acquiring data resources shown in fig. 5 include the receiving module 510, the determining module 520, and the acquiring module 530). The processor 71 executes various functional applications of the processing server and data processing by running software programs, instructions and modules stored in the storage device 72, namely, implements the method for acquiring data resources in the above method embodiments.
The storage device 72 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the processing server, and the like. Further, the storage device 72 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 72 may further include memory located remotely from the processor 71, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 73 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the processing server. The output device 74 may include a display device such as a display screen.
And, when the one or more programs included in the above-mentioned processing server are executed by the one or more processors 71, the programs perform the following operations:
receiving a data resource acquisition request sent by terminal equipment, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment;
responding to the request for acquiring the data resource, and determining the effectiveness of the target data resource according to the identifier of the target data resource;
and if the target data resource is effective, acquiring the target data resource from a cache server, and sending the target data resource to the terminal equipment so that the terminal equipment acquires the target data resource.
Example eight
An eighth embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, is configured to perform a method for acquiring a data resource.
As applied to a terminal device, the method comprising:
sending a data resource acquisition request to a processing server, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment;
when the processing server responds to the data resource acquisition request, acquiring the effectiveness of the target data resource from the processing server;
and if the target data resource is effective, acquiring the target data resource from the processing server, and if the target data resource is effective, acquiring the target data resource in the processing server from a cache server.
As applied to a processing server, the method comprising:
receiving a data resource acquisition request sent by terminal equipment, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment;
responding to the request for acquiring the data resource, and determining the effectiveness of the target data resource according to the identifier of the target data resource;
and if the target data resource is effective, acquiring the target data resource from a cache server, and sending the target data resource to the terminal equipment so that the terminal equipment acquires the target data resource.
Optionally, the program, when executed by a processor, may be further configured to perform a method for acquiring data resources according to any of the embodiments of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for acquiring data resources is applied to a terminal device, and the method comprises the following steps:
sending a data resource acquisition request to a processing server, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment;
when the processing server responds to the data resource acquisition request, acquiring the effectiveness of the target data resource from the processing server;
and if the target data resource is effective, acquiring the target data resource from the processing server, and if the target data resource is effective, acquiring the target data resource in the processing server from a cache server.
2. The method of claim 1, further comprising:
if the target data resource is invalid, acquiring the target data resource from a database server;
and caching the target data resource to a cache server after the target data resource is acquired by the processing server.
3. A method for acquiring data resources, which is applied to a processing server, and comprises the following steps:
receiving a data resource acquisition request sent by terminal equipment, wherein the data resource acquisition request comprises an identifier of a target data resource required to be requested by the terminal equipment;
responding to the request for acquiring the data resource, and determining the effectiveness of the target data resource according to the identifier of the target data resource;
and if the target data resource is effective, acquiring the target data resource from a cache server, and sending the target data resource to the terminal equipment so that the terminal equipment acquires the target data resource.
4. The method of claim 3, further comprising:
if the target data resource is invalid, acquiring the target data resource from a database server;
and caching the target data resource into a cache server.
5. The method of claim 3, wherein the identifier of the target data resource comprises a keyword of the target data resource, and wherein determining the validity of the target data resource according to the identifier of the target data resource comprises:
comparing the keywords of the target data resources with the keywords of the data resources in the cache server;
if the cache server has the data resource with the same keyword as the target data resource, determining that the target data resource is valid;
and if the data resource which is the same as the key word of the target data resource does not exist in the cache server, determining that the target data resource is invalid.
6. An apparatus for acquiring data resources, configured at a terminal device, the apparatus comprising:
a sending module, configured to send a request for obtaining data resources to a processing server, where the request for obtaining data resources includes an identifier of a target data resource that needs to be requested by the terminal device;
the first obtaining module is used for obtaining the effectiveness of the target data resource from the processing server after the processing server responds to the data resource obtaining request;
a second obtaining module, configured to obtain the target data resource from the processing server if the target data resource is valid, and obtain the target data resource in the processing server from a cache server when the target data resource is valid.
7. An apparatus for acquiring data resources, configured at a processing server, the apparatus comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a data resource obtaining request sent by terminal equipment, and the data resource obtaining request comprises an identifier of a target data resource required to be requested by the terminal equipment;
a determining module, configured to determine, in response to the request for obtaining data resources, validity of the target data resource according to the identifier of the target data resource;
and the acquisition module is used for acquiring the target data resource from a cache server and sending the target data resource to the terminal equipment if the target data resource is effective, so that the guest terminal equipment acquires the target data resource.
8. A terminal device, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs being executable by the one or more processors to cause the one or more processors to perform the method of acquiring data resources of any of claims 1-2.
9. A processing server, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs being executable by the one or more processors to cause the one or more processors to perform the method of acquiring data resources of any of claims 3-5.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of acquiring a data resource according to any one of claims 1 to 6.
CN202111048212.3A 2021-09-08 2021-09-08 Method, device, equipment, server and medium for acquiring data resources Pending CN113742076A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111048212.3A CN113742076A (en) 2021-09-08 2021-09-08 Method, device, equipment, server and medium for acquiring data resources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111048212.3A CN113742076A (en) 2021-09-08 2021-09-08 Method, device, equipment, server and medium for acquiring data resources

Publications (1)

Publication Number Publication Date
CN113742076A true CN113742076A (en) 2021-12-03

Family

ID=78736944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111048212.3A Pending CN113742076A (en) 2021-09-08 2021-09-08 Method, device, equipment, server and medium for acquiring data resources

Country Status (1)

Country Link
CN (1) CN113742076A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053800A (en) * 2010-11-26 2011-05-11 华为技术有限公司 Data access method, message receiving resolver and system
US20130151663A1 (en) * 2010-08-05 2013-06-13 Huawei Technologies Co., Ltd. Data obtaining method and apparatus, and network storage method and device
CN108304104A (en) * 2017-10-24 2018-07-20 腾讯科技(深圳)有限公司 A kind of data capture method and its equipment, storage medium, terminal
CN110535961A (en) * 2019-09-03 2019-12-03 中国联合网络通信集团有限公司 Resource acquiring method, device, electronic equipment and storage medium
CN113271362A (en) * 2021-06-08 2021-08-17 天闻数媒科技(湖南)有限公司 Education resource processing method, device, system and medium based on hybrid cloud

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130151663A1 (en) * 2010-08-05 2013-06-13 Huawei Technologies Co., Ltd. Data obtaining method and apparatus, and network storage method and device
CN102053800A (en) * 2010-11-26 2011-05-11 华为技术有限公司 Data access method, message receiving resolver and system
CN108304104A (en) * 2017-10-24 2018-07-20 腾讯科技(深圳)有限公司 A kind of data capture method and its equipment, storage medium, terminal
CN110535961A (en) * 2019-09-03 2019-12-03 中国联合网络通信集团有限公司 Resource acquiring method, device, electronic equipment and storage medium
CN113271362A (en) * 2021-06-08 2021-08-17 天闻数媒科技(湖南)有限公司 Education resource processing method, device, system and medium based on hybrid cloud

Similar Documents

Publication Publication Date Title
CN111581563B (en) Page response method and device, storage medium and electronic equipment
CN108804447B (en) Method and system for responding to data request by using cache
US20120102134A1 (en) Cache sharing among branch proxy servers via a master proxy server at a data center
US20190327105A1 (en) Method and apparatus for pushing information
CN113472901B (en) Load balancing method, device, equipment, storage medium and program product
CN108536617B (en) Cache management method, medium, system and electronic device
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN110929128A (en) Data crawling method, device, equipment and medium
CN113961832A (en) Page rendering method, device, equipment, storage medium and program product
CN111737564A (en) Information query method, device, equipment and medium
CN112818371A (en) Resource access control method, system, device, equipment and medium
US9798746B2 (en) Dynamic map template discovery and map creation
US20140172982A1 (en) Method, server and system for data sharing
CN111596864A (en) Method, device, server and storage medium for data delayed deletion
CN112948138A (en) Method and device for processing message
CN113742076A (en) Method, device, equipment, server and medium for acquiring data resources
CN113824675B (en) Method and device for managing login state
CN106068506B (en) Apparatus and method for increasing loading time in an electronic device
CN110730251B (en) Method, device, medium and electronic equipment for analyzing domain name
CN114024982A (en) Information transmission method, service server, terminal device, system and storage medium
CN113760929A (en) Data synchronization method and device, electronic equipment and computer readable medium
CN112149019A (en) Method, apparatus, electronic device, and computer-readable medium for displaying information
US8250177B2 (en) Uncached data control in server-cached page
CN117041343B (en) Request processing method, apparatus, electronic device and computer readable medium
CN113778909B (en) Method and device for caching data

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