Configuration information acquisition method and device, equipment and storage medium

By searching for configuration information in the content distribution node, the server pressure problem caused by the API to directly request the server is solved, and efficient and reliable configuration information is achieved, avoiding service crashes.

CN120378305APending Publication Date: 2025-07-25BEIJING LONGJU YIXING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510571191.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, when the API directly requests the server to obtain configuration information, the server pressure increases dramatically, the response speed becomes slower, and may even cause service crashes.

Method used

By finding node configuration information corresponding to configuration information acquisition requests from content distribution nodes, feedback information is generated, server pressure is reduced and response speed is improved.

Benefits of technology

Effectively reduce pressure on the server side, improve response speed, avoid the risk of service crashes, and ensure the timeliness and accuracy of configuration information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378305A_ABST
    Figure CN120378305A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of data processing, and discloses a configuration information acquisition method and device, equipment and a storage medium, and the method comprises the following steps: acquiring a configuration information acquisition request initiated by a user based on an application program interface; node configuration information corresponding to the configuration information acquisition request is searched from a content distribution node, a configuration information search result of the content distribution node is obtained, and one or more pieces of updated node configuration information are stored in the content distribution node; and generating feedback information for the configuration information acquisition request based on the configuration information search result of the content distribution node. By applying the technical scheme of the invention, the configuration information acquisition efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of data processing, and particularly to a method, apparatus, device, and storage medium for obtaining configuration information. Background Art

[0002] In the current Internet environment, the API (Application Program Interface) is a key channel for data interaction between the client and the server, and its performance and efficiency are crucial for improving the user experience. In the related art, the API call method usually directly requests the server to obtain configuration information. However, in the face of a large number of concurrent user requests, this method will cause a sharp increase in the server pressure, a slow response speed, and even may cause the service to crash. Summary of the Invention

[0003] In view of the above problems, embodiments of the present invention provide a method, apparatus, device, and storage medium for obtaining configuration information, which are used to solve the problem that when the API directly requests the server to obtain configuration information in the related art, it will cause a sharp increase in the server pressure, a slow response speed, and even may cause the service to crash.

[0004] According to one aspect of the embodiments of the present invention, a method for obtaining configuration information is provided. The method includes: obtaining a configuration information acquisition request initiated by a user based on an application program interface; searching for node configuration information corresponding to the configuration information acquisition request in a content delivery node to obtain a configuration information search result of the content delivery node, where one or more updated node configuration information are stored in the content delivery node; generating feedback information for the configuration information acquisition request based on the configuration information search result of the content delivery node. Through the above process, the pressure on the server side can be effectively reduced, the response speed can be improved, and the risk of service crash can be avoided.

[0005] In an optional embodiment, before searching for node configuration information corresponding to the configuration information acquisition request in the content delivery node to obtain a configuration information search result of the content delivery node, the method further includes:

[0006] If the content delivery node cannot be accessed, then search for local configuration information stored in the user's client based on the configuration information acquisition request, or search for backup configuration information stored in a backup content delivery node;

[0007] Generating feedback information for the configuration information acquisition request based on the local configuration information or the backup configuration information.

[0008] In an alternative embodiment, after looking up the node configuration information corresponding to the configuration information acquisition request from the content distribution node and obtaining the configuration information lookup result of the content distribution node, the method further includes:

[0009] If the configuration information lookup result of the content distribution node is empty, pull the source configuration information from the original server and trigger an update of the configuration information cache of the content distribution node to update the node configuration information based on the source configuration information.

[0010] In an alternative embodiment, looking up the node configuration information corresponding to the configuration information acquisition request from the content distribution node and obtaining the configuration information lookup result of the content distribution node includes:

[0011] Perform a matching query in the configuration information database of the content distribution node according to the identifier in the configuration information acquisition request, where the identifier is generated based on the full path of the application programming interface;

[0012] If the matching query is successful, extract the node configuration information corresponding to the identifier as the configuration information lookup result of the content distribution node.

[0013] In an alternative embodiment, generating feedback information for the configuration information acquisition request based on the configuration information lookup result of the content distribution node includes:

[0014] If the configuration information lookup result of the content distribution node is successful and the configured information lookup result is different from the original configuration information carried in the configuration information acquisition request, generate positive feedback information including the node configuration information, where the positive feedback information is used to indicate that the configuration information acquisition request has successfully obtained the corresponding node configuration information;

[0015] If the configuration information lookup result of the content distribution node is failed or empty, generate negative feedback information including an error prompt, where the negative feedback information is used to indicate that the configuration information acquisition request has failed to successfully obtain the corresponding node configuration information.

[0016] In an alternative embodiment, obtaining one or more updated node configuration information includes:

[0017] Obtain the configuration content updated by the configuration center to get the configuration update content;

[0018] Based on the configuration update content, call the content distribution node program interface to update the node configuration information stored in the content distribution node to obtain one or more updated node configuration information.

[0019] In an alternative embodiment, obtaining one or more updated node configuration information further includes:

[0020] The target cache time for obtaining node configuration information;

[0021] Based on the target cache time and the original server, update the node configuration information stored in the content distribution node to obtain one or more updated node configuration information.

[0022] According to another aspect of the embodiments of the present invention, there is provided a configuration information acquisition device, including: a request acquisition module for acquiring a configuration information acquisition request initiated by a user based on an application programming interface; an information acquisition module for searching for node configuration information corresponding to the configuration information acquisition request from the content distribution node to obtain a configuration information search result of the content distribution node, where one or more updated node configuration information are stored in the content distribution node; an information feedback module for generating feedback information for the configuration information acquisition request based on the configuration information search result of the content distribution node. Through the above modules, the pressure on the server side can be effectively reduced, the response speed can be improved, and the risk of service collapse can be avoided.

[0023] According to another aspect of the embodiments of the present invention, there is provided an electronic device, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operations of the foregoing configuration information acquisition method.

[0024] According to still another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, in which at least one executable instruction is stored, and the executable instruction causes the electronic device / device to execute the operations of the foregoing configuration information acquisition method.

[0025] According to still another aspect of the embodiments of the present invention, there is provided a computer program product, including computer instructions, and the computer instructions are used for causing a computer to execute the operations of the configuration information acquisition method in the foregoing first aspect or any corresponding embodiment thereof.

[0026] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to be able to understand the technical means of the embodiments of the present invention more clearly, it can be implemented according to the content of the description. And in order to make the above and other purposes, features, and advantages of the embodiments of the present invention more obvious and understandable, the following specifically gives the specific implementation manners of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings are only used to illustrate the embodiments and are not considered to be a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0028] Figure 1 A flowchart showing a configuration information acquisition method provided by the present invention is shown;

[0029] Figure 2 The structure diagram of a configuration information acquisition device provided by the present invention is shown;

[0030] Figure 3 The structure diagram of an electronic device provided by the present invention is shown. Detailed implementation manners

[0031] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0032] Figure 1 The flowchart of the first embodiment of a configuration information acquisition method of the present invention is shown. As Figure 1 shown, the method includes the following steps:

[0033] Step 110, obtain a configuration information acquisition request initiated by a user based on an application programming interface.

[0034] As above, by obtaining the configuration information acquisition request initiated by the user based on the application programming interface, the corresponding configuration information is obtained based on the configuration information acquisition request.

[0035] In an alternative embodiment, when obtaining the configuration information acquisition request initiated by the user based on the application programming interface, the validity of the request and the user's permissions can be verified first. Ensure that the request comes from a legitimate user, and the user has the permission to obtain the corresponding configuration information. After the verification passes, continue to process the configuration information acquisition request and enter the next process. If the verification fails, a prompt message indicating insufficient permissions or an invalid request is returned to the user, and the processing of this request is terminated.

[0036] When verifying the validity and permissions of the user request, it can be carried out in various ways. For example, the user identification information carried in the request, such as the username, password or token, can be checked to verify the user's identity. At the same time, according to the user's role or permission level, it can be judged whether the user has the permission to obtain specific configuration information. If the user's identity and permissions meet the requirements, the verification passes, and the configuration information acquisition request continues to be processed. If the verification fails, according to the reason for the failure, a corresponding prompt message is returned to the user, such as "Insufficient permissions to obtain configuration information" or "The request is invalid, please initiate again", and the processing flow of this request is terminated to ensure the security of the system and the confidentiality of data.

[0037] In an alternative embodiment, after obtaining the configuration information acquisition initiated by the user based on the application programming interface, it is also possible to determine whether the configuration information acquisition request is legal. If it is legal, the subsequent steps are continued; if it is not legal, feedback information containing an error prompt is generated and returned to the user. Among them, the methods for determining whether the configuration information acquisition request is legal may include, but are not limited to: verifying whether the parameters in the request are complete, verifying whether the signature in the request is valid, etc., to ensure that the request is initiated by a legitimate user and the content of the request complies with preset rules and restrictions, thereby further enhancing the security and stability of the system and preventing malicious attacks or illegal access.

[0038] Specifically, when creating a signature, necessary public parameters and business parameters can be prepared first. Among them, the public parameters include the client identifier api_key (for example: djclient), the current timestamp timestamp (for example: 1744189149), and the random string nonce (for example: adjf8Xz); the business parameter is, for example, user_id = 1001. Secondly, the public parameters and business parameters are sorted alphabetically and concatenated into a string (format: key1 = value1&key2 = value2). Then, a string to be signed is generated, and this string should include the HTTP method, the API path, and the above parameters. Next, the HMAC-SHA1 signature is calculated using the secret key secret_key. Finally, when sending the configuration information acquisition request, the signature is added to the request header of the configuration information acquisition request or passed as a parameter.

[0039] Step 120: Search for the node configuration information corresponding to the configuration information acquisition request in the content distribution node to obtain the configuration information search result of the content distribution node.

[0040] Among them, one or more updated node configuration information are stored in the content distribution node.

[0041] In some alternative implementation manners, when obtaining one or more updated node configuration information, the updated configuration content of the configuration center can be obtained to get the configuration update content; based on the configuration update content, the content distribution node program interface is called to update the node configuration information stored in the content distribution node to obtain one or more updated node configuration information.

[0042] Specifically, a configuration information acquisition request can be sent to the configuration center by means of an HTTP request. The request carries the identification information of the configuration information to be acquired, such as the key value of the configuration item. After receiving the request, the configuration center searches for the corresponding configuration content in its own configuration database according to the identification information carried in the request, and returns the found configuration content to the requester as the response content. After receiving the response content, the requester updates it to obtain the configuration update content. Then, according to the configuration update content, the content distribution node program interface is called to send an update request to the content distribution node, and the node configuration information to be updated is carried in the request. After receiving the update request, the content distribution node updates its own node configuration information according to the update information carried in the request to obtain one or more updated node configuration information.

[0043] In some alternative embodiments, when obtaining one or more updated node configuration information, the target cache time of the node configuration information can also be obtained. The cache of the node configuration information identified by the symbol / getDjBanner / config is 24 hours. Based on the target cache time and the original server, the node configuration information stored in the content distribution node is updated to obtain one or more updated node configuration information.

[0044] Specifically, when obtaining the updated node configuration information, the target cache time associated with the node configuration information can also be read from the configuration center or the original server. The target cache time refers to the longest time that the node configuration information is allowed to be cached on the content distribution node. Subsequently, the comparison between the current time and the target cache time is checked. If the current time has exceeded the target cache time, the update process of the node configuration information stored on the content distribution node is triggered to ensure the timeliness and accuracy of the node configuration information. During the update process, the expired configuration information on the content distribution node can be replaced with the latest node configuration information provided by the original server, so as to obtain one or more completely updated node configuration information, thus ensuring that the configuration information on the content distribution node is always in the latest state and improving the stability and reliability of the system.

[0045] In some alternative embodiments, before finding the node configuration information corresponding to the configuration information acquisition request from the content distribution node to obtain the configuration information search result of the content distribution node, if the content distribution node cannot be accessed, the local configuration information stored in the user's client is searched based on the configuration information acquisition request, or the backup configuration information stored in the backup content distribution node is searched; based on the local configuration information or the backup configuration information, feedback information for the configuration information acquisition request is generated.

[0046] Specifically, when the content distribution node cannot be accessed due to network failures, equipment failures, or other reasons, it can obtain the request according to the configuration information and try to find the locally stored configuration information in the user's client. The local configuration information is usually synchronized from the content distribution node to the client before and is used to provide temporary configuration support when the content distribution node is unavailable. If no matching local configuration information is found in the client or the local configuration information has expired, the backup configuration information stored on the backup content distribution node will be further searched. The backup content distribution node is specifically set to provide configuration information services when the primary content distribution node fails, and the configuration information it stores is usually synchronized and updated with the primary content distribution node to ensure the timeliness and accuracy of the information. Based on the found local configuration information or backup configuration information, the corresponding feedback information is generated, which will replace the configuration information that should originally be obtained from the primary content distribution node to meet the user's configuration information acquisition requirements, effectively improving the fault tolerance of node failures.

[0047] In some alternative embodiments, after looking up the node configuration information corresponding to the configuration information acquisition request from the content distribution node and obtaining the configuration information lookup result of the content distribution node, if the configuration information lookup result of the content distribution node is empty, the source configuration information is pulled from the original server, and the configuration information cache update of the content distribution node is triggered to update the node configuration information based on the source configuration information.

[0048] Specifically, when the content distribution node cannot provide the required configuration information, the original server will be used as the last source of configuration information. As the authoritative source of configuration information, the original server stores all the latest configuration information that has not been cached or modified by any node. The source configuration information matching the configuration information acquisition request will be pulled from the original server. Once the source configuration information is successfully obtained, the configuration information cache update mechanism of the content distribution node will be automatically triggered to synchronize the newly obtained source configuration information to the content distribution node to update its internal node configuration information, ensuring that all nodes can provide the latest and most accurate configuration information in the next request. This not only provides an alternative solution in case of content distribution node failures but also ensures the timeliness and accuracy of the configuration information, thus effectively improving the stability and reliability of the entire configuration information acquisition.

[0049] In some alternative embodiments, when looking up the node configuration information corresponding to the configuration information acquisition request from the content distribution nodes and obtaining the configuration information lookup result of the content distribution nodes, a matching query can be performed in the configuration information database of the content distribution nodes according to the identifier in the configuration information acquisition request. The identifier is generated based on the full path of the application programming interface to ensure the cache uniqueness of each API and its readability, such as activity / infoList. If the matching query is successful, the node configuration information corresponding to the identifier is extracted as the configuration information lookup result of the content distribution nodes.

[0050] Specifically, when the identifier included in the configuration information acquisition request exactly matches an entry in the content distribution node configuration information database, it indicates that the corresponding node configuration information has been found. At this time, all the node configuration information associated with this entry is extracted from the database and returned to the requester as the configuration information lookup result of the content distribution nodes, ensuring the accuracy and pertinence of the configuration information. Since each identifier is generated based on the full path of a specific application programming interface and is unique, it can accurately locate the required configuration information. In addition, to improve the query efficiency, the configuration information database of the content distribution nodes may adopt data structures such as indexes and hash tables to store and retrieve configuration information, thereby achieving fast lookup and extraction of configuration information.

[0051] Furthermore, to further improve the efficiency and accuracy of configuration information acquisition, a caching mechanism can be set up in the content distribution nodes. When the content distribution node receives a configuration information acquisition request, it will first try to look up the node configuration information corresponding to the request in its own cache. If the information exists in the cache, it is directly returned to the user, thus avoiding the process of accessing the original server or performing complex queries and improving the response speed. During the implementation of the caching mechanism, different caching policies can be set, such as the LRU (Least Recently Used) policy, the LFU (Least Frequently Used) policy, etc., to manage and update the node configuration information in the cache according to actual needs. At the same time, to prevent the data in the cache from expiring or becoming invalid, a cache expiration time can also be set. When the cache data exceeds this time, the latest configuration information is automatically pulled from the original server or the configuration center and the cache is updated.

[0052] In addition, when the configuration information on the configuration center or the original server is updated, the content distribution nodes can be notified in real time through message push, event triggering, etc. to update the configuration information, so that the content distribution nodes can timely obtain the latest configuration information and store it in the cache, thereby ensuring that the configuration information obtained by the users is always the latest and accurate.

[0053] In some alternative embodiments, before the content distribution node starts to search for the node configuration information corresponding to the configuration information acquisition request, the signature information included in the configuration information acquisition request must be verified first. This includes extracting the client identifier api_key, the current timestamp timestamp, the random string nonce, and the signature from the configuration information acquisition request; verifying the validity of the timestamp and rejecting those configuration information acquisition requests that exceed the time window (e.g., 5 minutes); confirming the uniqueness of the random string nonce and checking whether the random string nonce has been used; reconstructing the signature string, sorting and concatenating the parameters according to the same rules to generate the target string request_str; calculating the signature again, finding the corresponding secret key according to the client identifier api_key, generating the signature and comparing it with the signature in the request to determine whether the request has been tampered with or forged.

[0054] Step 130: Generate feedback information for the configuration information acquisition request based on the configuration information search result of the content distribution node.

[0055] Among them, the feedback information contains the configuration information required by the user, which can be specific configuration parameters, the values of configuration items, or configuration status, etc. The form of the feedback information can be text, JSON object, or other suitable data formats to facilitate parsing and processing by the user or application.

[0056] In an alternative embodiment, the generated feedback information can also include metadata such as the version number and update timestamp of the configuration information, so that users can understand the version situation and update time of the configuration information, thereby better managing and using the configuration information. At the same time, the generated feedback information can be encrypted before being returned to the user to ensure that the information is not stolen or tampered with during transmission.

[0057] In addition, in the process of specifically implementing the present invention, the configuration information acquisition method can be further optimized and improved in combination with specific business scenarios and requirements. For example, a caching mechanism can be introduced to cache the commonly used configuration information locally or at the content distribution node to reduce the number of accesses to the original server and improve the acquisition efficiency of the configuration information; a version control mechanism for the configuration information can also be introduced to achieve version management and backtracking of the configuration information and ensure the accuracy and consistency of the configuration.

[0058] In some optional embodiments, when feedback information is generated for a configuration information acquisition request based on the configuration information search result of the content distribution node, if the configuration information search result of the content distribution node is successful, and the configuration information search result is different from the original configuration information carried in the configuration information acquisition request, positive feedback information containing the node configuration information is generated, and the positive feedback information is used to indicate that the configuration information acquisition request has successfully acquired the corresponding node configuration information; if the configuration information search result of the content distribution node is a failure or is empty, negative feedback information containing an error prompt is generated, and the negative feedback information is used to indicate that the configuration information acquisition request has failed to successfully acquire the corresponding node configuration information.

[0059] When generating feedback information, it can be customized according to the specific situation of the configuration information search result. For example, if the search result is successful, and the obtained node configuration information is different from the original configuration information in the user request, it means that the configuration information may have been updated or optimized. At this time, the generated feedback information can contain the updated node configuration information and an attached message, such as "The configuration information has been updated, please refer to the latest configuration information in the attachment." This design not only informs users of changes in configuration information, but also provides specific updated content, which is convenient for users to compare and apply.

[0060] On the other hand, if the configuration information search result of the content distribution node fails or is empty, that is, the configuration information required by the user cannot be successfully obtained, the feedback information generated at this time should contain a clear error prompt, such as "failed to find the corresponding configuration information, please try again later" or "configuration information does not exist, please check whether the request parameters are correct." Such error information can help users quickly locate the problem and take corresponding solutions to improve user experience and satisfaction.

[0061] In the process of generating feedback information, the readability and usability of the information can also be considered. For example, the configuration information can be displayed in a structured manner, such as a JSON object, so that users or applications can more easily parse and process the information. At the same time, for complex configuration information, detailed instructions or comments can be attached to help users understand the purpose and value range of the configuration items, reducing the difficulty of use.

[0062] In addition, before the feedback information is returned to the user, a series of security checks and processing can be performed. For example, the feedback information can be encrypted to ensure the security and confidentiality of the information during transmission. At the same time, the feedback information can also be signed and verified to ensure the integrity and authenticity of the information and prevent the information from being tampered with or forged during transmission, so as to further improve the security and reliability of configuration information acquisition and protect the rights and interests of users and the security of data.

[0063] In specific implementation, a unique identifier ETag can be generated for JSON data, usually using a hash value (such as MD5 / SHA-1); the unique identifier ETag is returned to the client where the user is located through the HTTP header; the unique identifier ETag is saved when the client makes the first request; subsequent requests carry the If-None-Match header (the value is the previous unique identifier ETag); if the content distribution node resource has not changed, 304 Not Modified is returned, and the client uses the cache; if it has changed, new data and a new unique identifier ETag are returned.

[0064] In summary, for the configuration information acquisition method according to the embodiments of the present invention, by introducing a caching mechanism, common configuration information can be cached locally or at the content distribution node, thereby reducing the access pressure on the original server and improving the response speed of the configuration information. At the same time, the caching mechanism can also reduce network latency and bandwidth consumption, further enhancing the user experience. In addition, by introducing a version control mechanism for configuration information, version management and traceability of configuration information can be achieved, ensuring the accuracy and consistency of the configuration, and effectively avoiding system problems caused by configuration errors or version inconsistencies.

[0065] Figure 2 The structural schematic diagram of an embodiment of a configuration information acquisition device according to the present invention is shown. As Figure 2 shown, the device includes:

[0066] A request acquisition module 210, configured to acquire a configuration information acquisition request initiated by a user based on an application programming interface;

[0067] An information acquisition module 220, configured to find node configuration information corresponding to the configuration information acquisition request in the content distribution node to obtain a configuration information search result of the content distribution node, where one or more updated node configuration information are stored in the content distribution node;

[0068] An information feedback module 230, configured to generate feedback information for the configuration information acquisition request based on the configuration information search result of the content distribution node.

[0069] In an optional implementation manner, the information acquisition module 220 includes:

[0070] An information acquisition sub-module, configured to, when the content distribution node cannot be accessed, find local configuration information stored in the client where the user is located based on the configuration information acquisition request, or find backup configuration information stored in a backup content distribution node;

[0071] A feedback information generation sub-module, configured to generate feedback information for the configuration information acquisition request based on the local configuration information or the backup configuration information.

[0072] In an alternative embodiment, the information acquisition module 220 is further configured to, if the lookup result of the configuration information of the content distribution node is empty, pull the source configuration information from the original server and trigger an update of the configuration information cache of the content distribution node, so as to update the node configuration information based on the source configuration information.

[0073] In an alternative embodiment, the information acquisition module 220 further includes:

[0074] A matching query sub-module, configured to perform a matching query in the configuration information database of the content distribution node according to the identifier in the configuration information acquisition request, where the identifier is generated based on the full path of the application programming interface;

[0075] An information extraction sub-module, configured to, if the matching query is successful, extract the node configuration information corresponding to the identifier as the lookup result of the configuration information of the content distribution node.

[0076] In an alternative embodiment, the information feedback module 230 includes:

[0077] A positive feedback sub-module, configured to, if the lookup result of the configuration information of the content distribution node is successful and the configured information lookup result is different from the original configuration information carried in the configuration information acquisition request, generate positive feedback information including the node configuration information, where the positive feedback information is used to indicate that the configuration information acquisition request has successfully obtained the corresponding node configuration information;

[0078] A negative feedback sub-module, configured to, if the lookup result of the configuration information of the content distribution node is failed or empty, generate negative feedback information including an error prompt, where the negative feedback information is used to indicate that the configuration information acquisition request fails to successfully obtain the corresponding node configuration information.

[0079] In an alternative embodiment, the information acquisition module 220 further includes:

[0080] A configuration content acquisition sub-module, configured to acquire the updated configuration content of the configuration center to obtain the configuration update content;

[0081] A first configuration update sub-module, configured to call the content distribution node program interface based on the configuration update content to update the node configuration information stored in the content distribution node, so as to obtain one or more updated node configuration information.

[0082] In an alternative embodiment, the information acquisition module 220 further includes:

[0083] A cache time acquisition sub-module, configured to acquire the target cache time of the node configuration information;

[0084] A second configuration update sub-module, configured to update the node configuration information stored in the content distribution node based on a target cache time and an original server, so as to obtain one or more updated node configuration information.

[0085] The further function descriptions of the above-mentioned modules and units are the same as those in the corresponding method embodiments above, and will not be repeated here.

[0086] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of an electronic device provided by an optional embodiment of the present invention. As Figure 3 shown, the electronic device includes: one or more processors 310, a memory 320, and an interface for connecting each component, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the electronic device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 3 In

[0087] FIG. 13, a processor 310 is taken as an example.

[0088] The processor 310 may be a central processing unit, a network processor, or a combination thereof. Among them, the processor 310 may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device may be a complex programmable logic device, a field programmable gate array, a general array logic, or any combination thereof.

[0089] The memory 320 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the electronic device in the display of a small program landing page, etc. In addition, the memory 320 may include high-speed random access memory and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 320 may optionally include a memory remotely provided with respect to the processor 310, and these remote memories may be connected to the electronic device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a server cluster, a mobile communication network, and combinations thereof.

[0090] The memory 320 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, a hard disk, or a solid-state drive; the memory 320 may also include a combination of the above types of memory.

[0091] The electronic device further includes a communication interface 330 for communicating the electronic device with other devices or a communication network.

[0092] An embodiment of the present invention further provides a computer-readable storage medium storing at least one executable instruction, which, when running on an electronic device / configuration information acquisition device, causes the electronic device / configuration information acquisition device to execute the configuration information acquisition method in any of the above method embodiments.

[0093] An embodiment of the present invention further provides a computer program product including computer instructions for causing a computer to execute the configuration information acquisition method in the first aspect above or any corresponding embodiment thereof.

[0094] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. In addition, embodiments of the present invention are not directed to any particular programming language.

[0095] In the specification provided herein, a large number of specific details are set forth. However, it can be understood that embodiments of the present invention may be practiced without these specific details. Similarly, in order to streamline the present invention and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Among them, the claims following the specific implementation manners are hereby expressly incorporated into the specific implementation manners, and each claim itself serves as a separate embodiment of the present invention.

[0096] Those skilled in the art can understand that the modules in the devices in the embodiments can be adaptively changed and set in one or more devices different from those of the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive.

[0097] It should be noted that the above embodiments illustrate the present invention rather than limit the present invention, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim listing several devices, several of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A method for obtaining configuration information, characterized in that, The method includes: Obtaining a configuration information acquisition request initiated by a user based on an application programming interface; Searching for node configuration information corresponding to the configuration information acquisition request in a content distribution node to obtain a configuration information search result of the content distribution node, where one or more updated node configuration information are stored in the content distribution node; Generating feedback information for the configuration information acquisition request based on the configuration information search result of the content distribution node.

2. The method according to claim 1, characterized in that Before the step of searching for node configuration information corresponding to the configuration information acquisition request in the content distribution node to obtain a configuration information search result of the content distribution node, the method further includes: If the content distribution node cannot be accessed, searching for local configuration information stored in the user's client based on the configuration information acquisition request, or searching for backup configuration information stored in a backup content distribution node; Generating feedback information for the configuration information acquisition request based on the local configuration information or the backup configuration information.

3. The method according to claim 1, wherein After the step of searching for node configuration information corresponding to the configuration information acquisition request in the content distribution node to obtain a configuration information search result of the content distribution node, the method further includes: If the configuration information search result of the content distribution node is empty, pulling source configuration information from an original server and triggering an update of the configuration information cache of the content distribution node to update the node configuration information based on the source configuration information.

4. The method according to claim 1, wherein The step of searching for node configuration information corresponding to the configuration information acquisition request in the content distribution node to obtain a configuration information search result of the content distribution node includes: Performing a matching query in the configuration information database of the content distribution node according to an identifier in the configuration information acquisition request, where the identifier is generated based on the full path of the application programming interface; If the matching query is successful, extracting the node configuration information corresponding to the identifier as the configuration information search result of the content distribution node.

5. The method according to claim 1, characterized in that The step of generating feedback information for the configuration information acquisition request based on the configuration information search result of the content distribution node includes: If the configuration information search result of the content distribution node is successful and the configured information search result is different from the original configuration information carried in the configuration information acquisition request, generating positive feedback information including the node configuration information, where the positive feedback information is used to indicate that the configuration information acquisition request has successfully obtained the corresponding node configuration information; If the configuration information search result of the content distribution node is a failure or is empty, generating negative feedback information including an error prompt, where the negative feedback information is used to indicate that the configuration information acquisition request has failed to successfully obtain the corresponding node configuration information.

6. The method according to claim 1, wherein Obtaining one or more updated node configuration information includes: Obtaining updated configuration content from a configuration center to obtain configuration update content; Based on the configuration update content, calling a content distribution node program interface to update the node configuration information stored in the content distribution node to obtain one or more updated node configuration information.

7. The method according to claim 2, wherein Obtaining one or more updated node configuration information further includes: The target cache time for obtaining the node configuration information; Based on the target cache time and the original server, update the node configuration information stored in the content distribution node to obtain one or more updated node configuration information.

8. A configuration information acquisition device, characterized in that, The device includes: A request acquisition module, configured to acquire a configuration information acquisition request initiated by a user based on an application programming interface; An information acquisition module, configured to find the node configuration information corresponding to the configuration information acquisition request from the content distribution node to obtain a configuration information search result of the content distribution node, where one or more updated node configuration information are stored in the content distribution node; An information feedback module, configured to generate feedback information for the configuration information acquisition request based on the configuration information search result of the content distribution node.

9. An electronic device, characterized in that, Includes: A processor, a memory, a communication interface, and a communication bus, where the processor, the memory, and the communication interface complete communication with each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction causes the processor to execute the operations of the configuration information acquisition method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, At least one executable instruction is stored in the storage medium, and when the executable instruction runs on an electronic device, the electronic device is caused to execute the operations of the configuration information acquisition method according to any one of claims 1 to 7.