Gray traffic state determination method and device, storage medium and electronic equipment

By constructing grayscale templates and target templates, comparing the differences in traffic data characteristics, and using statistical or machine learning models to determine the grayscale traffic status, the problem of low efficiency and high cost in determining the grayscale traffic status is solved, and efficient and accurate grayscale traffic management is achieved.

CN121542151APending Publication Date: 2026-02-17INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511723452.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

The current technology for determining the status of grayscale traffic is inefficient and costly, mainly because the grayscale marking process is time-consuming and relies on the subjective judgment of developers, lacking systematicity and accuracy.

Method used

Construct grayscale templates and target templates, compare the feature differences between grayscale traffic data and target traffic data, directly control traffic processing behavior and execute operations using the characteristics of container templates, collect and analyze traffic data, and determine the grayscale traffic status using statistical methods or machine learning models.

Benefits of technology

It improves the efficiency and accuracy of grayscale traffic status verification, reduces development and operation costs, promptly identifies potential problems, and ensures the stability and reliability of grayscale deployments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542151A_ABST
    Figure CN121542151A_ABST
Patent Text Reader

Abstract

The invention discloses a gray traffic state determination method and device, a storage medium and electronic equipment, and relates to the field of financial science and technology, and the method comprises the steps: constructing a gray template and a target template which have a pairing relation; the target template is a container template corresponding to a formal network environment and is used for receiving and processing all actual traffic; collecting flow data in a gray level environment according to the gray level template to obtain gray level flow data; collecting traffic data in a formal network environment according to the target template to obtain target traffic data; and determining the state of the gray flow data by comparing the feature difference between the gray flow data and the target flow data. According to the method and the device, the technical problems of low efficiency and high cost of determining the gray flow state due to long time consumption in the marking process when the gray flow is marked to distinguish the gray flow from the normal flow and then the state of the gray flow is verified in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of financial technology, in particular to a method and device for determining the state of gray traffic, a storage medium and an electronic device. BACKGROUND

[0002] In the existing gray production technology, the gray traffic can be identified and managed by using the gray marking method. The developer needs to embed a specific gray label in the monitoring information reported by the application code, so as to identify and distinguish the gray traffic and the normal traffic in the monitoring system.

[0003] However, the gray marking process needs to modify the application code a lot, which is highly invasive to the application. Especially for some old technology stack applications, from code modification to testing and verification, to online deployment, the whole process needs to consume a lot of manpower and time, and a lot of manpower is needed to improve the monitoring data marking gray label work. The marking process is time-consuming, which increases the development cost and the transformation cost is extremely high. The state verification of the gray traffic can rely on the subjective judgment of the developer, which lacks systematicness and accuracy, resulting in low efficiency of determining the state of the gray traffic.

[0004] At present, there is no effective solution to the above problems. SUMMARY

[0005] The embodiments of the present application provide a method and device for determining the state of gray traffic, a storage medium and an electronic device, to at least solve the technical problem that the efficiency of determining the state of gray traffic is low and the cost is high due to the time-consuming marking process in the prior art, which uses the marking method to distinguish the gray traffic and the normal traffic, and then verifies the state of the gray traffic.

[0006] According to an aspect of an embodiment of the present application, a method for determining the state of gray traffic is provided, comprising: constructing a gray template and a target template having a pairing relationship. The gray template is a container template including a gray identifier and differentiated configuration information, used to control and record the traffic processing behavior and container execution operation in the gray environment, and the gray environment is a non-formal network environment corresponding to the gray identifier; the target template is a container template corresponding to the formal network environment, used to receive and process all actual traffic. The traffic data in the gray environment is collected according to the gray template to obtain gray traffic data; the traffic data in the formal network environment is collected according to the target template to obtain target traffic data; and the state of the gray traffic data is determined by comparing the feature difference between the gray traffic data and the target traffic data.

[0007] Optionally, constructing a paired grayscale template and target template includes: obtaining differentiated configuration parameters, wherein the differentiated configuration parameters include at least: service version identifier, traffic allocation strategy, resource constraints, network control strategy, and log monitoring tags; wherein, the service version identifier is used to distinguish the application service versions corresponding to the grayscale template and the target template respectively; the traffic allocation strategy is used to control the traffic routing rules of grayscale traffic data and target traffic data; the resource constraints are used to control the configuration resources of the grayscale environment; the network control strategy is used to control network isolation between different network environments; and the log monitoring tags are used to mark monitoring logs related to grayscale traffic data; and constructing the grayscale template and target template based on the differentiated configuration parameters.

[0008] Optionally, after constructing the grayscale template, the method further includes: setting grayscale identifiers for the target container and application services related to the target container based on the grayscale template; using the traffic data generated by the application services carrying the grayscale identifiers as grayscale traffic data; and controlling the flow of grayscale traffic data to the container carrying the grayscale identifiers.

[0009] Optionally, grayscale traffic data is obtained by collecting traffic data in a grayscale environment based on a grayscale template, including: configuring traffic collection rules based on the grayscale template, wherein the traffic collection rules include at least the identifier of the grayscale template and traffic collection indicators, and the traffic collection indicators include at least: processor utilization, memory utilization, communication protocol call volume, traffic transmission success rate and error code probability distribution information; collecting traffic data corresponding to the traffic collection indicators in the grayscale environment based on the traffic collection rules to obtain grayscale traffic data; and setting the identifier of the grayscale template for the collected grayscale traffic data.

[0010] Optionally, the state of grayscale traffic data is determined by comparing the feature differences between grayscale traffic data and target traffic data, including: performing a normalization operation on the grayscale traffic data and target traffic data, wherein the normalization operation is applied to the same data format of the traffic data; extracting features from the normalized grayscale traffic data and target traffic data respectively to obtain grayscale traffic features and target traffic features; determining the feature differences between the grayscale traffic features and target traffic features using statistical methods or machine learning models; and determining the state of grayscale traffic data based on the feature differences between the grayscale traffic features and target traffic features.

[0011] Optionally, the state of grayscale traffic data is determined based on the feature differences between grayscale traffic characteristics and target traffic characteristics, including: taking the traffic indicator item corresponding to the feature difference as the target traffic indicator item; detecting whether the value of the feature difference exceeds a judgment threshold set for the target traffic indicator item, wherein the judgment threshold set for different traffic indicators is different; if the value of the feature difference is detected to exceed the judgment threshold set for the target traffic indicator item, then the grayscale traffic data is determined to be in an abnormal state; if the value of the feature difference is detected not to exceed the judgment threshold set for the target traffic indicator item, then the grayscale traffic data is determined to be in a normal state.

[0012] Optionally, after determining the status of grayscale traffic data by comparing the feature differences between grayscale traffic data and target traffic data, the method further includes: generating a gray-to-positive inspection view report, wherein the gray-to-positive inspection view report displays at least the feature difference information between grayscale traffic data and target traffic data and the status information of grayscale traffic data, wherein the display format of the gray-to-positive inspection view report includes: images, tables, text, voice and video.

[0013] Optionally, setting grayscale identifiers for the target container and related application services based on a grayscale template includes: encapsulating the grayscale identifiers in a target file based on the grayscale template, wherein the target file is an environment variable configuration file, a container startup command file, or a container image file; when the target container runs according to the target file, decapsulating the grayscale identifiers to obtain them and setting the grayscale identifiers for the target container and related application services, wherein the application services related to the target container adjust their application running behavior according to the grayscale identifiers, and the application running behavior includes: enabling a preset number of log records, using the target version of the application interface, or changing the execution path of the business logic.

[0014] According to another aspect of the embodiments of this application, a device for determining the state of grayscale traffic is also provided, comprising: a target construction unit, used to construct a grayscale template and a target template having a pairing relationship, wherein the grayscale template is a container template including a grayscale identifier and differentiated configuration information, used to control and record traffic processing behavior and container execution operations in a grayscale environment, the grayscale environment being an informal network environment corresponding to the grayscale identifier; the target template being a container template corresponding to a formal network environment, used to receive and process all actual traffic; a grayscale traffic acquisition unit, used to acquire traffic data in the grayscale environment according to the grayscale template to obtain grayscale traffic data; a target traffic acquisition unit, used to acquire traffic data in the formal network environment according to the target template to obtain target traffic data; and a state determination unit, used to determine the state of the grayscale traffic data by comparing the characteristic differences between the grayscale traffic data and the target traffic data.

[0015] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, which stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the above-described method for determining grayscale traffic status.

[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors cause the one or more processors to perform the above-described method for determining the grayscale traffic state.

[0017] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program or instructions, which, when executed by a processor, implement the above-described method for determining grayscale traffic status.

[0018] In this application, a grayscale template and a target template with a pairing relationship are first constructed. The grayscale template is a container template that includes grayscale identifiers and differentiated configuration information, used to control and record traffic processing behavior and container execution operations in a grayscale environment, which is an informal network environment corresponding to the grayscale identifier. The target template is a container template corresponding to the formal network environment, used to receive and process all actual traffic, and to collect traffic data in the grayscale environment based on the grayscale template to obtain grayscale traffic data. Then, traffic data in the formal network environment is collected based on the target template to obtain target traffic data. Finally, the state of the grayscale traffic data is determined by comparing the characteristic differences between the grayscale traffic data and the target traffic data.

[0019] As described above, this application utilizes the characteristics of container templates, with grayscale templates and target templates corresponding to grayscale and production network environments, respectively. Traffic processing behavior and operations are directly controlled through template configuration, eliminating the need for extensive application modifications and reducing development costs. Furthermore, grayscale traffic data is obtained by collecting traffic data from the grayscale environment using the grayscale template, and target traffic data is obtained by collecting traffic data from the production network environment using the target template. This allows for the rapid and accurate acquisition of both grayscale and target traffic data, providing efficient data support for subsequent traffic status verification.

[0020] Traditional methods rely on developers' subjective judgment, lacking systematicity and objectivity, and are prone to overlooking potential risks. This application, however, accurately identifies the differences between grayscale traffic data and target traffic data by comparing their characteristic differences, and determines the status of the grayscale traffic data accordingly. This not only improves the efficiency of grayscale traffic status verification but also enables timely detection of potential problems, ensuring the stability and reliability of grayscale deployments. It effectively reduces the cost and risk of grayscale traffic status verification, thus solving the technical problem of low efficiency and high cost in existing technologies that use tagging to distinguish grayscale traffic from normal traffic before verifying its status, due to the time-consuming tagging process. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0022] Figure 1 This is a flowchart of an optional method for determining grayscale traffic status according to an embodiment of this application;

[0023] Figure 2 This is a schematic diagram of an optional method for determining grayscale traffic status according to an embodiment of this application;

[0024] Figure 3 This is a schematic diagram of an optional grayscale flow state determination device according to an embodiment of this application. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] According to an embodiment of this application, a method embodiment for determining grayscale traffic status is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0028] According to the embodiments of this application, an inspection system can be used as the execution subject of the grayscale traffic status determination method of this application embodiment. The system can be a software system or an embedded system combining software and hardware. Of course, the execution subject of the method in the embodiments of this application can also be other forms of execution subject, such as devices, equipment, etc. It should be known by those skilled in the art that this application does not particularly limit the specific form of the execution subject.

[0029] Figure 1 This is a flowchart of a method for determining grayscale traffic status according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0030] Step S101: Construct a grayscale template and a target template with a pairing relationship. The grayscale template is a container template that includes a grayscale identifier and differentiated configuration information, used to control and record traffic processing behavior and container execution operations in a grayscale environment, which is an informal network environment corresponding to the grayscale identifier. The target template is a container template corresponding to the formal network environment, used to receive and process all actual traffic.

[0031] Optionally, a grayscale template can be a special container template that includes grayscale identifiers and differentiated configuration information. Grayscale identifiers clearly distinguish grayscale traffic from normal traffic, ensuring that traffic processing and container operations performed in the grayscale environment can be accurately tracked and recorded. Differentiated configuration information can cover multiple aspects such as service version identifiers, traffic allocation policies, resource limits, network control policies, and log monitoring tags. Differentiated configuration information allows the grayscale template to flexibly control key operations such as traffic routing, resource allocation, network isolation, and logging according to specific grayscale environment requirements. Through grayscale templates, developers can conduct grayscale testing of applications in informal network environments, facilitating the early discovery and fixing of potential problems, thereby reducing the impact on the production network environment.

[0032] Optionally, the target template can be a container template in the production network environment corresponding to the grayscale template, used to receive and process all actual traffic. The configuration information of the target template differs from that of the grayscale template; the configuration information of the target template can primarily focus on traffic processing and container execution operations in the production network environment. By establishing a pairing relationship between the grayscale template and the target template, this application can collect grayscale traffic data in both the grayscale and production network environments, and determine the status of the grayscale traffic data through comparative analysis. This improves the efficiency of determining the grayscale traffic status, reduces intrusion into application code, and lowers development and maintenance costs.

[0033] Step S102: Collect traffic data in a grayscale environment based on the grayscale template to obtain grayscale traffic data.

[0034] Optionally, the grayscale template may contain detailed traffic collection rules, which define how to collect traffic data from the grayscale environment. Specifically, the traffic collection rules may include at least the grayscale template identifier and traffic collection metrics, such as processor utilization, memory usage, communication protocol call volume, traffic transmission success rate, and error code probability distribution information, to comprehensively reflect the container's operating status and traffic processing behavior in the grayscale environment. Through the traffic collection rules, the inspection system can easily and accurately collect data related to grayscale traffic through the monitoring platform and mark it as grayscale traffic data for subsequent analysis and comparison.

[0035] Optionally, the collected grayscale traffic data can be identified by a grayscale template to ensure data traceability and accuracy. The grayscale traffic data can be further processed and analyzed by the inspection system. This application effectively collects traffic data in a grayscale environment, providing reliable data support for subsequent grayscale traffic status determination, improving data collection efficiency, reducing intrusion into application code, and lowering development and maintenance costs.

[0036] Step S103: Collect traffic data in the formal network environment based on the target template to obtain target traffic data.

[0037] Optionally, similar to grayscale templates, target templates can also contain a series of traffic collection rules. These rules define how to collect traffic data from the production network environment. Specifically, the traffic collection rules for target templates include the target template's identifier and traffic collection metrics, such as processor utilization, memory usage, communication protocol call volume, traffic transmission success rate, and error code probability distribution information. These rules facilitate a comprehensive reflection of the container's operational status and traffic processing behavior in the production network environment. Through these target template rules, the inspection system can accurately collect traffic data from the production network environment via the monitoring platform and mark it as target traffic data for subsequent analysis and comparison.

[0038] Optionally, the collected target traffic data can be identified by a target template to ensure data traceability and accuracy. The target traffic data can then be further processed and analyzed by the inspection system. This application can effectively collect traffic data in a formal network environment, providing reliable data support for subsequent gray-scale traffic status determination, improving data collection efficiency, reducing intrusion into application code, and lowering development and maintenance costs.

[0039] Step S104: Determine the status of the grayscale traffic data by comparing the feature differences between the grayscale traffic data and the target traffic data.

[0040] Optionally, the collected grayscale traffic data and target traffic data can be normalized to ensure consistency in format between the two types of traffic data. Then, key features can be extracted from the normalized data to form grayscale traffic features and target traffic features. These features can intuitively reflect the operational status of traffic in grayscale and formal network environments. Analyzing the grayscale traffic features and target traffic features using statistical methods or machine learning models can quantify the differences between them.

[0041] Based on the analysis results of the feature differences between grayscale traffic data and target traffic data, the status of grayscale traffic data can be further determined. Specifically, the traffic indicators corresponding to the feature differences can be used as target traffic indicators, and the difference value of the target traffic indicators can be detected to see if it exceeds a preset judgment threshold. Different traffic indicators can have different thresholds, which can be set according to actual application scenarios and experience. If the detected feature difference value exceeds the corresponding judgment threshold, the grayscale traffic data can be determined to be in an abnormal state, indicating that there are potential problems in the grayscale environment, requiring further investigation and repair; conversely, if the feature difference value does not exceed the threshold, the grayscale traffic data is considered to be in a normal state, the grayscale environment is operating well, and the health status of grayscale traffic can be effectively and objectively identified, improving the accuracy and efficiency of grayscale traffic status determination.

[0042] In one optional embodiment, constructing a paired grayscale template and target template includes: the inspection system can obtain differentiated configuration parameters, wherein the differentiated configuration parameters include at least: service version identifier, traffic allocation policy, resource constraints, network control policy, and log monitoring tags. The service version identifier is used to distinguish the application service versions corresponding to the grayscale template and the target template, respectively; the traffic allocation policy is used to control the traffic routing rules for grayscale traffic data and target traffic data; the resource constraints are used to control the configuration resources of the grayscale environment; the network control policy is used to control network isolation between different network environments; and the log monitoring tags are used to mark monitoring logs related to the grayscale traffic data. Then, the grayscale template and target template can be constructed based on the differentiated configuration parameters.

[0043] Optionally, the inspection system first obtains differentiated configuration parameters, which can be the key basis for constructing templates. These differentiated configuration parameters may include at least service version identifiers, traffic allocation policies, resource constraints, network control policies, and log monitoring tags. Service version identifiers clearly distinguish the application service versions corresponding to the gray-scale template and the target template, ensuring that the correct version of the service is running in different environments. Traffic allocation policies define the traffic guidance rules for gray-scale traffic data and target traffic data, facilitating precise control of traffic allocation and routing, ensuring that traffic flows to the appropriate environment according to the predetermined strategy. Resource constraints constrain the configuration resources of the gray-scale environment, preventing excessive resource usage from affecting system stability. Network control policies ensure effective network isolation between different network environments, avoiding potential security risks and interference. Log monitoring tags are used to mark monitoring logs related to gray-scale traffic data, facilitating subsequent tracking and analysis, and quickly locating problems.

[0044] Based on differentiated configuration parameters, the inspection system can construct grayscale templates and target templates that precisely match the requirements. The grayscale template is used to control and record traffic processing behavior and container execution operations in the grayscale environment, suitable for grayscale testing in informal network environments. The target template corresponds to the formal network environment and is responsible for receiving and processing all actual traffic. This embodiment of the application can collect traffic data in both grayscale and formal network environments, and by comparing and analyzing the collected traffic data, it facilitates efficient and accurate determination of the grayscale traffic status. This not only improves the efficiency of grayscale traffic status determination but also reduces the intrusion into application code, thereby reducing development and maintenance costs.

[0045] In an optional embodiment, after constructing the grayscale template, the method further includes: the inspection system can set grayscale identifiers for the target container and the application services related to the target container based on the grayscale template, and use the traffic data generated by the application services carrying the grayscale identifiers as grayscale traffic data, and then control the flow of grayscale traffic data to the container carrying the grayscale identifiers.

[0046] Optionally, the inspection system can encapsulate the grayscale identifier in a target file based on the configuration information in the grayscale template. This target file can be an environment variable configuration file, a container startup command file, or a container image file. When the target container runs based on the target file, the inspection system can automatically uncapture it and set a grayscale identifier for the target container and its related application services. The grayscale identifier allows the application services to clearly identify that they are in a grayscale environment during operation. When the application service carrying the grayscale identifier processes traffic, the resulting traffic data is recognized as grayscale traffic data, facilitating a clear distinction between grayscale traffic and normal traffic, and providing a foundation for subsequent traffic data collection and analysis.

[0047] Optionally, the inspection system can use control mechanisms to ensure that grayscale traffic data flows to containers carrying grayscale identifiers. This can be achieved through traffic allocation strategies and network control strategies. The traffic allocation strategy defines the guidance rules for grayscale traffic, ensuring that grayscale traffic data is correctly guided to the corresponding containers in the grayscale environment. The network control strategy ensures isolation between different network environments, preventing mutual interference between grayscale traffic and normal traffic. In this embodiment, grayscale traffic data can be effectively collected and processed in the grayscale environment, providing accurate data support for subsequent status assessment. Precise control of traffic data flow not only improves the efficiency of grayscale traffic management but also enhances the stability and security of the system.

[0048] In one optional embodiment, grayscale traffic data is obtained by collecting traffic data in a grayscale environment based on a grayscale template. This includes: the inspection system can configure traffic collection rules based on the grayscale template, wherein the traffic collection rules include at least the identifier of the grayscale template and traffic collection indicators. The traffic collection indicators include at least the probability distribution information of processor utilization, memory utilization, communication protocol call volume, traffic transmission success rate and error codes. The system collects traffic data corresponding to the traffic collection indicators in the grayscale environment based on the traffic collection rules to obtain grayscale traffic data, and then sets the identifier of the grayscale template on the collected grayscale traffic data.

[0049] Optionally, the traffic collection rules should at least include the identifier of the grayscale template and traffic collection metrics. These metrics should include, at a minimum, processor utilization, memory usage, communication protocol call volume, traffic transmission success rate, and error code probability distribution information. Traffic collection metrics facilitate a comprehensive reflection of the container's operating status and traffic processing behavior in a grayscale environment. For example, processor utilization and memory usage can reflect the container's load, communication protocol call volume can reflect the container's interaction frequency, and traffic transmission success rate and error code probability distribution information can reveal the stability and potential problems of traffic transmission. The inspection system can accurately collect traffic data corresponding to the traffic collection metrics from the grayscale environment, obtaining complete grayscale traffic data. This ensures that the collected data comprehensively and accurately reflects the traffic status in the grayscale environment, providing a reliable data foundation for subsequent analysis and status judgment.

[0050] Optionally, after collecting grayscale traffic data, the inspection system can set a grayscale template identifier for the grayscale traffic data. The grayscale template identifier facilitates data traceability and accuracy, enabling subsequent processing and analysis to clearly identify that the grayscale traffic data originates from a grayscale environment and is associated with a specific grayscale template. In this embodiment, the inspection system can effectively distinguish between grayscale traffic data and target traffic data, providing a clear data source for subsequent comparative analysis. This not only improves the efficiency of data management but also enhances the reliability and usability of the data, providing strong support for the accurate assessment of grayscale traffic status.

[0051] In one optional embodiment, the state of grayscale traffic data is determined by comparing the feature differences between grayscale traffic data and target traffic data. This includes: the inspection system performing a normalization operation on the grayscale traffic data and target traffic data, wherein the normalization operation is applied to the same data format of the traffic data; and extracting features from the normalized grayscale traffic data and target traffic data respectively to obtain grayscale traffic features and target traffic features. Then, statistical methods or machine learning models are used to determine the feature differences between the grayscale traffic features and target traffic features, and the state of the grayscale traffic data is determined based on these feature differences.

[0052] Optionally, the purpose of normalization is to convert traffic data from different sources into a unified data format, eliminating format differences caused by different data sources and acquisition methods. Through this standardization process, the inspection system can ensure the comparability of grayscale traffic data and target traffic data in subsequent analysis. Normalized data provides a foundation for further feature extraction. The inspection system extracts grayscale traffic features and target traffic features from the normalized data, facilitating a comprehensive reflection of the operational status and performance of the traffic data. The feature extraction process transforms raw data into meaningful feature values, providing crucial information for subsequent analysis and status assessment.

[0053] Optionally, after feature extraction, the inspection system can utilize statistical methods or machine learning models to determine the differences between grayscale traffic features and target traffic features. This facilitates the quantification of these differences and identifies significant differences in the operational states of grayscale and target traffic. For example, if the processor utilization of grayscale traffic is significantly higher than that of target traffic, it indicates a performance bottleneck in the grayscale environment. By setting reasonable thresholds, the inspection system can determine whether the feature differences between grayscale and target traffic features exceed the normal range. If the feature difference exceeds the preset threshold, the grayscale traffic data can be determined to be in an abnormal state, indicating a potential problem in the grayscale environment that requires further investigation and repair. Conversely, if the feature difference is within the normal range, the grayscale traffic data is considered to be in a normal state, improving the accuracy and efficiency of grayscale traffic status determination and reducing reliance on manual judgment.

[0054] In one optional embodiment, determining the state of grayscale traffic data based on the feature differences between grayscale traffic characteristics and target traffic characteristics includes: the inspection system can use the traffic indicator item corresponding to the feature difference as the target traffic indicator item, and detect whether the value of the feature difference exceeds a judgment threshold set for the target traffic indicator item, wherein different judgment thresholds are set for different traffic indicators. If the detected feature difference value exceeds the judgment threshold set for the target traffic indicator item, the grayscale traffic data is determined to be in an abnormal state; if the detected feature difference value does not exceed the judgment threshold set for the target traffic indicator item, the grayscale traffic data is determined to be in a normal state.

[0055] Optionally, the inspection system can use traffic metrics corresponding to characteristic differences as target traffic metrics. Target traffic metrics include, but are not limited to, processor utilization, memory usage, communication protocol call volume, traffic transmission success rate, and error code probability distribution information. For each target traffic metric, the inspection system can set different judgment thresholds. These thresholds can be set based on actual application scenarios and empirical data to distinguish between normal and abnormal states. For example, the threshold for processor utilization can be set to 80%, while the threshold for error code probability distribution information can be set to 5%. By setting different judgment thresholds for different traffic metrics, the inspection system can perform accurate anomaly detection for different traffic metrics.

[0056] Optionally, during the detection process, if the inspection system finds that the value of the characteristic difference exceeds the judgment threshold set for the target traffic indicator, it determines that the grayscale traffic data is in an abnormal state, indicating potential risks such as performance problems, insufficient resources, or configuration errors in the grayscale environment. For example, if the processor utilization rate of grayscale traffic exceeds the set 80% threshold, the inspection system will determine that the grayscale traffic data is in an abnormal state and prompt developers to conduct further investigation and repair. Conversely, if the value of the characteristic difference does not exceed the judgment threshold, it determines that the grayscale traffic data is in a normal state, indicating that the grayscale environment is operating well and the traffic processing behavior is as expected. This application embodiment achieves automated and intelligent judgment of grayscale traffic status by quantifying characteristic differences and setting thresholds, improving the efficiency and accuracy of grayscale traffic management.

[0057] In an optional embodiment, after determining the status of grayscale traffic data by comparing the feature differences between grayscale traffic data and target traffic data, the method further includes: the inspection system can generate a gray-to-positive inspection view report, wherein the gray-to-positive inspection view report at least displays feature difference information between grayscale traffic data and target traffic data and status information of grayscale traffic data, wherein the display format of the gray-to-positive inspection view report includes: images, tables, text, voice and video.

[0058] Optionally, the gray-to-normal inspection view report generated by the inspection system is an important output of the gray-scale traffic status determination process. The report may include characteristic difference information between gray-scale traffic data and target traffic data, as well as status information of the gray-scale traffic data determined based on this characteristic difference information. The characteristic difference information reflects the differences between the gray-scale environment and the formal network environment in key operational indicators, such as the differences in processor utilization, memory utilization, and whether they exceed preset thresholds. The status information of the gray-scale traffic data clearly indicates whether the gray-scale traffic is in a normal or abnormal state, providing direct decision-making basis for operations and maintenance personnel. The report can be presented in various formats, including images, tables, text, audio, and video, to meet the needs and preferences of different users. Images and tables can intuitively present data comparisons and trends, text descriptions provide detailed information and analysis, and audio and video formats facilitate information retrieval in scenarios where it is mobile or inconvenient to view the screen.

[0059] This application's embodiments, through a combination of diverse display formats and technical content, facilitate efficient and accurate information transmission, enabling operations and maintenance personnel to quickly understand the operational status and potential problems of gray-scale traffic. The diverse display formats improve the usability and accessibility of reports, adapting to different work scenarios and user habits. For example, operations and maintenance personnel can quickly display key data through images and tables in meetings, or access report content via voice and video on mobile devices. This application's embodiments enhance the transparency and traceability of gray-scale traffic management, helping to promptly identify and resolve potential problems, and improving the stability and reliability of the inspection system.

[0060] In one optional embodiment, setting grayscale identifiers for the target container and related application services based on a grayscale template includes: the inspection system can encapsulate the grayscale identifiers in a target file based on the grayscale template, wherein the target file is an environment variable configuration file, a container startup command file, or a container image file. Then, when the target container runs according to the target file, the grayscale identifiers are decapsulated and set for the target container and related application services. The application services related to the target container adjust their application running behavior based on the grayscale identifiers, including: enabling a preset number of log entries, using the target version of the application interface, or changing the execution path of the business logic.

[0061] Optionally, the inspection system encapsulates grayscale identifiers in target files to facilitate accurate identification and management of grayscale traffic. The target file can be an environment variable configuration file, a container startup command file, or a container image file. The target file plays a crucial role in the container's startup and operation. When the target container runs according to the target file, the inspection system automatically decapsulates and obtains the grayscale identifier, then sets this identifier for the container and its related application services. This ensures that application services can clearly identify themselves as being in a grayscale environment and adjust their operational behavior based on the grayscale identifier. Specific adjustments may include enabling a preset number of log entries for more detailed monitoring of the operational status in the grayscale environment; using the target version of the application interface to ensure that the service version in the grayscale environment is consistent with expectations; or changing the execution path of business logic to adapt to the specific needs of grayscale testing. These adjustments to application operational behavior allow the grayscale environment to operate independently of the production network environment while maintaining precise control over traffic and application behavior.

[0062] Optionally, by encapsulating grayscale identifiers, the inspection system can automatically identify and distinguish grayscale traffic from normal traffic, reducing manual intervention and improving the efficiency and accuracy of traffic management. Adjustments to application runtime behavior allow the grayscale environment to operate independently, reducing the impact on the production network environment and improving system stability and security. Enabling a preset number of log entries and using the target version of the application interface enhances the monitoring and debugging capabilities of the grayscale environment, helping to promptly identify and resolve problems. This application's embodiments provide a solid technical foundation for the efficient management and status assessment of grayscale traffic, improving the reliability and efficiency of the entire grayscale testing and deployment process.

[0063] See Figure 2 , Figure 2 This diagram illustrates the principle of determining the status of gray-scale traffic, showcasing the architecture of a gray-scale traffic monitoring and analysis system. The inspection system is responsible for collecting metrics, identifying potential anomalies by comparing network metrics between the formal and gray-scale environments, and generating a gray-to-formation inspection view. For example, network metrics may include processor utilization, memory usage, communication protocol call volume, error code probability, and traffic transmission success rate. The monitoring platform receives communication protocol call volume information from the target template and gray-scale template in the cluster, enabling comprehensive monitoring of both formal and gray-scale versions of the application service. Containers in the cluster run the target template and gray-scale template respectively. The formal and gray-scale environments are distinguished by enabling a preset number of log entries, using the application interface of the target version, or changing the execution path of business logic. This allows the inspection system to accurately control and analyze gray-scale traffic, promptly identify and resolve potential problems, thereby improving the stability and reliability of gray-scale releases, reducing development costs, enhancing the ability to identify potential problems during gray-scale releases, and achieving more efficient gray-scale traffic management and monitoring.

[0064] See Figure 3 According to another aspect of the embodiments of this application, a device for determining grayscale traffic status is also provided, including: a target construction unit 301, a grayscale traffic acquisition unit 302, a target traffic acquisition unit 303, and a status determination unit 304.

[0065] The system includes a target construction unit 301, which constructs a grayscale template and a target template with a pairing relationship. The grayscale template is a container template that includes grayscale identifiers and differentiated configuration information, used to control and record traffic processing behavior and container execution operations in a grayscale environment, where the grayscale environment is an informal network environment corresponding to the grayscale identifier. The target template is a container template corresponding to a formal network environment, used to receive and process all actual traffic. The grayscale traffic acquisition unit 302 is used to acquire traffic data in the grayscale environment based on the grayscale templates to obtain grayscale traffic data. The target traffic acquisition unit 303 is used to acquire traffic data in the formal network environment based on the target templates to obtain target traffic data. The state determination unit 304 is used to determine the state of the grayscale traffic data by comparing the characteristic differences between the grayscale traffic data and the target traffic data.

[0066] Optionally, the target construction unit 301 includes: a differential parameter acquisition subunit, used to acquire differential configuration parameters, wherein the differential configuration parameters include at least: service version identifier, traffic allocation strategy, resource constraints, network control strategy, and log monitoring tag; wherein the service version identifier is used to distinguish the application service versions corresponding to the grayscale template and the target template respectively; the traffic allocation strategy is used to control the traffic routing rules of grayscale traffic data and target traffic data; the resource constraints are used to control the configuration resources of the grayscale environment; the network control strategy is used to control the network isolation between different network environments; and the log monitoring tag is used to mark the monitoring logs related to the grayscale traffic data; and a template construction subunit, used to construct the grayscale template and the target template according to the differential configuration parameters.

[0067] Optionally, the device for determining grayscale traffic status further includes: a grayscale identifier setting unit, used to set grayscale identifiers for the target container and application services related to the target container based on a grayscale template; a grayscale traffic setting unit, used to use traffic data generated by application services carrying grayscale identifiers as grayscale traffic data; and a grayscale traffic control unit, used to control the flow of grayscale traffic data to the container carrying grayscale identifiers.

[0068] Optionally, the grayscale traffic acquisition unit 302 includes: an acquisition rule configuration subunit, used to configure traffic acquisition rules according to the grayscale template, wherein the traffic acquisition rules include at least the identifier of the grayscale template and traffic acquisition indicators, and the traffic acquisition indicators include at least: processor utilization, memory utilization, communication protocol call volume, traffic transmission success rate and probability distribution information of error codes; a grayscale traffic processing subunit, used to acquire traffic data corresponding to the traffic acquisition indicators in the grayscale environment according to the traffic acquisition rules, and obtain grayscale traffic data; and an identifier setting subunit, used to set the identifier of the grayscale template on the acquired grayscale traffic data.

[0069] Optionally, the state determination unit 304 includes: a normalization operation subunit, used to perform a normalization operation on grayscale traffic data and target traffic data, wherein the normalization operation is applied to the same data format of traffic data; a feature extraction subunit, used to extract features from the normalized grayscale traffic data and target traffic data respectively to obtain grayscale traffic features and target traffic features; a feature difference determination subunit, used to determine the feature difference between grayscale traffic features and target traffic features using statistical methods or machine learning models; and a state determination subunit, used to determine the state of grayscale traffic data based on the feature difference between grayscale traffic features and target traffic features.

[0070] Optionally, the state determination subunit includes: a target item determination module, used to take the traffic indicator item corresponding to the feature difference as the target traffic indicator item; a feature difference detection module, used to detect whether the value of the feature difference exceeds the judgment threshold set for the target traffic indicator item, wherein the judgment threshold set for different traffic indicators is different; an anomaly handling module, used to determine that the grayscale traffic data is in an abnormal state if the detected value of the feature difference exceeds the judgment threshold set for the target traffic indicator item; and a normal state handling module, used to determine that the grayscale traffic data is in a normal state if the detected value of the feature difference does not exceed the judgment threshold set for the target traffic indicator item.

[0071] Optionally, the device for determining the grayscale traffic status further includes: an inspection view report generation unit, used to generate a gray-to-positive inspection view report, wherein the gray-to-positive inspection view report at least displays the characteristic difference information between the grayscale traffic data and the target traffic data, as well as the status information of the grayscale traffic data, wherein the display format of the gray-to-positive inspection view report includes: images, tables, text, voice, and video.

[0072] Optionally, the grayscale identifier setting unit includes: an encapsulation subunit, used to encapsulate the grayscale identifier in a target file based on a grayscale template, wherein the target file is an environment variable configuration file, a container startup command file, or a container image file; and a grayscale identifier setting subunit, used to decapsulate the grayscale identifier and set the grayscale identifier for the target container and application services related to the target container when the target container runs according to the target file, wherein the application services related to the target container adjust their application running behavior according to the grayscale identifier, and the application running behavior includes: enabling a preset number of log records, using the target version of the application interface, or changing the execution path of the business logic.

[0073] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, which stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the above-described method for determining grayscale traffic status.

[0074] According to another aspect of the embodiments of this application, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors cause the one or more processors to perform the above-described method for determining the grayscale traffic state.

[0075] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program or instructions, which, when executed by a processor, implement the above-described method for determining grayscale traffic status.

[0076] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0077] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0078] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0079] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0080] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0081] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0082] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for determining grayscale flow status, characterized in that, include: Construct a grayscale template and a target template with a pairing relationship. The grayscale template is a container template that includes a grayscale identifier and differentiated configuration information. It is used to control and record traffic processing behavior and container execution operations in the grayscale environment, where the grayscale environment is an informal network environment corresponding to the grayscale identifier. The target template is a container template corresponding to the formal network environment, used to receive and process all actual traffic. Based on the grayscale template, traffic data under the grayscale environment is collected to obtain grayscale traffic data; Based on the target template, traffic data in the formal network environment is collected to obtain target traffic data; The state of the grayscale traffic data is determined by comparing the feature differences between the grayscale traffic data and the target traffic data.

2. The method according to claim 1, characterized in that, Construct a grayscale template and a target template with a pairing relationship, including: Obtain differentiated configuration parameters, wherein the differentiated configuration parameters include at least: service version identifier, traffic allocation strategy, resource limit conditions, network control strategy, and log monitoring tags; The service version identifier is used to distinguish the application service versions corresponding to the grayscale template and the target template, respectively; the traffic allocation strategy is used to control the traffic routing rules for grayscale traffic data and target traffic data; the resource constraint condition is used to control the configuration resources of the grayscale environment; the network control strategy is used to control network isolation between different network environments; and the log monitoring tag is used to mark monitoring logs related to the grayscale traffic data. The grayscale template and the target template are constructed based on the differentiated configuration parameters.

3. The method according to claim 1, characterized in that, After constructing the grayscale template, the method further includes: The grayscale template is used to set the grayscale identifier for the target container and the application services related to the target container; Traffic data generated by application services carrying the grayscale identifier will be used as grayscale traffic data. Control the flow of grayscale traffic data to the container carrying the grayscale identifier.

4. The method according to claim 1, characterized in that, Based on the grayscale template, traffic data under the grayscale environment is collected to obtain grayscale traffic data, including: Traffic collection rules are configured based on the grayscale template, wherein the traffic collection rules include at least the grayscale template identifier and traffic collection indicators, and the traffic collection indicators include at least: processor utilization, memory utilization, communication protocol call volume, traffic transmission success rate and error code probability distribution information; The grayscale traffic data is obtained by collecting traffic data corresponding to the traffic collection indicators in the grayscale environment according to the traffic collection rules. The grayscale template is identified for the collected grayscale traffic data.

5. The method according to claim 1, characterized in that, The state of the grayscale traffic data is determined by comparing the feature differences between the grayscale traffic data and the target traffic data, including: The grayscale traffic data and the target traffic data are normalized, wherein the normalization operation is applied to the data format of the same traffic data; Feature extraction is performed on the normalized grayscale traffic data and the target traffic data to obtain grayscale traffic features and target traffic features; Statistical methods or machine learning models are used to determine the feature differences between grayscale traffic characteristics and target traffic characteristics; The state of the grayscale traffic data is determined based on the feature differences between the grayscale traffic features and the target traffic features.

6. The method according to claim 5, characterized in that, Determining the state of the grayscale traffic data based on the feature differences between the grayscale traffic features and the target traffic features includes: The flow index item corresponding to the aforementioned feature difference is taken as the target flow index item; The system detects whether the value of the feature difference exceeds a judgment threshold set for the target traffic indicator, wherein different judgment thresholds are set for different traffic indicators. If the detected value of the feature difference exceeds the judgment threshold set for the target traffic indicator, then the grayscale traffic data is determined to be in an abnormal state. If the detected value of the feature difference does not exceed the judgment threshold set for the target traffic indicator, then the grayscale traffic data is determined to be in a normal state.

7. The method according to claim 1, characterized in that, After determining the state of the grayscale traffic data by comparing the feature differences between the grayscale traffic data and the target traffic data, the method further includes: Generate a gray-to-positive inspection view report, wherein the gray-to-positive inspection view report shall at least display the feature difference information between the gray-scale traffic data and the target traffic data, as well as the status information of the gray-scale traffic data. The display format of the gray-to-positive inspection view report includes: image, table, text, voice and video.

8. The method according to claim 3, characterized in that, Based on the grayscale template, the grayscale identifier is set for the target container and the application services associated with the target container, including: The grayscale identifier is encapsulated in a target file based on the grayscale template, wherein the target file is an environment variable configuration file, a container startup command file, or a container image file; When the target container runs according to the target file, the grayscale identifier is decapsulated and set for the target container and the application services related to the target container. The application services related to the target container adjust their application running behavior according to the grayscale identifier. The application running behavior includes: enabling a preset number of log records, using the application interface of the target version, or changing the execution path of the business logic.

9. A device for determining grayscale flow state, characterized in that, include: A target construction unit is used to construct a grayscale template and a target template with a paired relationship. The grayscale template is a container template that includes a grayscale identifier and differentiated configuration information. It is used to control and record traffic processing behavior and container execution operations in a grayscale environment. The grayscale environment is an informal network environment corresponding to the grayscale identifier. The target template is a container template corresponding to a formal network environment. It is used to receive and process all actual traffic. A grayscale traffic acquisition unit is used to acquire traffic data in the grayscale environment based on the grayscale template to obtain grayscale traffic data. The target traffic acquisition unit is used to acquire traffic data in the formal network environment based on the target template to obtain target traffic data; A state determination unit is used to determine the state of the grayscale traffic data by comparing the feature differences between the grayscale traffic data and the target traffic data.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device in which the computer-readable storage medium is located performs the method for determining the grayscale traffic state as described in any one of claims 1 to 8.

11. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the grayscale traffic state determination method according to any one of claims 1 to 8.

12. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement the method for determining the grayscale traffic state of any one of claims 1 to 8.