Cross-platform multi-environment compatibility test method and device, electronic equipment and storage medium
By constructing an attribute set and an environment description vector, a three-layer heterogeneous memory graph is generated for fuzzy evaluation. This solves the problem of deviation between static script polling regression test coverage and actual field distribution in cross-platform compatibility testing, and achieves compatibility, security and predictability for cross-terminal deployment.
Patent Information
- Application Number
- CN202511485606.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-01-16
AI Technical Summary
In existing cross-platform compatibility automated testing solutions, static script polling regression test coverage deviates from the actual field distribution over time, and low-percentage environment nodes are often delayed or skipped.
By constructing attribute sets and environment description vectors, basic triples are generated and expanded into extended memory units. A time decay strategy is used to maintain the storage state, a load-weighted average is calculated, a dependency matrix is generated, a three-layer heterogeneous memory graph is constructed, fuzzy evaluation and hierarchical analysis are performed, the comprehensive risk of environment nodes is determined, and test tasks are executed based on the risk.
This improves the compatibility, security, and predictability of system deployment across terminals, ensuring that low-percentage environment nodes complete at least one necessary regression in each deployment cycle, reducing delays or skips when resources are scarce.
Smart Images

Figure CN121349880A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software testing technology, and in particular to a cross-platform, multi-environment compatibility testing method, apparatus, electronic device, and storage medium. Background Technology
[0002] Most existing cross-platform compatibility automated testing solutions in the industry are built on a centralized "desktop cloud" or "remote device farm" architecture. Operators first prepare physical machines with different hardware configurations or enable virtual machines supporting GPU passthrough in batches in the data center, and then pre-install multiple versions of operating systems and browser images on these nodes. Test scripts remotely call target nodes to execute functional scenarios through a unified scheduling entry point. The execution results and system logs are then aggregated to a big data platform for offline analysis to assess the current application's adaptability to diverse terminals.
[0003] Current desktop cloud compatibility testing typically involves building a unified resource pool using a batch of physical machines or GPU passthrough virtual machines. A one-time asset survey then selects combinations with high installation percentages for the core layer, while the remaining combinations are incorporated into the extension layer. The layering results remain largely fixed throughout the deployment cycle, relying solely on static script polling and regression testing. Terminal hardware replacements, operating system patches, and browser kernel upgrades cannot be mapped in a timely manner, causing test coverage to deviate from the actual on-site distribution over time.
[0004] Image management often employs a strategy of keeping complete system packages resident long-term, resulting in the repeated storage of the same operating system or driver layer. When a node starts up, the redundant layer needs to be downloaded again, increasing network and disk load and lengthening the first frame startup time. Logs and monitoring metrics generated during the testing phase can only be correlated with environmental information in the offline process, and the data lag of minutes to hours prevents the scheduler from dynamically adjusting the queue based on the latest load or failure rate. Low-percentage nodes lack guaranteed regression windows and are often delayed or skipped when resources are scarce. Summary of the Invention
[0005] This invention provides a cross-platform, multi-environment compatibility testing method, apparatus, electronic device, and storage medium to solve the problems of static script polling regression test coverage deviating from the actual field distribution over time, and the problem of low-percentage environment nodes being frequently delayed or skipped.
[0006] According to one aspect of the present invention, a cross-platform multi-environment compatibility testing method is provided, the method comprising:
[0007] An attribute set is constructed based on the obtained business terminal attribute information, and an image and environment description vector are constructed based on the attribute set;
[0008] Obtain test case execution logs, associate log fields with environment description vectors to generate basic triples, and expand the basic triples to obtain extended memory units; wherein, the basic triples include test target, environment index, and result identifier;
[0009] A time decay strategy is used to maintain the storage state of the extended memory unit, and a load-weighted average is calculated for each pair of test target and environment indexes to generate a dependency matrix;
[0010] The dependency matrix is split to construct a three-layer heterogeneous memory graph, and the three-layer heterogeneous memory graph is analyzed to determine the test dependency graph;
[0011] Fuzzy evaluation and hierarchical analysis are performed on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and mainstream-first and long-tail fallback test tasks are executed based on the comprehensive risk of each environment node.
[0012] According to another aspect of the present invention, a cross-platform multi-environment compatibility testing apparatus is provided, the apparatus comprising:
[0013] The environment acquisition and image construction module is used to construct an attribute set based on the acquired business terminal attribute information, and to construct an image and an environment description vector based on the attribute set.
[0014] An extended memory unit generation module is used to obtain test case execution logs, associate log fields with environment description vectors to generate basic triples, and expand the basic triples to obtain extended memory units; wherein, the basic triples include test target, environment index, and result identifier;
[0015] The dependency matrix generation module is used to maintain the storage state of the extended memory unit using a time decay strategy, and to calculate the load-weighted average value for each pair of test target and environment indexes to generate a dependency matrix.
[0016] The test dependency graph generation module is used to split the dependency matrix to construct a three-layer heterogeneous memory graph, and analyze the three-layer heterogeneous memory graph to determine the test dependency graph.
[0017] The test task execution module is used to perform fuzzy evaluation and hierarchical analysis on the environment nodes in the test dependency graph, determine the comprehensive risk of each environment node, and execute mainstream-first and long-tail fallback test tasks based on the comprehensive risk of each environment node.
[0018] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0019] At least one processor; and
[0020] A memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the cross-platform multi-environment compatibility testing method according to any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the cross-platform multi-environment compatibility testing method according to any embodiment of the present invention.
[0023] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the cross-platform multi-environment compatibility testing method as described in any embodiment of the present invention.
[0024] The technical solution of this invention constructs an attribute set based on the acquired business terminal attribute information, and constructs a mirror image and an environment description vector based on the attribute set; acquires test case execution logs, associates log fields with the environment description vectors to generate basic triples, and expands the basic triples to obtain extended memory units; wherein, the basic triples include test targets, environment indexes, and result identifiers; a time decay strategy is used to maintain the storage state of the extended memory units, and a load-weighted average is calculated for each pair of test targets and environment indexes to generate a dependency matrix; the dependency matrix is split to construct a three-layer heterogeneous memory graph, and the three-layer heterogeneous memory graph is analyzed to determine the test dependency graph; fuzzy evaluation and hierarchical analysis are performed on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and mainstream-first and long-tail fallback test tasks are executed based on the comprehensive risk of each environment node. This solves the problem that the coverage of static script polling regression tests deviates from the actual distribution over time and that low-percentage environment nodes are often delayed or skipped, thereby improving the compatibility, security, and predictability of the system across terminals.
[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a flowchart of a cross-platform multi-environment compatibility testing method provided in Embodiment 1 of the present invention;
[0028] Figure 2 This is a flowchart of a cross-platform multi-environment compatibility testing method provided in Embodiment 2 of the present invention;
[0029] Figure 3 This is a schematic diagram of a three-layer heterogeneous memory diagram provided in Embodiment 2 of the present invention;
[0030] Figure 4 This is a flowchart of a cross-platform multi-environment compatibility testing method provided in Embodiment 3 of the present invention;
[0031] Figure 5 This is a flowchart of a cross-platform, multi-environment compatibility testing method based on multi-hop memory network and fuzzy hierarchical analysis according to Embodiment 3 of the present invention.
[0032] Figure 6 This is a schematic diagram of the structure of a cross-platform multi-environment compatibility testing device according to Embodiment 4 of the present invention;
[0033] Figure 7 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. Detailed Implementation
[0034] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0035] The acquisition, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. It should be noted that the terms "first," "second," "target," and "original," etc., in the specification, claims, and accompanying drawings of this invention 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 the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising," "etc.," and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes 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.
[0036] Example 1
[0037] Figure 1 This is a flowchart illustrating a cross-platform, multi-environment compatibility testing method according to Embodiment 1 of the present invention. This embodiment is applicable to compatibility testing of cross-platform, multi-environment business terminals based on multi-hop memory networks and fuzzy hierarchical analysis. This method can be executed by a cross-platform, multi-environment compatibility testing device, which can be implemented in hardware and / or software and can be configured in any electronic device with network communication capabilities. Figure 1 As shown, the method includes:
[0038] S110. Construct an attribute set based on the obtained business terminal attribute information, and construct a mirror image and an environment description vector based on the attribute set.
[0039] In this invention, a sales terminal refers to a physical device through which an enterprise interacts with users. Security management needs to be strengthened from multiple dimensions to ensure data and operational security. The sales terminals described in this embodiment include, but are not limited to, billing systems and production systems. The attribute information of the sales terminals is obtained, including hardware model, operating system version, and browser kernel. The obtained attribute information of each sales terminal is aggregated to construct an attribute set.
[0040] In this invention, an image is a file storage format that can combine many files into a single image file. Specifically, in this embodiment, an attribute set is constructed as an image; this can be represented as follows: for the attribute set, the corresponding operating system distribution media and browser installation package are retrieved, components unrelated to compatibility are deleted to generate a base image, and driver files and unified font files matching the hardware are injected in a read-only layer to obtain a minimal image that can be directly booted.
[0041] The environment description vector refers to the structured transformation of the test environment's attribute information into quantifiable and comparable vector data, used to accurately define, reuse, and verify the consistency of the test environment. Specifically, it can be represented as follows: While generating the minimized image, a static index vector containing hardware codenames, operating system version numbers, and browser kernel numbers is written, and monitoring probes are uniformly embedded to collect CPU utilization, memory usage, disk speed, and network bandwidth at a fixed sampling period; subsequently, a container is started based on the image, resource limits are limited, and it is encapsulated as an environment snapshot object. The environment description vector is constructed by averaging the monitoring data within the most recent preset sampling window and adding the installation percentage.
[0042] S120. Obtain the test case execution log, associate the log fields with the environment description vector to generate a basic triplet, and expand the basic triplet to obtain an extended memory unit.
[0043] The test case execution log is a file that records key information about the testing process, used to track execution status and locate problems. Log fields are the specific information units that make up the log, including but not limited to container identity, test target code, image version number, and result identifier.
[0044] Within the gray-scale release windows of each system in the business terminal, continuously acquire test case execution logs arranged in ascending order of time. Based on the container identity and image version number, associate the log fields with the environment description vector to generate a basic triplet containing the test target, environment index, and result identifier. Then, add average CPU utilization, average memory usage, network peak bandwidth, and timestamp to form an extended memory unit.
[0045] S130. Use a time decay strategy to maintain the storage state of the extended memory unit, and calculate the load-weighted average value for each pair of test target and environment indexes to generate a dependency matrix.
[0046] The extended memory unit's storage state includes hot storage and cold storage. The time decay strategy can refer to reducing the weight of old data over time, simulating a "forgetting" mechanism; for example, extended memory units that have not been accessed for a long time gradually degrade from hot storage to cold storage.
[0047] The test objective can refer to cross-platform, multi-environment compatibility testing tasks, and the environment index can refer to the attribute information of each business terminal. The dependency matrix can refer to the dependency relationships between various attribute information of each business terminal.
[0048] In this embodiment of the invention, based on information such as the installed ratio of extended memory units, historical fault density, and operating load, a time decay strategy is adopted to maintain the hot and cold storage states of memory units, and a load-weighted average value is calculated for each pair of test targets and environment indexes to generate a dependency matrix.
[0049] S140. The dependency matrix is split to construct a three-layer heterogeneous memory graph, and the three-layer heterogeneous memory graph is analyzed to determine the test dependency graph.
[0050] The dependency matrix can be split according to the hardware layer, operating system layer, and browser layer to construct a three-layer heterogeneous memory graph.
[0051] After constructing the three-layer heterogeneous memory graph, it is analyzed to determine the test dependency graph. The test dependency graph describes the dependencies between hardware, operating system versions, and browsers within each terminal, as well as the dependencies between terminals. Specifically, internal analysis of the three-layer heterogeneous memory graph determines the first dependency between hardware, operating system versions, and browsers within each terminal; horizontal analysis of the three-layer heterogeneous memory graph determines the second dependency between terminals under the condition that adjacent hardware or browsers differ but operating system versions are the same. After determining the first and second dependencies, the test dependency graph is constructed.
[0052] In this embodiment of the invention, the potential resonance risk of the same operating system version on different hardware or browsers is captured by horizontal diffusion, while fault-free low-risk nodes automatically exit the high-priority area due to continuous decay, thus structurally eliminating the problem that traditional static layering cannot cover new hotspot scenarios.
[0053] S150. Perform fuzzy evaluation and hierarchical analysis on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and execute mainstream-first and long-tail fallback test tasks based on the comprehensive risk of each environment node.
[0054] In this context, an environment node refers to a specific element in the test dependency graph that represents the core components of the test environment. The test environment is a simulation platform built for software testing, including resources such as hardware, software, network, data preparation, and testing tools. An environment node is an independent point among these resources (such as a server, a database instance, or a network device), representing the basic unit on which the execution of test cases depends in the test dependency graph.
[0055] Fuzzy evaluation and hierarchical analysis can refer to the process of quantifying the risk level of each environmental node, constructing a hierarchical structure, and assigning weights in order to determine the comprehensive risk of each environmental node.
[0056] Mainstream priority can refer to generating a priority sequence of environment nodes from high to low after determining the comprehensive risk of each environment node, and then performing test tasks on environment nodes with higher priority according to the priority sequence.
[0057] Long-tail fallback refers to providing a safety net for low-priority environment nodes to prevent them from being permanently stuck or frequently delayed or skipped when resources are scarce. This ensures that low-priority environment nodes run simplified test cases at least once within a deployment cycle.
[0058] This invention provides a cross-platform, multi-environment compatibility testing method. It constructs an attribute set based on acquired terminal attribute information, and then constructs an image and an environment description vector based on the attribute set. It acquires test case execution logs, associates log fields with the environment description vectors to generate basic triples, and expands these basic triples to obtain extended memory units. Each basic triple includes a test target, an environment index, and a result identifier. A time decay strategy is used to maintain the storage state of the extended memory units, and a load-weighted average is calculated for each pair of test targets and environment indexes to generate a dependency matrix. The dependency matrix is then split to construct a three-layer heterogeneous memory graph, which is analyzed to determine the test dependency graph. Fuzzy evaluation and hierarchical analysis are performed on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and mainstream-first and long-tail fallback test tasks are executed based on the comprehensive risk of each environment node. The technical solution of this invention determines the attribute information of cross-platform multi-environment business terminals, establishes extended memory units, and introduces a time decay strategy to construct a three-layer heterogeneous memory graph to solve the problem that the coverage of static script polling regression tests deviates from the actual distribution on site over time; based on the comprehensive risk of each environmental node, mainstream priority and long-tail fallback test tasks are executed to solve the problem that low-percentage environmental nodes are often delayed or skipped.
[0059] Example 2
[0060] Figure 2 This is a flowchart of a cross-platform, multi-environment compatibility testing method provided in Embodiment 2 of the present invention. This embodiment further optimizes the aforementioned embodiments, and can be combined with various optional solutions from one or more of the above embodiments. For example... Figure 2 As shown, the method includes:
[0061] S210. Construct an attribute set based on the acquired business terminal attribute information, and construct an image and an environment description vector based on the attribute set.
[0062] This involves obtaining the hardware model, operating system version, and browser kernel of at least two business terminals, and constructing an attribute set; then constructing an image and an environment description vector based on the attribute set.
[0063] This invention first employs a two-tiered structure at the image building level: a minimized image plus a hardware optional layer. Based on a full inventory of all systems, the system creates a baseline layer for shared files within the same operating system version and browser kernel, and splits hardware drivers and font resources into several read-only additional layers. When launching a container for each hardware-operating system-browser combination, only the corresponding driver layer and the baseline layer need to be merged as needed to obtain a bootable image; the entire system package is no longer copied for each combination. This structure maintains hardware-level consistency while providing an independent update entry point for subsequent dynamic distribution of new drivers or patches.
[0064] As an optional but non-limiting implementation, the step of constructing an attribute set based on the acquired business terminal attribute information, and constructing a mirror image and environment description vector based on the attribute set, includes, but is not limited to, steps A1-A3:
[0065] Step A1: Obtain attribute information from the business terminal and construct an attribute set; wherein, the attribute information includes hardware model, operating system version, and browser kernel.
[0066] Step A2: For the attribute set, pull the corresponding operating system distribution media and browser installation package, delete components that are not related to compatibility to generate a base image, and inject the driver file and unified font file that match the business terminal in a read-only layer to obtain a minimal image that can be directly started.
[0067] Step A3: While generating the minimized image, write a static index vector and implant monitoring probes. Start the container based on the image and encapsulate it as an environment snapshot object. Construct an environment description vector by averaging the monitoring data within the preset sampling window and superimposing the installation percentage. The static index vector includes the hardware model, operating system version number, and browser kernel number.
[0068] Specifically, for each of the N business terminals, the hardware model, operating system version, and browser kernel are obtained, and an attribute set is constructed. ,in, Represents a set of hardware models. Represents a set of operating system versions. This represents a set of browser engines.
[0069] Set high frequency threshold The high-frequency combination set is extracted to ensure that the cumulative installed capacity ratio is not less than The mainstream environment then enters the subsequent image construction pipeline. The high-frequency combination set can be represented as:
[0070] .
[0071] against any combination of Pull the corresponding operating system distribution media and browser installation package, delete incompatible components, and generate a base image. ; then copy with hardware Matching driver file set With Uniform Fonts Injected in read-only mode, outputting a minimized image. The image can be directly started and maintains the same hardware and software stack as the production server room.
[0072] In generation Simultaneously write hardware code Operating system version number browser kernel number Concatenate them in a fixed order to form a static index vector. This provides a unique primary key for vectorized retrieval.
[0073] Unified embedding of monitoring probes across all mirrors Real-time collection of CPU utilization Memory usage ,disk rate Network egress bandwidth Sampling period The minimum acceptable cycle time is fixed as measured by the concurrent test benchmark: And write environment variables into the image startup script to ensure clock consistency.
[0074] The scheduling platform is invoked to start the images sequentially. Limit resource limits for each container And note parameters They are collectively encapsulated into an environment snapshot object, represented as:
[0075] .
[0076] exist recent Calculate the mean feature within each sampling window. And calculate the installed capacity ratio. Finally, an environment description vector is constructed. Environment description vector It contains three types of information: static index, real-time load, and business share, serving as the sole input to the multi-hop memory network in the next step.
[0077] This invention expands the environmental identification dimension from a simple static combination of hardware, system, and browser to a three-dimensional fusion expression of static index + real-time load + installation percentage, and writes it all at once during the image generation stage using a vectorized approach. This eliminates the need for offline joins to complete dynamic information; instead, a complete environmental description is obtained immediately upon container startup, providing millisecond-level usable data for subsequent retrieval and weight calculation, significantly reducing the update latency between environmental weights and the actual state.
[0078] S220. Obtain the test case execution log, associate the log fields with the environment description vector to generate a basic triplet, and expand the basic triplet to obtain an extended memory unit.
[0079] Specifically, the process involves obtaining test case execution logs, associating log fields in the test case execution logs with environment description vectors to generate basic triples, and then expanding the basic triples to obtain extended memory units.
[0080] As an optional but non-limiting implementation, the step of obtaining the use case execution log, associating the log fields with the environment description vector to generate basic triples, and expanding the basic triples to obtain extended memory units, includes but is not limited to steps B1-B4:
[0081] Step B1: Continuously acquire test case execution logs sorted in ascending order by time within the grayscale release window.
[0082] Step B2: Based on the correspondence between the log fields included in the test case execution log and the environment description vector, and the consistency of the image version number verification, generate an index mapping table; wherein, the log fields include container identity, test target code, image version number, and result identifier.
[0083] Step B3: Traverse the index mapping table, merge the test target, environment index, and result identifier to generate basic triples.
[0084] Step B4: Add central processing utilization, average memory usage, network peak bandwidth, and timestamp to the basic triplet to generate extended memory units.
[0085] Specifically, within the system gray-scale release window of each business terminal system, test case execution logs arranged in ascending order are continuously retrieved. The log fields contain the container ID and the test target encoding. Image version number With result identifier Based on the container ID in The environment vector was uniquely located in the middle. Then, based on the version number, the consistency of the image is verified, and an index mapping table is formed. This addresses the timing discrepancies caused by asynchronous log writing and environment modeling.
[0086] Traverse the index mapping table and... and Merge to generate basic triples ;in Corresponding system function points, Depicting the real environment of frontline sales staff Record compatibility success or failure status. Triples are written to a columnar graph storage area optimized for retrieval, laying a unified physical foundation for key-value pairs in weight calculation.
[0087] In high-concurrency scenarios, the load on containers within the same environment fluctuates dramatically over time. To capture this variation, for each... Add average CPU utilization Average memory usage Network peak bandwidth Image version number With execution timestamp To obtain extended memory units The extension enables the memory network not only to distinguish between hardware / software differences, but also to identify real-world phenomena such as the same PC being more prone to triggering compatibility defects during peak business hours than during off-peak hours.
[0088] S230. Use a time decay strategy to maintain the storage state of the extended memory unit, and calculate the load-weighted average value for each pair of test target and environment indexes to generate a dependency matrix.
[0089] As an optional but non-limiting implementation, the method employs a time decay strategy to maintain the storage state of the extended memory unit and calculates a load-weighted average for each pair of test target and environment indices to generate a dependency matrix, including but not limited to steps C1-C3:
[0090] Step C1: For extended memory units in hot storage state, obtain the fault level, fault occurrence frequency, installed ratio, and operating load, and determine the initial weights through a multi-factor combination formula.
[0091] Step C2: When multiple jumps in CPU load or mirror version transitions are detected, the initial weights are updated using a time decay strategy.
[0092] Step C3: For each pair of test target and environment indexes, collect the set of extended memory cell indexes of their bets, and generate a dependency matrix using a load-weighted averaging strategy.
[0093] Among them, those still in hot storage Read the severity of the fault (Levels 1-5) Frequency of fault occurrence in the past week Installed capacity ratio and runtime load vector The initial weights are calculated using a multi-factor combination formula. , can be represented as:
[0094] .
[0095] Push the weight of the four high scenarios (high severity, high frequency, high installation volume, and high load) to the top. upper half of the interval This allows it to be locked in the first round of multi-hop retrieval.
[0096] For situations where the image version and load curve change multiple times within a single deployment cycle for various systems in the business terminals, if the monitoring component is in the window... An increase in the combined CPU-memory utilization rate was detected internally. Or mirror the major version jump indicator The weights are immediately updated based on time decay, as follows:
[0097] ;
[0098] in The time decay coefficient, This is a real-time scaling factor. By instantly amplifying load surges or image upgrades to the weight side, the scheduler avoids continuing to rely on outdated weights.
[0099] For each pair of <test targets> Environment Index > Collect the corresponding memory unit index set A load-weighted averaging strategy is used to generate dependency matrix elements. , represented as:
[0100] ;
[0101] in, This is the load difference amplification factor; The function explicitly emphasizes the additional risk to the same objective when the load deviates from the mean. Matrix Immediately after being written to the in-memory database, it is exposed to the subsequent multi-hop memory network as the latest test target – the environmental risk map.
[0102] As an optional but non-limiting implementation, after obtaining the extended memory unit, the method may also include, but is not limited to, steps C4-C5:
[0103] Step C4: Set a survival flag for the extended memory unit and determine the cumulative fault count.
[0104] Step C5: If the interval between the current time and the most recent scheduling time exceeds a preset time interval threshold, and the cumulative fault count is zero, then the extended memory unit is stored in the cold storage area.
[0105] Among them, for expanding memory units Set survival marker And maintain the cumulative fault count. If the current time With the most recent scheduling time The interval exceeds the threshold and Then Move to cold storage area; otherwise refresh. .
[0106] When sales staff are mainly focused on matching 90% of mainstream environmental scenarios, the expansion of memory volume should be curbed without excessively sacrificing the traceability of less popular environments.
[0107] S240. The dependency matrix is split to construct a three-layer heterogeneous memory graph, and the three-layer heterogeneous memory graph is analyzed to determine the test dependency graph.
[0108] In this process, a test dependency graph is constructed, and the constructed real-time test dependency graph is used as the precise input for weight coupling and scheduling priority calculation.
[0109] As an optional but non-limiting implementation, the dependency matrix is split to construct a three-layer heterogeneous memory graph, and the three-layer heterogeneous memory graph is analyzed to determine the test dependency graph, including but not limited to steps D1-D6:
[0110] Step D1: Map the dependency matrix in layers, split all environment nodes into hardware layer, operating system layer and browser layer, and construct a three-layer heterogeneous memory graph using non-zero elements in the dependency matrix as edge weights.
[0111] Step D2: When a new test request arrives, use the environment description vector as the query factor to determine the weighted similarity between the environment description vector and each environment node, and determine the first hop score based on the non-edge weights in the relation matrix.
[0112] Step D3: Select a preset number of environment nodes based on the first hop score and construct the first hop return set.
[0113] Step D4: Based on the container load change rate, first hop score, and historical failure density of the environment nodes, filter the environment nodes in the first hop return set to determine the set of high-risk environment nodes.
[0114] Step D5: Starting from the set of high-risk environment nodes, perform a second hop lateral connection to obtain a set of target environment nodes that are adjacent to each other but have different hardware or browsers but the same operating system version.
[0115] Step D6: Determine the test dependency graph based on the set of high-risk environment nodes and the set of target environment nodes, as well as the corresponding edge relationships.
[0116] Among them, see Figure 3 Split all environment nodes to the hardware layer Operating system layer Browser layer and with The non-zero elements in the graph are used as edge weights to construct a three-layer heterogeneous memory graph. This three-layer heterogeneous memory graph is rooted at the hardware layer, with the system layer and browser layer respectively mounted to form a unified view, avoiding dimensional mismatch during cross-layer retrieval.
[0117] When a new test request Upon arrival, use the environment description vector. As a query seed; where the environment description vector is... It is an environment description vector An environment description vector. First, calculate... With each environment node Weighted similarity; then combined The inner side weight gets the first jump score , can be represented as:
[0118] ;
[0119] in For Manhattan distance in all dimensions, To satisfy the scene experience weight Depends on the amplification factor. Rating The higher the value, the better the environment. The closer to the query seed and the more similar to the target in history... The tighter the coupling. Before selecting descending order Each node serves as the first hop return set. .
[0120] right Each node Calculate the rate of change of container load Compared with historical failure density ; combine the two with Assemble into a three-component vector Feeding attention gate function Only retain scores with gating above the threshold. Node set This achieves a dual focus on high similarity and high risk.
[0121] This invention proposes and constructs a multi-hop memory network. The first-hop retrieval is based on the weighted similarity between the environment description vector and the graph nodes, and multiplied by the historical dependency edge weights to obtain the first-hop score; the attention gating function, combined with the load change rate and fault density of the nodes, filters low-risk nodes to ensure that the return set has both high relevance and high-risk characteristics.
[0122] The second hop is a horizontal connection, with Starting from the graph, we obtain a set of nodes that are adjacent to each other, even if they have different hardware or browsers but the same operating system version. The risk value is propagated along the edge weights. Lateral diffusion explicitly captures potential paths of resonant failures of the same system version under different hardware or browsers.
[0123] Weight decay and loop suppression reduction This prevents historically fault-free nodes from occupying high-priority positions for extended periods, ensuring that search focus remains on the latest anomalies.
[0124] Real-time test dependency graph aggregation, The environment nodes and their edge relationships within the graph converge to form a subgraph. At the same time, the edge weights are normalized to make .
[0125] In this embodiment of the invention, the second-hop retrieval spreads laterally along the same version of the system, enabling potential resonance defects of the same operating system under different hardware or browsers to be explicitly captured; the weight decay and loop suppression mechanism prevents historically fault-free nodes from occupying the central position for a long time, thereby maintaining the timeliness of the graph structure.
[0126] The three-layer heterogeneous memory graph superimposed with multi-hop retrieval and attention gating in this embodiment of the invention enables the potential resonance risk of the same operating system version on different hardware or browsers to be captured laterally, while fault-free low-risk nodes automatically exit the high-priority area due to continuous decay, thus structurally eliminating the problem that traditional static layering cannot cover new hotspot scenarios.
[0127] As an optional but non-limiting implementation, after splitting the dependency matrix to construct a three-layer heterogeneous memory graph and analyzing the three-layer heterogeneous memory graph to determine the test dependency graph, the method further includes:
[0128] When testing requests to update or generate new environment nodes, the edge weights of the environment nodes are updated based on the fault density gain and the neighborhood propagation coefficient, and then written back to the test dependency graph to update the test dependency graph.
[0129] Specifically, when a test request updates or generates a new environment node, the global weights are further recalculated and written back to the test dependency graph to update the graph; the weight update is represented as follows:
[0130] ;
[0131] In the formula For fault density gain, The neighborhood propagation coefficient, Indicates and A set of connected neighbors. The test dependency graph cache is refreshed immediately after the weights are written back, ensuring that the next query inherits the latest environment dynamics and risk information.
[0132] S250. Perform fuzzy evaluation and hierarchical analysis on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and execute mainstream-first and long-tail fallback test tasks based on the comprehensive risk of each environment node.
[0133] The embodiments of this invention aim to solve the problem of building a real-time updated multi-dimensional environmental risk model in a business terminal environment where hardware, operating system and browser are highly heterogeneous and their proportions change rapidly. Dynamic information such as installation proportion, operating load and historical fault density are uniformly quantified into scheduling weights, thereby achieving real-time and sufficient verification of mainstream environments within limited testing resources. At the same time, it ensures that low-proportion environments complete at least one necessary regression in each deployment cycle, so as to improve the compatibility, security and predictability of system deployment across terminals.
[0134] Example 3
[0135] Figure 4 This is a flowchart of a cross-platform, multi-environment compatibility testing method provided in Embodiment 3 of the present invention. This embodiment further optimizes the aforementioned embodiments, and can be combined with various optional solutions from one or more of the above embodiments. For example... Figure 4 As shown, the method includes:
[0136] S410 adaptively divides the membership intervals based on the installed capacity ratio and fault density, and incorporates the expert scores of each environmental node to construct a fuzzy judgment matrix.
[0137] In this process, after determining the test dependency graph, the membership intervals are adaptively divided based on the installed capacity and failure density, and the expert scores of each environment node are incorporated to construct a fuzzy judgment matrix for fuzzy evaluation of the environment nodes in the test dependency graph.
[0138] As an optional but non-limiting implementation, the method of adaptively dividing the membership interval based on the installed capacity ratio and fault density, and incorporating the expert score of each environmental node, to construct a fuzzy judgment matrix, includes but is not limited to steps E1-E3:
[0139] Step E1: Expand the compatibility metrics for each environment node in the test dependency graph to determine the set of metrics to be evaluated.
[0140] Step E2: Adaptively divide the membership intervals based on the installed capacity ratio and failure density, and determine the expert score for each indicator to be evaluated.
[0141] Step E3: Determine the fuzzy membership vector of each indicator to be evaluated based on the membership interval, and weight the fuzzy membership vector with the expert score to obtain the fuzzy judgment matrix.
[0142] Among them, the test dependency graph metrics are expanded and read. ,in For a set of environment nodes, Let it be an edge set. For each Expand its compatibility metrics set The metrics cover rendering completion rate, page load time, script error rate, etc. One metric. All. The union of sets forms the complete set of indicators to be evaluated. Fuzzy evaluation provides a unified index.
[0143] Adding runtime tags to count the number of image version changes on the same node. The sum of the standard deviations of CPU-memory fluctuations within the window enables static compatibility values to have real-time runtime semantics.
[0144] Membership interval adaptive partitioning, first based on installation ratio Compared with historical failure density Will Divided into three membership intervals Again To fine-tune the factor, it is adjusted using a linear translation method. boundary , can be represented as: This process makes active environments with frequent image upgrades or drastic load fluctuations more susceptible to entering high-risk zones.
[0145] Expert scoring is integrated with prior business knowledge, and experts in business volume and clearing fields are organized. ,right Each indicator is given a score for its contribution to the risk of accounting errors. The scoring results are composed of the following dimensions. expert vectors The prior knowledge of the business is reflected in the subsequent fuzzy judgment matrix.
[0146] Fuzzy judgment matrix soft fusion, for each indicator Calculate the fuzzy membership vector based on the aforementioned membership interval. and expert scores Soft weighting is performed to obtain the fuzzy judgment matrix. Specifically, the following formula represents the matrix elements. Calculation method:
[0147] ;
[0148] in Represents vector transpose; diagonal triplet By differentiating between three levels of risk, expert scores are only injected into high-risk areas to ensure that the scope of prior business impact is controlled.
[0149] S420. Aggregate the fuzzy judgment matrix to determine the global weight of each environment node, and determine the comprehensive risk of each environment node based on the installation ratio, global weight and operating load of each environment node.
[0150] Among them, the global weights of the indicators are obtained by top-down aggregation of matrix elements using the analytic hierarchy process. If it exists immediately backtrack Investigate the node that caused the jump, and whether it was a load or mirror change.
[0151] A vector is formed by combining the weights of all environmental nodes. and attach the generated timestamp Before writing to the scheduling center, a normalization and drift smoothing process is performed based on the following:
[0152] ;
[0153] in, This is the time smoothing coefficient; This is the weight from the previous version. The output after the above processing is... Together Archive them together to provide fine-grained input for priority coupling.
[0154] Read and Based on node number Create a hash table ,in This is the percentage of installations written. The operation ensures that subsequent calculations can simultaneously index the dependency strength, metric weight, and installation percentage fields.
[0155] Edge-level installation weighted sensitivity calculation, traversing each edge Read edge weights fuzzy weight vector With indicator failure density To highlight the high-installation environment, a percentage index amplification term is introduced into the original sensitivity framework. The corrected edge sensitivity is expressed as:
[0156] ;
[0157] Among them, parameters The installed base percentage Slight differences can be magnified into significant differences in ranking; This represents the sparse penalty for controlling fault density. The larger the value, the more likely the link is to cause accounting errors in a high-load environment.
[0158] compute nodes Failure frequency Load fluctuation Compared with the newly added percentage index .when or Temporary sensitive label The susceptibility amplification factor is rewritten as: The dual challenges of high installed capacity and high failure rate are highlighted.
[0159] Node-level comprehensive risk rollback, summary within Combined with the installed capacity ratio and business amount weighting With susceptibility factors The overall risk of the node is obtained as follows:
[0160]
[0161] coefficient satisfy To suppress oversaturation in the Sigmoid function. Because... It has been amplified by the index. mainstream environment and Niche environment The risk benchmark gap will widen to at least [missing information]. This allows for a clear stratification in the sorting process, with mandatory tests at the beginning and optional tests at the end.
[0162] S430. Based on the comprehensive risk of each environment node, generate an environment node priority sequence from high to low to execute the mainstream priority test tasks.
[0163] The aforementioned mainstream priority test task refers to executing test tasks on environment nodes with higher priority according to the environment node priority sequence. The environment node priority sequence is generated from high to low based on the comprehensive risk of each environment node. To perform mainstream priority testing tasks.
[0164] S440. When outputting the first round of test list, introduce a minimum regression period to perform long-tail fallback testing tasks.
[0165] The long-tail fallback test task refers to introducing a minimum regression cycle to ensure that low-percentage environment nodes run simplified test cases at least once within an online cycle.
[0166] To prevent the long-tail environment from permanently lagging behind, a minimum regression period is introduced. If node The most recent test time is more than [time period missing]. Even if Lower still inserted At the end, ensure that the simplified test case is run at least once in the niche environment within a deployment cycle.
[0167] This invention naturally favors mainstream environments by using an exponential amplification term based on the installed capacity ratio. Simultaneously, it ensures the testability of low-percentage nodes using a minimum regression period and a high-risk queue-jumping dual threshold, achieving coordinated scheduling that prioritizes mainstream nodes while providing a fallback for long-tail nodes. Combined with a two-level mirror structure, mainstream node images can be hot-cached long-term, while low-percentage nodes are dynamically merged into the driver layer only upon triggering, reducing bandwidth and storage consumption and balancing startup efficiency with resource conservation.
[0168] In one optional embodiment of the present invention, forward The first round of testing list consists of several nodes. (proportion coefficient) (Inversely derived from the upper limit of regression duration); for The longest node in the internal dependency chain reserves concurrent resources. To avoid bottlenecks blocking the entire system. Along with timestamps Write back to the memory bank for incremental training, schedule review and auditing with traceability, and achieve closed-loop optimization.
[0169] As an optional but non-limiting implementation, after performing fuzzy evaluation and hierarchical analysis on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and executing mainstream-first and long-tail fallback testing tasks based on the comprehensive risk of each environment node, the method may also include, but is not limited to, steps F1-F5:
[0170] Step F1: Obtain test logs and generate feedback entries.
[0171] Step F2: Based on the test target and environment description vector included in the feedback item, locate the basic triplet, determine the cumulative fault count, and record the latest anomaly time.
[0172] Step F3: When the cumulative fault count is detected to be increasing, a lightweight re-hop is triggered in the memory network. The edge weights of the environment nodes are adjusted according to the updated fault density, and the boundaries of the membership intervals are offset to update the test dependency graph and the fuzzy judgment matrix.
[0173] Step F4: Based on the updated test dependency graph and the updated fuzzy judgment matrix, update the global weight of the environment nodes to update the overall risk of the environment nodes.
[0174] Step F5: Globally normalize the overall risk of all updated environment nodes and generate a new priority sequence of environment nodes to form a closed-loop test.
[0175] Among them, see Figure 5 Online log access and feedback item generation costs Browser ID Generate feedback entries ,in For the test target, For environment vectors, To generate a timestamp.
[0176] in accordance with Locate triplet in memory bank Fault count Increment by one and record the latest anomaly time. At the same time, The entire data is written to the incremental partition to provide temporal accuracy for subsequent searches.
[0177] Rapid re-jump and attentional self-tightening, monitored After growth, a lightweight re-hop is triggered in the memory network. This is achieved using the updated fault density vector. Adjusting node attention coefficient Simultaneously transfer the weights of the connected edges Multiply This allows for the dynamic tightening of high-risk links.
[0178] Node frequency of occurrence of exception codes Write into the fuzzy model and apply the indicators. high-risk border Perform incremental offset This ensures that environments with a high incidence of malfunctions can quickly transition to high-risk subordinate areas.
[0179] S65, with a new membership vector Recalculate the fuzzy decision matrix and perform recursive hierarchical analysis to output the latest fuzzy weight vector. Simultaneously write the incremental version number. This ensures traceability in subsequent versions.
[0180] Combined with the updated dependency graph With weight For each environment node Calculate incremental risk , represented as:
[0181] ;
[0182] in As an indicator Fault density, For load vector, The global mean. This is the fault index amplification factor. satisfy .like Then the corresponding environment will be inserted into the emergency test queue. .
[0183] Comprehensive risks after updating all nodes Perform a global normalization and sorting to generate a new priority sequence. .make ,like The push scheduler then initiates the queue-jumping process and... With incremental logs All data is written back to the memory bank, forming a continuous self-learning closed loop. Trigger threshold. Adaptively adjust based on concurrent resource utilization, expressed as: ,in, For current concurrent usage, For the target concurrent water level, This is the adjustment coefficient.
[0184] Based on the above formula, the trigger threshold is lowered when resources are sufficient and automatically raised when resources are scarce, thus achieving load self-balancing.
[0185] As an optional but non-limiting implementation, after performing fuzzy evaluation and hierarchical analysis on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and executing mainstream-first and long-tail fallback testing tasks based on the comprehensive risk of each environment node, the method further includes, but is not limited to, steps G1-G6:
[0186] Step G1: Segment the installed capacity percentage and establish a mapping table between the identity of the environment node and the idle test node for each percentage segment; the percentage segments include high percentage segment, medium percentage segment and low percentage segment.
[0187] Step G2: Traverse the mapping table in descending order of the occupied areas, and adaptively adjust the allocation of environmental nodes according to the utilization rate of each occupied area.
[0188] Step G3: Before container startup, read the test dependency graph. If the environment nodes belong to the high-percentage segment, cache the image layer on the host machine in advance, hot-start the browser process and create a data volume snapshot; if the environment nodes belong to the medium-low percentage segment, perform basic preheating.
[0189] Step G4: Based on the error code, rendering frame rate, and peak time, set the error alarm threshold for each percentage segment.
[0190] Step G5: Generate test case percentage logs and prioritize consuming high percentage logs; if a critical defect occurs for the first time in an environment node in a low percentage segment, the environment node is promoted to a high percentage temporary queue and marked for priority processing.
[0191] Step G6: Continuously monitor the utilization rate of each segment and adaptively adjust the allocation of environmental nodes in each segment.
[0192] Among them, the segmented mapping of installed capacity and the locking of the scheduling starting point. low percentage segment The scheduler first establishes environment IDs only for segments with a high percentage of traffic. Idle test node mapping table The remaining segments will not occupy resources for the time being to avoid diluting the initial test window.
[0193] According to high middle Traverse the mapping table in low order. This occurs when a high percentage of the final stage is completed and cluster utilization is below [a certain threshold]. Then, allocate the largest proportion to the middle segment. The nodes; the low-percentage segment only occurs when the overall utilization rate is lower than It only starts when the high and mid sections are all completed. Each time a container is started, the corresponding image is pulled and a script set matching the percentage tag is injected to ensure a unified test path within the same installation segment and minimize differences between segments.
[0194] Read the dependency graph before container starts If a node belongs to a high-percentage segment, the image layer is cached on the host machine in advance, the browser process is hot-started, and a data volume snapshot is created to shorten the first frame loading time; for medium and low-percentage segments, only basic preheating is performed to save 10 bandwidth, reflecting the principle of prioritizing mainstream.
[0195] The system monitors exception codes, rendering frame rate, and peak execution time in real time, and sets different alarm thresholds based on the proportion of each segment: high proportion segments trigger an alarm at the 90th percentile; medium proportion segments trigger an alarm at the 95th percentile; and low proportion segments retain an alarm at the 99th percentile. These differentiated thresholds prevent occasional fluctuations in long-tail environments from disrupting the main process.
[0196] Upon completion of a test case, a record titled "Environment ID - Percentage Segment - Result" is generated and entered into a batch return queue. The scheduling center prioritizes consuming logs from high-percentage segments and reserves an independent channel for writing to the BI platform, supporting business users in creating real-time dashboards for mainstream environments.
[0197] During persistence, the fault count is written back to the memory network; if a P1 level defect occurs for the first time in a low-percentage segment, the scheduler immediately promotes the node to the temporary queue of the high-percentage segment and marks it with a preemption flag, so that it can be executed in the next round of rolling, avoiding long delays caused by rare environment-fatal faults.
[0198] Continuously monitor cluster utilization When the remaining number of tasks in the high-percentage segment Below or When the time is right, the next percentage segment will be automatically loaded; when all percentage segments are completed and When the system enters the long-tail fallback mode, it ensures that any environment among the 3000 seats executes the simplified test case at least once within a complete regression cycle.
[0199] This invention first constructs a membership vector for the compatibility index of each environment node in a fuzzy evaluation layer, and integrates expert scores to obtain a fuzzy judgment matrix. Then, it derives the global index weights through the analytic hierarchy process. The comprehensive risk calculation formula simultaneously includes an exponential amplification term for the installed capacity percentage, a business amount weight, and a susceptibility amplification factor, naturally prioritizing mainstream high-risk environments. Any low-percentage node that experiences a high-severity defect for the first time will be immediately given higher priority. The scheduler further segments and maps resources according to the installed capacity percentage. High-percentage segments are pre-warmed and cached with stricter alarm thresholds, while low-percentage segments are sequentially filled when cluster utilization is sufficient or the minimum regression cycle is reached, forming a rolling test queue with mainstream priority and long-tail fallback.
[0200] Example 4
[0201] Figure 6 This is a schematic diagram of a cross-platform, multi-environment compatibility testing device provided in Embodiment 4 of the present invention. Figure 6 As shown, the device includes:
[0202] The environment acquisition and image construction module 610 is used to construct an attribute set based on the acquired business terminal attribute information, and to construct an image and an environment description vector based on the attribute set.
[0203] The extended memory unit generation module 620 is used to obtain test case execution logs, associate log fields with environment description vectors to generate basic triples, and expand the basic triples to obtain extended memory units; wherein, the basic triples include test target, environment index and result identifier;
[0204] The dependency matrix generation module 630 is used to maintain the storage state of the extended memory unit using a time decay strategy, and to calculate the load-weighted average value for each pair of test target and environment indexes to generate a dependency matrix.
[0205] The test dependency graph generation module 640 is used to split the dependency matrix to construct a three-layer heterogeneous memory graph, and analyze the three-layer heterogeneous memory graph to determine the test dependency graph.
[0206] The test task execution module 650 is used to perform fuzzy evaluation and hierarchical analysis on the environment nodes in the test dependency graph, determine the comprehensive risk of each environment node, and execute mainstream-first and long-tail fallback test tasks based on the comprehensive risk of each environment node.
[0207] Optional, the environment acquisition and image building module is specifically used for:
[0208] The attribute information of the business terminal is acquired and an attribute set is constructed; wherein, the attribute information includes hardware model, operating system version and browser kernel;
[0209] For each attribute set, the corresponding operating system distribution media and browser installation package are retrieved. Components unrelated to compatibility are deleted to generate a base image. The driver file and unified font file matching the business terminal are injected in a read-only layer to obtain a minimal image that can be directly started.
[0210] While generating the minimized image, a static index vector is written and a monitoring probe is implanted. The container is started based on the image and encapsulated as an environment snapshot object. An environment description vector is constructed by averaging the monitoring data within a preset sampling window and superimposing the installation percentage. The static index vector includes the hardware model, operating system version number, and browser kernel number.
[0211] Optional, an extended memory cell generation module, specifically used for:
[0212] Continuously acquire test case execution logs sorted in ascending order by time within the grayscale release window;
[0213] Based on the correspondence between the log fields in the test case execution log and the environment description vector, and the consistency of the image version number verification, an index mapping table is generated; the log fields include container identity, test target code, image version number, and result identifier;
[0214] Traverse the index mapping table, merge the test target, environment index, and result identifier to generate basic triples;
[0215] Extended memory units are generated by adding central processing utilization, average memory usage, network peak bandwidth, and timestamps to the basic triplet.
[0216] Optional, a dependency matrix generation module, specifically used for:
[0217] For extended memory units in hot storage state, the fault level, fault occurrence frequency, installed ratio, and operating load are obtained, and the initial weights are determined by a multi-factor combination formula.
[0218] When multiple jumps in CPU load or mirror version transitions are detected, a time decay strategy is used to update the initial weights.
[0219] For each pair of test target and environment indexes, collect the set of extended memory cell indexes of their bets, and generate a dependency matrix using a load-weighted averaging strategy.
[0220] Optionally, after obtaining the extended memory unit, the device further includes an extended memory unit cold storage module, specifically used for:
[0221] Set a survival flag for the extended memory unit and determine the cumulative fault count;
[0222] If the interval between the current time and the most recent scheduling time exceeds a preset time interval threshold, and the cumulative fault count is zero, then the extended memory unit is stored in the cold storage area.
[0223] Optionally, the dependency graph generation module is tested, specifically used for:
[0224] The dependency matrix is mapped hierarchically, and all environment nodes are split into hardware layer, operating system layer and browser layer. The non-zero elements in the dependency matrix are used as edge weights to construct a three-layer heterogeneous memory graph.
[0225] When a new test request arrives, the environment description vector is used as a query factor to determine the weighted similarity between the environment description vector and each environment node, and the first hop score is determined based on the non-edge weights in the relation matrix.
[0226] Based on the first-hop score, a preset number of environmental nodes are selected to construct the first-hop return set;
[0227] Based on the container load change rate, first hop score, and historical failure density of the environment nodes, the environment nodes in the first hop return set are screened to determine the set of high-risk environment nodes.
[0228] Starting from the set of high-risk environment nodes, a second hop is made to connect horizontally to obtain a set of target environment nodes that are adjacent to each other but have different hardware or browsers but the same operating system version.
[0229] Based on the set of high-risk environment nodes and the set of target environment nodes, and the corresponding edge relationships, a test dependency graph is determined.
[0230] Optionally, after splitting the dependency matrix to construct a three-layer heterogeneous memory graph and analyzing the three-layer heterogeneous memory graph to determine the test dependency graph, the device further includes a test dependency graph update module, specifically used for:
[0231] When testing requests to update or generate new environment nodes, the edge weights of the environment nodes are updated based on the fault density gain and the neighborhood propagation coefficient, and then written back to the test dependency graph to update the test dependency graph.
[0232] Optional, the test task execution module, specifically used for:
[0233] The membership intervals are adaptively divided based on the installed capacity ratio and failure density, and the expert scores of each environmental node are incorporated to construct a fuzzy judgment matrix.
[0234] The fuzzy judgment matrix is aggregated to determine the global weight of each environment node, and the comprehensive risk of each environment node is determined based on the installation ratio, global weight and operating load of each environment node.
[0235] Based on the comprehensive risk of each environment node, an environment node priority sequence is generated from high to low to execute mainstream priority test tasks; wherein, the mainstream priority test tasks refer to executing test tasks on environment nodes with higher priority according to the environment node priority sequence.
[0236] When outputting the first round of test list, a minimum regression cycle is introduced to execute the long-tail fallback test task; wherein, the long-tail fallback test task refers to introducing a minimum regression cycle to ensure that low-percentage environment nodes run simplified test cases at least once within a deployment cycle.
[0237] Optionally, the test task execution module is also specifically used for:
[0238] Expand the compatibility metrics for each environment node in the test dependency graph to determine the set of metrics to be evaluated.
[0239] The membership intervals are adaptively divided based on the installed capacity ratio and failure density, and the expert score for each indicator to be evaluated is determined.
[0240] The fuzzy membership vector of each indicator to be evaluated is determined based on the membership interval, and the fuzzy membership vector is weighted with the expert score to obtain the fuzzy judgment matrix.
[0241] Optionally, after performing fuzzy evaluation and hierarchical analysis on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and executing mainstream-first and long-tail fallback testing tasks based on the comprehensive risk of each environment node, the method further includes a feedback and update module, specifically used for:
[0242] Retrieve test logs and generate feedback entries;
[0243] Based on the test objectives and environment description vectors included in the feedback items, locate the basic triplet, determine the cumulative fault count, and record the latest anomaly time;
[0244] When the cumulative fault count is detected to increase, a lightweight re-hop is triggered in the memory network. The edge weights of the environment nodes are adjusted according to the updated fault density, and the boundaries of the membership intervals are offset to update the test dependency graph and the fuzzy judgment matrix.
[0245] Based on the updated test dependency graph and the updated fuzzy judgment matrix, the global weights of the environment nodes are updated to update the overall risk of the environment nodes.
[0246] The overall risk of all updated environment nodes is globally normalized and a new priority sequence of environment nodes is generated to form a closed-loop test.
[0247] Optionally, after performing fuzzy evaluation and hierarchical analysis on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and executing mainstream-first and long-tail fallback test tasks based on the comprehensive risk of each environment node, the device further includes a scheduling execution and fallback guarantee module, specifically used for:
[0248] The installed capacity is segmented and mapped, and a mapping table is established between the identity of the environment node and the idle test node for each segment; the segment includes high segment, medium segment and low segment.
[0249] The mapping table is traversed in descending order of the occupied areas, and the allocation of environmental nodes is adaptively adjusted according to the utilization rate of each area.
[0250] Before the container starts, the test dependency graph is read. If the environment nodes belong to the high-percentage segment, the image layer is cached on the host machine in advance, the browser process is hot-started, and a data volume snapshot is created. If the environment nodes belong to the medium-low-percentage segment, basic preheating is performed.
[0251] Based on the error code, rendering frame rate, and peak time, set error alarm thresholds for each percentage segment.
[0252] Generate test case percentage logs and prioritize consuming logs from high percentage segments; if a critical defect first appears in an environment node in a low percentage segment, the environment node is promoted to a temporary queue of high percentage segments and marked for priority processing.
[0253] Continuously monitor the utilization rate of each segment and adaptively adjust the allocation of environmental nodes in each segment.
[0254] The cross-platform multi-environment compatibility testing device provided in the embodiments of the present invention can execute the cross-platform multi-environment compatibility testing method provided in any of the embodiments of the present invention, and has the corresponding functions and beneficial effects of executing the cross-platform multi-environment compatibility testing method. For details, please refer to the relevant operations of the cross-platform multi-environment compatibility testing method in the foregoing embodiments.
[0255] Example 5
[0256] Figure 7 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0257] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0258] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0259] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as cross-platform multi-environment compatibility testing methods.
[0260] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention 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 communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0261] In some embodiments, the cross-platform multi-environment compatibility testing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the cross-platform multi-environment compatibility testing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the cross-platform multi-environment compatibility testing method by any other suitable means (e.g., by means of firmware).
[0262] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.
[0263] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0264] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. 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 fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0265] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0266] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0267] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0268] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0269] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A cross-platform multi-environment compatibility testing method, characterized in that, The method comprises: According to the obtained business terminal attribute information, an attribute set is constructed, and an image and an environment description vector are constructed according to the attribute set; Obtain the use case execution log, associate the log field with the environment description vector to generate a basic triple, and extend the basic triple to obtain an extended memory unit; wherein the basic triple comprises a test target, an environment index, and a result identifier; A time decay strategy is used to maintain the storage state of the extended memory unit, and the load weighted average value of each pair of test target and environment index is calculated to generate a dependency matrix; The dependency matrix is split to construct a three-layer heterogeneous memory graph, and the three-layer heterogeneous memory graph is analyzed to determine a test dependency graph; The environment nodes in the test dependency graph are evaluated and analyzed by layers, the comprehensive risk of each environment node is determined, and the mainstream priority and long tail bottom-up test tasks are executed according to the comprehensive risk of each environment node.
2. The method of claim 1, wherein, According to the obtained business terminal attribute information, an attribute set is constructed, and an image and an environment description vector are constructed according to the attribute set, comprising: Obtain the attribute information of the business terminal and construct an attribute set; wherein the attribute information comprises a hardware model, an operating system version, and a browser kernel; For the attribute set, the corresponding operating system release medium and browser installation package are pulled, the components irrelevant to compatibility are deleted to generate a basic image, and the drive files and unified font files matched with the business terminal are injected in a read-only layer to obtain a minimized image that can be directly started; At the same time of generating the minimized image, write a static index vector and implant a monitoring probe, start a container based on the image and encapsulate it as an environment snapshot object, construct an environment description vector by averaging the monitoring data in a preset sampling window and superimposing the installation proportion; wherein the static index vector comprises a hardware model, an operating system version number, and a browser kernel number.
3. The method of claim 1, wherein, The use case execution log is obtained, the log field is associated with the environment description vector to generate a basic triple, and the basic triple is extended to obtain an extended memory unit, comprising: Continuously obtain the use case execution log arranged in ascending order of time within the gray release window; According to the correspondence between the log field included in the use case execution log and the environment description vector and the consistency of the image version number, an index mapping table is generated; wherein the log field comprises a container identity, a test target code, an image version number, and a result identifier; Iterate the index mapping table, merge the test target, environment index, and result identifier to generate a basic triple; Add the central processing utilization rate, average memory occupancy rate, network peak bandwidth, and timestamp in the basic triple to generate an extended memory unit.
4. The method of claim 1, wherein, For the extended memory unit in the hot storage state, the failure level, failure frequency, installation proportion, and running load are obtained, and the initial weight is determined by a multi-factor combination formula; The initial weight is updated by using a time decay strategy when the central processor load jumps multiple times or the mirror version transitions; For each pair of test target and environment index, a set of winning extended memory cell indexes is collected, and a dependency matrix is generated by using a load weighted average strategy.
5. The method of claim 1, wherein, After obtaining the extended memory cell, the method further comprises: Setting a survival flag for the extended memory cell and determining a fault cumulative count; If the interval between the current time and the last scheduling time exceeds a preset time interval threshold, and the fault cumulative count is zero, the extended memory cell is stored in the cold storage area.
6. The method of claim 1, wherein, The dependency matrix is split to construct a three-layer heterogeneous memory graph, and the three-layer heterogeneous memory graph is analyzed to determine a test dependency graph, including: The dependency matrix is split to construct a three-layer heterogeneous memory graph, and the three-layer heterogeneous memory graph is analyzed to determine a test dependency graph, including: When a new test request arrives, the environment description vector is used as a query factor to determine the weighted similarity between the environment description vector and each environment node, and the first hop score is determined based on the non-edge weight in the dependency matrix; A preset number of environment nodes are selected based on the first hop score to construct a first hop return set; The environment nodes in the first hop return set are screened based on the container load change rate of the environment nodes, the first hop score, and the historical fault density to determine a high-risk environment node set; The high-risk environment node set is used as a starting point for second-hop horizontal connection to obtain a target environment node set with adjacent hardware or browsers that are different but have the same operating system version. The test dependency graph is determined based on the environment nodes and corresponding edge relationships in the high-risk environment node set and the target environment node set.
7. The method of claim 1, wherein, After splitting the dependency matrix to construct a three-layer heterogeneous memory graph and analyzing the three-layer heterogeneous memory graph to determine a test dependency graph, the method further comprises: When a test request is updated or a new environment node is generated, the edge weight of the environment node is updated based on the fault density gain and the neighborhood propagation coefficient, and is written back to the test dependency graph to update the test dependency graph.
8. The method of claim 1, wherein, The fuzzy evaluation and hierarchical analysis of the environment nodes in the test dependency graph are performed to determine the comprehensive risk of each environment node, and the mainstream priority and long-tail bottom-up test tasks are executed based on the comprehensive risk of each environment node, including: The fuzzy judgment matrix is constructed by adaptively dividing the membership interval based on the installation proportion and fault density, and incorporating the expert score of each environment node; The global weight of each environment node is determined by aggregating the fuzzy judgment matrix, and the comprehensive risk of each environment node is determined based on the installation proportion, global weight, and running load of each environment node; The environment node priority sequence is generated from high to low according to the comprehensive risk of each environment node to execute the mainstream priority test task; wherein the mainstream priority test task refers to executing test tasks on environment nodes with higher priority in priority sequence. Introducing a minimum regression cycle to perform long tail bottom-up test tasks when outputting the first round test list; wherein the long tail bottom-up test task refers to introducing a minimum regression cycle to ensure that low proportion environment nodes run at least once in a online cycle. The minimum regression cycle is introduced to perform long tail bottom-up test tasks when outputting the first round test list; wherein the long tail bottom-up test task refers to introducing a minimum regression cycle to ensure that low proportion environment nodes run at least once in a online cycle.
9. The method of claim 8, wherein, The membership interval is adaptively divided according to the installed capacity proportion and the fault density, and the expert score of each environment node is integrated to construct a fuzzy judgment matrix, including: Compatibility index expansion is performed on each environment node in the test dependency graph to determine a set of to-be-evaluated indicators; The membership interval is adaptively divided according to the installed capacity proportion and the fault density, and the expert score of each to-be-evaluated indicator is determined; The fuzzy membership vector of each to-be-evaluated indicator is determined according to the membership interval, and the fuzzy membership vector and the expert score are weighted to obtain a fuzzy judgment matrix.
10. The method of claim 1, wherein, After fuzzy evaluation and analytic hierarchy process are performed on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and mainstream priority and long tail bottom-up test tasks are performed according to the comprehensive risk of each environment node, the method further includes: Obtaining test logs and generating feedback entries; According to the test target and environment description vector included in the feedback entry, the basic triplets are located, the fault cumulative count is determined, and the latest abnormal time is recorded; When the fault cumulative count is monitored to increase, a light weight rejump of the memory network is triggered, the edge weight of the environment node is adjusted according to the updated fault density, and the boundary of the membership interval is offset to update the test dependency graph and the fuzzy judgment matrix; According to the updated test dependency graph and the updated fuzzy judgment matrix, the global weight of the environment node is updated to update the comprehensive risk of the environment node; The updated comprehensive risk of all environment nodes is globally normalized to generate a new environment node priority sequence, forming a closed-loop test.
11. The method of claim 1, wherein, After fuzzy evaluation and analytic hierarchy process are performed on the environment nodes in the test dependency graph to determine the comprehensive risk of each environment node, and mainstream priority and long tail bottom-up test tasks are performed according to the comprehensive risk of each environment node, the method further includes: Segmented mapping is performed on the installed capacity proportion, and a mapping table of environment node identity and idle test nodes is established for each proportion segment; wherein the proportion segment includes a high proportion segment, a medium proportion segment, and a low proportion segment; The mapping table is traversed in the order of high and low proportion segments, and the distribution of environment nodes is adaptively adjusted according to the utilization rate of each proportion segment; The test dependency graph is read before the container starts, if the environment node belongs to the high proportion segment, the browser process is hot started in the host cache image layer in advance, and the data volume snapshot is established; if the environment node belongs to the medium or low proportion segment, the basic preheating is performed; According to the abnormal code, the rendering frame rate, and the time consumption peak value, abnormal alarm thresholds are set for each proportion segment; Test case proportion segment logs are generated, and high proportion segment logs are preferentially consumed; if a serious defect occurs in an environment node in the low proportion segment for the first time, the environment node is promoted to a high proportion segment temporary queue and marked for preferential processing; The utilization rate of each proportion segment is continuously monitored, and the distribution of environment nodes in each proportion segment is adaptively adjusted.
12. A cross-platform multi-environment compatibility testing apparatus, comprising: The device includes: An environment collection and image construction module is configured to construct an attribute set according to acquired business terminal attribute information, and construct an image and an environment description vector according to the attribute set; An extended memory unit generation module is configured to acquire a use case execution log, associate a log field with the environment description vector to generate a basic triple, and extend the basic triple to obtain an extended memory unit; the basic triple includes a test target, an environment index, and a result identifier; A dependency relationship matrix generation module is configured to maintain a storage state of the extended memory unit by using a time decay strategy, calculate a load weighted average value for each pair of test target and environment index, and generate a dependency relationship matrix; A test dependency graph generation module is configured to split the dependency relationship matrix to construct a three-layer heterogeneous memory graph, analyze the three-layer heterogeneous memory graph, and determine a test dependency graph; A test task execution module is configured to perform fuzzy evaluation and hierarchical analysis on environment nodes in the test dependency graph, determine a comprehensive risk of each environment node, and perform mainstream priority and long tail bottom-up test tasks according to the comprehensive risk of each environment node.
13. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the cross-platform multi-environment compatibility test method in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to implement the cross-platform multi-environment compatibility test method in any one of claims 1-11 when executed.
15. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is used to implement the cross-platform multi-environment compatibility test method according to any one of claims 1-11 when executed by the processor.
Citation Information
Cited By
Adaptive fuzzy test method and system based on deep learning
CN121808798A
