CDN service network element, CDN cache updating method and computer readable storage medium

By maintaining the rule relationship library and using the file server to update the CDN cache, the problem of untimely update of CDN cache data is solved, and the effect of electronic devices obtaining the latest business data is achieved.

CN119807559APending Publication Date: 2025-04-11JUHAOKAN TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411676579.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The service data cached by the CDN cannot be updated in time before the expiration time arrives, resulting in the electronic device not obtaining the latest service data.

Method used

By maintaining the rule relationship library, it is determined that when the data in the target database table changes, the target service data is obtained and the data is cached through the file server, and the cache address of the CDN node is updated.

Benefits of technology

It realizes the timely update of the CDN cached service data when the business data changes, so as to ensure that electronic devices can obtain the latest business data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807559A_ABST
    Figure CN119807559A_ABST
Patent Text Reader

Abstract

The invention relates to a CDN service network element, a CDN cache updating method and a computer readable storage medium, and the CDN service network element comprises the following steps: when it is determined that data in a target database table is changed and a target database table identifier matched with the identifier of the target database table exists in a rule relation library, updating the target database table according to the target database table identifier, determining a target URL based on target URL information corresponding to the target database table identifier; obtaining target business data stored in the target database table based on the target URL; sending the target business data to a file server, so that the file server caches the target business data; and receiving a first URL returned by the file server, the first URL being used by the CDN node to pull the target service data from the file server, and caching the target service data to a cache address indicated by a second URL to update a cache, corresponding to the target database table, of the CDN node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to communication technology, and more specifically, to a CDN service network element, a CDN cache update method, and a computer-readable storage medium. Background Art

[0002] With the development of communication technology, more and more users are browsing the web, listening to music and watching videos through the Internet. In order to ensure that users can quickly obtain network information, a cache layer is often added between users and network servers through a content delivery network (CDN) to increase the speed at which users obtain network information through the CDN network.

[0003] Normally, service data is cached on the CDN and an expiration time is set, and the electronic device can directly obtain the cached service data from the CDN. However, if the service data changes before the expiration time arrives, the cached service data cannot be updated immediately, and the electronic device does not obtain the latest service data. It must wait until the expiration time arrives to obtain the latest service data, so there is a problem of untimely refresh of the cached service data. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present application provide a CDN service network element, a CDN cache update method and a computer-readable storage medium, which can refresh the cached business data in time so that the electronic device can obtain the latest business data.

[0005] In a first aspect, an embodiment of the present application provides a CDN service network element, including: a controller, configured to: when determining that data in a target database table has changed, determine whether there is a database table identifier for indicating the target database table in a rule relationship library, the rule relationship library is used to indicate multiple database table identifiers and uniform resource locator URL information corresponding to each database table identifier, the database table identifier is used to indicate a database table, and the URL information is used to indicate the URL of a business interface corresponding to the database table indicated by the database table identifier; when there is a target database table identifier matching the identifier of the target database table in the rule relationship library, determine a target URL based on the target URL information corresponding to the target database table identifier; based on the target URL, obtain target business data stored in the target database table; send the target business data to a file server so that the file server caches the target business data; receive a first URL returned by the file server, the first URL is used to indicate a cache address at which the file server caches the target business data, the first URL is used by the CDN node to pull the target business data from the file server, and cache the target business data to the cache address indicated by the second URL to update the cache of the CDN node corresponding to the target database table.

[0006] In an embodiment of the present application, by maintaining a rule relationship library for indicating multiple database table identifiers and URL information corresponding to each database table identifier, when it is determined that the data in the target database table has changed, if it is queried that there is a target database table identifier matching the identifier of the target database table in the rule relationship library, the target URL is determined based on the target URL information corresponding to the target database table identifier, the target business data is obtained from the database table based on the target URL, the target business data is cached through the file server, and a first URL for indicating the cache address of the file server to cache the target business data is obtained, thereby facilitating the CDN node to pull the target business data from the server based on the first URL, and update the cache corresponding to the target database table cached by the CDN node by caching the target business data. In this way, when the business data changes, the business data cached by the CDN can be updated in time.

[0007] In some embodiments of the present application, the target URL information includes a target path; after the controller executes receiving the first URL returned by the file server, it is also configured to: save a first correspondence between the first URL and the target path; receive a data request from an electronic device, the data request carrying the target path; in response to the data request, determine whether there is target URL information matching the target path in the rule relationship library; if there is target URL information matching the target path in the rule relationship library, determine whether there is a first correspondence; if there is a first correspondence, return a redirection indication carrying the first URL to the electronic device, the redirection indication being used for the electronic device to redirect to the CDN node via CDN acceleration based on the first URL, and obtain the target business data corresponding to the second URL from the CDN node.

[0008] In the embodiment of the present application, since the target path remains unchanged, saving the first correspondence between the first URL and the target path is to update the correspondence between the cache address for caching the business data obtained from the target database table and the target path, that is, to update the cache address for caching the business data corresponding to the target database table in the file server, thereby updating the target business data cached in the file server, and updating the URL corresponding to the target business data in the file server. In this way, by saving the first correspondence between the first URL and the target path, it is convenient to respond to the received data request. If the target URL information matching the target path exists in the rule relationship library and the first correspondence exists, the electronic device can quickly obtain the target business data based on the first correspondence.

[0009] In some embodiments of the present application, after the controller determines whether a first corresponding relationship exists, it is also configured to: if the first corresponding relationship does not exist, determine the target URL based on the data request and the target URL information; based on the target URL, obtain the target business data stored in the target database table; send the target business data to the file server so that the file server caches the target business data; receive the first URL returned by the file server; save the first corresponding relationship; and return the redirection indication to the electronic device.

[0010] In the embodiment of the present application, since there is no first corresponding relationship, that is, there is no corresponding relationship between the first URL and the target path, the target business data is not cached in the file server, and the CDN node cannot pull the target business data from the file server, and then when the electronic device requests the target business data, the CDN server cannot return the cached target business data to the electronic device. Therefore, in response to the data request, when the file server does not cache the target business data, the target URL can be determined based on the data request and the target URL information; then based on the target URL, the target business data stored in the target database table is obtained, and then the target business data is cached to the file server, the first URL is obtained, and then the first corresponding relationship between the first URL and the target path is saved, and a redirection indication is returned to the electronic device so that the electronic device can obtain the cached target business data from the CDN node. In this way, it is convenient for the electronic device to quickly obtain the target business data from the CDN node.

[0011] In some embodiments of the present application, the target URL information includes the target path, the domain name of the corresponding business interface and the relevant parameter name of the corresponding business interface; the controller executes, in the absence of a first corresponding relationship, based on the data request and the target URL information, to determine the target URL, and is specifically configured as: in the absence of a first corresponding relationship, concatenating the target path, the domain name and the relevant parameter name, and the parameter value corresponding to the relevant parameter name carried in the data request, to obtain the target URL.

[0012] In an embodiment of the present application, the target URL information including the target path, the domain name of the corresponding business interface and the relevant parameter name of the corresponding business interface is stored separately, and then the target path, the domain name and the relevant parameter name, as well as the parameter value corresponding to the relevant parameter name carried in the data request are spliced ​​to obtain the target URL. This facilitates flexible storage of the target path, the domain name of the corresponding business interface and the relevant parameter name of the corresponding business interface, and quickly and accurately splices the target URL, thereby quickly and accurately acquiring the target business data.

[0013] In some embodiments of the present application, before the controller determines whether the target URL information matching the target path exists in the rule relationship library, it is also configured to: determine, in response to the data request, whether the data request is a request for the CDN interface; the controller determines whether the target URL information matching the target path exists in the rule relationship library, and is specifically configured to: when the data request is a request for the CDN interface, determine whether the target URL information matching the target path exists in the rule relationship library; the controller is also configured to: when the data request is not a request for the CDN interface, forward the data request to the business interface corresponding to the target database to obtain the target business data, and forward the target business data to the electronic device.

[0014] In an embodiment of the present application, it is first determined whether the data request is a request for the CDN interface. If the data request is a request for the CDN interface, it is determined whether the target URL information matching the target path exists in the rule relationship library. If the data request is not a request for the CDN interface, the data request is forwarded to the business interface corresponding to the target database to obtain the target business data, and the target business data is forwarded to the electronic device, which can ensure the normal interaction and the electronic device can quickly obtain the target business data.

[0015] In some embodiments of the present application, the tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data; the first identifier is used for the CDN node to respond to the data request after redirecting to the CDN node, and when the cache address indicated by the second URL including the first identifier is empty, go back to the file server to obtain the target business data, cache the target business data to the cache address indicated by the second URL, and return the target business data to the electronic device.

[0016] In the embodiment of the present application, since the tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data, the target business data changes, and the first identifier in the first URL and the second URL also changes with the target business data. Therefore, when the data in the target database table changes, the first URL is updated, and the second URL is updated accordingly. If the target business data is cached to the cache address indicated by the first URL in the file server, when the electronic device is redirected to the CDN node through CDN acceleration based on the first URL, the CDN node will obtain the target business data from the cache address indicated by the second URL including the first identifier. If the cache address indicated by the current second URL has not cached the target business data, the CDN node will return to the source to the file server to obtain the target business data, and cache the target business data to the cache address indicated by the second URL, and return the target business data to the electronic device. In this way, the tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data, which can ensure that the target business data obtained by the electronic device from the CDN node is the latest data in the target database table.

[0017] In some embodiments of the present application, after the controller executes receiving the first URL returned by the file server, it is also configured to: send a notification message carrying the first URL to the CDN node, and the notification message is used for the CDN node to obtain the target business data from the file server based on the first URL, and cache the target business data to the cache address indicated by the second URL.

[0018] In an embodiment of the present application, the CDN service network element sends a notification message carrying a first URL to the CDN node, so that the CDN node can quickly obtain and cache the target service data, and then after the electronic device sends a data request, it can quickly obtain the target service data from the CDN node.

[0019] In a second aspect, an embodiment of the present application provides a CDN cache update method, which is applied to a CDN service network element, including:

[0020] In the case of determining that the data in the target database table has changed, determining whether there is a database table identifier for indicating the target database table in the rule relationship library, the rule relationship library is used to indicate multiple database table identifiers and uniform resource locator URL information corresponding to each database table identifier, the database table identifier is used to indicate a database table, and the URL information is used to indicate the URL of the business interface corresponding to the database table indicated by the database table identifier;

[0021] In the case where there is a target database table identifier matching the target database table identifier in the rule relationship library, determining the target URL based on the target URL information corresponding to the target database table identifier;

[0022] Based on the target URL, obtain the target business data stored in the target database table;

[0023] Sending the target service data to a file server so that the file server caches the target service data;

[0024] Receive the first URL returned by the file server, where the first URL is used to indicate the cache address where the file server caches the target business data. The first URL is used by the CDN node to pull the target business data from the file server and cache the target business data to the cache address indicated by the second URL to update the cache corresponding to the CDN node and the target database table.

[0025] In some embodiments of the present application, the target URL information includes a target path;

[0026] After receiving the first URL returned by the file server, the method further includes:

[0027] Saving a first correspondence between the first URL and the target path;

[0028] receiving a data request from an electronic device, the data request carrying the target path;

[0029] In response to the data request, determining whether the target URL information matching the target path exists in the rule relationship library;

[0030] In the case where the target URL information matching the target path exists in the rule relationship library, determining whether there is a first corresponding relationship;

[0031] When a first corresponding relationship exists, a redirection instruction carrying the first URL is returned to the electronic device, and the redirection instruction is used for the electronic device to redirect to the CDN node via CDN acceleration based on the first URL, and obtain the target business data corresponding to the second URL from the CDN node.

[0032] In some embodiments of the present application, after determining whether the first corresponding relationship exists, the method further includes:

[0033] In the absence of the first corresponding relationship, determining the target URL based on the data request and the target URL information;

[0034] Based on the target URL, obtain the target business data stored in the target database table;

[0035] Sending the target service data to the file server so that the file server caches the target service data;

[0036] Receive the first URL returned by the file server;

[0037] Save the first correspondence;

[0038] The redirection instruction is returned to the electronic device.

[0039] In some embodiments of the present application, the target URL information includes the target path, the domain name of the corresponding business interface and the relevant parameter name of the corresponding business interface;

[0040] In the absence of the first corresponding relationship, determining the target URL based on the data request and the target URL information includes:

[0041] In the case where the first corresponding relationship does not exist, the target path, the domain name and the relevant parameter name, as well as the parameter value corresponding to the relevant parameter name carried in the data request are concatenated to obtain the target URL.

[0042] In some embodiments of the present application, before determining whether the target URL information matching the target path exists in the rule relationship library, the method further includes:

[0043] In response to the data request, determining whether the data request is a request for a CDN interface;

[0044] The controller determines whether the target URL information matching the target path exists in the rule relationship library, and is specifically configured as follows:

[0045] In the case where the data request is a request for a CDN interface, determining whether there is target URL information matching the target path in the rule relationship library;

[0046] The method further includes:

[0047] In the case that the data request is not a request for the CDN interface, the data request is forwarded to the service interface corresponding to the target database to obtain the target service data, and the target service data is forwarded to the electronic device.

[0048] In some embodiments of the present application, the tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data; the first identifier is used for the CDN node to respond to the data request after redirecting to the CDN node, and when the cache address indicated by the second URL including the first identifier is empty, go back to the file server to obtain the target business data, cache the target business data to the cache address indicated by the second URL, and return the target business data to the electronic device.

[0049] In some embodiments of the present application, after receiving the first URL returned by the file server, the method further includes:

[0050] A notification message carrying the first URL is sent to the CDN node, where the notification message is used by the CDN node to obtain the target service data from the file server based on the first URL, and cache the target service data to a cache address indicated by the second URL.

[0051] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, including: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the CDN cache update method shown in the second aspect is implemented.

[0052] In a fourth aspect, an embodiment of the present application provides a computer program product, including: when the computer program product is run on a computer, the computer implements the CDN cache update method shown in the second aspect.

[0053] Compared with the prior art, the technical solution provided by the embodiment of the present application has the following advantages: In the embodiment of the present application, by determining whether there is a database table identifier for indicating the target database table in the rule relationship library when it is determined that the data in the target database table has changed, the rule relationship library is used to indicate multiple database table identifiers and uniform resource locator URL information corresponding to each database table identifier, the database table identifier is used to indicate a database table, and the URL information is used to indicate the URL of the business interface corresponding to the database table indicated by the database table identifier; when there is a target database table identifier matching the identifier of the target database table in the rule relationship library, based on the target URL information corresponding to the target database table identifier, determine the target URL; based on the target URL, obtain the target business data stored in the target database table; send the target business data to the file server so that the file server caches the target business data; receive the first URL returned by the file server, the first URL is used to indicate the cache address of the file server caching the target business data, the first URL is used by the CDN node to pull the target business data from the file server, and cache the target business data to the cache address indicated by the second URL, so as to update the cache of the CDN node corresponding to the target database table. In this way, by maintaining a rule relationship library for indicating multiple database table identifiers and URL information corresponding to each database table identifier, when it is determined that the data in the target database table has changed, if it is queried that there is a target database table identifier that matches the identifier of the target database table in the rule relationship library, the target URL is determined based on the target URL information corresponding to the target database table identifier, the target business data is obtained from the database table based on the target URL, and the target business data is cached through the file server, and a first URL for indicating the cache address of the file server to cache the target business data is obtained, thereby facilitating the CDN node to pull the target business data from the server based on the first URL, and update the cache corresponding to the target database table cached by the CDN node by caching the target business data. In this way, when the business data changes, the business data cached by the CDN can be updated in time. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0055] Figure 1 A hardware configuration block diagram of a CDN service network element according to some embodiments is shown;

[0056] Figure 2shows a hardware configuration block diagram of an electronic device 200 according to some embodiments;

[0057] Figure 3 One of the flowcharts of the CDN cache update method according to some embodiments is shown;

[0058] Figure 4 A second flowchart of a CDN cache update method according to some embodiments is shown;

[0059] Figure 5 A third flowchart of a CDN cache update method according to some embodiments is shown;

[0060] Figure 6 A fourth flowchart of a CDN cache update method according to some embodiments is shown;

[0061] Figure 7 A fifth flowchart of a CDN cache update method according to some embodiments is shown;

[0062] Figure 8 A sixth flowchart of a CDN cache update method according to some embodiments is shown;

[0063] Fig. 9 FIG7 shows a seventh flow chart of a CDN cache update method according to some embodiments;

[0064] Fig.10 An eighth flowchart of a CDN cache update method according to some embodiments is shown. DETAILED DESCRIPTION

[0065] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0066] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0067] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0068] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0069] The electronic device provided in the embodiments of the present application may have various implementation forms, for example, it may be a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, etc.

[0070] Figure 1 This is a configuration block diagram of a CDN service network element in an embodiment of the present application. The CDN service network element may be one cluster or multiple clusters, and may include one or more types of servers. The CDN service network element may communicate data with other types of service devices.

[0071] The CDN service network element includes a controller 101, a memory 102, and a bus 103. The controller 101 and the memory 102 are connected through a bus 103. The controller 101 is used to execute an executable module stored in the memory 102, such as a computer-readable program instruction. When the computer-readable program instruction is executed by the controller 101, the steps of the CDN cache update method provided in the above embodiment are implemented. The controller 101 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the CDN cache method provided in this embodiment can be completed by an integrated logic circuit of hardware in the controller 101 or an instruction in the form of software. The above-mentioned controller 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0072] The memory 102 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.

[0073] The bus 103 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. Figure 1 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus 103 or only one type of bus 103 .

[0074] The memory 102 is used to store programs, such as program instructions corresponding to the CDN cache device. The CDN cache device includes at least one software function module that can be stored in the memory 102 in the form of software or firmware or fixed in the operating system (OS) of the CDN service network element. After receiving the execution instruction, the controller 101 executes the program to implement the steps of the CDN cache update method.

[0075] Possibly, the CDN service network element provided in the embodiment of the present application further includes a communication interface 104. The communication interface 104 is connected to the controller 101 via a bus. The communication interface 104 can be used to implement communication between the CDN system and the source station, initiate a back-to-source request to the source station, and receive resource data returned by the source station.

[0076] It should be understood that Figure 1 The structure shown is only a schematic diagram of the structure of part of the CDN service network element. The CDN service network element may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown, Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0077] like Figure 2 The electronic device 200 includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a user interface 280, an external memory, and a power supply.

[0078] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input / output.

[0079] The display 260 includes a display screen component for presenting images, and a driving component for driving image display, which is used to receive image signals output from the controller, and display video content, image content, and menu control interface components and user control UI interface.

[0080] The display 260 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.

[0081] The communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The electronic device 200 can establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.

[0082] The user interface 280 can be used to receive control signals from the control device 100 (such as an infrared remote controller, etc.) It can also be used to directly receive user input operation instructions and convert the operation instructions into instructions that the electronic device 200 can recognize and respond to, which can be called a user input interface.

[0083] The detector 230 is used to collect signals from the external environment or the external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.

[0084] The external device interface 240 may include, but is not limited to, any one or more of the following interfaces: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by the above multiple interfaces.

[0085] The tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.

[0086] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

[0087] The controller 250 controls the operation of the CDN service network element and responds to the user's operation through various software control programs stored in the memory (internal memory or external memory). The controller 250 controls the overall operation of the electronic device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on the display 260, the controller 250 can perform operations related to the object selected by the user command.

[0088] In some embodiments, the controller includes a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), and at least one of a random access memory (RAM), a read-only memory (ROM), a first interface to an nth interface for input / output, a communication bus, etc.

[0089] Among them, RAM, also called main memory, is an internal memory that directly exchanges data with the controller. It can be read and written at any time (except when refreshed), and it is very fast. It is usually used as a temporary data storage medium for operating systems or other running programs. The biggest difference between it and ROM is the volatility of data, that is, once the power is cut off, the stored data will be lost. RAM is used in computers and digital systems to temporarily store programs, data and intermediate results. ROM works in a non-destructive read-out mode and can only read but not write information. Once the information is written, it is fixed, and even if the power is cut off, the information will not be lost, so it is also called fixed memory.

[0090] The user may input a user command through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command through a specific sound or gesture, and the user input interface recognizes the sound or gesture through a sensor to receive the user input command.

[0091] "User interface" is the medium interface for interaction and information exchange between the application or operating system and the user. It realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the Graphical User Interface (GUI), which refers to the user interface related to computer operation displayed in a graphical way. It can be an icon, window, control or other interface element displayed on the display screen of the CDN service network element, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets and other visual interface elements.

[0092] The embodiments of the present application provide a CDN service network element and a CDN cache update method, wherein the CDN service network element can implement the CDN cache update method provided by the embodiments of the present application, or the functional modules or functional entities in the CDN service network element can implement the CDN cache update method provided by the embodiments of the present application.

[0093] The CDN service network element in the embodiment of the present application is a general CDN service network element that is independent of the service and can manage and maintain the update of the CDN cache of different services based on the CDN cache update rules. The CDN cache update rules are provided in the embodiment of the present application to timely update the corresponding CDN cache based on the rule relationship library when the service data of different services changes.

[0094] In the embodiment of the present application, since the CDN service network element is independent of the business and is not aware of the business, any subsequent business changes do not require changes to the CDN service network element, that is, the business logic of the business service is updated and upgraded without the need to update and upgrade the CDN service network element accordingly.

[0095] In the embodiments of the present application, information between business services and CDN service network elements can be transmitted by using middleware (such as content management middleware) or message queues; the interfaces and data interaction protocols between business services and CDN service network elements can also be clarified by defining clear interfaces and protocols; so as to achieve decoupling of CDN service network elements from business services, making CDN service network elements independent of the business.

[0096] In some embodiments of the present application, the controller is configured to: determine whether there is a database table identifier for indicating the target database table in the rule relationship library when it is determined that the data in the target database table has changed, the rule relationship library is used to indicate multiple database table identifiers and uniform resource locator URL information corresponding to each database table identifier, the database table identifier is used to indicate a database table, and the URL information is used to indicate the URL of the business interface corresponding to the database table indicated by the database table identifier; determine the target URL based on the target URL information corresponding to the target database table identifier when there is a target database table identifier matching the identifier of the target database table in the rule relationship library; obtain the target business data stored in the target database table based on the target URL; send the target business data to the file server so that the file server caches the target business data; receive a first URL returned by the file server, the first URL is used to indicate the cache address of the file server caching the target business data, the first URL is used by the CDN node to pull the target business data from the file server, and cache the target business data to the cache address indicated by the second URL to update the cache of the CDN node corresponding to the target database table.

[0097] The rule relationship library may be in a table form or in other forms, which are not limited here.

[0098] The data in the target database table may be determined to have changed when the data in the target database table is monitored to have changed, or may be determined to have changed when a notification message of the data in the target database table having changed is received.

[0099] The URL information may be a complete URL, or may include the domain name, path, parameter names of parameters, etc. that constitute the URL (ie, stored separately). The specific information may be determined based on actual conditions and is not limited here.

[0100] Among them, based on the target URL, obtaining the target business data stored in the target database table may include, based on the target URL, sending a data request to the target business server corresponding to the target URL, requesting to obtain the target business data stored in the target database table, and receiving the target business data returned by the target business server.

[0101] Among them, the file server is the source site. When the business data cached by the CDN node expires or the CDN node does not cache the business data, the CDN node obtains the business data from the file server through back-to-source, and then caches the business data.

[0102] Among them, in the file server and CDN node, the target business data can be stored in the form of files.

[0103] Among them, the target business data is the latest business data stored in the target database table. After the CDN service network element sends the target business data to the file server so that the file server caches the target business data and returns the first URL (indicating the cache address where the file server caches the target business data) to the CDN service network element, the CDN node can pull the target business data from the file server based on the first URL, and the CDN node caches the target business data to the cache address indicated by the second URL to update the cache corresponding to the CDN node and the target database table. In this way, the latest target business data stored in the target database table is cached in the CDN node. If the CDN node receives a data request from an electronic device, it can return the latest target business data to the electronic device.

[0104] In an embodiment of the present application, by maintaining a rule relationship library for indicating multiple database table identifiers and URL information corresponding to each database table identifier, when it is determined that the data in the target database table has changed, if it is queried that there is a target database table identifier matching the identifier of the target database table in the rule relationship library, the target URL is determined based on the target URL information corresponding to the target database table identifier, the target business data is obtained from the database table based on the target URL, the target business data is cached through the file server, and a first URL for indicating the cache address of the file server to cache the target business data is obtained, thereby facilitating the CDN node to pull the target business data from the server based on the first URL, and update the cache corresponding to the target database table cached by the CDN node by caching the target business data. In this way, when the business data changes, the business data cached by the CDN can be updated in time.

[0105] In some embodiments of the present application, the target URL information includes a target path; after the controller executes receiving the first URL returned by the file server, it is also configured to: save a first correspondence between the first URL and the target path; receive a data request from an electronic device, the data request carrying the target path; in response to the data request, determine whether there is target URL information matching the target path in the rule relationship library; if there is target URL information matching the target path in the rule relationship library, determine whether there is a first correspondence; if there is a first correspondence, return a redirection indication carrying the first URL to the electronic device, the redirection indication being used for the electronic device to redirect to the CDN node via CDN acceleration based on the first URL, and obtain the target business data corresponding to the second URL from the CDN node.

[0106] The CDN service network element returns a redirection instruction to the electronic device, which may be specifically that the CDN service network element returns the first URL to the electronic device in http302. The electronic device obtains the target service data by redirecting to the CDN node through CDN acceleration based on the first URL.

[0107] In some embodiments of the present application, when the target URL information is a complete target URL, the target path is the path part in the target URL; when the target URL information includes the domain name, path, parameter name of parameters, etc. that constitute the target URL, the target path is the path that constitutes the target URL in the target URL information.

[0108] The first corresponding relationship between the first URL and the target path is saved by taking the first URL as value and the target path (the path of the business interface corresponding to the business server) as key and writing them into the cache, that is, saving the first corresponding relationship.

[0109] In some embodiments of the present application, after the controller executes receiving the first URL returned by the file server, it is also configured to: send a notification message carrying the first URL to the CDN node, and the notification message is used for the CDN node to obtain the target business data from the file server based on the first URL, and cache the target business data to the cache address indicated by the second URL.

[0110] In an embodiment of the present application, the CDN service network element sends a notification message carrying a first URL to the CDN node, so that the CDN node can quickly obtain and cache the target service data, and then after the electronic device sends a data request, it can quickly obtain the target service data from the CDN node.

[0111] Exemplarily, after receiving the first URL returned by the file server, the CDN service network element sends a notification message to the CDN node, where the notification message is used to indicate that the target service data has been stored in the file server, and the notification message carries the first URL. The CDN node requests the file server to obtain the target service data based on the first URL, and the CDN node receives the target service data returned by the file server, and caches the target service data to the cache address indicated by the second URL.

[0112] In the embodiment of the present application, since the target path remains unchanged, saving the first correspondence between the first URL and the target path is to update the correspondence between the cache address for caching the business data obtained from the target database table and the target path, that is, to update the cache address for caching the business data corresponding to the target database table in the file server, thereby updating the target business data cached in the file server, and updating the URL corresponding to the target business data in the file server. In this way, by saving the first correspondence between the first URL and the target path, it is convenient to respond to the received data request. If the target URL information matching the target path exists in the rule relationship library and the first correspondence exists, the electronic device can quickly obtain the target business data based on the first correspondence.

[0113] In some embodiments of the present application, after the controller determines whether a first corresponding relationship exists, it is also configured to: if the first corresponding relationship does not exist, determine the target URL based on the data request and the target URL information; based on the target URL, obtain the target business data stored in the target database table; send the target business data to the file server so that the file server caches the target business data; receive the first URL returned by the file server; save the first corresponding relationship; and return the redirection indication to the electronic device.

[0114] In the embodiment of the present application, since there is no first corresponding relationship, that is, there is no corresponding relationship between the first URL and the target path, the target business data is not cached in the file server, and the CDN node cannot pull the target business data from the file server, and then when the electronic device requests the target business data, the CDN server cannot return the cached target business data to the electronic device. Therefore, in response to the data request, when the file server does not cache the target business data, the target URL can be determined based on the data request and the target URL information; then based on the target URL, the target business data stored in the target database table is obtained, and then the target business data is cached to the file server, the first URL is obtained, and then the first corresponding relationship between the first URL and the target path is saved, and a redirection indication is returned to the electronic device so that the electronic device can obtain the cached target business data from the CDN node. In this way, it is convenient for the electronic device to quickly obtain the target business data from the CDN node.

[0115] In some embodiments of the present application, the target URL information includes the target path, the domain name of the corresponding business interface and the relevant parameter name of the corresponding business interface; the controller executes, in the absence of a first corresponding relationship, based on the data request and the target URL information, to determine the target URL, and is specifically configured as: in the absence of a first corresponding relationship, concatenating the target path, the domain name and the relevant parameter name, and the parameter value corresponding to the relevant parameter name carried in the data request, to obtain the target URL.

[0116] In some embodiments of the present application, the relevant parameter name of the business interface in the URL information may be empty, that is, there is no relevant parameter name. In this case, it is necessary to traverse all parameter names to obtain the target business data.

[0117] In an embodiment of the present application, the target URL information including the target path, the domain name of the corresponding business interface and the relevant parameter name of the corresponding business interface is stored separately, and then the target path, the domain name and the relevant parameter name, as well as the parameter value corresponding to the relevant parameter name carried in the data request are spliced ​​to obtain the target URL. This facilitates flexible storage of the target path, the domain name of the corresponding business interface and the relevant parameter name of the corresponding business interface, and quickly and accurately splices the target URL, thereby quickly and accurately acquiring the target business data.

[0118] In some embodiments of the present application, before the controller determines whether the target URL information matching the target path exists in the rule relationship library, it is also configured to: determine, in response to the data request, whether the data request is a request for the CDN interface; the controller determines whether the target URL information matching the target path exists in the rule relationship library, and is specifically configured to: when the data request is a request for the CDN interface, determine whether the target URL information matching the target path exists in the rule relationship library; the controller is also configured to: when the data request is not a request for the CDN interface, forward the data request to the business interface corresponding to the target database to obtain the target business data, and forward the target business data to the electronic device.

[0119] In an embodiment of the present application, it is first determined whether the data request is a request for the CDN interface. If the data request is a request for the CDN interface, it is determined whether the target URL information matching the target path exists in the rule relationship library. If the data request is not a request for the CDN interface, the data request is forwarded to the business interface corresponding to the target database to obtain the target business data, and the target business data is forwarded to the electronic device, which can ensure the normal interaction and the electronic device can quickly obtain the target business data.

[0120] In some embodiments of the present application, when the data request is a request for a CDN interface and there is no URL information matching the target path, an illegal request is returned to the electronic device.

[0121] In some embodiments of the present application, the tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data; the first identifier is used for the CDN node to respond to the data request after redirecting to the CDN node, and when the cache address indicated by the second URL including the first identifier is empty, go back to the file server to obtain the target business data, cache the target business data to the cache address indicated by the second URL, and return the target business data to the electronic device.

[0122] The first identifier may be timestamp information, for example, timestamp information when the CDN server obtains the target service data, timestamp information when the file server caches the target service data, or other timestamp information, which is not limited here.

[0123] The first identifier may also be the file name of the target business data, which may be determined based on actual conditions and is not limited here.

[0124] In the embodiment of the present application, based on the first identifier, it can be ensured that the service data returned by the CDN node to the electronic device is the same as the service data cached in the file server, and it can be ensured that the electronic device can obtain the latest service data in a timely manner.

[0125] In some embodiments of the present application, after the CDN service network element receives the first URL returned by the file server, the CDN service network element receives a data request from the terminal device for target service data. Based on the data request, the CDN service network element sends a redirect indication carrying the first URL to the terminal device. The terminal device is redirected to the CDN node based on the first URL. The CDN node finds that the cache in the cache address indicated by the second URL is empty. The CDN node requests the file server to obtain the target service data based on the first URL. The CDN node receives the target service data returned by the file server, caches the target service data to the cache address indicated by the second URL, and returns the target service data to the electronic device.

[0126] In the embodiment of the present application, since the tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data, the target business data changes, and the first identifier in the first URL and the second URL also changes with the target business data. Therefore, when the data in the target database table changes, the first URL is updated, and the second URL is updated accordingly. If the target business data is cached to the cache address indicated by the first URL in the file server, when the electronic device is redirected to the CDN node through CDN acceleration based on the first URL, the CDN node will obtain the target business data from the cache address indicated by the second URL including the first identifier. If the cache address indicated by the current second URL has not cached the target business data, the CDN node will return to the source to the file server to obtain the target business data, and cache the target business data to the cache address indicated by the second URL, and return the target business data to the electronic device. In this way, the tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data, which can ensure that the target business data obtained by the electronic device from the CDN node is the latest data in the target database table.

[0127] In the embodiment of the present application, by configuring CDN cache update rules, a public CDN service network element that is independent of the business can complete the detection of business data changes and real-time refresh of the business CDN cache, which makes up for the shortcomings of the common scheme of untimely cache refresh and repeated development work due to business changes (CDN service network element is independent of the business and can be fully reused), effectively improving development efficiency and user experience.

[0128] In order to explain this scheme in more detail, the following will be combined in an exemplary manner Figures 3 to 10 To explain, it is understandable that Figures 3 to 10 The steps involved may include more steps or fewer steps in actual implementation, and the order of these steps may also be different, subject to the ability to implement the CDN cache update method provided in the embodiment of the present application. The CDN cache update method is applied to a CDN service network element controlled by a control device, and the execution subject of the CDN cache update method may be a CDN service network element, or a functional module or functional entity in the CDN service network element that can implement the CDN cache update method, which is not limited here. Moreover, the specific description of the CDN cache update method provided in the embodiment of the present application can refer to the relevant description of the above-mentioned CDN service network element, and the same or similar technical effects can be achieved, which will not be repeated here.

[0129] Figure 3A flowchart of the steps of implementing a CDN cache update method according to one or more embodiments of the present application, which is applied to a CDN service network element, may include the following S301 to S305.

[0130] S301: When it is determined that data in a target database table has changed, determine whether there is a database table identifier for indicating the target database table in a rule relationship library.

[0131] The rule relationship library is used to indicate multiple database table identifiers and uniform resource locator URL information corresponding to each database table identifier. The database table identifier is used to indicate a database table, and the URL information is used to indicate the URL of the business interface corresponding to the database table indicated by the database table identifier.

[0132] S302: When there is a target database table identifier matching the target database table identifier in the rule relationship library, determine a target URL based on target URL information corresponding to the target database table identifier.

[0133] S303: Based on the target URL, obtain the target business data stored in the target database table.

[0134] S304: Send the target business data to a file server, so that the file server caches the target business data.

[0135] S305: Receive the first URL returned by the file server.

[0136] Among them, the first URL is used to indicate the cache address where the file server caches the target business data. The first URL is used by the CDN node to pull the target business data from the file server and cache the target business data to the cache address indicated by the second URL to update the cache corresponding to the CDN node and the target database table.

[0137] In some embodiments of the present application, the target URL information includes a target path; Figure 3 ,like Figure 4 As shown, after S305, the CDN cache update method provided in the embodiment of the present application may further include the following S306 to S310.

[0138] S306: Save a first corresponding relationship between the first URL and the target path.

[0139] S307: Receive a data request from an electronic device, where the data request carries the target path.

[0140] S308: In response to the data request, determine whether there is target URL information matching the target path in the rule relationship library.

[0141] S309: When the target URL information matching the target path exists in the rule relationship library, determine whether a first corresponding relationship exists.

[0142] S310: When the first corresponding relationship exists, a redirection instruction carrying the first URL is returned to the electronic device.

[0143] The redirection indication is used for the electronic device to redirect to the CDN node via CDN acceleration based on the first URL, and obtain the target service data corresponding to the second URL from the CDN node.

[0144] In some embodiments of the present application, Figure 4 ,like Figure 5 As shown, after S306, the CDN cache update method provided in the embodiment of the present application may further include the following S311 to S316.

[0145] S311. When there is no first corresponding relationship, determine the target URL based on the data request and the target URL information.

[0146] S312: Based on the target URL, obtain the target business data stored in the target database table.

[0147] S313: Send the target business data to the file server so that the file server caches the target business data.

[0148] S314: Receive the first URL returned by the file server.

[0149] S315: Save the first corresponding relationship.

[0150] S316: Return the redirection instruction to the electronic device.

[0151] In some embodiments of the present application, the target URL information includes the target path, the domain name of the corresponding business interface and the relevant parameter name of the corresponding business interface; Figure 5 ,like Figure 6 As shown, the above S311 can be specifically implemented through the following S311a.

[0152] S311a. In the absence of the first corresponding relationship, concatenate the target path, the domain name and the relevant parameter name, and the parameter value corresponding to the relevant parameter name carried in the data request to obtain the target URL.

[0153] In some embodiments of the present application, Figure 6 ,like Figure 7As shown, before S308, the CDN cache update method provided in the embodiment of the present application may further include the following S317 to S316, and the above S308 can be specifically implemented by the following S308a; after S317, the CDN cache update method provided in the embodiment of the present application may further include the following S318 and S319.

[0154] S317: In response to the data request, determine whether the data request is a request for a CDN interface.

[0155] S308a: When the data request is a request for a CDN interface, determine whether there is target URL information matching the target path in the rule relationship library.

[0156] S318: When the data request is not a request for a CDN interface, forward the data request to a service interface corresponding to the target database to obtain the target service data.

[0157] S319: Forward the target business data to the electronic device.

[0158] In some embodiments of the present application, the tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data; the first identifier is used for the CDN node to respond to the data request after redirecting to the CDN node, and when the cache address indicated by the second URL including the first identifier is empty, go back to the file server to obtain the target business data, cache the target business data to the cache address indicated by the second URL, and return the target business data to the electronic device.

[0159] In some embodiments of the present application, Figure 7 ,like Figure 8 As shown, after S305, the CDN cache update method provided in the embodiment of the present application may further include the following S320.

[0160] S320. Send a notification message carrying the first URL to the CDN node. The notification message is used by the CDN node to obtain the target service data from the file server based on the first URL, and cache the target service data to a cache address indicated by the second URL.

[0161] For example, Fig. 9 As shown, the CDN cache update method provided in the embodiment of the present application can be implemented through the following S401 to S411.

[0162] S401. When determining that data in a target database table has changed, the CDN service network element determines whether there is a database table identifier for indicating the target database table in the rule relationship library.

[0163] The rule relationship library is used to indicate multiple database table identifiers and uniform resource locator URL information corresponding to each database table identifier. The database table identifier is used to indicate a database table, and the URL information is used to indicate the URL of the business interface corresponding to the database table indicated by the database table identifier.

[0164] S402: When there is a target database table identifier matching the target database table identifier in the rule relationship library, the CDN service network element determines a target URL based on target URL information corresponding to the target database table identifier.

[0165] S403: The CDN service network element requests the service server to obtain target service data stored in the target database table based on the target URL.

[0166] S404: The CDN service network element receives target service data returned by the service server.

[0167] S405: The CDN service network element sends the target service data to the file server.

[0168] S406: The file server caches the target service data to the cache address indicated by the first URL.

[0169] S407: The CDN service network element receives the first URL returned by the file server.

[0170] S408. The CDN service network element saves a first corresponding relationship between the first URL and the target path.

[0171] S409: The CDN service network element sends a notification message carrying the first URL to the CDN node.

[0172] S410: The CDN node obtains target service data from the file server based on the first URL.

[0173] S411. The CDN node caches the target service data to a cache address indicated by the second URL.

[0174] For example, Fig.10 As shown, the CDN cache update method provided in the embodiment of the present application can be implemented through the following S501 to S514.

[0175] S501. A CDN service network element receives a data request sent by an electronic device, where the data request carries the target path.

[0176] S502: The CDN service network element responds to the data request and determines whether there is target URL information matching the target path in the rule relationship library.

[0177] In the case that the target URL information matching the target path exists in the rule relationship library, the following S503 is executed; in the case that the target URL information matching the target path does not exist in the rule relationship library, an illegal request is returned to the electronic device.

[0178] S503: When the target URL information matching the target path exists in the rule relationship library, the CDN service network element determines whether there is a first corresponding relationship.

[0179] If the first corresponding relationship exists, the following S504 is executed; if the first corresponding relationship does not exist, the following S505 is executed.

[0180] S504: When the first corresponding relationship exists, the CDN service network element returns a redirection instruction carrying the first URL to the electronic device.

[0181] After executing S504, the following S513 and S514 are executed.

[0182] S505: When there is no first corresponding relationship, the CDN service network element determines the target URL based on the data request and the target URL information.

[0183] S506: The CDN service network element requests the service server to obtain the target service data stored in the target database table based on the target URL.

[0184] S507: The CDN service network element receives the target service data returned by the service server.

[0185] S508: The CDN service network element sends the target service data to the file server.

[0186] S59: The file server caches the target service data to the cache address indicated by the first URL.

[0187] S510: The CDN service network element receives the first URL returned by the file server.

[0188] S511. The CDN service network element saves a first corresponding relationship between the first URL and the target path.

[0189] S512: The CDN service network element returns a redirection instruction carrying the first URL to the electronic device.

[0190] S513: The electronic device is redirected to the CDN node through CDN acceleration based on the first URL.

[0191] S514: The CDN node returns the target service data cached in the second URL to the electronic device.

[0192] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned CDN cache update method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0193] The computer readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0194] The present invention provides a computer program product, comprising: when the computer program product is run on a computer, the computer is enabled to implement the above-mentioned CDN cache update method.

[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0196] For the convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.

Claims

1. A CDN service network element, characterized in that: Used to manage CDN cache updates for multiple services, including: The controller is configured as: In the case of determining that the data in the target database table has changed, determining whether there is a database table identifier for indicating the target database table in the rule relationship library, the rule relationship library is used to indicate multiple database table identifiers and uniform resource locator URL information corresponding to each database table identifier, the database table identifier is used to indicate a database table, and the URL information is used to indicate the URL of the service interface corresponding to the database table indicated by the database table identifier; In the case where there is a target database table identifier matching the target database table identifier in the rule relationship library, determining a target URL based on target URL information corresponding to the target database table identifier; Based on the target URL, obtaining target business data stored in the target database table; Sending the target service data to a file server so that the file server caches the target service data; Receive a first URL returned by the file server, where the first URL is used to indicate a cache address where the file server caches the target business data. The first URL is used by the CDN node to pull the target business data from the file server and cache the target business data to the cache address indicated by the second URL to update the cache corresponding to the CDN node and the target database table.

2. The CDN service network element according to claim 1, characterized in that: The target URL information includes a target path; After receiving the first URL returned by the file server, the controller is further configured to: Saving a first corresponding relationship between the first URL and the target path; receiving a data request from an electronic device, wherein the data request carries the target path; In response to the data request, determining whether the target URL information matching the target path exists in the rule relationship library; In the case where the target URL information matching the target path exists in the rule relationship library, determining whether the first corresponding relationship exists; In the case where the first corresponding relationship exists, a redirection indication carrying the first URL is returned to the electronic device, and the redirection indication is used for the electronic device to redirect to the CDN node via CDN acceleration based on the first URL, and obtain the target business data corresponding to the second URL from the CDN node.

3. The CDN service network element according to claim 2, characterized in that: After determining whether the first corresponding relationship exists, the controller is further configured to: In the absence of the first corresponding relationship, determining the target URL based on the data request and the target URL information; Based on the target URL, obtaining the target business data stored in the target database table; Sending the target service data to the file server, wherein the file server caches the target service data; Receiving the first URL returned by the file server; Saving the first corresponding relationship; The redirection indication is returned to the electronic device.

4. The CDN service network element according to claim 3, characterized in that: The target URL information includes the target path, the domain name of the corresponding business interface and the relevant parameter name of the corresponding business interface; The controller determines the target URL based on the data request and the target URL information when the first corresponding relationship does not exist, and is specifically configured as follows: In the absence of the first corresponding relationship, the target path, the domain name and the relevant parameter name, as well as the parameter value corresponding to the relevant parameter name carried in the data request are concatenated to obtain the target URL.

5. The CDN service network element according to claim 2, characterized in that: Before the controller determines whether the target URL information matching the target path exists in the rule relationship library, the controller is further configured to: In response to the data request, determining whether the data request is a request for a CDN interface; The controller determines whether the target URL information matching the target path exists in the rule relationship library, and is specifically configured as follows: In the case where the data request is a request for a CDN interface, determining whether the target URL information matching the target path exists in the rule relationship library; The controller is further configured to: In the case that the data request is not a request for a CDN interface, the data request is forwarded to a service interface corresponding to the target database to obtain the target service data, and the target service data is forwarded to the electronic device.

6. The CDN service network element according to claim 2, characterized in that: The tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data; The first identifier is used for the CDN node to respond to the data request after redirecting to the CDN node, and when the cache address indicated by the second URL including the first identifier is empty, to go back to the file server to obtain the target business data, cache the target business data to the cache address indicated by the second URL, and return the target business data to the electronic device.

7. The CDN service network element according to any one of claims 1 to 6, characterized in that: After receiving the first URL returned by the file server, the controller is further configured to: A notification message carrying the first URL is sent to the CDN node, where the notification message is used by the CDN node to obtain the target service data from the file server based on the first URL, and cache the target service data to a cache address indicated by a second URL.

8. A CDN cache update method, characterized in that: Applied to CDN service network elements, including: In the case of determining that the data in the target database table has changed, determining whether there is a database table identifier for indicating the target database table in the rule relationship library, the rule relationship library is used to indicate multiple database table identifiers and uniform resource locator URL information corresponding to each database table identifier, the database table identifier is used to indicate a database table, and the URL information is used to indicate the URL of the service interface corresponding to the database table indicated by the database table identifier; In the case where there is a target database table identifier matching the target database table identifier in the rule relationship library, determining a target URL based on target URL information corresponding to the target database table identifier; Based on the target URL, obtaining target business data stored in the target database table; Sending the target service data to a file server, wherein the file server caches the target service data; Receive a first URL returned by the file server, where the first URL is used to indicate a cache address where the file server caches the target business data. The first URL is used by the CDN node to pull the target business data from the file server and cache the target business data to the cache address indicated by the second URL to update the cache corresponding to the CDN node and the target database table.

9. The method according to claim 8, characterized in that The target URL information includes a target path, and the tail of the first URL and the tail of the second URL both have a first identifier for uniquely indicating the target business data; After receiving the first URL returned by the file server, the method further includes: Saving a first corresponding relationship between the first URL and the target path; receiving a data request from an electronic device, wherein the data request carries the target path; In response to the data request, determining whether the target URL information matching the target path exists in the rule relationship library; In the case where the target URL information matching the target path exists in the rule relationship library, determining whether the first corresponding relationship exists; When the first corresponding relationship exists, a redirection indication carrying the first URL is returned to the electronic device, and the redirection indication is used for the electronic device to redirect to the CDN node via CDN acceleration based on the first URL, and obtain the target business data corresponding to the second URL from the CDN node based on the first identifier.

10. A computer-readable storage medium, characterized in that: include: A computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the CDN cache update method according to claim 8 or 9 is implemented.

Citation Information

Patent Citations

  • Data management method and device

    CN107066570A

  • Data caching processing method and device, electronic device and readable storage medium

    CN109885786A

  • Cache data processing method and device, computer equipment and storage medium

    CN115757495A

  • CDN service scheduling processing method and CDN server

    WO2019201072A1