Content processing method and apparatus, electronic device, storage medium, and product

CN122945992APending Publication Date: 2026-10-20BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510467846.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0003]在使用配置中心的过程中,如果将配置内容的配置类型声明为指针类型,那么读取配置内容后对其进行的修改操作,会导致原配置内容被篡改,使得后续读取到的配置内容均出现错误

Benefits of technology

[0022]本公开实施例,在目标服务初始化后,获取目标服务关联的第一配置内容。在目标服务针对第一请求处理完成之前,获取目标服务所关联的第二配置内容。然后根据第一配置内容和第二配置内容,得到差异内容。得到差异内容后,根据差异内容和差异内容的发布信息,确定差异内容是否被修改。实现了目标服务在获取第一配置内容后,及时对第一配置内容修改与否进行检测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This disclosure provides a configuration content processing method, apparatus, electronic device, storage medium, and product. The configuration content processing method includes: in response to target service initialization, obtaining first configuration content associated with the target service; before the target service completes a first request, obtaining second configuration content associated with the target service; obtaining difference content based on the first configuration content and the second configuration content; and determining modification information of the difference content based on the difference content and corresponding publication information, wherein the modification information indicates whether the difference content has been modified. This enables the target service to promptly detect whether the first configuration content has been modified after obtaining it.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to computer technology, and more particularly to configuration content processing methods, apparatus, electronic devices, storage media, and products. Background Technology

[0002] The configuration center is a centralized configuration management platform that can be used to publish and manage various configuration contents, such as switch configurations and parameter adjustments.

[0003] When using the configuration center, if the configuration type of the configuration content is declared as a pointer type, then any modification operation performed on the read configuration content will cause the original configuration content to be tampered with, resulting in errors in all subsequent read configuration content.

[0004] Therefore, how to detect modifications made after reading configuration content in the service has become a pressing technical problem that needs to be solved. Summary of the Invention

[0005] This disclosure provides a method, apparatus, electronic device, storage medium, and product for processing configuration content to detect modifications made after reading configuration content in a service.

[0006] In a first aspect, embodiments of this disclosure provide a configuration content processing method, including:

[0007] In response to the initialization of the target service, obtain the first configuration content associated with the target service;

[0008] Before the target service completes processing the first request, obtain the second configuration content associated with the target service;

[0009] Based on the first configuration content and the second configuration content, the difference content is obtained;

[0010] Based on the difference content and the corresponding publication information, modification information of the difference content is determined, and the modification information indicates whether the difference content has been modified.

[0011] Secondly, embodiments of this disclosure also provide a configuration content processing apparatus, including:

[0012] The first acquisition module is used to acquire the first configuration content associated with the target service in response to the initialization of the target service;

[0013] The second acquisition module is used to acquire the second configuration content associated with the target service before the target service completes processing the first request;

[0014] The determining module is used to obtain the difference content based on the first configuration content and the second configuration content;

[0015] The determination module is used to determine the modification information of the difference content based on the difference content and the corresponding publication information, wherein the modification information indicates whether the difference content has been modified.

[0016] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0017] One or more processing devices;

[0018] Storage device for storing one or more programs.

[0019] When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the configuration content processing method provided in the embodiments of this disclosure.

[0020] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the configuration content processing method provided in embodiments of this disclosure.

[0021] Fifthly, embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements a configuration content processing method provided according to embodiments of this disclosure.

[0022] In this embodiment, after the target service is initialized, first configuration content associated with the target service is obtained. Before the target service completes processing the first request, second configuration content associated with the target service is obtained. Then, based on the first and second configuration content, difference content is obtained. After obtaining the difference content, it is determined whether the difference content has been modified based on the difference content and its publication information. This enables the target service to promptly detect whether the first configuration content has been modified after obtaining it. Attached Figure Description

[0023] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0024] Figure 1 This is a flowchart illustrating a configuration content processing method provided in an embodiment of this disclosure;

[0025] Figure 2 This is a schematic diagram illustrating a configuration content publishing method provided in an embodiment of this disclosure;

[0026] Figure 3This is a schematic diagram illustrating a configuration content acquisition method provided in an embodiment of this disclosure;

[0027] Figure 4 This is a schematic diagram illustrating a modification of a configuration value provided in an embodiment of this disclosure;

[0028] Figure 5 This is a schematic diagram illustrating yet another modification of configuration values ​​provided in this embodiment of the disclosure;

[0029] Figure 6 This is a schematic diagram of a detection process for configuration content modification provided in an embodiment of this disclosure;

[0030] Figure 7 This is a flowchart illustrating yet another configuration content processing method provided in this embodiment of the disclosure;

[0031] Figure 8 This is a schematic diagram of a processing flow with modified configuration content provided in an embodiment of this disclosure;

[0032] Figure 9 This is a schematic diagram of a processing flow with a modified configuration provided in another embodiment of this disclosure;

[0033] Figure 10 This is a schematic diagram of the structure of a configuration content acquisition device provided in an embodiment of this disclosure;

[0034] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0035] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0036] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0037] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0038] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0039] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0040] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0041] Figure 1 This is a flowchart illustrating a configuration content processing method provided in an embodiment of this disclosure. This embodiment is applicable to situations where configuration content has been modified. The method can be executed by a configuration content processing device, which can be implemented in software and / or hardware, or optionally, by an electronic device, such as a mobile terminal, a PC, or a server.

[0042] Configuration content can be considered as a collection of information used to control the functionality of an application, business, or service.

[0043] The configuration content disclosed herein can be published by a configuration center. A configuration center is a platform and software development kit (SDK) configuration management solution provided to business users. By publishing configuration content in the configuration center, any service using the configuration center's SDK can access this configuration content in real time. This method of using on / off configurations is widely applicable in scenarios such as business logic development and feature degradation.

[0044] Figure 2 This is a schematic diagram illustrating a configuration content publishing method provided in this embodiment of the disclosure. See also... Figure 2 The configuration center publishes configuration content. This configuration content can be configured and published by the business unit in the configuration center.

[0045] Figure 3This is a schematic diagram illustrating a configuration content acquisition method provided in an embodiment of this disclosure. See also... Figure 3 After the configuration content is published, the application can obtain the published configuration content by using the configuration center's SDK. If the application's business services use the configuration center's SDK, the SDK will poll and pull all the latest published configuration content from the configuration center every 10 seconds, such as all configuration content associated with the application or all configuration content associated with the service.

[0046] An application can provide multiple services, and a single service can include multiple services that work together to support the operation of that service. A service can be a specific function supported by the application, such as a search service, which is a collection of processes and functions provided by the application to query content by entering keywords. A service can be considered a relatively independent program module with a specific function that implements a particular service. Services are interconnected, work together, and jointly realize the service. For example, a search service includes services for displaying search results and keyword parsing services.

[0047] Currently, there are issues with improper use of the service's configuration settings. Figure 4 This is a schematic diagram illustrating a modification of configuration values ​​provided in an embodiment of this disclosure. See also... Figure 4 If a service reads a configuration value from the configuration content, and the variable storing that configuration value is a pointer, and then modifies that pointer within the service, subsequent reads of the configuration value will no longer be correct. The configuration content includes multiple configuration items, each represented by multiple key-value pairs. Each key-value pair can include a configuration key and a corresponding configuration value, where the configuration value can be the value configured within the configuration content. The configuration key can be the key configured within the configuration content.

[0048] In service coding, a pointer is a memory address used to store the address of a variable. A pointer variable `ptr` is used to store these memory addresses, and data can be accessed and manipulated indirectly through pointers. For example... Figure 4 The pointer 0x123456 stores the address of the character variable "string123".

[0049] Initially, pointer variables ptr1 and ptr2 both point to this address, and the content they read is "string123";

[0050] Then, the pointer variable ptr1 was modified within the service. By modifying the pointer, the string content stored at the original address was changed to "string234";

[0051] Next, the pointer variable ptr2 reads the string content again through pointer addressing and reads "string234".

[0052] Therefore, if a configuration type is declared as a pointer type, any subsequent modifications to that configuration within the service will also change the content read by subsequent processes.

[0053] Figure 5 This is a schematic diagram illustrating yet another modification of configuration values ​​provided in this embodiment of the disclosure.

[0054] 1. Assume the access link to the application is as follows: Figure 5 The diagram shows the call relationship between Service A, Service B, and Service C.

[0055] 2. Service C uses the configuration content. Service C reads the correct configuration value for the first time: query = 123. The variable storing this configuration value in C is a pointer type.

[0056] 3. There is a problem with the code in service C. Each request increments the configured variable, which modifies the data pointed to by the pointer.

[0057] 4. As requests continue to be made, the configuration content accumulates with each request. The configuration value on service C has gradually expanded from the initial query=123 to: query=123&query=123&query=123&query=123&query=123&query=123&query=123&query=123&query=123&query=123&query=123&query=123&query=123&query=123&query=123&query=123

[0058] 5. Because service C returned this configuration value, the size of the response packet to service B also increased. That is, the data size of service C -> service B -> service A all increased, eventually exceeding the application's memory usage limit, resulting in a client crash.

[0059] Configuration content, as a type of configuration, is in principle read-only. That is, once the configuration center publishes the configuration content, the service should only read it; there should be no operation where the configuration value is read and then modified. However, if subsequent code logic involves modification operations such as assignment, accumulation, and recharge, it will directly modify the data pointed to by the pointer.

[0060] Especially when the configuration type is declared as a pointer type, modifications after reading will alter the original configuration content, resulting in incorrect configuration values ​​read subsequently. Therefore, to detect modifications to the pointer of the configuration value, this disclosure provides a configuration content processing method to detect modifications performed after reading configuration content in the service.

[0061] like Figure 1 As shown, the method includes:

[0062] S110. In response to the initialization of the target service, obtain the first configuration content associated with the target service.

[0063] The target service can be considered as the service included in the business provided by the application. Each business can include multiple services, and each service can execute the configuration content processing method provided in this disclosure. This embodiment describes the target service as an example.

[0064] The first configuration content can be considered as the configuration content obtained after the target service is initialized. This configuration content can contain one or more configuration items, each identified as a key-value pair. There are no restrictions on the configurations here; they can define the runtime environment, whether a feature is enabled or disabled, or performance-related configurations, etc.

[0065] The target service can include three phases: the initialization phase, the processing phase, and the return phase. The initialization phase can be considered as initializing environment variables and loading required configurations. The processing phase can be the phase of processing business logic or processing the first request. The return phase can be considered as the phase of returning the processing results. After the target service starts, it can enter the initialization phase. The initial configuration content is obtained during the target service initialization phase.

[0066] This operation retrieves the initial configuration information associated with the target service after the target service is initialized. This initial configuration information can be the configuration information used by the target service itself.

[0067] This operation can retrieve the initial configuration content from the local memory space of the electronic device. When retrieving the initial configuration content, the first configuration key of all configurations included in the target service can be determined first, and then the first configuration value corresponding to the first configuration key can be retrieved.

[0068] Here, the first configuration key can be considered as the configuration key included in the target service after the target service is initialized. The first configuration value can be considered as the value corresponding to the first configuration key.

[0069] In one instance, this operation can retrieve the first configuration key of the first configuration content associated with the target service from the local machine after the target service is initialized, and then retrieve the first configuration value corresponding to the first configuration key to obtain the configuration in the first configuration content.

[0070] S120. Before the target service completes processing of the first request, obtain the second configuration content associated with the target service.

[0071] The first request includes a request sent to the target service. The first request can be a request for the target service to respond accordingly. The content of the first request can correspond to the target service, and different target services can respond to different first requests. Taking a search service as an example, the first request can include parameters associated with the search, such as search keywords.

[0072] The second configuration content can be considered as the configuration content obtained before the target service completes processing the first request. The first and second configuration contents are configuration contents obtained at different times. After the first configuration content is obtained, the configuration in the first configuration content may be modified. Therefore, before the target service completes processing the first request (such as before the processing of the first request ends), the second configuration content associated with the target service is obtained again.

[0073] The stage before the target service finishes processing the first request, also known as the stage before the target service finishes processing the first request, can be after the processing stage or before the return stage returns the result of the first request. For example, in the return stage, the second configuration content is first obtained, operations related to the second configuration content are performed, and then the result is returned. The second configuration content is obtained within the lifecycle of the first request, and the lifecycle of the first request ends after the result is returned. The target service finishes processing the first request after the return stage returns the result.

[0074] Before the target service completes processing the first request, this operation retrieves the second configuration key and its corresponding second configuration value from the second configuration content associated with the target service locally, thus enabling the acquisition of configurations within the second configuration content. The second configuration key can be considered as the configuration key of the target service obtained before the target service finishes processing the first request, such as `key`. The second configuration value can be the configuration value corresponding to the second configuration key, such as the pointer value `val`.

[0075] The first configuration key and first configuration value are data obtained at different stages than the second configuration key and second configuration value. For example, the first configuration key and first configuration value are data obtained during the target service initialization phase. The second configuration value and second configuration key are data obtained before the target service finishes processing the first request.

[0076] After the target service starts, the configuration key can remain unchanged, and the second configuration key can be the same as the first configuration key. Configuration values ​​may be modified. Therefore, before the target service completes processing the first request, this operation retrieves the second configuration content to determine whether the second configuration value differs from the first configuration value.

[0077] S130. Based on the first configuration content and the second configuration content, obtain the difference content.

[0078] The difference can be considered as the configuration that differs between the second configuration and the first configuration.

[0079] After obtaining the second configuration content, this operation can determine the differences between the first and second configuration content. For example, by comparing the first and second configuration content, the configuration differences between the second configuration content and the first configuration content can be determined by comparing the configuration values ​​one by one.

[0080] The comparison method is not limited here. You can compare the differences between the configuration values ​​corresponding to the configuration keys of the first and second configuration contents, one by one. For example, for the same first and second configuration keys, obtain the first and second configuration values, and compare whether there are differences between them.

[0081] S140. Based on the difference content and the corresponding publication information, determine the modification information of the difference content.

[0082] Release information can be considered as information associated with the differences released in the configuration center, such as the release time and version. Modification information indicates whether the differences have been modified. Specifically, modification information can indicate whether individual configurations within the differences have been modified, or indicate which configurations within the differences have been modified.

[0083] If the modification information indicates that the content of the difference has been modified, it can be considered that the content of the difference has been modified by mistake.

[0084] After determining the differences, this operation can identify the configuration keys included in the differences. The configuration keys included in the differences can be the keys corresponding to the configuration changes made by the second configuration content relative to the first configuration content.

[0085] After determining the configuration keys included in the discrepancies, the time when the first configuration value corresponding to that configuration key was acquired can be determined, as well as the publication information of that configuration key obtained from the configuration center. Based on the first configuration value corresponding to the configuration key, the time when the first configuration value was acquired, and the publication information corresponding to the configuration key, it can be determined whether the configuration corresponding to that configuration key has been modified, if so, if the configuration value of that configuration has been modified.

[0086] The technical solution of this disclosure embodiment obtains the first configuration content associated with the target service after the target service is initialized. Before the target service completes processing the first request, it obtains the second configuration content associated with the target service. Then, based on the first and second configuration contents, it obtains the difference content. After obtaining the difference content, it determines whether the difference content has been modified based on the difference content and its publication information. This enables the target service to promptly detect whether the first configuration content has been modified after obtaining it.

[0087] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.

[0088] In one embodiment, in response to target service initialization, obtaining the first configuration content associated with the target service includes:

[0089] In response to the initialization of the target service, a first configuration key of the first configuration content associated with the target service is obtained from the local machine, wherein the type of the first configuration content includes a pointer type;

[0090] Determine whether to enable the configuration content verification function;

[0091] If so, obtain the first configuration value corresponding to each of the first configuration keys.

[0092] Configuration content validation can be implemented at the service level. When enabled, it can verify whether configuration content has been modified.

[0093] In this embodiment, after the target service is initialized, the first configuration key of the first configuration content associated with the target service can be obtained from the local electronic device to initialize the target service.

[0094] In this embodiment, the types of the first configuration content and the second configuration content can be pointer types.

[0095] After obtaining the first configuration key, it can be determined whether the target service has enabled the configuration content verification function. If so, the first configuration value corresponding to each first configuration key can be obtained. That is, during the target service initialization phase, all first configuration keys and first configuration values ​​included in the target service can be obtained, so as to facilitate subsequent determination of whether the first configuration value has been modified based on all first configuration keys and first configuration values.

[0096] In this embodiment, if the configuration content verification function is not enabled, the business logic can be executed directly to process the first request.

[0097] In one embodiment, after obtaining the configuration value corresponding to each configuration key, the method further includes:

[0098] Store each of the first configuration keys and the corresponding first configuration values ​​into a global variable.

[0099] Global variables can be considered as variables defined in the global scope of an application. They can be accessed and modified from anywhere in the program.

[0100] In this embodiment, after obtaining all the first configuration keys and first configuration values ​​of the target service, all the first configuration keys and first configuration values ​​can be stored in a global variable as key-value pairs. Alternatively, a snapshot of the first configuration keys and first configuration values ​​can be stored in the application's global variable. A snapshot can be considered a complete record of the first configuration keys and first configuration values.

[0101] In one embodiment, obtaining the second configuration content associated with the target service before the target service completes processing the first request includes:

[0102] Before the target service completes processing the first request, determine whether to start the configuration content verification function;

[0103] If so, retrieve the second configuration key and the second configuration value corresponding to each second configuration key from the local machine for the second configuration content associated with the target service.

[0104] Before the target service completes processing the first request, this embodiment can determine whether the target service has enabled the configuration content verification function. If the configuration content verification function is enabled, this embodiment can obtain the second configuration key and the second configuration value corresponding to the second configuration content associated with the target service at the current moment from the local electronic device.

[0105] This embodiment enables the acquisition of the second configuration content before the target service finishes processing the first request, so as to compare it with the first configuration content and determine whether the configuration value has been modified.

[0106] In one embodiment, determining the modification information of the difference content based on the difference content and the corresponding publication information includes:

[0107] Determine the acquisition time of the first configuration value corresponding to the difference content;

[0108] Obtain the publication information of the difference content in the configuration center and the third configuration value associated with the publication information;

[0109] The modification information of the difference content is determined by comparing the release information, the acquisition time, the third configuration value, and the second configuration value corresponding to the difference content.

[0110] The acquisition time can be considered as the time when the first configuration value is acquired. This acquisition time can be the actual time when the first configuration is acquired, or it can be the time when the target service initializes and triggers the acquisition of the first configuration content.

[0111] The third configuration value can be considered the latest configuration value published by the configuration center. This configuration value can be the latest configuration value corresponding to the configuration key included in the difference content.

[0112] The differences can include multiple configuration keys. For each configuration key, the publication information of that configuration key in the configuration center and its corresponding third configuration value are retrieved sequentially.

[0113] In this embodiment, for each configuration key in the difference content, the acquisition time of the corresponding first configuration value is determined, the third configuration value and the release information of the configuration key are determined, and the second configuration value corresponding to the configuration key is determined.

[0114] By comparing whether the publication time in the published information is later than the acquisition time, and whether the third configuration value is equal to the second configuration value, it can be determined whether the difference in the configuration value of the configuration key is due to the configuration center publishing a new configuration value after the acquisition time. If not, it is determined that the modification information indicates that the first configuration value corresponding to the configuration key has been modified.

[0115] Figure 6 This is a schematic diagram of a configuration content modification detection process provided in an embodiment of this disclosure. See also... Figure 6 The application retrieves the first request, which is a request sent to the target service for the target service to respond to. After the target service is initialized, the application loads and reads the target service's configuration, [key1, key2, ..., keyn], which is the first configuration key of the first configuration content associated with the target service, retrieved from the local machine in response to the target service initialization.

[0116] Next, it determines whether to enable the configuration content detection function. If not enabled, the target service executes business logic to respond to the first request. If enabled, a first-version snapshot of the configuration is stored in the application's global variable `dump1`, and each configuration is stored as a key-value pair in `map{`.<key1,val1> ,<key2,val2> ,……<keyn,valn> This involves retrieving the first configuration value corresponding to each of the first configuration keys, and storing each first configuration key and its corresponding first configuration value in global variables (val1, val2, ..., val1n). The configuration of the target service is loaded and read for the first time to determine whether to start the configuration content verification function. If storage is involved, this can occur during the initialization phase of the target service.

[0117] Then, the business logic is executed through the target service (i.e., the stage of receiving and processing requests). In the stage before the target service finishes processing (i.e., before the target service completes processing the first request, also known as the stage before returning the result), it is determined whether to enable the configuration content verification function. If not, the first request of the target service ends, and the result can be returned. If the configuration content verification function is enabled, the configuration values ​​of the target service's configuration can be read again (i.e., the second configuration key and the second configuration value corresponding to each second configuration key are obtained from the local machine), and the current configuration is stored as a second-version snapshot in the application's global variable dump2.<key1,val1> ,<key2,val2> ,……<keyn,valn>}

[0118] Then, the `val` values ​​corresponding to each key in the first and second version snapshots are compared sequentially to determine if there are differences in the configuration values. This is done by obtaining the differences based on the first and second configuration content (e.g., comparing the corresponding `val` values ​​using the key as an index). If there are no differences, the first request for the target service ends. If there are differences, it is determined whether the key with the difference has been published on the platform side. This determination can be made by calling the configuration center interface through the application to obtain the publication information and latest value of the key in the configuration center (i.e., obtaining the publication information of the difference content in the configuration center and the third configuration value associated with the publication information). This information is then compared with the key and associated information, such as the time and the second configuration value corresponding to the difference content. If it is determined that the key with the difference has been published on the platform side, the first request for the target service ends. If the key with the difference has not been published on the platform side, it is determined that the key with the difference has undergone pointer modification. An alarm message is sent to inform that the key has undergone pointer value modification (i.e., the first configuration value corresponding to the configuration key in the difference content has been modified), and then the first request for the target service ends.

[0119] Figure 7 This is a flowchart illustrating another configuration content processing method provided in this disclosure embodiment; before obtaining the first configuration content associated with the target service in response to target service initialization, this embodiment further includes: deploying a pipeline for the application's offline environment; if the pipeline deployment is successful, copying and forwarding a second request from the application; if the second request forwarding is successful, starting the target service. See also Figure 7 This embodiment includes the following operations:

[0120] S710, a pipeline for deploying applications in offline environments.

[0121] A pipeline can refer to a workflow similar to a production line, where a series of related tasks and operations are organized in a specific order and process during the offline deployment of an application. A pipeline can include a series of automated steps for building, testing, and deploying applications.

[0122] An offline environment can be a runtime environment provided offline for the application, used for application development, testing, debugging, and other tasks. An offline environment can simulate a real production environment.

[0123] This operation can automate the entire process of an application from source code building, testing, packaging to deployment in an offline environment through a series of steps.

[0124] S720, If the pipeline deployment is successful, copy and forward the second request of the application.

[0125] The second request can be an application-level request, such as a request related to the application itself. For example, the second request could be a request received by the application. The second request includes the first request. The first request can be a request associated with the target service, such as a request requiring a response from the target service. The second request can also include requests that other services need to process, such as requests that a service implementing video viewing can handle, or requests to update interactive parameters.

[0126] If the pipeline deployment is successful, this operation can copy the application's second request and forward it to the offline environment so that the modification information can be determined based on the response to each second request.

[0127] This operation enables the target service to run in an offline environment by copying and forwarding the second request, allowing the target service to respond to the first request and obtain modification information through the above embodiments during the response process.

[0128] S730. If the second request is successfully forwarded, start the target service.

[0129] For a service to function properly and fully display its functionality, it requires traffic to drive it. For example, the processing phase requires the target service to handle requests and execute business logic.

[0130] This embodiment introduces traffic into the offline environment by copying and forwarding the second request. If the second request is successfully forwarded, the application can be run based on each second request to start the target service in response to the first request in the second request.

[0131] This embodiment determines the modified information in an offline environment. When a problem occurs where the pointer to the configuration value is modified, it is prevented as much as possible and the problem is not brought to the online environment.

[0132] S740, in response to the initialization of the target service, obtains the first configuration content associated with the target service.

[0133] S750. Before the target service completes processing of the first request, obtain the second configuration content associated with the target service.

[0134] S760. Based on the first configuration content and the second configuration content, obtain the difference content.

[0135] S770. Based on the difference content and the corresponding publication information, determine the modification information of the difference content.

[0136] The above steps can detect whether the configuration values ​​within the target service have been modified, in order to identify the problematic code.

[0137] This embodiment constructs a pipeline for the application's offline environment. After successful pipeline deployment, traffic generated by the application's second request is forwarded to the pipeline for the application to respond to. Based on the modification information determined during the processing of the first request by the target service in the second request, it is determined whether there has been a modification of the configuration value. This achieves the judgment of whether the application's offline configuration value has been modified, preventing the introduction of modified configuration values ​​into the online environment before deployment. In other words, after detecting a modification of the configuration value, it prevents the modified configuration value from affecting the online application.

[0138] Based on the above embodiments, modified embodiments of the above embodiments are proposed. It should be noted that, in order to keep the description brief, only the differences from the above embodiments are described in the modified embodiments.

[0139] In one embodiment, the configuration content processing method further includes:

[0140] If the pipeline is successfully deployed, the pipeline is blocked until the modification information is obtained;

[0141] If the modification information indicates that the difference content has been modified, an exception notification message is sent.

[0142] After successful pipeline deployment, this embodiment can pause the execution of subsequent pipeline steps until modification information for the target service is obtained. Upon obtaining the modification information, it can be determined whether the modification information indicates that the difference content has been modified. If so, an exception notification can be sent. The exception notification can be considered as notification that the configuration value of the target service has been mistakenly modified. The exception notification may include the configuration key corresponding to the modified configuration value, and the error code that caused the configuration value to be modified.

[0143] Figure 8This is a schematic diagram of a processing flow with modified configuration content provided in an embodiment of this disclosure; see also Figure 8 This embodiment detects modification information in a pipeline deployed in an offline environment. The specific operation is as follows:

[0144] Determine whether to enable configuration content verification. If not, end the operation. If yes, start the offline environment deployment pipeline for building the application, i.e., deploy the pipeline for the application's offline environment. Determine whether the pipeline deployment was successful. If not, end the operation. If yes, enable application request traffic replication and forwarding, i.e., replicate and forward the application's second request. After the pipeline is successfully built, block the pipeline and wait for the preceding sequence to complete, i.e., block the pipeline until the modification information is obtained, such as waiting for feedback on the modification information, i.e., whether there is feedback on the pointer modification operation.

[0145] After enabling request traffic replication and forwarding, determine whether forwarding traffic to the offline environment pipeline was successful. If not, end the operation; if yes, execute the pipeline for a fixed period of n seconds, waiting for pointer modification information. Figure 6 Determine if there are any pointer modification operations and report the modification information to stop the pipeline from blocking.

[0146] Then, the configuration verification task in the offline environment pipeline checks for any anomalies, such as changes in configuration information. If so, an anomaly notification message is sent, indicating that the modified content has been altered. This message informs the detected key and the problematic code. If no anomalies are detected, the application deployment pipeline is started, and the application code is deployed.

[0147] The configuration verification task can be considered as checking whether the modification information indicates that the configuration content has been modified. This is to identify problematic code before going live.

[0148] In one embodiment, after determining the modification information of the difference content based on the difference content and the corresponding publication information, the method further includes:

[0149] If the modification information of the difference content indicates that the fourth configuration value has been modified, determine whether there is target data for the first configuration value corresponding to the fourth configuration value, wherein the fourth configuration value includes the first configuration value that has been modified in the first configuration value included in the difference content;

[0150] If so, obtain the target data.

[0151] The fourth configuration value can be considered as a configuration value that has been mistakenly modified in the difference content, such as changing the first configuration value to a different second configuration value. The target data can be the copied object, such as obtaining the target data by recursively copying objects at all levels. The target data for the first configuration value can be obtained by recursively copying objects at all levels to copy the first configuration value, achieving a complete copy of the first configuration value and its corresponding first configuration key.

[0152] The difference content may include multiple first configuration values. By comparing these values ​​with the corresponding publication information and third configuration values, it can be determined whether each first configuration value in the difference content has been modified. If so, it can be used as a fourth configuration value, representing the modified configuration value in the target service.

[0153] Each configuration value can be associated through a configuration key. The first configuration value corresponding to the fourth configuration value can have the same configuration key. This embodiment can determine whether the first configuration value corresponding to the fourth configuration value contains target data.

[0154] If target data for the first configuration value exists, the target data can be retrieved to process subsequent requests through the target service based on the target data.

[0155] In one embodiment, after determining the modification information of the difference content based on the difference content and the corresponding publication information, the method further includes:

[0156] Update the signal flag corresponding to the fourth configuration value; the updated signal flag indicates that the fourth configuration value has been modified.

[0157] If the updated signal flag indicates that the fourth configuration value has been modified, obtain the first configuration value and the corresponding fourth configuration key corresponding to the fourth configuration value.

[0158] The signal flag can be considered as information indicating whether the configuration value has been modified. The configuration key corresponding to the fourth configuration value can be called the fourth configuration key.

[0159] After determining the modification information, determine whether the modification information indicates that the fourth configuration value in the difference content has been modified. If so, update the signal flag of the fourth configuration value so that the updated signal flag indicates that the fourth configuration value has been modified.

[0160] Each time the signal flag is updated, the first configuration value and the fourth configuration key corresponding to the fourth configuration value can be obtained to get the target data of the first configuration value that is the same as the fourth configuration key.

[0161] In this disclosure, the first, second, third, and fourth configuration values ​​can be associated using configuration keys. The first configuration value can be considered the configuration value obtained after the target service is initialized. The second configuration value can be considered the configuration value obtained before the target service finishes processing the first request. The third configuration value can be considered the latest configuration value from the configuration center. The fourth configuration value can be a modified configuration value. The second configuration value is different from the first configuration value. If the second configuration value is the same as the third configuration value, it can be considered that the configuration center has updated the configuration, and the second configuration value can be considered unchanged. If the second configuration value is different from the third configuration value, it can be considered that the first configuration value has been mistakenly modified. In this case, the second configuration value can be the fourth configuration value, obtained after modifying the first configuration value. Since the first configuration value is stored in a global variable, the target data can be obtained by retrieving the first configuration value and its corresponding configuration key, thus resolving the problem of mistaken modification.

[0162] Figure 9 This is a schematic diagram of a processing flow with modified configuration content provided in another embodiment of this disclosure, such as... Figure 9 As shown, when a pointer modification operation is detected, the operation can be handled adaptively. The operation is as follows:

[0163] exist Figure 6 Based on this, after determining that a pointer modification operation exists for the key, it is determined whether the target data with the original value exists for the key. That is, if the modification information of the difference content indicates that the fourth configuration value has been modified, it is determined whether the target data corresponding to the first configuration value of the fourth configuration value exists. If not, an alarm message is sent; if so, the process is switched to reading the target data, and the first request for the target service ends.

[0164] Furthermore, after determining that a key has undergone a pointer modification operation, the signal flag is updated to indicate that keyi (e.g., the i-th key has undergone a pointer modification operation) has been modified. This means updating the signal flag corresponding to the fourth configuration value and retrieving the key-value pair of the configuration that has been modified. Specifically, if the updated signal flag indicates that the fourth configuration value has been modified, the first configuration value and the corresponding fourth configuration key are retrieved. This can be done by retrieving the key from a snapshot of the first version.

[0165] Figure 10 This is a schematic diagram of the structure of a configuration content acquisition device provided in an embodiment of this disclosure, as shown below. Figure 10 As shown,

[0166] The configuration content acquisition device includes:

[0167] The first acquisition module 1010 is used to acquire the first configuration content associated with the target service in response to the initialization of the target service;

[0168] The second acquisition module 1020 is used to acquire the second configuration content associated with the target service before the target service completes processing the first request;

[0169] The determining module 1030 is used to obtain the difference content based on the first configuration content and the second configuration content;

[0170] The determining module 1040 is used to determine the modification information of the difference content based on the difference content and the corresponding publication information, wherein the modification information indicates whether the difference content has been modified.

[0171] The technical solution provided in this disclosure involves a first acquisition module acquiring first configuration content associated with the target service after the target service is initialized. A second acquisition module acquiring second configuration content associated with the target service before the target service completes processing the first request. Then, a determining module obtains the difference content based on the first and second configuration content. After obtaining the difference content, the determining module determines whether the difference content has been modified based on the difference content and its publication information. This enables the target service to promptly detect whether the first configuration content has been modified after acquiring it.

[0172] In one embodiment, the first acquisition module 1010 is specifically used for:

[0173] In response to the initialization of the target service, a first configuration key of the first configuration content associated with the target service is obtained from the local machine, wherein the type of the first configuration content includes a pointer type;

[0174] Determine whether to enable the configuration content verification function;

[0175] If so, obtain the first configuration value corresponding to each of the first configuration keys.

[0176] In one embodiment, the configuration content acquisition device further includes a storage module, used for:

[0177] After obtaining the configuration value corresponding to each configuration key, each first configuration key and its corresponding first configuration value are stored in a global variable.

[0178] In one embodiment, the second acquisition module 1020 is specifically used for:

[0179] Before the target service completes processing the first request, determine whether to start the configuration content verification function;

[0180] If so, retrieve the second configuration key and the second configuration value corresponding to each second configuration key from the local machine for the second configuration content associated with the target service.

[0181] In one embodiment, the determining module 1040 is specifically used for:

[0182] Determine the acquisition time of the first configuration value corresponding to the difference content;

[0183] Obtain the publication information of the difference content in the configuration center and the third configuration value associated with the publication information;

[0184] The modification information of the difference content is determined by comparing the release information, the acquisition time, the third configuration value, and the second configuration value corresponding to the difference content.

[0185] In one embodiment, the configuration content acquisition device further includes a deployment module, configured to:

[0186] In response to the initialization of the target service, before obtaining the first configuration content associated with the target service, the pipeline for deploying the application to the offline environment is established.

[0187] If the pipeline deployment is successful, the second request from the application is copied and forwarded.

[0188] If the second request is successfully forwarded, the target service is started.

[0189] In one embodiment, the configuration content acquisition device further includes a sending module, configured to:

[0190] If the pipeline is successfully deployed, the pipeline is blocked until the modification information is obtained;

[0191] If the modification information indicates that the difference content has been modified, an exception notification message is sent.

[0192] In one embodiment, the configuration content acquisition device further includes a third acquisition module, configured to:

[0193] After determining the modification information of the difference content based on the difference content and the publication information corresponding to the difference content, if the modification information of the difference content indicates that the fourth configuration value has been modified, it is determined whether there is target data for the first configuration value corresponding to the fourth configuration value, wherein the fourth configuration value includes the first configuration value that has been modified in the first configuration value included in the difference content;

[0194] If so, obtain the target data.

[0195] In one embodiment, the configuration content acquisition device further includes an update module, configured to:

[0196] After determining the modification information of the difference content based on the difference content and the corresponding publication information, the signal flag bit corresponding to the fourth configuration value is updated, and the updated signal flag bit indicates that the fourth configuration value has been modified.

[0197] If the updated signal flag indicates that the fourth configuration value has been modified, obtain the first configuration value and the corresponding fourth configuration key corresponding to the fourth configuration value.

[0198] The configuration content acquisition device provided in this disclosure can execute the configuration content acquisition method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0199] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0200] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Refer to the following... Figure 11 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 11 A structural diagram of the terminal device or server in the 500.

[0201] Electronic equipment 500, including:

[0202] One or more processing devices 501;

[0203] Storage device 508, for storing one or more programs,

[0204] When the one or more programs are executed by the one or more processing devices 501, the one or more processing devices 501 implement any of the methods provided in this disclosure.

[0205] The terminal devices in this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 11 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0206] like Figure 11As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.

[0207] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, configuration keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although... Figure 11 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0208] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0209] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0210] The electronic device provided in this embodiment and the configuration content acquisition method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0211] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the configuration content acquisition method provided in the above embodiments.

[0212] It should be noted that the computer-readable medium described above in this disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof.

[0213] The computer storage medium may be a storage medium for computer-executable instructions, which, when executed by a computer processor, are used to perform the methods provided in this disclosure.

[0214] Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0215] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0216] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0217] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to target service initialization, acquire first configuration content associated with the target service;

[0218] Before the target service completes processing the first request, obtain the second configuration content associated with the target service;

[0219] Based on the first configuration content and the second configuration content, the difference content is obtained;

[0220] Based on the difference content and the corresponding publication information, modification information of the difference content is determined, and the modification information indicates whether the difference content has been modified.

[0221] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0222] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. 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 some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated 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 diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0223] The modules or units described in the embodiments of this disclosure can be implemented in software or hardware. The names of modules or units do not necessarily limit the specific unit; for example, the first acquisition module can also be described as a "first configuration content acquisition module".

[0224] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0225] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0226] A computer program product includes a computer program that, when executed by a processor, implements the configuration content acquisition method provided according to embodiments of this disclosure. It possesses the corresponding functional modules and beneficial effects for implementing the method.

[0227] According to one or more embodiments of this disclosure, [Example 1] provides a method for configuring content processing, including:

[0228] In response to the initialization of the target service, obtain the first configuration content associated with the target service;

[0229] Before the target service completes processing the first request, obtain the second configuration content associated with the target service;

[0230] Based on the first configuration content and the second configuration content, the difference content is obtained;

[0231] Based on the difference content and the corresponding publication information, modification information of the difference content is determined, and the modification information indicates whether the difference content has been modified.

[0232] According to one or more embodiments of this disclosure, [Example 2] provides the method described in Example 1, wherein obtaining the first configuration content associated with the target service in response to target service initialization includes:

[0233] In response to the initialization of the target service, a first configuration key of the first configuration content associated with the target service is obtained from the local machine, wherein the type of the first configuration content includes a pointer type;

[0234] Determine whether to enable the configuration content verification function;

[0235] If so, obtain the first configuration value corresponding to each of the first configuration keys.

[0236] According to one or more embodiments of this disclosure, [Example 3] provides the method described in Example 2, which, after obtaining the configuration values ​​corresponding to each configuration key, further includes:

[0237] Store each of the first configuration keys and the corresponding first configuration values ​​into a global variable.

[0238] According to one or more embodiments of this disclosure, [Example 4] provides the method of Example 1, which, before the target service completes processing of the first request, obtains second configuration content associated with the target service, including:

[0239] Before the target service completes processing the first request, determine whether to start the configuration content verification function;

[0240] If so, retrieve the second configuration key and the second configuration value corresponding to each second configuration key from the local machine for the second configuration content associated with the target service.

[0241] According to one or more embodiments of this disclosure, [Example 5] provides the method described in Example 1, wherein determining the modification information of the difference content based on the difference content and the corresponding publication information includes:

[0242] Determine the acquisition time of the first configuration value corresponding to the difference content;

[0243] Obtain the publication information of the difference content in the configuration center and the third configuration value associated with the publication information;

[0244] The modification information of the difference content is determined by comparing the release information, the acquisition time, the third configuration value, and the second configuration value corresponding to the difference content.

[0245] According to one or more embodiments of this disclosure, [Example 6] provides the method of Example 1, which further includes, before obtaining the first configuration content associated with the target service in response to target service initialization:

[0246] A pipeline for deploying applications to offline environments;

[0247] If the pipeline deployment is successful, the second request from the application is copied and forwarded.

[0248] If the second request is successfully forwarded, the target service is started.

[0249] According to one or more embodiments of this disclosure, Example 7 provides the method described in Example 6, further comprising:

[0250] If the pipeline is successfully deployed, the pipeline is blocked until the modification information is obtained;

[0251] If the modification information indicates that the difference content has been modified, an exception notification message is sent.

[0252] According to one or more embodiments of this disclosure, [Example 8] provides the method of Example 1, which, after determining the modification information of the difference content based on the difference content and the publication information corresponding to the difference content, further includes:

[0253] If the modification information of the difference content indicates that the fourth configuration value has been modified, determine whether there is target data for the first configuration value corresponding to the fourth configuration value, wherein the fourth configuration value includes the first configuration value that has been modified in the first configuration value included in the difference content;

[0254] If so, obtain the target data.

[0255] According to one or more embodiments of this disclosure, [Example 9] provides the method described in Example 8, which, after determining the modification information of the difference content based on the difference content and the publication information corresponding to the difference content, further includes:

[0256] Update the signal flag corresponding to the fourth configuration value; the updated signal flag indicates that the fourth configuration value has been modified.

[0257] If the updated signal flag indicates that the fourth configuration value has been modified, obtain the first configuration value and the corresponding fourth configuration key corresponding to the fourth configuration value.

[0258] According to one or more embodiments of this disclosure, [Example 10] provides a configuration content processing apparatus, including:

[0259] The first acquisition module is used to acquire the first configuration content associated with the target service in response to the initialization of the target service;

[0260] The second acquisition module is used to acquire the second configuration content associated with the target service before the target service completes processing the first request;

[0261] The determining module is used to obtain the difference content based on the first configuration content and the second configuration content;

[0262] The determination module is used to determine the modification information of the difference content based on the difference content and the corresponding publication information, wherein the modification information indicates whether the difference content has been modified.

[0263] According to one or more embodiments of this disclosure, [Example 11] an electronic device is provided, the electronic device comprising:

[0264] One or more processing devices;

[0265] Storage device for storing one or more programs.

[0266] When the one or more programs are executed by the one or more processing devices, the one or more processing devices perform the method as described in any of Examples 1-9.

[0267] According to one or more embodiments of this disclosure, [Example 12] provides a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform the method described in any of Examples 1-9.

[0268] According to one or more embodiments of this disclosure, [Example 13] provides a computer program product including a computer program that, when executed by a processor, implements the method according to any one of Examples 1-9.

[0269] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0270] Furthermore, although the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0271] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for processing configuration content, characterized in that, include: In response to the initialization of the target service, obtain the first configuration content associated with the target service; Before the target service completes processing the first request, obtain the second configuration content associated with the target service; Based on the first configuration content and the second configuration content, the difference content is obtained; Based on the difference content and the corresponding publication information, modification information of the difference content is determined, and the modification information indicates whether the difference content has been modified.

2. The method according to claim 1, characterized in that, The step of responding to the initialization of the target service and obtaining the first configuration content associated with the target service includes: In response to the initialization of the target service, a first configuration key of the first configuration content associated with the target service is obtained from the local machine, wherein the type of the first configuration content includes a pointer type; Determine whether to enable the configuration content verification function; If so, obtain the first configuration value corresponding to each of the first configuration keys.

3. The method according to claim 2, characterized in that, After obtaining the configuration values ​​corresponding to each configuration key, the process also includes: Store each of the first configuration keys and the corresponding first configuration values ​​into a global variable.

4. The method according to claim 1, characterized in that, Before the target service completes processing the first request, the second configuration content associated with the target service is obtained, including: Before the target service completes processing the first request, determine whether to start the configuration content verification function; If so, retrieve the second configuration key and the second configuration value corresponding to each second configuration key from the local machine for the second configuration content associated with the target service.

5. The method according to claim 1, characterized in that, The step of determining the modification information of the differing content based on the differing content and the corresponding publication information includes: Determine the acquisition time of the first configuration value corresponding to the difference content; Obtain the publication information of the difference content in the configuration center and the third configuration value associated with the publication information; The modification information of the difference content is determined by comparing the release information, the acquisition time, the third configuration value, and the second configuration value corresponding to the difference content.

6. The method according to claim 1, characterized in that, In response to the initialization of the target service, before obtaining the first configuration content associated with the target service, the following steps are also included: A pipeline for deploying applications to offline environments; If the pipeline deployment is successful, the second request from the application is copied and forwarded. If the second request is successfully forwarded, the target service is started.

7. The method according to claim 6, characterized in that, Also includes: If the pipeline is successfully deployed, the pipeline is blocked until the modification information is obtained; If the modification information indicates that the difference content has been modified, an exception notification message is sent.

8. The method according to claim 1, characterized in that, After determining the modification information of the difference content based on the difference content and the corresponding publication information, the method further includes: If the modification information of the difference content indicates that the fourth configuration value has been modified, determine whether there is target data for the first configuration value corresponding to the fourth configuration value, wherein the fourth configuration value includes the first configuration value that has been modified in the first configuration value included in the difference content; If so, obtain the target data.

9. The method according to claim 8, characterized in that, After determining the modification information of the difference content based on the difference content and the corresponding publication information, the method further includes: Update the signal flag corresponding to the fourth configuration value; the updated signal flag indicates that the fourth configuration value has been modified. If the updated signal flag indicates that the fourth configuration value has been modified, obtain the first configuration value and the corresponding fourth configuration key corresponding to the fourth configuration value.

10. A configuration content processing apparatus, characterized in that, include: The first acquisition module is used to acquire the first configuration content associated with the target service in response to the initialization of the target service; The second acquisition module is used to acquire the second configuration content associated with the target service before the target service completes processing the first request; The determining module is used to obtain the difference content based on the first configuration content and the second configuration content; The determination module is used to determine the modification information of the difference content based on the difference content and the corresponding publication information, wherein the modification information indicates whether the difference content has been modified.

11. An electronic device, characterized in that, The electronic device includes: One or more processing devices; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processing devices, the one or more processing devices perform the method as described in any one of claims 1-9.

12. A storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform the method as described in any one of claims 1-9.

13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-9.