CN111371824A - Resource synchronization method and device - Google Patents

Resource synchronization method and device Download PDF

Info

Publication number
CN111371824A
CN111371824A CN201811601137.7A CN201811601137A CN111371824A CN 111371824 A CN111371824 A CN 111371824A CN 201811601137 A CN201811601137 A CN 201811601137A CN 111371824 A CN111371824 A CN 111371824A
Authority
CN
China
Prior art keywords
resource
source station
level node
information
node 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
CN201811601137.7A
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201811601137.7A priority Critical patent/CN111371824A/en
Publication of CN111371824A publication Critical patent/CN111371824A/en
Pending legal-status Critical Current

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The invention discloses a resource synchronization method, a resource synchronization device, electronic equipment and a computer readable storage medium. The method comprises the following steps: a first-level node server in the same area with a source station judges whether a received resource acquisition request is initiated for the first time; if the resource data are judged to be the same as the resource data, the corresponding resource information is sent to the first-level node servers in different areas with the source station, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and resource synchronization is achieved. Therefore, the first-level node server in a different area from the source station acquires the corresponding resource in advance and stores the resource in the local area before receiving the resource acquisition request, and when the resource acquisition request is received, the resource does not need to be acquired from the source station because the local area is pre-stored, so that the delay of request response is avoided, and the use experience of a user is ensured.

Description

Resource synchronization method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a resource synchronization method, apparatus, electronic device, and computer-readable storage medium.
Background
In a content distribution network, edge node servers deployed in various regions need to acquire resources from an upper-level node server step by step when receiving a resource acquisition request, and need to acquire resources from a source station if a first-level node server in a local region does not have corresponding resources. If the source station is in another region, resources need to be acquired across regions, which is easily affected by factors such as network, etc., so that response of the request is delayed, and user experience is affected.
Disclosure of Invention
In view of the above, the present invention has been made to provide a resource synchronization method, apparatus, electronic device and computer-readable storage medium that overcome or at least partially solve the above-mentioned problems.
According to an aspect of the present invention, there is provided a resource synchronization method, wherein the method is applied to a first level node server in the same area as a source station, and includes:
judging whether the received resource acquisition request is initiated for the first time;
if the resource information is judged to be the resource information, the corresponding resource information is sent to the first-level node servers in different areas with the source station, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and resource synchronization is achieved.
Optionally, the sending the corresponding resource information to the first level node server in a different area from the source station includes:
acquiring identification information of corresponding resources;
recording the acquired identification information of the resources into a specified list;
and according to a preset period, sending the identification information of the recorded resources in the appointed list to a first-level node server in a different area with the source station.
Optionally, the identification information of the resource includes URL information of the resource.
Optionally, after sending the identification information of the recorded resource in the specified list to the first level node server in a different area from the source station, the method further includes:
the identification information of the recorded resources in the specified list is deleted.
Optionally, the sending the corresponding resource information to the first level node server in a different area from the source station includes:
and when receiving the resource data returned by the source station according to the resource acquisition request, sending the resource data to other first-level node servers in different areas with the source station.
According to another aspect of the present invention, there is provided a resource synchronization method, wherein the method is applied to a first level node server located in a different area from a source station, and comprises:
receiving resource information sent by a first-level node server in the same area as a source station;
and acquiring and storing corresponding resource data according to the received resource information.
Optionally, the method further comprises:
and judging whether the corresponding resource data are stored in the local database according to the received resource information, and if not, executing the step of acquiring and storing the corresponding resource data according to the received resource information.
Optionally, the resource information is an appointed list for recording identification information of resources, and the acquiring and storing corresponding resource data according to the received resource information includes:
according to the identification information of the resource, sending a request for acquiring resource data to a source station;
and receiving and storing the resource data returned by the source station.
Optionally, the resource information is resource data, and the obtaining and storing corresponding resource data according to the received resource information includes:
and storing the received resource data.
According to another aspect of the present invention, there is provided a resource synchronization apparatus, wherein the apparatus is adapted to a first level node server in the same area as a source station, and comprises:
the judging unit is suitable for judging whether the received resource acquisition request is initiated for the first time;
and the sending unit is suitable for sending the corresponding resource information to the first-level node servers in different areas with the source station if the judgment result is yes, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and the resource synchronization is realized.
Alternatively,
the sending unit is suitable for acquiring the identification information of the corresponding resource; recording the acquired identification information of the resources into a specified list; and according to a preset period, sending the identification information of the recorded resources in the appointed list to a first-level node server in a different area with the source station.
Optionally, the identification information of the resource includes URL information of the resource.
Optionally, after the sending unit sends the identification information of the resource recorded in the specified list to the first level node server in a different area from the source station, the apparatus further includes:
and a deleting unit adapted to delete the identification information of the resource recorded in the specified list.
Alternatively,
and the sending unit is suitable for sending the resource data to other first-level node servers in different areas with the source station when receiving the resource data returned by the source station according to the resource acquisition request.
According to another aspect of the present invention, there is provided a resource synchronization apparatus, wherein the apparatus is adapted to a first level node server located in a different area from a source station, and comprises:
the receiving unit is suitable for receiving the resource information sent by the first-level node server in the same area as the source station;
and the acquisition unit is suitable for acquiring and storing corresponding resource data according to the received resource information.
Optionally, the apparatus further comprises:
and the judging unit is suitable for judging whether the corresponding resource data are stored in the local database according to the received resource information, and if not, executing the step of acquiring and storing the corresponding resource data according to the received resource information.
Optionally, the resource information is a specified list recording identification information of the resource, and the obtaining unit is adapted to send a request for obtaining resource data to the source station according to the identification information of the resource; and receiving and storing the resource data returned by the source station.
Optionally, the resource information is resource data, and the obtaining unit is adapted to store the received resource data.
According to still another aspect of the present invention, there is provided an electronic apparatus, wherein the electronic apparatus includes:
a processor; and the number of the first and second groups,
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform a method according to the foregoing.
According to yet another aspect of the present invention, there is provided a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the aforementioned method.
According to the technical scheme of the invention, a first-level node server in the same area with a source station judges whether a received resource acquisition request is initiated for the first time; if the resource data are judged to be the same as the resource data, the corresponding resource information is sent to the first-level node servers in different areas with the source station, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and resource synchronization is achieved. Therefore, the first-level node server in a different area from the source station acquires the corresponding resource in advance and stores the resource in the local area before receiving the resource acquisition request, and when the resource acquisition request is received, the resource does not need to be acquired from the source station because the local area is pre-stored, so that the delay of request response is avoided, and the use experience of a user is ensured.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a flow diagram of a resource synchronization method according to one embodiment of the invention;
FIG. 2 shows a flow diagram of a resource synchronization method according to another embodiment of the invention;
fig. 3 is a schematic structural diagram of a resource synchronization apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a resource synchronization apparatus according to another embodiment of the present invention;
FIG. 5 shows a schematic structural diagram of an electronic device according to one embodiment of the invention;
fig. 6 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 shows a flow diagram of a resource synchronization method according to an embodiment of the invention. As shown in fig. 1, the method is applied to a first level node server in the same area as the source station, and includes:
step S110, determine whether the received resource obtaining request is initiated for the first time.
When the resource acquisition request is initiated for the first time, the first-level node server usually needs to perform back-to-source processing, that is, corresponding resource data is not locally stored, corresponding data needs to be acquired from the source station and is locally stored, so that when the acquisition request of the same resource is received again, the back-to-source processing is not needed. Therefore, when the received resource acquisition request is initiated for the first time, the first-level node server in the same area as the source station is at the time of local resource saving. In order to implement resource synchronization with a first-level node server in a different area from a source station while performing local resource storage with the first-level node server in the same area as the source station, in this embodiment, it is necessary to determine whether a received resource acquisition request is initiated for the first time.
Preferably, the determining whether the received resource obtaining request is initiated for the first time includes: and judging whether the received resource acquisition request needs to be processed back to the source.
And step S120, if the judgment result is yes, sending the corresponding resource information to the first-level node servers in different areas with the source station, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and realizing resource synchronization.
In this embodiment, the first node server in the same area as the source station actively sends the resource information that has been saved by itself to the first level node server in a different area from the source station, so as to implement resource synchronization. Therefore, the first-level node server in a different area from the source station acquires the corresponding resource in advance and stores the resource in the local area before receiving the resource acquisition request, and when the resource acquisition request is received, the resource does not need to be acquired from the source station because the local area is pre-stored, so that the delay of request response is avoided, and the use experience of a user is ensured.
In one embodiment of the present invention, the sending the corresponding resource information to the first level node server in the different area from the source station in step S120 of the method shown in fig. 1 includes: acquiring identification information of corresponding resources; recording the acquired identification information of the resources into a specified list; and according to a preset period, sending the identification information of the recorded resources in the appointed list to a first-level node server in a different area with the source station.
In this embodiment, the resource information sent to the first-level node servers in different areas from the source station is identification information of the resource. Therefore, the first-level node server in a different area from the source station can acquire the resource according to the identification information of the resource. For example, a specified list is created, when a first level node server in the same area as the source station receives a resource acquisition request for the first time, the resource is acquired while the identification information of the resource is recorded in the specified list, five minutes later, the identification information of 10 resources is already recorded in the specified list, and then the identification information of the 10 resources is sent to the first level node server in a different area from the source station.
Preferably, the identification information of the resource includes URL information of the resource.
The URL is a uniform resource locator, which is the address of a standard resource on the internet. Each file on the internet has a unique URL that contains information indicating the location of the file. Therefore, the first-level node servers in different areas from the source station can acquire corresponding resource data according to the URL information of the resources.
Further, after sending the identification information of the recorded resources in the specified list to the first level node server in a different area from the source station, the method shown in fig. 1 further includes: the identification information of the recorded resources in the specified list is deleted.
And each time after the identification information of the recorded resource in the instruction list is sent to the first-level node server in a different area from the source station, emptying processing is needed so as to repeatedly send the identification information of the resource and realize reasonable utilization of the specified list resource.
In one embodiment of the invention, the sending the corresponding resource information to the first level node server in the different area from the source station in step S120 of the method shown in fig. 1 includes: and when receiving the resource data returned by the source station according to the resource acquisition request, sending the resource data to other first-level node servers in different areas with the source station.
In the above embodiment, it is indicated that the resource information sent to the first-level node server in a different area from the source station is identification information of the resource, and the first-level node server in a different area from the source station actively acquires the resource data according to the identification information of the resource. In this embodiment, the resource information sent to the first-level node servers in different areas from the source station is the resource data itself, so that the first-level node servers in different areas from the source station do not need to acquire the resource data again, but directly store the resource data, thereby further saving resources and ensuring the efficiency of resource synchronization.
Fig. 2 shows a flow diagram of a resource synchronization method according to another embodiment of the invention. As shown in fig. 2, the method is applied to a first level node server located in a different area from the source station, and includes:
step S210, receiving the resource information sent by the first level node server in the same area with the source station.
Step S220, acquiring and storing corresponding resource data according to the received resource information.
When a first-level node server in the same area with a source station receives a resource acquisition request for the first time, corresponding resources are acquired from the source station, corresponding resource information is sent to the first-level node servers in different areas with the source station in order to achieve resource synchronization, and the first-level node servers in different areas with the source station acquire and store corresponding resource data in advance according to the resource information. When the acquisition request of the resource is received, the resource does not need to be acquired from the source station because the local area is pre-stored, so that the delay of request response is avoided, and the use experience of a user is ensured.
In one embodiment of the present invention, the method shown in fig. 2 further comprises:
and judging whether the corresponding resource data are stored in the local database according to the received resource information, and if not, executing the step of acquiring and storing the corresponding resource data according to the received resource information.
The resource information sent by the first node server in the same area as the source station is in the case that the resource acquisition request is received for the first time, but it is not excluded that the first node server in a different area from the source station has already received the resource acquisition request before and has locally stored the resource, and at this time, it is not necessary to obtain the corresponding resource according to the resource information sent by the first node server in the same area as the source station. Therefore, in this embodiment, before processing the received resource information, it is determined whether corresponding resource data is stored in the local database, and if yes, no processing is performed.
In an embodiment of the present invention, the resource information in the method shown in fig. 2 is a specified list for recording identification information of resources, and the acquiring and storing corresponding resource data according to the received resource information in step S220 includes: according to the identification information of the resource, sending a request for acquiring resource data to a source station; and receiving and storing the resource data returned by the source station.
In this embodiment, the resource information of the first-level node server in the same area as the source station is the identification information of the resource, so that corresponding resource data needs to be actively acquired from the source station according to the identification information of the resource.
In an embodiment of the present invention, the resource information in the method shown in fig. 2 is resource data, and the acquiring and storing the corresponding resource data according to the received resource information in step S220 includes: and storing the received resource data.
In this embodiment, the resource information of the first-level node server in the same area as the source station is the resource data itself, and thus, the resource data is directly stored.
Fig. 3 is a schematic structural diagram of a resource synchronization apparatus according to an embodiment of the present invention. As shown in fig. 3, the resource synchronization apparatus 300 is adapted to a first-level node server in the same area as the source station, and includes:
the determining unit 310 is adapted to determine whether the received resource acquisition request is initiated for the first time.
When the resource acquisition request is initiated for the first time, the first-level node server usually needs to perform back-to-source processing, that is, corresponding resource data is not locally stored, corresponding data needs to be acquired from the source station and is locally stored, so that when the acquisition request of the same resource is received again, the back-to-source processing is not needed. Therefore, when the received resource acquisition request is initiated for the first time, the first-level node server in the same area as the source station is at the time of local resource saving. In order to implement resource synchronization with a first-level node server in a different area from a source station while performing local resource storage with the first-level node server in the same area as the source station, in this embodiment, it is necessary to determine whether a received resource acquisition request is initiated for the first time.
Preferably, the judging unit 310 is adapted to judge whether the received resource obtaining request needs to be processed back to the source.
If yes, the sending unit 320 is adapted to send the corresponding resource information to the first-level node servers in different areas from the source station, so that the first-level node servers in different areas from the source station obtain and store the resource data according to the resource information, thereby implementing resource synchronization.
In this embodiment, the first node server in the same area as the source station actively sends the resource information that has been saved by itself to the first level node server in a different area from the source station, so as to implement resource synchronization. Therefore, the first-level node server in a different area from the source station acquires the corresponding resource in advance and stores the resource in the local area before receiving the resource acquisition request, and when the resource acquisition request is received, the resource does not need to be acquired from the source station because the local area is pre-stored, so that the delay of request response is avoided, and the use experience of a user is ensured.
In an embodiment of the present invention, the sending unit 320 shown in fig. 3 is adapted to obtain identification information of a corresponding resource; recording the acquired identification information of the resources into a specified list; and according to a preset period, sending the identification information of the recorded resources in the appointed list to a first-level node server in a different area with the source station.
In this embodiment, the resource information sent to the first-level node servers in different areas from the source station is identification information of the resource. Therefore, the first-level node server in a different area from the source station can acquire the resource according to the identification information of the resource. For example, a specified list is created, when a first level node server in the same area as the source station receives a resource acquisition request for the first time, the resource is acquired while the identification information of the resource is recorded in the specified list, five minutes later, the identification information of 10 resources is already recorded in the specified list, and then the identification information of the 10 resources is sent to the first level node server in a different area from the source station.
Preferably, the identification information of the resource includes URL information of the resource.
The URL is a uniform resource locator, which is the address of a standard resource on the internet. Each file on the internet has a unique URL that contains information indicating the location of the file. Therefore, the first-level node servers in different areas from the source station can acquire corresponding resource data according to the URL information of the resources.
Further, after the sending unit 320 sends the identification information of the recorded resource in the specified list to the first level node server in a different area from the source station, the apparatus shown in fig. 3 further includes:
and a deleting unit adapted to delete the identification information of the resource recorded in the specified list.
And each time after the identification information of the recorded resource in the instruction list is sent to the first-level node server in a different area from the source station, emptying processing is needed so as to repeatedly send the identification information of the resource and realize reasonable utilization of the specified list resource.
In an embodiment of the present invention, the sending unit 320 shown in fig. 3 is adapted to, when receiving resource data returned by the source station according to the resource obtaining request, send the resource data to other first-level node servers in different areas from the source station.
In the above embodiment, it is indicated that the resource information sent to the first-level node server in a different area from the source station is identification information of the resource, and the first-level node server in a different area from the source station actively acquires the resource data according to the identification information of the resource. In this embodiment, the resource information sent to the first-level node servers in different areas from the source station is the resource data itself, so that the first-level node servers in different areas from the source station do not need to acquire the resource data again, but directly store the resource data, thereby further saving resources and ensuring the efficiency of resource synchronization.
Fig. 4 is a schematic structural diagram of a resource synchronization apparatus according to another embodiment of the present invention. As shown in fig. 4, the resource synchronization apparatus 400 is adapted to a first-level node server located in a different area from the source station, and includes:
the receiving unit 410 is adapted to receive the resource information sent by the first level node server in the same area as the source station.
The obtaining unit 420 is adapted to obtain and store corresponding resource data according to the received resource information.
When a first-level node server in the same area with a source station receives a resource acquisition request for the first time, corresponding resources are acquired from the source station, corresponding resource information is sent to the first-level node servers in different areas with the source station in order to achieve resource synchronization, and the first-level node servers in different areas with the source station acquire and store corresponding resource data in advance according to the resource information. When the acquisition request of the resource is received, the resource does not need to be acquired from the source station because the local area is pre-stored, so that the delay of request response is avoided, and the use experience of a user is ensured.
In one embodiment of the present invention, the apparatus shown in fig. 4 further comprises:
and the judging unit is suitable for judging whether the corresponding resource data are stored in the local database according to the received resource information, and if not, executing the step of acquiring and storing the corresponding resource data according to the received resource information.
The resource information sent by the first node server in the same area as the source station is in the case that the resource acquisition request is received for the first time, but it is not excluded that the first node server in a different area from the source station has already received the resource acquisition request before and has locally stored the resource, and at this time, it is not necessary to obtain the corresponding resource according to the resource information sent by the first node server in the same area as the source station. Therefore, in this embodiment, before processing the received resource information, it is determined whether corresponding resource data is stored in the local database, and if yes, no processing is performed.
In an embodiment of the present invention, the resource information received by the receiving unit 410 shown in fig. 4 is a specified list for recording identification information of a resource, and the obtaining unit 420 is adapted to send a request for obtaining resource data to the source station according to the identification information of the resource; and receiving and storing the resource data returned by the source station.
In this embodiment, the resource information of the first-level node server in the same area as the source station is the identification information of the resource, so that corresponding resource data needs to be actively acquired from the source station according to the identification information of the resource.
In an embodiment of the present invention, the resource information received by the receiving unit 410 shown in fig. 4 is resource data, and the obtaining unit 420 is adapted to store the received resource data.
In this embodiment, the resource information of the first-level node server in the same area as the source station is the resource data itself, and thus, the resource data is directly stored.
In summary, according to the technical solution of the present invention, the first-level node server in the same area as the source station determines whether the received resource acquisition request is initiated for the first time; if the resource data are judged to be the same as the resource data, the corresponding resource information is sent to the first-level node servers in different areas with the source station, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and resource synchronization is achieved. Therefore, the first-level node server in a different area from the source station acquires the corresponding resource in advance and stores the resource in the local area before receiving the resource acquisition request, and when the resource acquisition request is received, the resource does not need to be acquired from the source station because the local area is pre-stored, so that the delay of request response is avoided, and the use experience of a user is ensured.
It should be noted that:
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may be used with the teachings herein. The required structure for constructing such a device will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the resource synchronization apparatus, electronic device, and computer-readable storage medium according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
For example, fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the invention. The electronic device 500 conventionally includes a processor 510 and a memory 520 arranged to store computer-executable instructions (program code). The memory 520 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. The memory 520 has a memory space 530 that stores program code 540 for performing the method steps shown in fig. 1 or fig. 2 and in any of the embodiments. For example, the storage space 530 for the program code may include respective program codes 540 for implementing the various steps in the above method, respectively. The program code can be read from or written to one or more computer program products. These computer program products comprise a program code carrier such as a hard disk, a Compact Disc (CD), a memory card or a floppy disk. Such a computer program product is generally a computer-readable storage medium 600, such as described in fig. 6. The computer-readable storage medium 600 may have memory segments, memory spaces, etc. arranged similarly to the memory 520 in the electronic device of fig. 5. The program code may be compressed, for example, in a suitable form. In general, the memory unit stores program code 610 for performing the steps of the method according to the invention, i.e. program code readable by a processor such as 510, which when run by an electronic device causes the electronic device to perform the steps of the method described above.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, third, etc. does not indicate any ordering. These words may be interpreted as names.
The invention discloses A1, a resource synchronization method, wherein the method is suitable for a first-level node server in the same area with a source station, and comprises the following steps:
judging whether the received resource acquisition request is initiated for the first time;
if the resource information is judged to be the resource information, the corresponding resource information is sent to the first-level node servers in different areas with the source station, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and resource synchronization is achieved.
A2, the method as in A1, wherein the sending the corresponding resource information to the first level node server in a different area from the source station comprises:
acquiring identification information of corresponding resources;
recording the acquired identification information of the resources into a specified list;
and according to a preset period, sending the identification information of the recorded resources in the appointed list to a first-level node server in a different area with the source station.
A3, the method of A2, wherein the identification information of the resource includes URL information of the resource.
A4, the method as in a2, wherein after sending the identification information of the recorded resources in the specified list to the first level node server in a different area from the source station, the method further comprises:
the identification information of the recorded resources in the specified list is deleted.
A5, the method as in A1, wherein the sending the corresponding resource information to the first level node server in a different area from the source station comprises:
and when receiving the resource data returned by the source station according to the resource acquisition request, sending the resource data to other first-level node servers in different areas with the source station.
The invention also discloses B6 and a resource synchronization method, wherein the method is suitable for the first-level node server in different areas with the source station, and comprises the following steps:
receiving resource information sent by a first-level node server in the same area as a source station;
and acquiring and storing corresponding resource data according to the received resource information.
B7, the method according to B6, wherein the method further comprises:
and judging whether the corresponding resource data are stored in the local database according to the received resource information, and if not, executing the step of acquiring and storing the corresponding resource data according to the received resource information.
B8, the method according to B6, wherein the resource information is a specified list in which identification information of a resource is recorded, and the acquiring and storing corresponding resource data according to the received resource information includes:
according to the identification information of the resource, sending a request for acquiring resource data to a source station;
and receiving and storing the resource data returned by the source station.
The method of B9, as set forth in B6, wherein the resource information is resource data, and the obtaining and storing corresponding resource data according to the received resource information includes:
and storing the received resource data.
The invention also discloses C10, a resource synchronization device, wherein the device is suitable for the first level node server in the same area with the source station, and comprises:
the judging unit is suitable for judging whether the received resource acquisition request is initiated for the first time;
and the sending unit is suitable for sending the corresponding resource information to the first-level node servers in different areas with the source station if the judgment result is yes, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and the resource synchronization is realized.
C11, the device of C10, wherein,
the sending unit is suitable for acquiring the identification information of the corresponding resource; recording the acquired identification information of the resources into a specified list; and according to a preset period, sending the identification information of the recorded resources in the appointed list to a first-level node server in a different area with the source station.
C12, the apparatus as in C11, wherein the identification information of the resource includes URL information of the resource.
C13, the apparatus of C11, wherein after the transmitting unit transmits the identification information of the resource recorded in the designated list to the first level node server in a different area from the source station, the apparatus further comprises:
and a deleting unit adapted to delete the identification information of the resource recorded in the specified list.
C14, the device of C10, wherein,
and the sending unit is suitable for sending the resource data to other first-level node servers in different areas with the source station when receiving the resource data returned by the source station according to the resource acquisition request.
The invention also discloses D15, a resource synchronization device, wherein the device is suitable for the first level node server in different areas with the source station, and comprises:
the receiving unit is suitable for receiving the resource information sent by the first-level node server in the same area as the source station;
and the acquisition unit is suitable for acquiring and storing corresponding resource data according to the received resource information.
D16, the apparatus of D15, wherein the apparatus further comprises:
and the judging unit is suitable for judging whether the corresponding resource data are stored in the local database according to the received resource information, and if not, executing the step of acquiring and storing the corresponding resource data according to the received resource information.
D17, the apparatus as recited in D16, wherein the resource information is a specified list recording identification information of resources, the obtaining unit is adapted to send a request for obtaining resource data to the source station according to the identification information of the resources; and receiving and storing the resource data returned by the source station.
D18, the apparatus according to D15, wherein the resource information is resource data, and the obtaining unit is adapted to store the received resource data.
The invention also discloses E19 and electronic equipment, wherein the electronic equipment comprises:
a processor; and the number of the first and second groups,
a memory arranged to store computer executable instructions that when executed cause the processor to perform a method according to any one of A1-A5 or B6-B9.
The invention also discloses F20, a computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any one of A1-A5 or B6-B9.

Claims (10)

1. A resource synchronization method, wherein the method is applied to a first level node server in the same area with a source station, and comprises the following steps:
judging whether the received resource acquisition request is initiated for the first time;
if the resource information is judged to be the resource information, the corresponding resource information is sent to the first-level node servers in different areas with the source station, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and resource synchronization is achieved.
2. The method of claim 1, wherein the transmitting the corresponding resource information to the first level node server in a different area from the source station comprises:
acquiring identification information of corresponding resources;
recording the acquired identification information of the resources into a specified list;
and according to a preset period, sending the identification information of the recorded resources in the appointed list to a first-level node server in a different area with the source station.
3. The method of claim 2, wherein the identification information of the resource comprises URL information of the resource.
4. The method of claim 2, wherein after transmitting the identification information specifying the resources recorded in the list to the first level node server in a different area from the source station, the method further comprises:
the identification information of the recorded resources in the specified list is deleted.
5. The method of claim 1, wherein the transmitting the corresponding resource information to the first level node server in a different area from the source station comprises:
and when receiving the resource data returned by the source station according to the resource acquisition request, sending the resource data to other first-level node servers in different areas with the source station.
6. A resource synchronization method, wherein the method is applied to a first level node server in a different area from a source station, and comprises the following steps:
receiving resource information sent by a first-level node server in the same area as a source station;
and acquiring and storing corresponding resource data according to the received resource information.
7. A resource synchronization apparatus, wherein the apparatus is adapted for a first level node server in the same area as a source station, comprising:
the judging unit is suitable for judging whether the received resource acquisition request is initiated for the first time;
and the sending unit is suitable for sending the corresponding resource information to the first-level node servers in different areas with the source station if the judgment result is yes, so that the first-level node servers in different areas with the source station acquire and store the resource data according to the resource information, and the resource synchronization is realized.
8. A resource synchronization apparatus adapted for a first level node server located in a different area from a source station, comprising:
the receiving unit is suitable for receiving the resource information sent by the first-level node server in the same area as the source station;
and the acquisition unit is suitable for acquiring and storing corresponding resource data according to the received resource information.
9. An electronic device, wherein the electronic device comprises:
a processor; and the number of the first and second groups,
a memory arranged to store computer executable instructions that, when executed, cause the processor to perform the method of any of claims 1 to 5 or claim 6.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 1-5 or claim 6.
CN201811601137.7A 2018-12-26 2018-12-26 Resource synchronization method and device Pending CN111371824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811601137.7A CN111371824A (en) 2018-12-26 2018-12-26 Resource synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811601137.7A CN111371824A (en) 2018-12-26 2018-12-26 Resource synchronization method and device

Publications (1)

Publication Number Publication Date
CN111371824A true CN111371824A (en) 2020-07-03

Family

ID=71212055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811601137.7A Pending CN111371824A (en) 2018-12-26 2018-12-26 Resource synchronization method and device

Country Status (1)

Country Link
CN (1) CN111371824A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130262766A1 (en) * 2012-03-27 2013-10-03 Sk Telecom Co., Ltd. Cache Synchronization System, Cache Synchronization Method and Apparatus thereof
CN103905916A (en) * 2012-12-25 2014-07-02 中国科学院声学研究所 Region-oriented set top box P2P-Vod system and data pre-deployment method
CN106550047A (en) * 2016-11-25 2017-03-29 上海爱数信息技术股份有限公司 Document fast access system and method based on content distribution mechanism
CN107645386A (en) * 2017-09-25 2018-01-30 网宿科技股份有限公司 A kind of method and apparatus for obtaining data resource

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130262766A1 (en) * 2012-03-27 2013-10-03 Sk Telecom Co., Ltd. Cache Synchronization System, Cache Synchronization Method and Apparatus thereof
CN103905916A (en) * 2012-12-25 2014-07-02 中国科学院声学研究所 Region-oriented set top box P2P-Vod system and data pre-deployment method
CN106550047A (en) * 2016-11-25 2017-03-29 上海爱数信息技术股份有限公司 Document fast access system and method based on content distribution mechanism
CN107645386A (en) * 2017-09-25 2018-01-30 网宿科技股份有限公司 A kind of method and apparatus for obtaining data resource

Similar Documents

Publication Publication Date Title
CN104468399B (en) Data transmission method and device and server
CN111143739B (en) Page jump method, computing device and computer storage medium
CN108009147B (en) Electronic book cover generation method, electronic device and computer storage medium
CN110968478A (en) Log collection method, server and computer storage medium
CN104424352A (en) System and method for providing agent service to user terminal
CN112907840A (en) Pop-up control method and device for shared charge pal and electronic equipment
CN106844479B (en) Method and device for compressing and decompressing file
CN111222592A (en) Method and device for acquiring two-dimensional code of equipment
CN107329832B (en) Data receiving method and device
CN106682199B (en) Method and device for realizing automatic expansion of Mongos cluster
CN111371824A (en) Resource synchronization method and device
CN111192166B (en) Method and device for processing ordering information, storage medium and electronic device
CN110889073A (en) Page request response method, server and computer storage medium
CN106817592B (en) Method and device for recommending and scheduling home page
CN111198725B (en) Application starting processing method, computing equipment and computer storage medium
CN109472540B (en) Service processing method and device
CN116303320A (en) Real-time task management method, device, equipment and medium based on log file
CN106951236B (en) Plug-in development method and device
CN111443918A (en) Channel access method and device for business object installation package
CN111367868A (en) Method and device for processing file acquisition request
CN108647095B (en) Verification method of idle storage space, storage terminal, verification terminal and system
CN114968963A (en) File overwriting method and device and electronic equipment
CN110597766A (en) Data transmission method and device
CN112887352A (en) Image file uploading method and device for Docker container
CN111563153A (en) Recommendation method and terminal based on clipboard information sharing

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