Resource element testing method and system for simulating massive edge devices and storage medium
By deploying resource feature mirror groups in container node clusters and using simulation data to generate test data, the feasibility problem of physical host deployment when the number of edge devices is large, and effective testing and evaluation of complex edge scenarios is achieved.
Patent Information
- Application Number
- CN202311631269.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-06-03
AI Technical Summary
In the case of a large number of edge devices, there are feasibility issues in the deployment of physical hosts, making it difficult to implement testing for complex edge scenarios.
By obtaining the resource element mirror group corresponding to the target operation scenario, deploying it in the container node cluster, building a resource element test scenario, and generating test data using simulation data and machine learning algorithms to simulate resource elements of edge devices for testing.
Simulate the resource elements of massive edge devices under limited resources, solve the problem of insufficient resources and unable to verify large-scale edge scenarios, realize testing for complex edge scenarios, and improve testing efficiency and accuracy by automatically generating test cases and test data.
Smart Images

Figure CN120086121A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a method, a system and a storage medium for testing resource elements of simulating a large number of edge devices. Background Art
[0002] With the rapid development of edge computing, the number of resource elements of the edge network accessed by the edge distributed system is increasing continuously. Since various types of bottleneck problems are difficult to be discovered during small-scale testing, it becomes more and more important to test the performance and reliability of large-scale edge distributed systems, and it becomes more and more important to monitor and manage a large number of edge nodes. Therefore, a method and a system are needed to test the resource elements of these edge devices.
[0003] Currently, the traditional method for testing resource elements of edge devices includes: deploying multiple physical hosts in a laboratory environment to test the resource elements of edge devices.
[0004] However, in actual situations, due to limited resources and complex testing processes, when the number of edge devices is large, there are feasibility problems in the deployment of physical hosts, resulting in difficulties in implementing tests for complex edge scenarios. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a method, a system and a storage medium for testing resource elements of simulating a large number of edge devices to eliminate or improve one or more defects existing in the prior art. It can solve the problem that when the number of edge devices is large, there are feasibility problems in the deployment of physical hosts, resulting in difficulties in implementing tests for complex edge scenarios.
[0006] One aspect of the present invention provides a method for testing resource elements of simulating a large number of edge devices, the method including the following steps:
[0007] Obtain a resource element image group corresponding to a target operation scenario; the target operation scenario includes at least one edge device; the resource element image group includes resource element images corresponding to each edge device based on at least one edge device;
[0008] Deploy the target resource element image in a container node cluster corresponding to the target operation scenario to construct a resource element test scenario corresponding to the target operation scenario;
[0009] Obtain simulation data corresponding to the target resource element image group;
[0010] Based on the simulation data and the resource element test scenario, test the resource elements of the edge devices.
[0011] Optionally, obtaining a resource element image group corresponding to a target operation scenario includes:
[0012] Obtain the target scenario identifier corresponding to the target operation scenario;
[0013] Based on the preset correspondence between the target scenario identifier and the preset resource element mirror images corresponding to the preset scenario identifiers, determine at least one resource element mirror image corresponding to the target scenario identifier in the preset resource element mirror images;
[0014] Combine at least one resource element mirror image to obtain a resource element mirror image group.
[0015] Optionally, before obtaining the target resource element mirror image group corresponding to the target operation scenario, it further includes:
[0016] Obtain the resource elements corresponding to each edge device in the target operation scenario respectively; the resource elements include the attributes, behaviors of each edge device, or the connection relationships with other edge devices;
[0017] Based on the resource elements, construct resource element models corresponding to each edge device respectively;
[0018] Containerize and package the resource element models respectively to obtain resource element mirror images corresponding to each edge device.
[0019] Optionally, containerize and package the resource element models respectively to obtain resource element mirror images corresponding to each edge device, including:
[0020] Obtain the pre-created container files; the container files corresponding to different types of edge devices are different;
[0021] Copy the resource elements corresponding to each edge device into the corresponding type of container file to construct resource element mirror images corresponding to each edge device.
[0022] Optionally, obtain the simulation data corresponding to the target resource element mirror image group, including:
[0023] Obtain the historical data of each edge device in at least one edge device;
[0024] Obtain the pre-trained simulation data generation model;
[0025] Input the historical data into the simulation data generation model respectively to obtain the simulation data corresponding to each resource element mirror image in the target resource element mirror image group.
[0026] Optionally, obtain the pre-trained simulation data generation model, including:
[0027] Obtain the test data corresponding to each edge device;
[0028] Train a pre-created autoregressive model with test data, and adjust the model parameters of the autoregressive model according to the element characteristics of each resource element during the training process to obtain a simulation data generation model.
[0029] Another aspect of the present invention provides a resource element test system for simulating a large number of edge devices, including:
[0030] A resource service module for: obtaining a resource element image group corresponding to a target operation scenario; the target operation scenario includes at least one edge device; the resource element image group includes resource element images corresponding to each edge device based on at least one edge device; deploying the target resource element image in a container node cluster corresponding to the target operation scenario to construct a resource element test scenario corresponding to the target operation scenario;
[0031] A machine learning module for: obtaining simulation data corresponding to the target resource element image group; generating test cases and test scripts, and sending the simulation data, test cases, and test scripts to an automated test module;
[0032] An automated test module for: executing the test cases and test scripts when receiving the simulation data, test cases, and test scripts, and testing the resource elements of the edge device based on the simulation data and the resource element test scenario.
[0033] Optionally, the system further includes: a model tool module for: respectively obtaining the resource elements corresponding to each edge device in the target operation scenario; respectively constructing resource element models corresponding to each edge device based on the resource elements;
[0034] The machine learning module, connected to the model tool service module, is further used for: providing resource elements for the model tool service module.
[0035] Optionally, the system further includes: a statistical analysis module for: collecting test data in the resource element test scenario; the test data includes performance data, response time, or stability data.
[0036] Another aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps of the above-mentioned resource element test method for simulating a large number of edge devices.
[0037] The resource element testing method, system, and storage medium for simulating a large number of edge devices according to the present invention analyze the attributes, behaviors, relationships with other objects, etc. of the resource elements of different types of edge devices for the resource elements of edge devices, build models for the resource elements of each type of edge device, simulate the activities and requests of different resource elements, build images for each resource element, and deploy them in a container cluster. It can simulate the resource elements of a large number of edge devices under limited resources, solve the problem that insufficient resources cannot verify large-scale edge scenarios, and achieve testing for complex edge scenarios. At the same time, by introducing a machine learning algorithm using an autoregressive model, a large amount of test data is simulated and generated, including test data of different types or different scenarios. In the case of a large number of edge devices or diverse edge device types and a large amount of test data required for testing, problems such as insufficient test data and incomplete scenario coverage can be solved.
[0038] Furthermore, through a rule-based test case generation algorithm and a random test data generation algorithm, test cases and test data are automatically generated to perform performance, stability testing, and evaluation of an edge distributed system by means of automation, which can avoid investing a large amount of labor in complex operating scenarios and improve the testing efficiency.
[0039] Furthermore, by simulating load, communication, and fault scenarios to verify the network connection, latency, and fault scenarios between edge nodes, it can truly reflect the operating scenario, thereby improving the testing accuracy.
[0040] The additional advantages, objectives, and features of the present invention will be partially described below and will become partially apparent to those of ordinary skill in the art after studying the following text, or can be learned from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the specification and the drawings.
[0041] Those skilled in the art will understand that the objectives and advantages that can be achieved by the present invention are not limited to the above specifically described, and the above and other objectives that the present invention can achieve will be more clearly understood according to the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and do not limit the present invention. In the drawings:
[0043] Figure 1 It is a structural diagram of a resource element testing system for simulating a large number of edge devices provided by an embodiment of the present invention;
[0044] Figure 2 It is a flowchart of a resource element testing method for simulating a large number of edge devices provided by another embodiment of the present invention;
[0045] Figure 3 It is a block diagram of a resource element testing device for simulating a large number of edge devices provided by another embodiment of the present invention. Detailed implementation manners
[0046] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with the implementation manners and the accompanying drawings. Herein, the illustrative implementation manners of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0047] Herein, it should also be noted that in order to avoid obscuring the present invention due to unnecessary details, only the structures and / or processing steps closely related to the solution of the present invention are shown in the drawings, while other details less related to the present invention are omitted.
[0048] It should be emphasized that the term "including / comprising" when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0049] Herein, it should also be noted that if not otherwise specified, the term "connection" herein can not only refer to direct connection, but also represent indirect connection with an intermediate.
[0050] In the following, embodiments of the present invention will be described with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0051] The resource element testing system for simulating a large number of edge devices provided by the present application will be introduced below.
[0052] Figure 1 It is a schematic diagram of a resource element testing system for simulating a large number of edge devices provided by an embodiment of the present application. As Figure 1 shown, the system at least includes: a resource service module 110, a machine learning module 120, and an automated testing module.
[0053] The resource service module 110 is used to realize the unified management and scheduling of resources, and provide testing resources and training resources. Among them, the testing resources mainly refer to the resource element testing scenarios provided for the edge network accessed by the edge distributed system.
[0054] The edge network accessed by the edge distributed system can be used in different operation scenarios, such as the Internet of Things scenario or edge settlement collaboration, etc. Based on this, in this embodiment, taking the operation scenario of the edge network service as the main line, performance and stability models are constructed, the influencing factors of each operation scenario are analyzed, such as resource requirements, data volume requirements, or access requirements, etc., and a test scenario corresponding to the operation scenario is established. At the same time, by creating simulated loads and communication modes, the actual interactions between a large number of edge nodes are simulated, such as data transmission between edge nodes and edge distributed systems in the edge network, edge communication latency, load balancing, etc. At the same time, by configuring a load balancer, requests are evenly distributed among multiple nodes, and the network links and delays between different edge nodes are simulated through the network, so that the resource element test scenario can truly reflect the edge environment.
[0055] In this embodiment, the resource element test scenario is constructed by deploying the resource element image group corresponding to the target operation scenario in the container node cluster corresponding to the target operation scenario.
[0056] In actual implementation, the containerized architecture of the container node cluster can be designed and adjusted according to the requirements of the actual application program. This embodiment does not limit the containerized architecture of the container node cluster.
[0057] Among them, the resource element image group includes resource element images corresponding to each edge device based on at least one edge device. These resource element images are deployed and managed in the container node cluster to construct a test scenario simulating the operation scenario.
[0058] In this embodiment, the resource element image is obtained by mirror encapsulating the resource element model object of each type of edge device through containerization encapsulation technology. The base image includes but is not limited to Ubuntu, Centos, or Debian, etc. By writing a container file (Dockerfile) for the resource elements of various types of edge devices, which includes the application runtime environment, dependencies, configurations, or components of the monitoring and collection end, etc., Docker is used to convert the written container file into a container image to construct the resource element image.
[0059] Among them, the edge devices include but are not limited to hosts, network devices, or storage devices; the resource element objects include but are not limited to computing resources, network resources, storage resources, data resources, or business applications.
[0060] By determining the element type, specification, and configuration of each resource element object, analyze the characteristics of each resource element object, including but not limited to the attributes, behaviors of edge devices, or the relationships between edge devices and other edge devices, etc., clarify information such as the transmission protocol, port, working mode, and exchange relationship with other devices used by each edge device, and construct resource element objects using programming languages (such as Python, Java, or C++).
[0061] In the case where the edge device is the host, the attributes of the host include but are not limited to the host's operating system, CPU resources, memory resources, storage resources, or network interfaces, sensors, etc. The behaviors of the host include the host's ability to run various application programs and provide functions such as computing, storage, and communication. The relationships of the host include the network devices and storage devices connected by the host as the producer or consumer of data.
[0062] In the case where the edge device is a network device, network devices include routers, switches, firewalls, etc., and have attributes such as ports, protocol support, and routing tables; the behaviors of network devices include packet forwarding, filtering, and processing, and managing network traffic; the relationships of network devices include that network devices connect different hosts and other network devices, construct a network topology, and provide communication services.
[0063] In the case where the edge device is a storage device, the attributes of the storage device can be hard disks, solid-state drives, storage arrays, etc., and have attributes such as capacity, read / write speed, and reliability; the behaviors of the storage device include providing services such as file systems, block storage, or object storage for the persistent storage of data; the relationships of the storage device include that the storage device is connected to the host through the network or directly, and provides functions such as data storage and retrieval.
[0064] In this embodiment, create one or more container node clusters through the container cloud platform, use an automated orchestration tool (YAML files of Docker Compose or Kubernets) or a batch creation script to deploy a resource element image group in the container node cluster, and be able to quickly start hundreds or thousands of edge resource instances. Connect a large number of simulated edge nodes to the edge distributed system. The automated process built with the automated orchestration tool can deploy and tear down 1000 edge node instances in less than 15 minutes.
[0065] Among them, there are two strategies for connecting a large number of simulated edge nodes to the edge distributed system. The first is the agent-based method. By modifying the configuration file of the agent of the simulated edge node, information such as the address and port of the server to be connected is specified, and the simulated edge node is automatically connected to the edge distributed system when it starts. The second is the agentless approach, which usually uses protocols such as Secure Shell (SSH) and Simple Network Management Protocol (SNMP) to collect monitoring data, and calls the edge node access interface through the edge distributed system program or ssh script to batch connect the simulated edge nodes to the edge distributed system.
[0066] In this embodiment, the purpose of the resource element test scenario is to simulate the behavior, performance, and resource usage of edge devices in the target operation scenario. By deploying the resource element image in the container node cluster, the simulation and testing of edge devices can be achieved. In this way, tasks such as system testing, performance evaluation, and machine learning training are carried out in the resource element test scenario to verify the functions and performance of the system, and corresponding optimization and adjustment are made.
[0067] The construction of the resource element test scenario can help developers better understand and evaluate the edge distributed system, and conduct sufficient testing and verification before actual deployment. By simulating the real environment, potential problems and bottlenecks can be discovered, and guidance and decision-making support can be provided to ensure that the reliability and performance of the system meet the expected requirements.
[0068] Specifically, the resource service module 110 is used to: obtain the resource element image group corresponding to the target operation scenario; the target operation scenario includes at least one edge device; the resource element image group includes resource element images corresponding to each edge device in at least one edge device; deploy the target resource element image in the container node cluster corresponding to the target operation scenario to construct the resource element test scenario corresponding to the target operation scenario.
[0069] After the resource element test scenario is constructed, automated testing is controlled by the automated testing module. Before that, it is also necessary to obtain the simulation data, test cases, and test scripts required for automated testing through the machine learning module 120.
[0070] Specifically, the machine learning module 120 is used to: obtain the simulation data corresponding to the target resource element image group; generate test cases and test scripts, and send the simulation data, test cases, and test scripts to the automated testing module 130.
[0071] Since long-term stability tests are required, a large amount of simulation data needs to be generated for each type of edge device. If manual methods are used, it will result in a huge workload. Therefore, in this embodiment, a simulation data generation model trained by a machine learning algorithm, the Auto Regressive (AR) model, is used to generate simulation data. The simulation data under different operation scenarios is used to simulate different edge test scenarios, including normal working scenarios, high-load working scenarios, fault scenarios, etc., to improve test accuracy and coverage.
[0072] In this embodiment, the resource service model 110 is also used to provide a training environment for the machine learning service, including the training data required for model training.
[0073] Among them, the training data includes the historical data of each edge device. Through data cleaning, standardization, normalization, etc., the historical data is converted into training data in a format that the autoregressive model can use, and the autoregressive model is trained. The autoregressive model machine learning algorithm uses the training data as the basis for predicting future data, and a linear regression model is established to predict future data. During the training process, the parameters of the autoregressive model are adjusted according to the characteristics of each resource element to improve the quality of the generated simulation data until the model training is completed to obtain the simulation data generation model.
[0074] In this embodiment, the machine learning module 120 also automatically generates test cases and test scripts from the program code through a rule-based test case generation algorithm to reduce the workload of manual testing and improve test efficiency.
[0075] Among them, the rule-based test case generation algorithm is an automated method for generating test cases and test scripts from program code according to given test coverage criteria. The test coverage criteria and corresponding generation algorithms include but are not limited to Input Coverage, Path Coverage, or Condition Coverage, etc.
[0076] After obtaining the bionic data, test cases, and test scripts, the machine learning module 120 sends the bionic data, test cases, and test scripts to the automated test module 130. The automated test module 130 provides services such as test case management, test execution, and test task scheduling, automatically executes the test cases, and collects the test return results to reduce the workload of manual testing.
[0077] The automated test module 130 is used to: when receiving the simulation data, test cases, and test scripts, execute the test cases and test scripts, and test the resource elements of the edge device based on the simulation data and the resource element test scenarios.
[0078] In addition, in this embodiment, the resource element test system for simulating a large number of edge devices further includes a model tool module 140. The model tool module 140 is connected to the machine learning module 120 and is used to establish a resource element model of an edge device when receiving the resource elements of the edge device sent by the machine learning module 120.
[0079] Specifically, the model tool module 140 is used to: receive the resource elements corresponding to each edge device in the target operation scenario; respectively construct a resource element model corresponding to each edge device based on the resource elements.
[0080] Correspondingly, the machine learning module 120 is further used to: provide resource elements for the model tool service module.
[0081] In addition, in this embodiment, the resource element test system for simulating a large number of edge devices further includes a statistical analysis module 150, which is used to: collect test data in the resource element test scenario; the test data includes performance data, response time, or stability data.
[0082] In this embodiment, the statistical analysis module 150 collects test data in the resource element test scenario, including but not limited to performance data, response time, stability, etc.; analyzes and evaluates the performance of the edge distributed system in the operation scenario of a large number of edge nodes based on the collected test data, so that developers can discover possible problems and bottlenecks of the edge distributed system in a large number of scenarios.
[0083] Next, the resource element test method for simulating a large number of edge devices provided by this application will be introduced.
[0084] As Figure 2 shown, an embodiment of this application provides a resource element test method for simulating a large number of edge devices. This embodiment is described by taking this method as an example in the Figure 1 system shown. This method includes at least steps S201 to S204:
[0085] Step S201, obtain a resource element image group corresponding to the target operation scenario.
[0086] Among them, the target operation scenario includes at least one edge device; the resource element image group includes resource element images corresponding to each edge device among at least one edge device.
[0087] In this embodiment, the operation scenario corresponds to a scenario identifier, and the scenario identifier is used to uniquely indicate the operation scenario. After determining the target operation scenario, according to the preset relationship between the scenario identifier and the preset resource element image, determine the resource element image group corresponding to the target operation scenario.
[0088] Specifically, obtaining the resource element image group corresponding to the target operation scenario includes: obtaining the target scenario identifier corresponding to the target operation scenario; based on the preset correspondence between the target scenario identifier and the preset scenario identifier and the preset resource element images, determining at least one resource element image corresponding to the target scenario identifier in the preset resource element images; and combining the at least one resource element image to obtain the resource element image group.
[0089] Alternatively, obtaining the resource element image group corresponding to the target operation scenario includes: obtaining the target scenario identifier corresponding to the target operation scenario; based on the preset correspondence between the target scenario identifier and the preset scenario identifier and the preset resource element image group, determining the resource element image group corresponding to the target scenario identifier in the preset resource element image group.
[0090] In addition, before obtaining the target resource element image group corresponding to the target operation scenario, it is also necessary to construct a resource element model based on the resource elements corresponding to each edge device, and then perform containerization packaging on the resource element models respectively to obtain the resource element images corresponding to each edge device.
[0091] Specifically, before obtaining the target resource element image group corresponding to the target operation scenario, it also includes: respectively obtaining the resource elements corresponding to each edge device in the target operation scenario; the resource elements include the attributes, behaviors of each edge device, or the connection relationships with other edge devices; constructing resource element models corresponding to each edge device based on the resource elements respectively; and performing containerization packaging on the resource element models respectively to obtain the resource element images corresponding to each edge device.
[0092] Among them, performing containerization packaging on the resource element models respectively to obtain the resource element images corresponding to each edge device includes: obtaining the pre-created container files; the container files corresponding to different types of edge devices are different; copying the resource elements corresponding to each edge device into the corresponding type of container file to construct the resource element images corresponding to each edge device.
[0093] Step S202, deploying the target resource element images in the container node cluster corresponding to the target operation scenario to construct the resource element test scenario corresponding to the target operation scenario.
[0094] Step S203, obtaining the simulation data corresponding to the target resource element image group.
[0095] Specifically, obtaining the simulation data corresponding to the target resource element image group includes: obtaining the historical data of each edge device in at least one edge device; obtaining the pre-trained simulation data generation model; and respectively inputting the historical data into the simulation data generation model to obtain the simulation data corresponding to each resource element image in the target resource element image group.
[0096] Among them, obtaining a pre-trained simulation data generation model includes: obtaining test data corresponding to each edge device; training a pre-created autoregressive model with the test data, and adjusting the model parameters of the autoregressive model according to the element characteristics of each resource element during the training process to obtain a simulation data generation model.
[0097] Step S204: Test the resource elements of the edge device based on the simulation data and the resource element test scenario.
[0098] In summary, the resource element testing method and system for simulating a large number of edge devices provided by this application, for the resource elements of edge devices, by analyzing the attributes, behaviors, relationships with other objects, etc. of the resource elements of different types of edge devices, constructing models for the resource elements of each type of edge device, simulating the activities and requests of different resource elements, constructing images for each resource element, and deploying them in a container cluster, can simulate the resource elements of a large number of edge devices under limited resources, solve the problem that insufficient resources cannot verify large-scale edge scenarios, and achieve testing for complex edge scenarios; at the same time, by introducing the machine learning algorithm of the autoregressive model, a large number of test data are simulated and generated, including test data of different types or different scenarios. In the case of a large number of edge devices or diverse edge device types and a large amount of test data required for testing, problems such as insufficient test data and incomplete scenario coverage can be solved.
[0099] Furthermore, by means of a rule-based test case generation algorithm and a random test data generation algorithm, test cases and test data are automatically generated, and the performance and stability testing and evaluation of the edge distributed system are carried out by automated means, which can avoid investing a large amount of labor in complex operation scenarios and improve the testing efficiency.
[0100] Furthermore, by simulating load, communication, and fault scenarios, the network connection, latency, and fault scenarios between edge nodes are verified, which can truly reflect the operation scenario and thus improve the testing accuracy.
[0101] This embodiment provides a resource element testing device for simulating a large number of edge devices, as Figure 3 shown. The resource element testing device for simulating a large number of edge devices at least includes a processor 301 and a memory 302.
[0102] The processor 301 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 301 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0103] The memory 302 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 302 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 302 stores computer instructions, and the processor 301 is configured to execute the computer instructions stored in the memory 302. When the computer instructions are executed by the processor 301, the apparatus implements the method for testing resource elements of simulating a massive number of edge devices provided in the method embodiments of the present application.
[0104] In some embodiments, the apparatus for testing resource elements of simulating a massive number of edge devices may optionally further include: a peripheral device interface and at least one peripheral device. The processor 301, the memory 302, and the peripheral device interface may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface through a bus, signal lines, or a circuit board. Schematically, the peripheral devices include but are not limited to: a radio frequency circuit, a touch display screen, an audio circuit, and a power supply, etc.
[0105] Of course, the apparatus for testing resource elements of simulating a massive number of edge devices may also include fewer or more components, and this embodiment does not limit this.
[0106] Optionally, the present application also provides a computer-readable storage medium storing a computer program, which when executed by a processor implements the method for simulating resource element testing of a massive number of edge devices in the above method embodiment.
[0107] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.
[0108] Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, those of ordinary skill in the art can make other different forms of changes or variations without making creative efforts, and all of them should fall within the scope of protection of the present application.
Claims
1. A method for testing resource elements of simulating a large number of edge devices, characterized in that, the method comprises the following steps: Obtain a resource element image group corresponding to a target operation scenario; the target operation scenario includes at least one edge device; the resource element image group includes resource element images corresponding to each edge device in the at least one edge device; Deploy the target resource element images in a container node cluster corresponding to the target operation scenario to construct a resource element test scenario corresponding to the target operation scenario; Obtain simulation data corresponding to the target resource element image group; Based on the simulation data and the resource element test scenario, test the resource elements of the edge device.
2. The method for testing resource elements of simulating a large number of edge devices according to claim 1, characterized in that, the obtaining of the resource element image group corresponding to the target operation scenario includes: Obtain a target scenario identifier corresponding to the target operation scenario; Based on the target scenario identifier and a preset correspondence between the preset scenario identifier and the preset resource element images, determine at least one resource element image corresponding to the target scenario identifier in the preset resource element images; Combine the at least one resource element image to obtain the resource element image group.
3. The method for testing resource elements of simulating a large number of edge devices according to claim 1, characterized in that, before obtaining the target resource element image group corresponding to the target operation scenario, it further includes: Respectively obtain resource elements corresponding to each edge device in the target operation scenario; the resource elements include attributes, behaviors of each edge device or connection relationships with other edge devices; Based on the resource elements, respectively construct resource element models corresponding to each edge device; Respectively perform containerization encapsulation on the resource element models to obtain resource element images corresponding to each edge device.
4. The method for testing resource elements of simulating a large number of edge devices according to claim 3, characterized in that, the respectively performing containerization encapsulation on the resource element models to obtain resource element images corresponding to each edge device includes: Obtain a pre-created container file; the container files corresponding to different types of edge devices are different; Copy the resource elements corresponding to each edge device into the corresponding type of container file to construct resource element images corresponding to each edge device.
5. The method for testing resource elements of simulating a large number of edge devices according to claim 1, characterized in that, the obtaining of the simulation data corresponding to the target resource element image group includes: Obtain historical data of each edge device in the at least one edge device; Obtain a pre-trained simulation data generation model; Respectively input the historical data into the simulation data generation model to obtain simulation data corresponding to each resource element image in the target resource element image group.
6. The method for testing resource elements of simulating a large number of edge devices according to claim 5, characterized in that, the obtaining of the pre-trained simulation data generation model includes: Obtain the test data corresponding to each of the edge devices; Train a pre-created autoregressive model with the test data, and adjust the model parameters of the autoregressive model according to the feature characteristics of each resource element during the training process to obtain the simulation data generation model.
7. A resource element test system for simulating a large number of edge devices, characterized in that, the system includes: A resource service module, configured to: obtain a resource element image group corresponding to a target operation scenario; the target operation scenario includes at least one edge device; the resource element image group includes resource element images corresponding to each edge device in the at least one edge device; deploy the target resource element images in a container node cluster corresponding to the target operation scenario to construct a resource element test scenario corresponding to the target operation scenario; A machine learning module, configured to: obtain simulation data corresponding to the target resource element image group; generate test cases and test scripts, and send the simulation data, the test cases, and the test scripts to an automated test module; The automated test module is configured to: when receiving the simulation data, the test cases, and the test scripts, execute the test cases and the test scripts, and test the resource elements of the edge device based on the simulation data and the resource element test scenario.
8. The resource element test system for simulating a large number of edge devices according to claim 7, characterized in that, the system further includes: A model tool module, configured to: respectively obtain resource elements corresponding to each edge device in the target operation scenario; respectively construct resource element models corresponding to each edge device based on the resource elements; The machine learning module, connected to the model tool service module, is further configured to: provide the resource elements for the model tool service module.
9. The resource element test system for simulating a large number of edge devices according to claim 7, characterized in that, the system further includes: A statistical analysis module, configured to: collect test data in a resource element test scenario; the test data includes performance data, response time, or stability data.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, it implements the steps of the resource element test method for simulating a large number of edge devices as described in any one of claims 1 to 6.