Resource synchronization method and device
By determining the first time of resource acquisition requests in the content distribution network and synchronizing resource information between first-level node servers in different regions, the network delay problem when acquiring resources across regions is solved and the user experience is improved.
Patent Information
- Application Number
- CN201811601137.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-26
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2038-12-26
AI Technical Summary
In a content distribution network, when edge node servers need to obtain resources across regions, they are easily affected by network delays and affect user experience.
By judging whether the resource acquisition request is initiated for the first time, if it is the first time, resource information is sent to the first-level node server in different regions to achieve resource synchronization, and resource data is obtained and saved in advance to avoid delays in subsequent requests.
When receiving a resource acquisition request, the existing resource data is saved locally, which avoids obtaining resources from the origin site, reduces request response delays, and improves user experience.
Smart Images

Figure CN111371824B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a resource synchronization method, device, electronic device and computer-readable storage medium. Background Art
[0002] In a content distribution network, when edge node servers deployed in various places receive resource acquisition requests, they need to obtain resources from the upper-level node servers step by step. If the first-level node servers in the region do not have the corresponding resources, they need to obtain resources from the source station. If the source station is in another region, it is necessary to obtain resources across regions, which is easily affected by factors such as the network, resulting in delayed responses to requests and affecting the user experience. Summary of the invention
[0003] In view of the above problems, the present invention is proposed to provide a resource synchronization method, device, electronic device and computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0004] According to one aspect of the present invention, a resource synchronization method is provided, wherein the method is applicable to a first-level node server in the same area as a source station, comprising:
[0005] Determine whether the received resource acquisition request is initiated for the first time;
[0006] If the judgment is yes, the corresponding resource information is sent to the first-level node server in a different area from the source station, so that the first-level node server in a different area from the source station obtains and stores resource data according to the resource information to achieve resource synchronization.
[0007] Optionally, sending the corresponding resource information to a first-level node server in a different area from the source station includes:
[0008] Obtain identification information of corresponding resources;
[0009] Record the identification information of the acquired resources into the specified list;
[0010] According to a preset period, the identification information of the resources recorded in the specified list is sent to the first-level node server in a different area from the source station.
[0011] Optionally, the identification information of the resource includes URL information of the resource.
[0012] Optionally, after sending the identification information of the resources recorded in the specified list to the first-level node server in a different area from the source station, the method further includes:
[0013] Deletes the identification information of the resources recorded in the specified list.
[0014] Optionally, sending the corresponding resource information to the first-level node server in a different area from the source station includes:
[0015] When the resource data returned by the source station according to the resource acquisition request is received, the resource data is sent to other first-level node servers in different areas from the source station.
[0016] According to another aspect of the present invention, a resource synchronization method is provided, wherein the method is applicable to a first-level node server in a different region from a source station, comprising:
[0017] Receive resource information sent by the first-level node server in the same area as the source station;
[0018] According to the received resource information, the corresponding resource data is obtained and stored.
[0019] Optionally, the method further comprises:
[0020] According to the received resource information, it is determined whether the corresponding resource data has been stored in the local database. If it is determined not, the steps of obtaining and storing the corresponding resource data according to the received resource information are executed.
[0021] Optionally, the resource information is a specified list recording identification information of resources, and acquiring and storing corresponding resource data according to the received resource information includes:
[0022] According to the identification information of the resource, a request for obtaining resource data is sent to the origin station;
[0023] Receive and store resource data returned by the source station.
[0024] Optionally, the resource information is resource data, and acquiring and storing corresponding resource data according to the received resource information includes:
[0025] The received resource data is stored.
[0026] According to another aspect of the present invention, a resource synchronization device is provided, wherein the device is applicable to a first-level node server in the same area as a source station, comprising:
[0027] A determination unit, adapted to determine whether the received resource acquisition request is initiated for the first time;
[0028] The sending unit is adapted to send the corresponding resource information to the first-level node server in a different area from the source station if the judgment is yes, so that the first-level node server in a different area from the source station obtains and stores resource data according to the resource information to achieve resource synchronization.
[0029] Optionally,
[0030] The sending unit is suitable for obtaining identification information of corresponding resources; recording the obtained identification information of resources into a specified list; and sending the identification information of resources recorded in the specified list to a first-level node server in a different area from the source station according to a preset period.
[0031] Optionally, the identification information of the resource includes URL information of the resource.
[0032] Optionally, after the sending unit sends the identification information of the resources recorded in the specified list to the first-level node server in a different area from the source station, the device further includes:
[0033] The deletion unit is adapted to delete the identification information of the resources recorded in the specified list.
[0034] Optionally,
[0035] The sending unit is adapted to send the resource data to other first-level node servers in different areas from the source station when receiving the resource data returned by the source station according to the resource acquisition request.
[0036] According to another aspect of the present invention, a resource synchronization device is provided, wherein the device is applicable to a first-level node server in a different area from a source station, comprising:
[0037] A receiving unit, adapted to receive resource information sent by a first-level node server in the same area as the source station;
[0038] The acquisition unit is adapted to acquire and store corresponding resource data according to the received resource information.
[0039] Optionally, the device further comprises:
[0040] The judgment unit is adapted to judge whether the corresponding resource data has been stored in the local database according to the received resource information, and if the judgment is not, then execute the step of obtaining and storing the corresponding resource data according to the received resource information.
[0041] Optionally, the resource information is a specified list recording identification information of resources, and the acquisition unit is adapted to send a request for acquiring resource data to a source station according to the identification information of the resources; and receive and store the resource data returned by the source station.
[0042] Optionally, the resource information is resource data, and the acquisition unit is suitable for storing the received resource data.
[0043] According to another aspect of the present invention, there is provided an electronic device, wherein the electronic device comprises:
[0044] processor; and,
[0045] A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to the foregoing.
[0046] According to yet another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the aforementioned method is implemented.
[0047] 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 it is determined to be, the corresponding resource information is sent to the first-level node server in a different area from the source station, so that the first-level node server in a different area from the source station obtains and stores resource data according to the resource information to achieve resource synchronization. In this way, before receiving the resource acquisition request, the first-level node server in a different area from the source station pre-acquires the corresponding resources and saves them locally. When receiving the resource acquisition request, because the local has been pre-saved, there is no need to obtain resources from the source station again, avoiding delays in request responses and ensuring the user experience.
[0048] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0050] Figure 1 A schematic diagram showing a flow chart of a resource synchronization method according to an embodiment of the present invention is shown;
[0051] Figure 2 A schematic diagram showing a flow chart of a resource synchronization method according to another embodiment of the present invention;
[0052] Figure 3 A schematic diagram showing the structure of a resource synchronization device according to an embodiment of the present invention is shown;
[0053] Figure 4A schematic diagram showing the structure of a resource synchronization device according to another embodiment of the present invention is shown;
[0054] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention is shown;
[0055] Figure 6 A schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0056] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0057] Figure 1 FIG. 2 shows a schematic diagram of a resource synchronization method according to an embodiment of the present invention. Figure 1 As shown, this method is applicable to the first-level node server in the same region as the source station, including:
[0058] Step S110, determining whether the received resource acquisition request is initiated for the first time.
[0059] When a resource acquisition request is initiated for the first time, the first-level node server usually needs to go back to the source for processing, that is, the corresponding resource data is not saved locally, and the corresponding data needs to be obtained from the source station and saved locally, so that when the acquisition request for the same resource is received again, there is no need to go back to the source for processing. Therefore, when the received resource acquisition request is initiated for the first time, it is the time for the first-level node server in the same area as the source station to save local resources. In order to achieve resource synchronization with the first-level node server in a different area from the source station while the first-level node server in the same area as the source station saves local resources, in this embodiment, it is necessary to determine whether the received resource acquisition request is initiated for the first time.
[0060] Preferably, determining whether the received resource acquisition request is initiated for the first time includes: determining whether the received resource acquisition request needs to be processed back to the source.
[0061] Step S120, if the judgment is yes, the corresponding resource information is sent to the first-level node server in a different area from the source station, so that the first-level node server in a different area from the source station obtains and stores resource data according to the resource information to achieve resource synchronization.
[0062] In this embodiment, the first node server in the same area as the source station actively sends the resource information it has saved to the first-level node server in a different area from the source station to achieve resource synchronization. In this way, the first-level node server in a different area from the source station pre-acquires the corresponding resources and saves them locally before receiving the resource acquisition request. When receiving the resource acquisition request, it does not need to obtain the resources from the source station because the resources have been pre-saved locally, thus avoiding the delay of request response and ensuring the user experience.
[0063] In one embodiment of the present invention, Figure 1 Step S120 of the method shown in FIG. 1 includes sending corresponding resource information to a first-level node server in a different area from the source station, and includes: obtaining identification information of corresponding resources; recording the obtained identification information of the resources in a specified list; and sending the identification information of the resources recorded in the specified list to a first-level node server in a different area from the source station according to a preset period.
[0064] In this embodiment, the resource information sent to the first-level node server in a different area from the source station is the identification information of the resource. In this way, the first-level node server in a different area from the source station can obtain the resource based on the identification information of the resource. For example, a designated list is created. When the first-level node server in the same area as the source station receives a resource acquisition request for the first time, it obtains the resource and records the identification information of the resource in the designated list. Five minutes later, the identification information of 10 resources has been recorded in the designated list, and then the identification information of these 10 resources is sent to the first-level node server in a different area from the source station.
[0065] Preferably, the above-mentioned resource identification information includes URL information of the resource.
[0066] URL is a uniform resource locator, which is the address of a standard resource on the Internet. Every file on the Internet has a unique URL, which contains information indicating the location of the file. In this way, the first-level node server in a different area from the source station can obtain the corresponding resource data based on the resource URL information.
[0067] Further, after the identification information of the resources recorded in the specified list is sent to the first-level node server in a different area from the source station, Figure 1 The method shown also includes: deleting identification information of resources recorded in the specified list.
[0068] Whenever the identification information of the resources recorded in the instruction list is sent to the first-level node server in a different area from the source station, it needs to be cleared so that the identification information of the resources can be sent repeatedly to achieve reasonable utilization of the resources in the specified list.
[0069] In one embodiment of the invention, Figure 1 Sending corresponding resource information to the first-level node server in a different area from the source station in step S120 of the method shown includes: when receiving 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 from the source station.
[0070] In the above embodiment, it is pointed out that the resource information sent to the first-level node server in a different area from the source station is the identification information of the resource, and the first-level node server in a different area from the source station actively obtains the resource data according to the identification information of the resource. In this embodiment, the resource information sent to the first-level node server in a different area from the source station is the resource data itself, so that the first-level node server in a different area from the source station does not need to obtain the resource data again, but can directly save it, thereby further saving resources and ensuring the efficiency of resource synchronization.
[0071] Figure 2 FIG. 2 shows a schematic diagram of a resource synchronization method according to another embodiment of the present invention. Figure 2 As shown, the method is applicable to the first-level node server in a different area from the source station, including:
[0072] Step S210, receiving resource information sent by a first-level node server in the same area as the source station.
[0073] Step S220: Obtain and store corresponding resource data according to the received resource information.
[0074] When the first-level node server in the same area as the source station receives a resource acquisition request for the first time, it will obtain the corresponding resources from the source station. In order to achieve resource synchronization, the corresponding resource information will be sent to the first-level node server in a different area from the source station. The first-level node server in a different area from the source station will pre-acquire and save the corresponding resource data based on the resource information. When receiving the acquisition request for the resource, since it has been pre-saved locally, there is no need to obtain the resource from the source station again, avoiding delays in request responses and ensuring the user experience.
[0075] In one embodiment of the present invention, Figure 2 The method shown also includes:
[0076] According to the received resource information, it is determined whether the corresponding resource data has been stored in the local database. If it is determined not, the steps of obtaining and storing the corresponding resource data according to the received resource information are executed.
[0077] The resource information sent by the first node server in the same area as the source station is when it receives the resource acquisition request for the first time, but it does not rule out that the first node server in a different area from the source station has received the resource acquisition request before, and the resource has been saved locally. In this case, it is not necessary to obtain the corresponding resource based on 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 first determined whether the corresponding resource data has been stored in the local database. If it is determined to be yes, no processing is performed.
[0078] In one embodiment of the present invention, Figure 2 The resource information in the method shown is a specified list that records the identification information of the resources. In step S220, obtaining and storing the corresponding resource data based on the received resource information includes: sending a request to the source station to obtain the resource data based on the identification information of the resource; receiving and storing the resource data returned by the source station.
[0079] 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. In this way, it is necessary to actively obtain the corresponding resource data from the source station according to the identification information of the resource.
[0080] In one embodiment of the present invention, Figure 2 The resource information in the method shown is resource data, and obtaining and storing corresponding resource data according to the received resource information in step S220 includes: storing the received resource data.
[0081] 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, so the resource data can be directly saved.
[0082] Figure 3 FIG. 2 shows a schematic diagram of the structure of a resource synchronization device according to an embodiment of the present invention. Figure 3 As shown, the resource synchronization device 300 is applicable to a first-level node server in the same area as the source station, and includes:
[0083] The determination unit 310 is adapted to determine whether the received resource acquisition request is initiated for the first time.
[0084] When a resource acquisition request is initiated for the first time, the first-level node server usually needs to go back to the source for processing, that is, the corresponding resource data is not saved locally, and the corresponding data needs to be obtained from the source station and saved locally, so that when the acquisition request for the same resource is received again, there is no need to go back to the source for processing. Therefore, when the received resource acquisition request is initiated for the first time, it is the time for the first-level node server in the same area as the source station to save local resources. In order to achieve resource synchronization with the first-level node server in a different area from the source station while the first-level node server in the same area as the source station saves local resources, in this embodiment, it is necessary to determine whether the received resource acquisition request is initiated for the first time.
[0085] Preferably, the determining unit 310 is adapted to determine whether the received resource acquisition request needs to be processed back to the source.
[0086] The sending unit 320 is adapted to send the corresponding resource information to the first-level node server in a different area from the source station if the judgment is yes, so that the first-level node server in a different area from the source station obtains and stores resource data according to the resource information to achieve resource synchronization.
[0087] In this embodiment, the first node server in the same area as the source station actively sends the resource information it has saved to the first-level node server in a different area from the source station to achieve resource synchronization. In this way, the first-level node server in a different area from the source station pre-acquires the corresponding resources and saves them locally before receiving the resource acquisition request. When receiving the resource acquisition request, it does not need to obtain the resources from the source station because the resources have been pre-saved locally, thus avoiding the delay of request response and ensuring the user experience.
[0088] In one embodiment of the present invention, Figure 3 The sending unit 320 shown is suitable for obtaining identification information of corresponding resources; recording the obtained identification information of resources in a specified list; and sending the identification information of resources recorded in the specified list to the first-level node server in a different area from the source station according to a preset period.
[0089] In this embodiment, the resource information sent to the first-level node server in a different area from the source station is the identification information of the resource. In this way, the first-level node server in a different area from the source station can obtain the resource based on the identification information of the resource. For example, a designated list is created. When the first-level node server in the same area as the source station receives a resource acquisition request for the first time, it obtains the resource and records the identification information of the resource in the designated list. Five minutes later, the identification information of 10 resources has been recorded in the designated list, and then the identification information of these 10 resources is sent to the first-level node server in a different area from the source station.
[0090] Preferably, the above-mentioned resource identification information includes URL information of the resource.
[0091] URL is a uniform resource locator, which is the address of a standard resource on the Internet. Every file on the Internet has a unique URL, which contains information indicating the location of the file. In this way, the first-level node server in a different area from the source station can obtain the corresponding resource data based on the resource URL information.
[0092] Further, after the sending unit 320 sends the identification information of the resources recorded in the specified list to the first-level node server in a different area from the source station, Figure 3 The device shown also includes:
[0093] The deletion unit is adapted to delete the identification information of the resources recorded in the specified list.
[0094] Whenever the identification information of the resources recorded in the instruction list is sent to the first-level node server in a different area from the source station, it needs to be cleared so that the identification information of the resources can be sent repeatedly to achieve reasonable utilization of the resources in the specified list.
[0095] In one embodiment of the invention, Figure 3 The sending unit 320 shown is suitable for sending the resource data to other first-level node servers in different areas from the source station when receiving the resource data returned by the source station according to the resource acquisition request.
[0096] In the above embodiment, it is pointed out that the resource information sent to the first-level node server in a different area from the source station is the identification information of the resource, and the first-level node server in a different area from the source station actively obtains the resource data according to the identification information of the resource. In this embodiment, the resource information sent to the first-level node server in a different area from the source station is the resource data itself, so that the first-level node server in a different area from the source station does not need to obtain the resource data again, but can directly save it, thereby further saving resources and ensuring the efficiency of resource synchronization.
[0097] Figure 4 FIG. 4 shows a schematic diagram of the structure of a resource synchronization device according to another embodiment of the present invention. Figure 4 As shown, the resource synchronization device 400 is applicable to a first-level node server in a different area from the source station, and includes:
[0098] The receiving unit 410 is adapted to receive resource information sent by a first-level node server in the same area as the source station.
[0099] The acquisition unit 420 is adapted to acquire and store corresponding resource data according to the received resource information.
[0100] When the first-level node server in the same area as the source station receives a resource acquisition request for the first time, it will obtain the corresponding resources from the source station. In order to achieve resource synchronization, the corresponding resource information will be sent to the first-level node server in a different area from the source station. The first-level node server in a different area from the source station will pre-acquire and save the corresponding resource data based on the resource information. When receiving the acquisition request for the resource, since it has been pre-saved locally, there is no need to obtain the resource from the source station again, avoiding delays in request responses and ensuring the user experience.
[0101] In one embodiment of the present invention, Figure 4 The device shown also includes:
[0102] The judgment unit is adapted to judge whether the corresponding resource data has been stored in the local database according to the received resource information, and if the judgment is not, then execute the step of obtaining and storing the corresponding resource data according to the received resource information.
[0103] The resource information sent by the first node server in the same area as the source station is when it receives the resource acquisition request for the first time, but it does not rule out that the first node server in a different area from the source station has received the resource acquisition request before, and the resource has been saved locally. In this case, it is not necessary to obtain the corresponding resource based on 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 first determined whether the corresponding resource data has been stored in the local database. If it is determined to be yes, no processing is performed.
[0104] In one embodiment of the present invention, Figure 4 The resource information received by the receiving unit 410 is a specified list recording identification information of resources. The acquiring unit 420 is adapted to send a request for acquiring resource data to the source station according to the identification information of the resources; and receive and store the resource data returned by the source station.
[0105] 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. In this way, it is necessary to actively obtain the corresponding resource data from the source station according to the identification information of the resource.
[0106] In one embodiment of the present invention, Figure 4 The resource information received by the receiving unit 410 is resource data, and the acquiring unit 420 is suitable for storing the received resource data.
[0107] 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, so the resource data can be directly saved.
[0108] 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 it is determined to be, the corresponding resource information is sent to the first-level node server in a different area from the source station, so that the first-level node server in a different area from the source station obtains resource data according to the resource information and stores it, thereby achieving resource synchronization. In this way, the first-level node server in a different area from the source station pre-acquires the corresponding resources and saves them locally before receiving the resource acquisition request. When the resource acquisition request is received, since the local has been pre-saved, there is no need to obtain resources from the source station, thereby avoiding delays in request responses and ensuring the user experience.
[0109] It should be noted that:
[0110] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. Various general-purpose devices can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of device. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific language is for the purpose of disclosing the best mode of the present invention.
[0111] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0112] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0113] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0114] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0115] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or complete functions of some or complete components of a resource synchronization device, an electronic device, and a computer-readable storage medium according to an embodiment of the present invention. The present invention may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing a portion or a complete portion of the method described herein. Such a program implementing the present invention may be stored on a computer-readable medium, 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 provided in any other form.
[0116] For example, Figure 5 1 shows a schematic diagram of the structure of an electronic device according to an embodiment of the present 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 can 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 for executing Figure 1 or Figure 2The storage space 530 for program code 540 of any method step shown in the figure and in each embodiment. For example, the storage space 530 for program code may include various program codes 540 respectively used to implement various steps in the above method. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such computer program products are usually, for example, Figure 6 The computer readable storage medium 600. The computer readable storage medium 600 may have Figure 5 The memory 520 in the electronic device of the present invention is similarly arranged as a storage segment, storage space, etc. The program code can be compressed, for example, in an appropriate form. Generally, the storage unit stores program code 610 for executing the method steps according to the present invention, that is, program code that can be read by a processor such as 510, and when these program codes are run by the electronic device, the electronic device is caused to execute the various steps in the method described above.
[0117] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present invention can be implemented by means of hardware including several different elements and by means of appropriately programmed computers. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, first, and third, etc. does not indicate any order. These words may be interpreted as names.
[0118] The present invention discloses A1, a resource synchronization method, wherein the method is applicable to a first-level node server in the same area as a source station, comprising:
[0119] Determine whether the received resource acquisition request is initiated for the first time;
[0120] If the judgment is yes, the corresponding resource information is sent to the first-level node server in a different area from the source station, so that the first-level node server in a different area from the source station obtains and stores resource data according to the resource information to achieve resource synchronization.
[0121] A2. The method as described in A1, wherein sending the corresponding resource information to the first-level node server in a different area from the source station comprises:
[0122] Obtain identification information of corresponding resources;
[0123] Record the identification information of the acquired resources into the specified list;
[0124] According to a preset period, the identification information of the resources recorded in the specified list is sent to the first-level node server in a different area from the source station.
[0125] A3. A method as described in A2, wherein the identification information of the resource includes URL information of the resource.
[0126] A4. The method as described in A2, wherein after sending the identification information of the resources recorded in the specified list to the first-level node server in a different area from the source station, the method further comprises:
[0127] Deletes the identification information of the resources recorded in the specified list.
[0128] A5. The method as described in A1, wherein sending the corresponding resource information to the first-level node server in a different area from the source station comprises:
[0129] When the resource data returned by the source station according to the resource acquisition request is received, the resource data is sent to other first-level node servers in different areas from the source station.
[0130] The present invention also discloses B6, a resource synchronization method, wherein the method is applicable to a first-level node server in a different area from a source station, comprising:
[0131] Receive resource information sent by the first-level node server in the same area as the source station;
[0132] According to the received resource information, the corresponding resource data is obtained and stored.
[0133] B7. The method as described in B6, wherein the method further comprises:
[0134] According to the received resource information, it is determined whether the corresponding resource data has been stored in the local database. If it is determined not, the steps of obtaining and storing the corresponding resource data according to the received resource information are executed.
[0135] B8. The method as described in B6, wherein the resource information is a specified list of identification information of recorded resources, and the acquiring and storing corresponding resource data according to the received resource information comprises:
[0136] According to the identification information of the resource, a request for obtaining resource data is sent to the origin station;
[0137] Receive and store resource data returned by the source station.
[0138] B9. The method as described in B6, wherein the resource information is resource data, and the acquiring and storing corresponding resource data according to the received resource information comprises:
[0139] The received resource data is stored.
[0140] The present invention also discloses C10, a resource synchronization device, wherein the device is applicable to a first-level node server in the same area as a source station, comprising:
[0141] A determination unit, adapted to determine whether the received resource acquisition request is initiated for the first time;
[0142] The sending unit is adapted to send the corresponding resource information to the first-level node server in a different area from the source station if the judgment is yes, so that the first-level node server in a different area from the source station obtains and stores resource data according to the resource information to achieve resource synchronization.
[0143] C11. The device as described in C10, wherein
[0144] The sending unit is suitable for obtaining identification information of corresponding resources; recording the obtained identification information of resources into a specified list; and sending the identification information of resources recorded in the specified list to a first-level node server in a different area from the source station according to a preset period.
[0145] C12. The device as described in C11, wherein the identification information of the resource includes URL information of the resource.
[0146] C13. The device as described in C11, wherein after the sending unit sends the identification information of the resources recorded in the specified list to the first-level node server in a different area from the source station, the device further includes:
[0147] The deletion unit is adapted to delete the identification information of the resources recorded in the specified list.
[0148] C14. The device as described in C10, wherein
[0149] The sending unit is adapted to send the resource data to other first-level node servers in different areas from the source station when receiving the resource data returned by the source station according to the resource acquisition request.
[0150] The present invention also discloses D15, a resource synchronization device, wherein the device is applicable to a first-level node server in a different area from a source station, comprising:
[0151] A receiving unit, adapted to receive resource information sent by a first-level node server in the same area as the source station;
[0152] The acquisition unit is adapted to acquire and store corresponding resource data according to the received resource information.
[0153] D16. The device as described in D15, wherein the device further comprises:
[0154] The judgment unit is adapted to judge whether the corresponding resource data has been stored in the local database according to the received resource information, and if the judgment is not, then execute the step of obtaining and storing the corresponding resource data according to the received resource information.
[0155] D17. An apparatus as described in D16, wherein the resource information is a specified list recording identification information of resources, and the acquisition unit is suitable for sending a request for obtaining resource data to a source station based on the identification information of the resources; receiving and storing the resource data returned by the source station.
[0156] D18. The device as described in D15, wherein the resource information is resource data, and the acquisition unit is suitable for storing the received resource data.
[0157] The present invention also discloses E19, an electronic device, wherein the electronic device comprises:
[0158] processor; and,
[0159] A memory arranged to store computer executable instructions, which, when executed, cause the processor to perform a method according to any one of A1 to A5 or B6 to B9.
[0160] The present invention also discloses F20, a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method described in any one of A1 to A5 or B6 to B9 is implemented.
Claims
1. A resource synchronization method, wherein: This method is applicable to the first-level node servers in the same region as the source station, including: Determine whether the received resource acquisition request is initiated for the first time; If the judgment is yes, the corresponding resource information is sent to the first-level node server in a different area from the source station, so that the first-level node server in a different area from the source station obtains and stores resource data according to the resource information to achieve resource synchronization.
2. The method of claim 1, wherein: The sending of the corresponding resource information to the first-level node server in a different area from the source station includes: Obtain identification information of corresponding resources; Record the identification information of the acquired resources into the specified list; According to a preset period, the identification information of the resources recorded in the specified list is sent to the first-level node server in a different area from the source station.
3. The method of claim 2, wherein: The identification information of the resource includes URL information of the resource.
4. The method of claim 2, wherein: After sending the identification information of the resources recorded in the specified list to the first-level node server in a different area from the source station, the method further includes: Deletes the identification information of the resources recorded in the specified list.
5. The method of claim 1, wherein: The sending of the corresponding resource information to the first-level node server in a different area from the source station includes: When the resource data returned by the source station according to the resource acquisition request is received, the resource data is sent to other first-level node servers in different areas from the source station.
6. A resource synchronization method, wherein: This method is applicable to first-level node servers in different regions from the source station, including: Receive resource information sent by the first-level node server in the same area as the source station; According to the received resource information, the corresponding resource data is obtained and stored.
7. The method of claim 6, wherein: The method further includes: According to the received resource information, it is determined whether the corresponding resource data has been stored in the local database. If it is determined not, the steps of obtaining and storing the corresponding resource data according to the received resource information are executed.
8. The method of claim 6, wherein: The resource information is a specified list 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, a request for obtaining resource data is sent to the origin station; Receive and store resource data returned by the source station.
9. The method of claim 6, wherein: The resource information is resource data, and the acquiring and storing of corresponding resource data according to the received resource information includes: The received resource data is stored.
10. A resource synchronization device, wherein: The device is suitable for the first-level node server in the same area as the source station, including: A determination unit, adapted to determine whether the received resource acquisition request is initiated for the first time; The sending unit is adapted to send the corresponding resource information to the first-level node server in a different area from the source station if the judgment is yes, so that the first-level node server in a different area from the source station obtains and stores resource data according to the resource information to achieve resource synchronization.
11. The device of claim 10, wherein: The sending unit is suitable for obtaining identification information of corresponding resources; recording the obtained identification information of resources into a specified list; and sending the identification information of resources recorded in the specified list to a first-level node server in a different area from the source station according to a preset period.
12. The device of claim 11, wherein: The identification information of the resource includes URL information of the resource.
13. The device of claim 11, wherein: After the sending unit sends the identification information of the resources recorded in the specified list to the first-level node server in a different area from the source station, the device further includes: The deletion unit is adapted to delete the identification information of the resources recorded in the specified list.
14. The device of claim 10, wherein: The sending unit is adapted to send the resource data to other first-level node servers in different areas from the source station when receiving the resource data returned by the source station according to the resource acquisition request.
15. A resource synchronization device, wherein: The device is suitable for first-level node servers in different areas from the source station, including: A receiving unit, adapted to receive resource information sent by a first-level node server in the same area as the source station; The acquisition unit is adapted to acquire and store corresponding resource data according to the received resource information.
16. The device of claim 15, wherein: The device also includes: The judgment unit is adapted to judge whether the corresponding resource data has been stored in the local database according to the received resource information, and if the judgment is not, then execute the step of obtaining and storing the corresponding resource data according to the received resource information.
17. The device of claim 16, wherein: The resource information is a specified list recording identification information of resources. The acquisition unit is adapted to send a request for acquiring resource data to a source station according to the identification information of the resources; and receive and store the resource data returned by the source station.
18. The device of claim 15, wherein: The resource information is resource data, and the acquisition unit is suitable for storing the received resource data.
19. An electronic device, wherein: The electronic device includes: processor; and, A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to any one of claims 1 to 5 or claims 6 to 9.
20. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method of any one of claims 1 to 5 or claims 6 to 9 is implemented.
