CN116208676A - Data back-source method, device, computer equipment, storage medium and program product - Google Patents

Data back-source method, device, computer equipment, storage medium and program product Download PDF

Info

Publication number
CN116208676A
CN116208676A CN202310012413.0A CN202310012413A CN116208676A CN 116208676 A CN116208676 A CN 116208676A CN 202310012413 A CN202310012413 A CN 202310012413A CN 116208676 A CN116208676 A CN 116208676A
Authority
CN
China
Prior art keywords
source
domain name
path
data
return path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310012413.0A
Other languages
Chinese (zh)
Inventor
孙彬彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Yitan Network Technology Co ltd
Original Assignee
Shanghai Yitan Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Yitan Network Technology Co ltd filed Critical Shanghai Yitan Network Technology Co ltd
Priority to CN202310012413.0A priority Critical patent/CN116208676A/en
Publication of CN116208676A publication Critical patent/CN116208676A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a data source returning method, a data source returning device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: receiving a data source return request, wherein the data source return request carries a domain name and a source return path; the source return path is rewritten according to the domain name to obtain a rewritten source return path, the domain name in the rewritten source return path corresponds to a primary directory in a source station, and the source return path is a resource path under the primary directory; and inquiring the source station according to the rewritten source return path to obtain corresponding data, and returning the inquired data. By adopting the method, the resources can be isolated, and the subsequent maintenance is simple.

Description

Data back-source method, device, computer equipment, storage medium and program product
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a data source returning method, apparatus, computer device, storage medium, and computer program product.
Background
A CDN (content delivery network CDN (Content Delivery Network) is a distributed network built and covered on a carrier network and composed of edge node server groups distributed throughout the world, the CDN can share source site pressure, avoid network congestion, ensure that the delivery of web content is accelerated in different areas and different scenarios, and improve the resource access speed. However, as the service scale is enlarged, the CDN domain name becomes larger, so too will the OSS pocket, resulting in management fragmentation and high maintenance costs in the later period.
In the conventional technology, there are also a plurality of CDN domain names that are returned to the same OSS socket, and each domain name uses a management manner of a primary folder of the OSS socket according to a convention. However, in this manner, the resources of multiple domain names are not completely isolated, for example, the resource paths under the domain name a and the domain name B can access the resources of the domain name B, so that complete resource isolation is not achieved, and later maintenance is difficult.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data back-source method, apparatus, computer device, computer readable storage medium, and computer program product that enable isolation of resources and subsequent maintenance of simplicity.
In a first aspect, the present application provides a data source-returning method, the method including:
receiving a data source return request, wherein the data source return request carries a domain name and a source return path;
the source return path is rewritten according to the domain name to obtain a rewritten source return path, the domain name in the rewritten source return path corresponds to a primary directory in a source station, and the source return path is a resource path under the primary directory;
and inquiring the source station according to the rewritten source return path to obtain corresponding data, and returning the inquired data.
In one embodiment, before the querying the source station according to the rewriteback source path to obtain the corresponding data, the method further includes:
inquiring whether corresponding data is cached in a node according to the rewriting source path;
when the corresponding data is cached in the node, acquiring the corresponding data from the node and returning the data;
and when the corresponding data is not cached in the node, continuing to query the source station according to the rewriting source path to obtain the corresponding data.
In one embodiment, the rewriting the source-return path according to the domain name to obtain a rewritten source-return path includes:
rewriting the source return path to obtain an initial source return path with a domain name;
acquiring parameters in the data source request;
and rewriting to a rewriting source-returning path according to the initial source-returning path and the parameters.
In one embodiment, after the rewriting the source-return path according to the domain name to obtain the rewritten source-return path, the method further includes:
newly adding a rewriting source-returning path in the request response header information;
the method further comprises the steps of:
and inquiring and displaying a rewriting source path in the request response header information when debugging.
In one embodiment, the method further comprises:
receiving a new domain name adding request, wherein the new domain name adding request carries at least one new domain name;
configuring the newly added domain name as the same source station;
and generating a primary catalog corresponding to the newly added domain name in the source station, and managing data corresponding to the newly added domain name under the primary catalog.
In one embodiment, after the configuring the newly added domain name to be the same source station, the method further includes:
configuring a source return path rewriting rule of the newly added domain name;
and the step of rewriting the source return path according to the domain name to obtain a rewritten source return path, which comprises the following steps:
acquiring a source return path rewriting rule corresponding to the domain name;
and rewriting the source-returning path according to the domain name by the source-returning path rewriting rule to obtain a rewritten source-returning path.
In a second aspect, the present application further provides a data source device, where the device includes:
the data back source request receiving module is used for receiving a data back source request, wherein the data back source request carries a domain name and a back source path;
the rewriting module is used for rewriting the source return path according to the domain name to obtain a rewritten source return path, the domain name in the rewritten source return path corresponds to a primary directory in a source station, and the source return path is a resource path under the primary directory;
and the source returning module is used for inquiring the source station according to the rewriting source returning path to obtain corresponding data and returning the inquired data.
In a third aspect, the present application also provides a computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any one of the embodiments described above when the computer program is executed by the processor.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any of the embodiments described above.
In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any of the embodiments described above.
According to the data source return method, the device, the computer equipment, the storage medium and the computer program product, after a data source return request is received, the source return path is rewritten according to the domain name to obtain a rewritten source return path, because each domain name shares one source station and corresponds to a primary directory in the source station, different domain names do not need to use one primary directory according to conventions, file isolation is achieved, the source return paths are resource paths under the primary directory, the source return paths are different as well as the domain names of different data, therefore, the resources under the domain names are not related to each other, the problem that the resources of the domain name B can be accessed under the domain name A cannot occur, and because only one source station is applicable, the domain name is divided by the primary directory, the rule is simple and clear, and the later management and maintenance are convenient.
Drawings
FIG. 1 is an application environment diagram of a data source back method in one embodiment;
FIG. 2 is a flow diagram of a method for data source back in one embodiment;
FIG. 3 is a flow diagram of an embodiment of a back source request rewriting a back source path via an edge script to back source the same OSS socket;
FIG. 4 is a flow chart of a method for data source back in another embodiment;
FIG. 5 is a flow chart of the overwrite steps in one embodiment;
FIG. 6 is a block diagram of a data source device in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The data source returning method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network and the server 104 communicates with the source station 106.
The terminal 102 generates a data source return request based on the domain name and the source return path, and sends the data source return request to the server 104, the server 104 rewrites the source return path according to the domain name to obtain a rewritten source return path, the domain name in the rewritten source return path corresponds to the primary directory in the source station, the source return path is a resource path under the primary directory, the source station 106 is queried according to the rewritten source return path to obtain corresponding data, and the queried data is returned to the terminal 102.
In this way, after receiving the data source-returning request, the server 104 rewrites the source-returning path according to the domain name to obtain a rewritten source-returning path, because each domain name shares a source station and corresponds to a primary directory in the source station, different domain names do not need to use a primary directory according to conventions, file isolation is achieved, the source-returning path is a resource path under the primary directory, the source-returning paths of different data are the same, the source-returning paths of different data are different, therefore, resources under the domain names are not related to each other, the problem that resources of domain B can be accessed under the domain name A is avoided, and because only one source station is applicable, the domain name is divided by the primary directory, the rule is simple and clear, and later management and maintenance are convenient.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers. For convenience of understanding, the server 104 in the present application may be considered as a CDN (Content Delivery Network, where the content delivery network CDN is a distributed network that is built and covered on a carrier network and is formed by edge node server groups distributed throughout the world. The source station 106 is for storing back source data, which may be referred to as an OSS socket, where the object store OSS (Object Storage Service) is a mass, secure, low cost, highly reliable cloud storage service. A Bucket means a storage space, which is a container used by a user to store objects (objects), all of which must be affiliated with a certain storage space. The storage space has various configuration attributes including region, access rights, storage type, etc. The user can create different types of storage spaces to store different data according to actual requirements.
The source return refers to that when the client requests to access the resource, if the resource is not cached on the CDN node, the CDN node can acquire the resource by the source return station.
In one embodiment, as shown in fig. 2, a data source returning method is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
s202: and receiving a data source return request, wherein the data source return request carries the domain name and the source return path.
Specifically, a data back-source request is a request for querying the original data, and the data back-source request carries a domain name and a back-source path. The data back-source request can be regarded as a CDN link sent by the terminal.
Where a domain name is an electronic position of a source station consisting of a string of names separated by dots, which can identify the location of the source station. The back source path is the storage path of the data in the source station, e.g. the path of the file access.
S204: and rewriting the source return path according to the domain name to obtain a rewritten source return path, wherein the domain name in the rewritten source return path corresponds to the primary directory in the source station, and the source return path is a resource path under the primary directory.
Specifically, the re-writing back source path is obtained after the re-writing back source path is reformed according to the domain name, for example, the domain name and the back source path are combined according to a re-writing rule to obtain the re-writing back source path, wherein the re-writing rule is generated based on a file path of data stored in the source station, in this embodiment, in order to facilitate the data in the source station to be stored under a corresponding domain name folder, that is, the source station includes a plurality of primary directories, each primary directory corresponds to a domain name, for example, each primary directory commands a corresponding domain name, data corresponding to the domain name is stored under a primary directory corresponding to each domain name, different data is stored under different folders, thus resources under a plurality of domain names are not related to each other, the problem that resources of domain B can be accessed under domain name a cannot occur, and the CDN access link cannot be affected by the primary directory of OSS, in addition, the OSS is not perceived by using only one primary folder, the primary directory is divided, the rule is simple, and the post management maintenance cost is low. The re-writing back source path can be obtained by adding the path of the folder where the data is located to the domain name, so that the re-writing rule is that the path of the folder, namely the back source path, is added to the corresponding domain name, namely the domain name and the back source path are spliced. The rewrite rule can be generated by means of a custom edge script, namely, the source logic can be customized and configured like building blocks, the edge script (ES for short) is a tool box for quickly realizing CDN/DCDN customized and configured, and when the standard configuration on a CDN/DCDN console cannot meet the service requirement, the simple programming implementation of the edge script can be attempted.
S206: and inquiring the source station according to the rewritten source return path to obtain corresponding data, and returning the inquired data.
The source station is a storage space for storing data, and the server inquires a folder corresponding to the source station according to the rewriting source-returning path to obtain the data and returns the data to the terminal.
The server firstly inquires the primary directory according to the domain name in the rewriting source return path, then continuously acquires the corresponding folder from the primary directory according to the source return path to obtain the corresponding data, and returns the read data to the terminal.
Specifically, referring to fig. 3, fig. 3 is a flowchart of an embodiment in which a source-back request rewrites a source-back path via an edge script and then returns to the same OSS socket. In this embodiment, for convenience, a plurality of terminals or one terminal may send a plurality of link requests, which is not specifically limited herein, for example, there is a link request 1: http:// www.exemplomain.com-examplefile1.html. Link request 2: http:// www.exampledomain1.com-examplefile3.htmlEtc., and are not described in detail herein. When the request arrives at the server, i.e., the CDN edge node, the server (shown as CDN edge node) rewrites the link request back to the source path, e.g., link request 1 from the source pathexamplefile1.htmlThe overwriting is to rewrite back the source path/www.exemplomain.com/examplefile1.html. Link request 2 is rewritten from the return source pathexamplefile3.htmlRewriting is rewriting back to source path/www.exampledomain1.com/examplefile3.html. And then inquiring the OSS socket to obtain corresponding data according to the rewritten source return path, such as a file directory structure of the OSS socket in FIG. 3, wherein the primary directory is a domain name, and the secondary and above directories form the source return path, so that the inquiry can be facilitated.
According to the data source return method, after the data source return request is received, the source return path is rewritten according to the domain name to obtain the rewritten source return path, because each domain name shares one source station and corresponds to the primary directory in the source station, different domain names do not need to use one primary directory according to convention, file isolation is achieved, the source return path is a resource path under the primary directory, like the domain names of different data, the source return paths are different, therefore resources under the domain names are not related to each other, the problem that the B domain name resource can be accessed under the A domain name does not occur, and because only one source station is applicable, the domain name is divided by the primary directory, the rule is simple and clear, and the later management and maintenance are convenient.
In one embodiment, before the source station is queried according to the rewriting source path to obtain the corresponding data, the method further includes: inquiring whether corresponding data is cached in the node according to the rewriting source path; when the corresponding data is cached in the node, the corresponding data is acquired from the node and returned; and when the corresponding data is not cached in the node, continuing to query the source station according to the rewritten source path to obtain the corresponding data.
The node refers to a CDN node, and some return source data is stored in a cache of the CDN node.
Specifically, referring to fig. 4, fig. 4 is a flowchart of a data source returning method in another embodiment, after a terminal request arrives at a CDN node, a node gateway processes the request according to a pre-written edge script rule, returns a result if the processed request hits a cache of the node, and continues to return to a source OSS socket if the processed request does not hit the cache. The edge script is a section of script code which can be run at the CDN node, and the running refers to running the script code; edge scripts are built with many functions and methods to handle requests, so called toolkits, based on which developers write script program code to achieve the goal of customization.
In one embodiment, rewriting the source-back path according to the domain name to obtain a rewritten source-back path includes: rewriting the source return path to obtain an initial source return path with a domain name; acquiring parameters in a data source request; and rewriting to the rewriting source back path according to the initial source back path and the parameters.
Specifically, referring to fig. 5, fig. 5 is a flowchart of a rewriting process in an embodiment, where the rewriting process for a source-return path mainly includes two steps, the first step is to construct an initial source-return path with a domain name, that is, construct a member uri with a domain name, and then rewrite the source-return and cached uri to keep parameters unchanged, where the first step is to construct only the needed uri to be temporarily stored as a variable, and the actual re-write is not performed, and the second step is to use the variable of the first step to rewrite, and keep the parameters unchanged: meaning that a link request may be followed by splice parameters such as https:// bin.cn/m-yppsource=1 & test=1? Is? The character string is used as parameter, the parameter is not fixed, and the request initiator can splice the character string at will.
In one embodiment, after the source-back path is rewritten according to the domain name to obtain the rewritten source-back path, the method further includes: newly adding a rewriting source-returning path in the request response header information; the method further comprises the steps of: at debugging, the source path is queried and displayed for overwriting in the request response header information.
Specifically, continuing to refer to fig. 5, where a response header is newly added with X-CDN-FILE-PATH, where X is a custom naming specification, and is generally a prefix of custom header information, and CDN-FILE-PATH is a CDN FILE PATH, and this field is what is a PATH that facilitates a developer to check an actual return source, and facilitates debugging of complement information.
In one embodiment, the data source returning method further includes: receiving a new domain name request, wherein the new domain name request carries at least one new domain name; configuring the newly added domain name as the same source station; and generating a primary directory corresponding to the newly added domain name in the source station, and managing data corresponding to the newly added domain name under the primary directory.
Specifically, in this embodiment, the configuration process is mainly performed when a domain name is newly added, where the CDN newly adds a plurality of domain names, at this time, the source station configuring the plurality of domain names is the same source station, that is, OSS socket, where the primary directory in the source station corresponds to the domain name, and the names of the primary directory in the preferred source station are the corresponding domain names, that is, when the domain name is newly added, the primary folder of the same domain name is newly added in the OSS socket, and files in the folder corresponding to the domain name may be managed, where the files under the plurality of folders do not affect each other.
In one embodiment, after configuring the newly added domain name as the same source station, the method further includes: configuring a source return path rewriting rule of a newly added domain name; rewriting the source return path according to the domain name to obtain a rewritten source return path, including: acquiring a source return path rewriting rule corresponding to a domain name; and rewriting the source return path according to the domain name through a source return path rewriting rule to obtain a rewritten source return path.
Specifically, configuring a source return path rewriting rule of a newly added domain name, namely writing an edge script source return path redirection core code; the source-back path rewriting rule mainly realizes the following functions: constructing a return source uri with a domain name, splicing the domain name before a PATH, modifying the return source and the cached uri, keeping parameters unchanged, and newly adding an X-CDN-FILE-PATH for a response header to identify the re-directed uri of the return source.
In the above embodiment, multiple domain names are sourced back to the same OSS socket. And the use of CDN edge script is introduced to customize the back source logic. The edge script rewrites the back source path to a path with a domain name prefix. The primary folder in the OSS pocket is named by a domain name, so that the management of multi-domain name files is facilitated.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a data source returning device for realizing the above related data source returning method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the data source device or devices provided below may refer to the limitation of the data source method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 6, there is provided a data back source device, including: a data back source request receiving module 601, a rewriting module 602, and a back source module 603, wherein:
a data back source request receiving module 601, configured to receive a data back source request, where the data back source request carries a domain name and a back source path;
the rewriting module 602 is configured to rewrite the source return path according to the domain name to obtain a rewritten source return path, where the domain name in the rewritten source return path corresponds to the primary directory in the source station, and the source return path is a resource path under the primary directory;
the source return module 603 is configured to query the source station according to the rewritten source return path to obtain corresponding data, and return the queried data.
In one embodiment, the data source device further includes:
the query module is used for querying whether corresponding data is cached in the node according to the rewritten source path; when the corresponding data is cached in the node, the corresponding data is acquired from the node and returned; and when the corresponding data is not cached in the node, continuing to query the source station according to the rewritten source path to obtain the corresponding data.
In one embodiment, the above-mentioned rewriting module 602 includes:
the rewriting unit is used for rewriting the source return path to obtain an initial source return path with a domain name;
the parameter acquisition unit is used for acquiring parameters in the data source return request;
and the first rewriting unit is used for rewriting to the rewriting source-returning path according to the initial source-returning path and the parameters.
In one embodiment, the data source device further includes:
the rewriting module is used for newly adding a rewriting source return path in the request response head information;
and the debugging module is used for inquiring and displaying the rewriting source-returning path in the request response header information during debugging.
In one embodiment, the data source device further includes:
the domain name adding module is used for receiving a domain name adding request which carries at least one domain name;
the source station configuration module is used for configuring the newly added domain name to be the same source station;
the source station processing module is used for generating a first-level catalog corresponding to the newly added domain name in the source station and managing data corresponding to the newly added domain name under the first-level catalog.
In one embodiment, the data source device further includes:
the rewriting rule configuration module is used for configuring a source returning path rewriting rule of the newly added domain name;
the above-mentioned rewriting module 602 includes:
the rewrite rule acquisition unit is used for acquiring a rewrite rule of the source return path corresponding to the domain name;
and the second rewriting unit is used for rewriting the source return path according to the domain name through the source return path rewriting rule to obtain a rewritten source return path.
The modules in the data source device can be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store the back source data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data back-source method.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: receiving a data source return request, wherein the data source return request carries a domain name and a source return path; rewriting a source return path according to the domain name to obtain a rewritten source return path, wherein the domain name in the rewritten source return path corresponds to a primary directory in a source station, and the source return path is a resource path under the primary directory; and inquiring the source station according to the rewritten source return path to obtain corresponding data, and returning the inquired data.
In one embodiment, before querying the source station for the corresponding data according to the rewriteback source path implemented when the processor executes the computer program, further comprises: inquiring whether corresponding data is cached in the node according to the rewriting source path; when the corresponding data is cached in the node, the corresponding data is acquired from the node and returned; and when the corresponding data is not cached in the node, continuing to query the source station according to the rewritten source path to obtain the corresponding data.
In one embodiment, the rewriting of the source-return path according to the domain name, implemented when the processor executes the computer program, results in a rewritten source-return path, including: rewriting the source return path to obtain an initial source return path with a domain name; acquiring parameters in a data source request; and rewriting to the rewriting source back path according to the initial source back path and the parameters.
In one embodiment, after the re-writing the source-back path according to the domain name and obtaining the re-writing source-back path when the processor executes the computer program, the method further includes: newly adding a rewriting source-returning path in the request response header information; the processor when executing the computer program also implements the steps of: at debugging, the source path is queried and displayed for overwriting in the request response header information.
In one embodiment, the processor when executing the computer program further performs the steps of: receiving a new domain name request, wherein the new domain name request carries at least one new domain name; configuring the newly added domain name as the same source station; and generating a primary directory corresponding to the newly added domain name in the source station, and managing data corresponding to the newly added domain name under the primary directory.
In one embodiment, after the configuration added domain name implemented by the processor when executing the computer program is the same source station, the method further comprises: configuring a source return path rewriting rule of a newly added domain name; when executing the computer program, the processor rewrites the source return path according to the domain name to obtain a rewritten source return path, which comprises the following steps: acquiring a source return path rewriting rule corresponding to a domain name; and rewriting the source return path according to the domain name through a source return path rewriting rule to obtain a rewritten source return path.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a data source return request, wherein the data source return request carries a domain name and a source return path; rewriting a source return path according to the domain name to obtain a rewritten source return path, wherein the domain name in the rewritten source return path corresponds to a primary directory in a source station, and the source return path is a resource path under the primary directory; and inquiring the source station according to the rewritten source return path to obtain corresponding data, and returning the inquired data.
In one embodiment, before querying the source station for the corresponding data according to the rewriteback source path, as implemented when the computer program is executed by the processor, further comprises: inquiring whether corresponding data is cached in the node according to the rewriting source path; when the corresponding data is cached in the node, the corresponding data is acquired from the node and returned; and when the corresponding data is not cached in the node, continuing to query the source station according to the rewritten source path to obtain the corresponding data.
In one embodiment, the rewriting of the source-return path according to the domain name, as implemented when the computer program is executed by the processor, results in a rewritten source-return path, comprising: rewriting the source return path to obtain an initial source return path with a domain name; acquiring parameters in a data source request; and rewriting to the rewriting source back path according to the initial source back path and the parameters.
In one embodiment, after the computer program is executed by the processor to rewrite the source-return path according to the domain name to obtain the rewritten source-return path, the method further includes: newly adding a rewriting source-returning path in the request response header information; the computer program when executed by the processor also performs the steps of: at debugging, the source path is queried and displayed for overwriting in the request response header information.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving a new domain name request, wherein the new domain name request carries at least one new domain name; configuring the newly added domain name as the same source station; and generating a primary directory corresponding to the newly added domain name in the source station, and managing data corresponding to the newly added domain name under the primary directory.
In one embodiment, after the configuration of the added domain name as the same source station implemented when the computer program is executed by the processor, the method further comprises: configuring a source return path rewriting rule of a newly added domain name; the computer program when executed by the processor rewrites the source return path according to the domain name to obtain a rewritten source return path, comprising: acquiring a source return path rewriting rule corresponding to a domain name; and rewriting the source return path according to the domain name through a source return path rewriting rule to obtain a rewritten source return path.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of: receiving a data source return request, wherein the data source return request carries a domain name and a source return path; rewriting a source return path according to the domain name to obtain a rewritten source return path, wherein the domain name in the rewritten source return path corresponds to a primary directory in a source station, and the source return path is a resource path under the primary directory; and inquiring the source station according to the rewritten source return path to obtain corresponding data, and returning the inquired data.
In one embodiment, before querying the source station for the corresponding data according to the rewriteback source path, as implemented when the computer program is executed by the processor, further comprises: inquiring whether corresponding data is cached in the node according to the rewriting source path; when the corresponding data is cached in the node, the corresponding data is acquired from the node and returned; and when the corresponding data is not cached in the node, continuing to query the source station according to the rewritten source path to obtain the corresponding data.
In one embodiment, the rewriting of the source-return path according to the domain name, as implemented when the computer program is executed by the processor, results in a rewritten source-return path, comprising: rewriting the source return path to obtain an initial source return path with a domain name; acquiring parameters in a data source request; and rewriting to the rewriting source back path according to the initial source back path and the parameters.
In one embodiment, after the computer program is executed by the processor to rewrite the source-return path according to the domain name to obtain the rewritten source-return path, the method further includes: newly adding a rewriting source-returning path in the request response header information; the computer program when executed by the processor also performs the steps of: at debugging, the source path is queried and displayed for overwriting in the request response header information.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving a new domain name request, wherein the new domain name request carries at least one new domain name; configuring the newly added domain name as the same source station; and generating a primary directory corresponding to the newly added domain name in the source station, and managing data corresponding to the newly added domain name under the primary directory.
In one embodiment, after the configuration of the added domain name as the same source station implemented when the computer program is executed by the processor, the method further comprises: configuring a source return path rewriting rule of a newly added domain name; the computer program when executed by the processor rewrites the source return path according to the domain name to obtain a rewritten source return path, comprising: acquiring a source return path rewriting rule corresponding to a domain name; and rewriting the source return path according to the domain name through a source return path rewriting rule to obtain a rewritten source return path.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method of data back source, the method comprising:
receiving a data source return request, wherein the data source return request carries a domain name and a source return path;
the source return path is rewritten according to the domain name to obtain a rewritten source return path, the domain name in the rewritten source return path corresponds to a primary directory in a source station, and the source return path is a resource path under the primary directory;
and inquiring the source station according to the rewritten source return path to obtain corresponding data, and returning the inquired data.
2. The method of claim 1, wherein before querying the source station for the corresponding data according to the rewriteback source path, further comprises:
inquiring whether corresponding data is cached in a node according to the rewriting source path;
when the corresponding data is cached in the node, acquiring the corresponding data from the node and returning the data;
and when the corresponding data is not cached in the node, continuing to query the source station according to the rewriting source path to obtain the corresponding data.
3. The method according to claim 1 or 2, wherein the overwriting the source-back path according to the domain name to obtain an overwriting source-back path comprises:
rewriting the source return path to obtain an initial source return path with a domain name;
acquiring parameters in the data source request;
and rewriting to a rewriting source-returning path according to the initial source-returning path and the parameters.
4. The method according to claim 1 or 2, wherein after the rewriting the source-return path according to the domain name to obtain the rewritten source-return path, the method further comprises:
newly adding a rewriting source-returning path in the request response header information;
the method further comprises the steps of:
and inquiring and displaying a rewriting source path in the request response header information when debugging.
5. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving a new domain name adding request, wherein the new domain name adding request carries at least one new domain name;
configuring the newly added domain name as the same source station;
and generating a primary catalog corresponding to the newly added domain name in the source station, and managing data corresponding to the newly added domain name under the primary catalog.
6. The method of claim 5, wherein after said configuring said added domain name as the same source station, further comprising:
configuring a source return path rewriting rule of the newly added domain name;
and the step of rewriting the source return path according to the domain name to obtain a rewritten source return path, which comprises the following steps:
acquiring a source return path rewriting rule corresponding to the domain name;
and rewriting the source-returning path according to the domain name by the source-returning path rewriting rule to obtain a rewritten source-returning path.
7. A data source device, the device comprising:
the data back source request receiving module is used for receiving a data back source request, wherein the data back source request carries a domain name and a back source path;
the rewriting module is used for rewriting the source return path according to the domain name to obtain a rewritten source return path, the domain name in the rewritten source return path corresponds to a primary directory in a source station, and the source return path is a resource path under the primary directory;
and the source returning module is used for inquiring the source station according to the rewriting source returning path to obtain corresponding data and returning the inquired data.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310012413.0A 2023-01-05 2023-01-05 Data back-source method, device, computer equipment, storage medium and program product Pending CN116208676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310012413.0A CN116208676A (en) 2023-01-05 2023-01-05 Data back-source method, device, computer equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310012413.0A CN116208676A (en) 2023-01-05 2023-01-05 Data back-source method, device, computer equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN116208676A true CN116208676A (en) 2023-06-02

Family

ID=86506980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310012413.0A Pending CN116208676A (en) 2023-01-05 2023-01-05 Data back-source method, device, computer equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN116208676A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117061615A (en) * 2023-10-09 2023-11-14 杭州优云科技有限公司 Cache path acquisition method, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117061615A (en) * 2023-10-09 2023-11-14 杭州优云科技有限公司 Cache path acquisition method, device, computer equipment and storage medium
CN117061615B (en) * 2023-10-09 2024-01-16 杭州优云科技有限公司 Cache path acquisition method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US10356156B2 (en) Method and device for loading webpage
CN109714188B (en) Configuration data management method, device and storage medium based on Zookeeper
US20060248467A1 (en) Framework for declarative expression of data processing
CN104601736A (en) Method and device for realizing short uniform resource locator (URL) service
US8176097B2 (en) Maintaining data coherency within related multi-perspective user interfaces via session-less queries
US11882154B2 (en) Template representation of security resources
CA2747783C (en) Extensibility for web based diagram visualization
CN104423961A (en) Method and system for generating testing script
CN112615759A (en) Full link voltage measurement assembly, full link voltage measurement method and device
CN112256772A (en) Data service method, device and readable storage medium
CN116208676A (en) Data back-source method, device, computer equipment, storage medium and program product
CN108021564A (en) A kind of method and apparatus of page reorientation
CN106990974B (en) APP updating method and device and electronic equipment
CN114218156A (en) Data export method, data export device, computer equipment and storage medium
US11443098B1 (en) Federated recursive user interface element rendering
CN115858972B (en) Page display method and device of application program, storage medium and computer equipment
CN110297945B (en) Data information processing method and system based on XBRL
CN116644250A (en) Page detection method, page detection device, computer equipment and storage medium
CN116488986A (en) Event-driven message touch method, system and device and storage medium
US20220229858A1 (en) Multi-cloud object store access
US9230022B1 (en) Customizable result sets for application program interfaces
CN112417508B (en) Data desensitization method, data storage system, storage medium and server
US11100128B2 (en) Cascading data impact visualization tool
US20220035615A1 (en) Cross platform configuration domain translation
CN114692056A (en) Target page generation method and device, computer equipment and storage medium

Legal Events

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