Front-end resource selection method based on global multi-data center and related device
By receiving data center request information and determining resource configuration and version number based on unique identifiers and product type identifiers, the problem of inflexible switching of data center front-end service pages is solved, enabling flexible page version switching and improved scalability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN FULIN TECH CO LTD
- Filing Date
- 2023-07-06
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, the switching of data center front-end service pages in globalized service systems is inflexible, difficult to expand, and cannot specify versions for different data centers, resulting in low implementation efficiency and poor flexibility.
By receiving request information from the data center, determining the resource configuration and version number based on the unique identifier of the data center and the product type identifier, and using resource policy packages and template packages to obtain front-end resource data, it supports displaying different versions of pages in different data centers.
It enables flexible switching of front-end page versions, allowing for the specification of page versions for different data centers, thereby improving the system's scalability and flexibility and simplifying the data center expansion process.
Smart Images

Figure CN116723096B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a front-end resource selection method and related equipment based on global multi-data center. Background Technology
[0002] The global service system comprises an API interface layer, an IDS (Identity Services) layer, and at least one data center (DC). Users of this system are located worldwide. When a user enters a request through the official website to access the front-end service page, the API interface layer receives the request and forwards it to the IDS layer. The IDS layer, possessing reverse proxy capabilities, selects a data center located in the corresponding country to retrieve the specified data before returning it to the user. Specifically, the IDS layer stores the basic resource data for the front-end service page, while the data center stores the sensitive data for the front-end service page.
[0003] In existing technologies, switching the user's front-end service page version requires adding code to the IDS layer to set the basic resource data and corresponding configurations for the user's version. This is inefficient and lacks flexibility. Furthermore, adding a new data center also requires re-adding code to configure the basic resource data and corresponding configurations for the new version, making the process difficult.
[0004] Furthermore, while some data centers may want to use version A and others may want to use version B, the current technology only supports all data centers using the same version of service page resources, making it impossible to specify a version for a single data center, which is not flexible enough.
[0005] In summary, the existing technology for switching service pages on the front end is relatively complicated, and it cannot specify a version for the front end, resulting in poor flexibility. Summary of the Invention
[0006] In view of this, this application provides a front-end resource selection method and related equipment based on global multi-data center, which can effectively solve the problems of data center not being easy to expand and front-end service page switching being cumbersome, as well as poor flexibility and difficulty in expansion in the prior art.
[0007] In a first aspect, embodiments of this application provide a front-end resource selection method based on global multi-datacenters, including:
[0008] Receive request information sent from the front end of any data center; the request information includes a unique identifier for the data center and a product type identifier;
[0009] The resource configuration of the front-end page is determined based on the unique identifier of the data center;
[0010] The resource version number of the front-end page is determined based on the unique identifier of the data center;
[0011] The front-end resource data required for front-end page display is determined based on the resource configuration, the product type identifier, and the resource version number.
[0012] The front-end resource data is returned to the front-end, and the front-end resource data is used for the front-end page to display the page according to the resource version number.
[0013] In some embodiments, determining the resource version number of the front-end page based on the unique identifier of the data center includes:
[0014] Based on the unique identifier of the data center, a specified version number and / or the latest resource version number are detected within the resource policy package, and the resource version number is determined based on the specified version number and / or the latest resource version number; the resource policy package includes specified version information and / or resource version number information, as well as the unique identifier of the data center.
[0015] In some embodiments, the resource version number information is a priority value of the resource version;
[0016] The step of detecting a specified version number and / or the latest resource version number within the resource policy package based on the unique identifier of the data center, and determining the resource version number based on the specified version number and / or the latest resource version number, includes:
[0017] Based on the unique identifier of the data center, the specified version number is detected in the resource policy package. If the specified version number is obtained, the specified version number is used as the resource version number.
[0018] If the specified version number is not obtained, the priority values of all resource versions corresponding to the data center are obtained from the resource policy package based on the unique identifier of the data center, and the resource version number corresponding to the highest priority value is obtained by sorting the priority values of each resource version.
[0019] In some embodiments, determining the resource configuration of the front-end page based on the unique identifier of the data center includes:
[0020] The resource configuration of the front-end page is determined within the resource configuration package based on the unique identifier of the data center.
[0021] The resource configuration package includes a unique identifier for each data center and the corresponding page resource configuration information.
[0022] In some embodiments, determining the front-end resource data required for front-end page display based on the resource configuration, the product type identifier, and the resource version number includes:
[0023] Based on the resource configuration, the product type identifier, and the resource version number, determine the front-end resource data required for the front-end page display in the resource template package;
[0024] The resource template package includes each product category, the resource version number corresponding to the product, and the basic page data resources corresponding to the product.
[0025] Based on the basic data resources of the page and the resource configuration, the front-end resource data required for the front-end page display is obtained.
[0026] In some embodiments, determining the front-end resource data required for front-end page display based on the resource configuration, the product type identifier, and the resource version number includes:
[0027] If the resource configuration is valid and the resource version number is valid, then the corresponding product is determined according to the product type identifier; the front-end resource data corresponding to the resource version number of the product is obtained;
[0028] If the resource configuration is invalid and / or the resource version number is invalid, return the product corresponding to the default resource version number and determine the corresponding product based on the product type identifier; obtain the front-end resource data corresponding to the default resource version number of the product.
[0029] Secondly, embodiments of this application provide a front-end resource selection device based on global multi-datacenters, comprising:
[0030] The request receiving module is used to receive request information sent by the front end of a data center; the request information includes a unique identifier for the data center and a product type identifier.
[0031] The resource configuration determination module is used to determine the resource configuration of the front-end page based on the unique identifier of the data center;
[0032] The resource version number determination module is used to determine the resource version number of the front-end page based on the unique identifier of the data center;
[0033] The front-end resource data determination module is used to determine the front-end resource data required for front-end page display based on the resource configuration, the product type identifier, and the resource version number.
[0034] The front-end resource data sending module is used to return the front-end resource data to the front-end, and the front-end resource data is used for the front-end page to display according to the resource version number.
[0035] In some embodiments, the resource version number determination module is used to detect a specified version number and / or the latest resource version number within the resource policy package based on the data center unique identifier, and determine the resource version number based on the specified version number and / or the latest resource version number; the resource policy package includes specified version information and / or resource version number information, and a data center unique identifier.
[0036] Thirdly, embodiments of this application provide a terminal device, the terminal device including a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement a front-end resource selection method based on global multi-data center provided in the first aspect of this application.
[0037] Fourthly, embodiments of this application provide a readable storage medium storing a computer program, which, when executed on a processor, implements a front-end resource selection method based on global multi-data center provided in the first aspect of this application.
[0038] The embodiments of this application have the following beneficial effects:
[0039] This application first obtains the resource configuration and resource version number based on the unique data center identifier in the request information; then, it obtains the corresponding product based on the product type identifier in the request information. Finally, the product, the resource version number, and the resource configuration are used to obtain the front-end resource data, which is then used by the front-end page to display the page based on the resource version number. This achieves the function of flexibly switching the front-end page based on the resource version number, thus effectively solving the problems of cumbersome implementation and poor flexibility in existing technologies for switching service pages. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This illustration shows a data structure representation of a front-end resource selection method based on global multi-datacenters, according to an embodiment of this application.
[0042] Figure 2 This illustration shows an improved data structure representation of the front-end resource selection method based on global multi-datacenters in an embodiment of this application.
[0043] Figure 3This paper illustrates a flowchart of a front-end resource selection method based on global multi-datacenters according to an embodiment of this application.
[0044] Figure 4 This illustration shows another flowchart of the front-end resource selection method based on global multi-data center in this application embodiment;
[0045] Figure 5 This paper illustrates a flowchart of a front-end resource selection method based on global multi-datacenters in an embodiment of this application to obtain a resource version number strategy.
[0046] Figure 6 This paper shows a schematic diagram of a front-end resource selection device based on a global multi-data center according to an embodiment of this application;
[0047] Figure 7 A block diagram of a globalized service system according to an embodiment of this application is shown.
[0048] Explanation of key component symbols:
[0049] 100 - API Interface Layer; 200 - IDS Layer; 210 - Resource Configuration Package; 220 - Resource Template Package; 230 - Resource Policy Package; 231 - Policy Content; 300 - Data Center Layer; 610 - Request Receiving Module; 620 - Resource Configuration Determination Module; 630 - Resource Version Number Determination Module; 640 - Front-end Resource Data Determination Module; 650 - Front-end Resource Data Sending Module. Detailed Implementation
[0050] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0051] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0052] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0053] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0054] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0055] Figure 1 This illustration shows a data structure representation of a front-end resource selection method based on global multi-datacenters, according to an embodiment of this application. The data structure table includes resources, resource configurations, and resource templates. Resources include unique identifiers, data center unique identifiers, product type identifiers, and version information, etc. Resource configurations include unique identifiers and page resource configuration information, etc. Resource templates include unique identifiers and basic page data resources, etc.
[0056] The front-end user request information includes a unique data center identifier and a product type identifier. For example, RegionUUID represents the unique data center identifier, and Component represents the product type identifier. The IDS layer 200 determines the data center and product type based on the unique data center identifier and product type identifier in the resources. For example, this request might be from a US data center, sent by a document editing product. The document editing product could be a Wiki product. The unique identifier determines the resource configuration and resource file template. Based on the resource configuration and resource file template, the data information for the front-end service page is reconstructed and returned to the front end to obtain a visual front-end service page. If switching the front-end service page or adding a data center is desired, new data tables such as resource, resource configuration, and resource file template need to be added. The resource table is strongly correlated with the version of the resource, resulting in a rigid, inflexible, and poorly scalable IDS layer 200. Therefore, this paper provides a front-end resource selection method and related equipment based on global multi-data center systems, which can effectively solve the problems of cumbersome implementation, poor flexibility, and poor scalability in existing technologies for switching front-end service pages.
[0057] Figure 2 This illustration shows an improved data structure representation of the front-end resource selection method based on global multi-datacenters in this application embodiment. The improved data structure table includes a resource configuration package 210, a resource template package 220, and a resource policy package 230. The resource configuration package 210 includes resource configuration rows for each data center, each row containing a unique data center identifier and page resource configuration information. The resource template package 220 includes resource sub-templates for each product, each sub-template containing a unique identifier, basic page data resources, product type identifier, and resource version number. The resource policy package 230 includes at least one row of policy information, including a unique data center identifier, a policy name, and resource version priority. Furthermore, the policy name points to a policy content 231, which includes a specified version number and a unique data center identifier. Based on the policy content 231, the corresponding version of the front-end resource template and resource configuration are obtained.
[0058] The following examples illustrate this method for selecting front-end resources based on global multi-datacenter systems.
[0059] Figure 3 A flowchart illustrating a front-end resource selection method based on global multi-datacenters according to an embodiment of this application is shown. This front-end resource selection method based on global multi-datacenters is exemplary and applicable to the IDS layer 200, which also implements routing and forwarding functions and maintains user information. Specifically, the IDS layer 200 in this application mainly implements the following steps:
[0060] S10, receive request information sent by the front end of a data center; the request information includes the unique identifier of the data center and the product type identifier.
[0061] This method uses an abstracted API interface to facilitate interaction between the IDS layer 200 and the front-end. For example, the API interface receives requests from the front-end. The front-end can be an H5 front-end, a WEB front-end, or a RESTful API front-end, etc.
[0062] The unique data center identifier is used to identify the data center. This identifier can be a Universally Unique Identifier (UUID), or any other unique identifier; there are no restrictions here. The product category identifier is used to identify the specific product used by the front-end. A data center supports services for multiple products. Front-end users have already registered at IDS layer 200, and IDS layer 200 can identify the corresponding data center and product category for each front-end. In other words, the unique data center identifier and product category identifier are used to distinguish between each data center and each product.
[0063] S20 determines the resource configuration of the front-end page based on the unique identifier of the data center.
[0064] Because there are multiple data centers, each with different resource configurations. For example, data centers located in the United States and Japan can have their front-end page content customized according to customer needs.
[0065] In one implementation, step S20, which determines the resource configuration of the front-end page based on the unique identifier of the data center, includes:
[0066] The resource configuration of the front-end page is determined within resource configuration package 210 based on the unique identifier of the data center.
[0067] Resource configuration package 210 includes a unique identifier for each data center and corresponding page resource configuration information. Preferably, resource configuration package 210 uses a data table to obtain a resource configuration table, which includes a unique identifier field for the data center and a page resource configuration information field. The page resource configuration information is used to represent the content and format displayed on the page, such as configuring the display or hiding of a certain control.
[0068] S30 determines the resource version number of the front-end page based on the unique identifier of the data center.
[0069] This application determines the resource version number of the basic page data resources used by the data center based on the unique identifier of the data center. This application can support providing a specified version of the basic page data resources to the data center and support different versions of the page to be displayed in different data centers.
[0070] In one implementation, step S30 involves determining the resource version number of the front-end page based on the unique identifier of the data center, including the following cases:
[0071] The first method involves detecting the specified version number within the resource policy package 230 based on the unique identifier of the data center, and then determining the resource version number accordingly. The resource policy package 230 includes the unique identifier of the data center and specified version information, etc. The specified version information can be a policy field, the value of which points to policy content, which includes the specified version number.
[0072] The second method involves detecting the latest resource version number within the resource policy package 230 based on the unique identifier of the data center, and then determining the resource version number based on the latest resource version number. The resource policy package 230 includes information such as the unique identifier of the data center and the resource version number.
[0073] The third method involves detecting the specified version number and the latest resource version number within the resource policy package 230 based on the unique identifier of the data center, and then determining the resource version number based on the specified version number and the latest resource version number. The resource policy package 230 includes the unique identifier of the data center, the specified version information, and the resource version number information.
[0074] Furthermore, the specified version information in resource strategy package 230 can be modified according to requirements. For example, if a data center located in the United States does not like the latest version of the product, then IDS layer 200 can set a specified version number according to customer needs.
[0075] In one implementation, the resource version number information is the priority value of the resource version; the resource version number is determined in step S30 using the following method:
[0076] Based on the unique identifier of the data center, the specified version number is checked in the resource policy package 230. If the specified version number is obtained, the specified version number is used as the resource version number.
[0077] If the specified version number is not obtained, the priority values of all resource versions corresponding to the data center are obtained from the resource policy package 230 based on the unique identifier of the data center, and sorted according to the priority values of each resource version to obtain the resource version number corresponding to the highest priority value.
[0078] S40 determines the front-end resource data required for front-end page display based on resource configuration, product type identifier, and resource version number.
[0079] Find the corresponding front-end resource data based on resource configuration, product type identifier, and resource version number.
[0080] In one implementation, step S40, determining the front-end resource data required for front-end page display based on resource configuration, product type identifier, and resource version number, includes:
[0081] Based on resource configuration, product type identifier, and resource version number, determine the front-end resource data required for front-end page display in resource template package 220;
[0082] Resource template package 220 includes various product categories, the resource version number corresponding to the product, and the basic page data resources corresponding to the product.
[0083] Based on the page's basic data resources and resource configuration, the front-end resource data required for the front-end page display is obtained.
[0084] In one implementation, to improve stability, step S40 determines the front-end resource data required for front-end page display based on resource configuration, product type identifier, and resource version number, including:
[0085] If the resource configuration and resource version number are valid, then determine the corresponding product based on the product type identifier; obtain the front-end resource data corresponding to the resource version number of the obtained product;
[0086] If either the resource configuration or the resource version number is invalid, the system returns the default resource version number corresponding to the product identified by the product type identifier; then it retrieves the front-end resource data corresponding to the default resource version number of the obtained product. Alternatively, it can directly return the default page data, for example, indicating that no page data for this product exists.
[0087] Invalid resource configuration includes situations where the resource configuration is empty or does not exist. Invalid resource version number includes situations where the resource version number is empty or does not exist.
[0088] S50 returns front-end resource data to the front-end, which is used by the front-end page to display the page according to the resource version number.
[0089] The IDS layer 200 is also used to store front-end resource data, while the data center is used to store sensitive data. In addition to front-end resource data, the front-end page also requires sensitive data corresponding to the front-end account within the data center. The front-end resource data and sensitive data work together to display the front-end page.
[0090] Therefore, this application enables the flexible switching of front-end page versions according to needs, as well as the ability to specify a page version for a particular data center.
[0091] The following describes the front-end resource selection method based on global multi-datacenters in this application, using a data center located in the United States as an example. In this example, the resource configuration table includes resource configuration rows for each data center. Each resource configuration row includes a unique identifier, UUID, page resource configuration information, creation time, and update time. The unique identifier is used as the primary key to retrieve other relevant information. The resource template table includes resource sub-templates for each product. Each resource sub-template includes a unique identifier, basic page data resources, product type identifier, resource version number, creation time, and update time. The resource strategy table includes multiple rows of strategy information, including UUID, strategy name, resource version priority value, creation time, and update time. Furthermore, the strategy information table also includes multiple specified strategies, each including a UUID, specified version number, resource version priority value, creation time, and update time. Based on the specified strategy, the resource template and resource configuration for the corresponding version number of the front-end are obtained. Specifically, for example... Figure 4 As shown, this example includes the following steps:
[0092] The S100 receives access files containing UUIDs and product type identifiers from front-ends located in a data center in the United States. Multiple user front-ends are supported within a single data center. Users log in to their corresponding accounts via the official website and send UUIDs and product type identifiers to the IDS layer 200 through the API interface layer 100.
[0093] S200: Based on the UUID, find the resource configuration row containing the same UUID in the resource configuration table, obtain the page resource configuration information in that resource configuration row, and obtain the resource configuration of the front-end page.
[0094] S300: Based on the UUID, find the policy information containing the same UUID in the resource policy table, and determine the resource version number of the front-end page according to the policy information. Specifically, such as... Figure 5 As shown, the resource version number is obtained using the following strategy:
[0095] S310, determine whether a specified version number exists.
[0096] The system checks whether the field corresponding to the specified version number in the policy information has been assigned a value. For example, if the field KeyName is used, and KeyName is assigned a policy name, the system finds the corresponding policy content 231 based on that policy name. This policy content 231 contains the UUID and the specified version number.
[0097] S311, use the specified version number as the resource version number. If the field corresponding to the specified version number is assigned a valid value, then another policy content 231 is obtained based on the field assigned to the specified version number. Within policy content 231, the specified version number corresponding to the same UUID is obtained, and the specified version number is used as the resource version number.
[0098] S320 sorts all resource version priority values and obtains the resource version number with the highest priority value.
[0099] If the field corresponding to the specified version number is assigned an invalid value, then retrieve all policy information in the resource policy table that has the same UUID as the UUID sent by the front end, retrieve the resource version priority value in each policy information, sort the resource version priority values, and retrieve the version number corresponding to the resource version priority value with the largest sequence number. This version number is the resource version number.
[0100] S400: Based on the product type identifier, obtain the corresponding product, acquire the page basic data resources of the corresponding resource version number of the product. The page basic data resource file contains placeholders. Fill the page resource configuration information into the placeholders to obtain the front-end resource data required for the front-end page display.
[0101] S500 returns front-end resource data to the front-end, which is used by the front-end page to display the page according to the resource version number.
[0102] For example, an S3 server is set up in IDS layer 200. Front-end resource data is stored on the S3 server, pulled from S3CDN, and returned to the front-end browser. The front-end browser loads the front-end resource data, renders it, and then displays the visual page. Alternatively, the front-end resource data can be rendered in IDS layer 200, and the rendered data can be returned to the front-end browser.
[0103] This application allows for the provision of different versions of resources to different data centers, enabling different data centers to display different versions of the front-end page. For example, a data center located in the United States can support the V1.0 version of the front-end service page, while a data center located in Japan can support the V2.0 version. Furthermore, this application can specify a version number for a particular data center; for instance, it can assign the V1.0 version of the resources to a data center located in the United States, allowing the US data center to display the V1.0 version of the service page. Therefore, this application offers great flexibility, allowing for easy switching between page versions based on customer needs, testing requirements, and bug reports.
[0104] Furthermore, this application greatly assists in expanding data centers, facilitating expansion without requiring additional code; simply specify the product version for the expanded data center.
[0105] In this application, different data centers have different front-end resource data, and the pages displayed for different data centers are different. This function was not supported in previous applications. For example, version 2.0 was launched in the United States, while version 1.0 was launched in Japan.
[0106] Figure 6 A schematic diagram of a front-end resource selection device based on a global multi-datacenter system according to an embodiment of this application is shown. Exemplarily, the front-end resource selection device based on a global multi-datacenter system includes: a request receiving module 610, a resource configuration determining module 620, a resource version number determining module 630, a front-end resource data determining module 640, and a front-end resource data sending module 650.
[0107] The request receiving module 610 is used to receive request information sent by the front end of a data center; the request information includes the unique identifier of the data center and the product type identifier.
[0108] The resource configuration determination module 620 is used to determine the resource configuration of the front-end page based on the unique identifier of the data center;
[0109] The resource version number determination module 630 is used to determine the resource version number of the front-end page based on the unique identifier of the data center;
[0110] The front-end resource data determination module 640 is used to determine the front-end resource data required for front-end page display based on resource configuration, product type identifier, and resource version number.
[0111] The front-end resource data sending module 650 is used to return front-end resource data to the front-end, and the front-end resource data is used for the front-end page to display according to the resource version number.
[0112] It is understood that the apparatus in this embodiment corresponds to the front-end resource selection method based on global multi-data center in the above embodiment. The options in the above embodiment are also applicable to this embodiment, so they will not be described again here.
[0113] Figure 7 This diagram illustrates a structural block diagram of a globalized service system according to an embodiment of this application. Exemplarily, the service system includes an API interface layer 100, an IDS layer 200, and a data center layer 300. The API interface layer 100 receives access files input from the front end, including a unique data center identifier and a product type identifier. The IDS layer 200 uses a front-end resource selection method based on global multi-data center scenarios as described in this application to select front-end resource data. The data center receives the front-end resource data and displays pages rendered based on the front-end resource data on the corresponding front end.
[0114] It is understood that the IDS layer 200 in this embodiment corresponds to the front-end resource selection method based on global multi-data center in the above embodiment. The options in the above embodiment are also applicable to this embodiment, so they will not be described again here.
[0115] This application also provides a terminal device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the terminal device to perform the functions of the various modules in the above-described global multi-data center-based front-end resource selection method or the above-described global multi-data center-based front-end resource selection device.
[0116] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0117] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0118] In one implementation, the terminal device is an authentication server.
[0119] This application also provides a readable storage medium for storing the computer program used in the aforementioned terminal device.
[0120] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0121] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0122] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium can be a non-volatile storage medium or a volatile storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, and other media capable of storing program code.
[0123] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for selecting front-end resources based on global multi-datacenters, characterized in that, include: Receive request information sent from the front end of any data center; The request information includes a unique data center identifier and a product type identifier; Determining the resource configuration of the front-end page based on the unique identifier of the data center specifically includes: determining the resource configuration of the front-end page within a resource configuration package based on the unique identifier of the data center; the resource configuration package includes the unique identifier of each data center and the corresponding page resource configuration information; Determining the resource version number of the front-end page based on the unique identifier of the data center specifically includes: detecting a specified version number and / or the latest resource version number within the resource policy package based on the unique identifier of the data center, and determining the resource version number based on the specified version number and / or the latest resource version number; the resource policy package includes specified version information and / or resource version number information, as well as the unique identifier of the data center; Determining the front-end resource data required for front-end page display based on the resource configuration, product type identifier, and resource version number specifically includes: determining the front-end resource data required for front-end page display in the resource template package based on the resource configuration, product type identifier, and resource version number; the resource template package includes each product type, the resource version number corresponding to the product, and the basic page data resources corresponding to the product; and obtaining the front-end resource data required for front-end page display based on the basic page data resources and the resource configuration. The front-end resource data is returned to the front-end, and the front-end resource data is used by the front-end page to display the page according to the resource version number; The resource version number information is the priority value of the resource version; The step of detecting a specified version number and / or the latest resource version number within the resource policy package based on the unique identifier of the data center, and determining the resource version number based on the specified version number and / or the latest resource version number, includes: Based on the unique identifier of the data center, the specified version number is detected in the resource policy package. If the specified version number is obtained, the specified version number is used as the resource version number. If the specified version number is not obtained, the priority values of all resource versions corresponding to the data center are obtained from the resource policy package based on the unique identifier of the data center, and the resource version number corresponding to the highest priority value is obtained by sorting the priority values of each resource version.
2. The front-end resource selection method based on global multi-datacenters according to claim 1, characterized in that, The step of determining the front-end resource data required for front-end page display based on the resource configuration, the product type identifier, and the resource version number includes: If the resource configuration is valid and the resource version number is valid, then the corresponding product is determined according to the product type identifier; the front-end resource data corresponding to the resource version number of the product is obtained; If the resource configuration is invalid and / or the resource version number is invalid, return the product type identifier corresponding to the default resource version number, determine the corresponding product based on the product type identifier, and obtain the front-end resource data corresponding to the default resource version number of the product.
3. A front-end resource selection device based on global multi-data center, characterized in that, include: The request receiving module is used to receive request information sent by the front end of a data center; The request information includes a unique data center identifier and a product type identifier; The resource configuration determination module is used to determine the resource configuration of the front-end page based on the unique identifier of the data center. Specifically, it includes: determining the resource configuration of the front-end page within the resource configuration package based on the unique identifier of the data center; the resource configuration package includes the unique identifier of each data center and the corresponding page resource configuration information. The resource version number determination module is used to determine the resource version number of the front-end page based on the unique identifier of the data center. Specifically, it includes: detecting a specified version number and / or the latest resource version number within a resource policy package based on the unique identifier of the data center; and determining the resource version number based on the specified version number and / or the latest resource version number. The resource policy package includes specified version information and / or resource version number information, and a unique identifier of the data center. The resource version number information is a priority value of the resource version. The step of detecting the specified version number and / or the latest resource version number within the resource policy package based on the unique identifier of the data center, and determining the resource version number based on the specified version number and / or the latest resource version number, includes: detecting the specified version number within the resource policy package based on the unique identifier of the data center; if the specified version number is obtained, it is used as the resource version number; if the specified version number is not obtained, priority values of all resource versions corresponding to the data center are obtained within the resource policy package based on the unique identifier of the data center, and the priority values of each resource version are sorted to obtain the resource version number corresponding to the highest priority value. The front-end resource data determination module is used to determine the front-end resource data required for front-end page display based on the resource configuration, the product type identifier, and the resource version number. Specifically, it includes: determining the front-end resource data required for front-end page display in a resource template package based on the resource configuration, the product type identifier, and the resource version number; the resource template package includes each product type, the resource version number corresponding to the product, and the basic page data resources corresponding to the product; and obtaining the front-end resource data required for front-end page display based on the basic page data resources and the resource configuration. The front-end resource data sending module is used to return the front-end resource data to the front-end, and the front-end resource data is used for the front-end page to display according to the resource version number.
4. A terminal device, characterized in that, The terminal device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the front-end resource selection method based on global multi-data center as described in claim 1 or 2.
5. A readable storage medium, characterized in that, It stores a computer program that, when executed on a processor, implements the front-end resource selection method based on global multi-data center as described in claim 1 or 2.
Citation Information
Patent Citations
Webpage access method and device, computer equipment and storage medium
CN116304403A