Platform test information generation method and device, electronic equipment and storage medium
By simulating real equipment through virtual production line equipment and virtual data acquisition equipment, platform test information is generated, which solves the problems of high hardware resource requirements and test data being easily interfered with in the R&D and testing of the IoT platform, and realizes efficient and economical test data generation.
Patent Information
- Application Number
- CN202510606556.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-10-03
AI Technical Summary
The R&D and testing of existing IoT platforms require a large amount of hardware resources and a complex production line environment, resulting in high costs, test data being susceptible to external interference, and complex operations, which affects test efficiency and accuracy.
By using virtual production line equipment and virtual data acquisition equipment to simulate real equipment, establishing the correspondence between attributes and signal points, and using programming languages to generate platform test information, hardware resource requirements are reduced and the accuracy and efficiency of test data are improved.
It reduces the cost of IoT platform R&D and testing, improves the quality and reliability of test data, simplifies the operating process, and enhances the flexibility and efficiency of testing work.
Smart Images

Figure CN120743745A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things technology, and in particular to a method, device, electronic device and storage medium for generating platform test information. Background Art
[0002] Data plays a crucial role in the modern information society. Data acquisition devices, such as sensors and data acquisition cards, are widely used in various fields, including industrial production, environmental monitoring, and healthcare. These devices collect various physical quantities and, through data transmission devices, submit this information to IoT platforms for statistical analysis. With the rapid development of IoT technology, the importance of data acquisition systems has become increasingly prominent. They not only enable interoperability between devices but also provide data support for intelligent decision-making.
[0003] During the development phase of an IoT platform, a large amount of test information is required to support version testing. Currently, this approach primarily involves connecting real physical devices and related data acquisition equipment to the platform to provide relevant test data for functional verification. However, this approach requires extensive hardware resources and complex production line environments, significantly increasing R&D and testing costs. Summary of the Invention
[0004] In view of this, multiple embodiments of the present application are dedicated to providing platform test information generation methods, devices, electronic devices and storage media, which can generate platform test information and reduce the cost of IoT platform R&D and testing.
[0005] In a first aspect, an embodiment of the present application provides a method for generating platform test information, comprising:
[0006] Receive target attributes of the virtual production line equipment; determine the target signal points of the virtual data acquisition equipment based on the target attributes of the virtual production line equipment and the target correspondence; the target correspondence is the correspondence between the attributes of the virtual production line equipment and the signal points of the virtual data acquisition equipment; generate platform test information based on the simulation data of the target attributes of the virtual production line equipment and the configuration information of the target signal points of the virtual data acquisition equipment.
[0007] Optionally, before receiving the target attributes of the virtual production line device, the method further includes: creating the virtual production line device using the application end; and configuring at least one attribute of the virtual production line device.
[0008] Optionally, the simulation data of the target attribute is determined according to the received attribute setting information.
[0009] Optionally, before receiving the target attributes of the virtual production line equipment, the method also includes: using the acquisition end to create the virtual data acquisition device corresponding to the physical data acquisition device; and for at least one physical signal point of the physical data acquisition device, configuring a signal point corresponding to the physical signal point for the virtual data acquisition device.
[0010] Optionally, the configuration information of the target signal point is determined according to the configuration information of the corresponding physical signal point of the physical data acquisition device.
[0011] Optionally, the configuration information of the physical signal point includes one or more of a device identifier, a signal point name, a signal point variable type, a signal point identifier, a signal point read / write type, and a serial number.
[0012] Optionally, the platform test information is generated based on the simulation data of the target attributes of the virtual production line equipment and the configuration information of the target signal points of the virtual data acquisition equipment, including: combining the simulation data of the target attributes and the configuration information of the target signal points through a python tool to generate the platform test information.
[0013] Optionally, the method further includes: sending the platform test information to a cache server, so that the application end obtains the platform test information from the cache server and performs a visual display of the platform test information.
[0014] In the second aspect, an embodiment of the present application also provides a platform test information generating device, including: a receiving module for receiving the target attributes of a virtual production line device; a corresponding module for determining the target signal point of a virtual data acquisition device based on the target attributes and the target correspondence of the virtual production line device; the target correspondence is the correspondence between the attributes of the virtual production line device and the signal point of the virtual data acquisition device; a generating module for generating platform test information based on the simulation data of the target attributes of the virtual production line device and the configuration information of the target signal point of the virtual data acquisition device.
[0015] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the platform test information generation method as described above.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, it can implement the platform test information generation method as described above.
[0017] The present application provides a method, device, electronic device and storage medium for generating platform test information. By using virtual production line equipment to simulate real production line equipment in an industrial production line, using virtual data acquisition equipment to simulate real data acquisition equipment, and establishing a correspondence between the attributes of the virtual production line equipment and the signal points of the virtual data acquisition equipment, the simulation data of the target attributes of the virtual production line equipment and the configuration information of the target signal points of the virtual data acquisition equipment are used to generate platform test information, thereby reducing the cost of R&D and testing of the Internet of Things platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of a method for generating platform test information provided in one embodiment of the present application.
[0019] Figure 2 A flowchart for sending simulated data of target attributes of virtual production line equipment is provided for one embodiment of the present application.
[0020] Figure 3 An application scenario diagram of the platform test information generation method provided in one embodiment of the present application.
[0021] Figure 4 A schematic diagram of constructing simulation data of target attributes of virtual production line equipment provided in one embodiment of the present application.
[0022] Figure 5 This is a Python message format diagram corresponding to the platform test information provided in one embodiment of the present application.
[0023] Figure 6 A Python tool execution flowchart is provided for one embodiment of the present application.
[0024] Figure 7 This is a Python message result diagram corresponding to the platform test information provided in one embodiment of the present application.
[0025] Figure 8 A diagram showing the simulation data effects of target attributes of virtual production line equipment provided in one embodiment of the present application.
[0026] Figure 9 This is a diagram showing the effect of using energy consumption simulation data in a production line energy consumption management module provided in one embodiment of the present application.
[0027] Figure 10 This is a diagram showing the device simulation status display effect in a production line energy consumption management module provided in one embodiment of the present application.
[0028] Figure 11 A business scenario flowchart of a platform test information generation method provided in one embodiment of the present application.
[0029] Figure 12 A schematic diagram of signal types of virtual production line equipment provided for one embodiment of the present application.
[0030] Figure 13 A module diagram of a platform test information generating device provided in one embodiment of the present application.
[0031] Figure 14 A schematic diagram of an electronic device provided in accordance with one embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0033] In today's information society, data has become a critical resource. Data acquisition devices, such as sensors and data acquisition cards, are widely used in various fields, including industrial production, environmental monitoring, and healthcare. These devices can collect various physical quantities, such as temperature, humidity, and pressure. This collected data can be sent to the Internet of Things (IoT) platform via data transmission equipment. After receiving this data, the IoT platform can perform statistics and analysis to support decision-making in various fields.
[0034] During the R&D phase of an IoT platform, version testing requires extensive production line data. Related technologies typically use real physical devices and related data acquisition equipment to connect to the IoT platform, providing test data for functional verification of the IoT platform. Data transmission technologies include both wired and wireless transmission. Wired transmission methods include RS232, RS485, and CAN, while wireless transmission methods include WiFi, Bluetooth, and Zigbee.
[0035] However, there are some problems with the test data construction methods (i.e., platform test information generation methods) in these related technologies. First, these methods require a large amount of hardware resources and related production line environments, which will increase the cost of R&D testing, because the procurement and maintenance of hardware equipment require a large amount of money. Secondly, during the data transmission process, these methods are easily interfered with by external factors. For example, electromagnetic interference and temperature changes may affect the accuracy and reliability of data transmission. This will cause errors in the test data, thereby affecting the results of the platform function verification. In addition, the operation process is relatively complicated, requiring testers to have a high level of hardware equipment usage capabilities. This not only increases the training cost of testers, but also limits the flexibility and efficiency of testing work.
[0036] In view of the above problems, this application proposes an innovative test data construction method. This method realizes the simulation construction of test data by combining a programming language with relevant data acquisition tools. This method can improve the efficiency and accuracy of test data construction while reducing the demand and loss of hardware resources. Through programming languages, this method can simulate the data acquisition process of various physical quantities without the need for actual hardware equipment. At the same time, data acquisition tools can help us generate test data more accurately. This not only reduces the cost of R&D testing, but also improves the quality and reliability of test data.
[0037] Furthermore, the method proposed in this application is also simpler to operate. Testers do not need to be able to use complex hardware equipment; they only need to master basic programming skills and how to use data collection tools. This significantly reduces the training costs of testers and also improves the flexibility and efficiency of testing work. The test data construction method proposed in this application provides a more efficient, economical, and reliable solution for the R&D and testing of IoT platforms.
[0038] See also Figure 1 , Figure 1 A flowchart of a method for generating platform test information provided in one embodiment of the present application.
[0039] One embodiment of the present application provides a method for generating platform test information. The platform test information generation method can be applied to a platform test information generation device. The platform test information generation device can be an electronic device with certain computing capabilities. The electronic device can include a controller and a memory. Of course, in some embodiments, the platform test information generation device can also refer to a program module running in the electronic device. The platform test information generation method can include steps S110 to S130.
[0040] Step S110: Receive target attributes of virtual production line equipment.
[0041] Step S120: determining target signal points of the virtual data acquisition device according to the target attributes and target correspondence of the virtual production line device; the target correspondence is the correspondence between the attributes of the virtual production line device and the signal points of the virtual data acquisition device.
[0042] Step S130: Generate platform test information based on the simulation data of the target attributes of the virtual production line equipment and the configuration information of the target signal points of the virtual data acquisition equipment.
[0043] In this embodiment, the platform test information may be a type of information required for version testing of the IoT platform. The platform test information may include production data generated during the operation of an industrial production line. The IoT platform may be a platform for collecting, storing, processing, analyzing, and applying various types of production data generated during the operation of an industrial production line. Virtual production line equipment may be a program module in the IoT platform used to simulate real production line equipment on an industrial production line. Virtual production line equipment can simulate a variety of information about real production line equipment, such as the workshop to which it belongs, the production line to which it belongs, the workstation where it is located, the equipment type, attributes, etc. The attributes of virtual production line equipment may include multiple types, such as energy consumption attributes, status attributes, etc. For example, energy consumption attributes may include electricity, gas, water, etc., and status attributes may include power on, power off, sleep, wake up, etc.
[0044] See also Figure 12 , Figure 12 A schematic diagram of signal types of a virtual production line device provided in one embodiment of the present application. Figure 12 As shown, in a specific application scenario, the signal types of the virtual production line equipment may include equipment power signals (as an example of energy consumption attributes), equipment gas volume signals (as an example of energy consumption attributes), and equipment attribute signals (as an example of status attributes).
[0045] A virtual data acquisition device can be a program module in an IoT platform that simulates a real data acquisition device. When collecting data from real production line equipment on an industrial production line, the real data acquisition device can collect data on different attributes of the real production line equipment through different physical signal points. The physical signal points of the real data acquisition device correspond one-to-one with the attributes of the real production line equipment. For example, the real data acquisition device can collect power data of the real production line equipment through physical signal point 1 and collect power-on data of the real production line equipment through physical signal point 2. The virtual data acquisition device can simulate the physical signal points of the real data acquisition device through different signal points. The signal points of the virtual acquisition device correspond one-to-one with the physical signal points of the real data acquisition device.
[0046] The simulation data of the target attribute of the virtual production line device can be a data representation used to quantify the energy consumption attribute or classify the state attribute. For example, when the target attribute of the virtual production line device is power, the simulation data of the target attribute can be 50 kWh; when the target attribute of the virtual production line device is power on, the simulation data of the target attribute can be 1 or 0, where 1 can represent that the virtual production line device is in the power on state and 0 can represent that the virtual production line device is in the power off state. The configuration information of the target signal point of the virtual data acquisition device can be determined based on the configuration information of the physical signal point of the real data acquisition device corresponding to the target signal point of the virtual data acquisition device.
[0047] The platform test information generating device can receive the target attributes of the virtual production line equipment according to the requirements of the Internet of Things platform test. For example, when the requirements of the Internet of Things platform test are to test the function of the Internet of Things platform to collect the power data of the real production line equipment on the industrial production line, the target attribute of the virtual production line equipment can be power. Since the virtual production line equipment can simulate the attributes of the real production line equipment, and the attributes of the real production line equipment correspond one-to-one with the physical signal points of the real data acquisition equipment, and the physical signal points of the real data acquisition equipment correspond one-to-one with the signal points of the virtual acquisition equipment, the platform test information generating device can determine the signal point of the corresponding virtual acquisition equipment as the target signal point based on the target attribute of power. The platform test information generating device can receive the simulation data of the target attribute of power and the configuration information of the target signal point of the corresponding virtual data acquisition equipment and process them using python tools to generate corresponding platform test information.
[0048] In multiple implementations provided in the present application, by using virtual production line equipment in the Internet of Things platform to simulate real production line equipment in an industrial production line, using virtual data acquisition equipment in the Internet of Things platform to simulate real data acquisition equipment, and by establishing a correspondence between the attributes of the virtual production line equipment and the signal points of the virtual data acquisition equipment, receiving simulation data of the target attributes of the virtual production line equipment and configuration information of the target signal points of the virtual data acquisition equipment to generate platform test information, the cost of R&D and testing of the Internet of Things platform is reduced.
[0049] One embodiment of the present application provides an example application scenario of a platform test information generation method. The platform test information generation method is applied to a platform test information generation device to reduce the cost of IoT platform R&D testing and improve the efficiency of platform test information generation.
[0050] See also Figure 3 , Figure 3 This is an application scenario diagram of the platform test information generation method provided by one embodiment of this application. Figure 3As shown, in a specific application scenario, the platform test information generation device can send simulated data of the device energy consumption data and device status attribute data of the virtual production line equipment (as an example of simulated data of the target attributes of the virtual production line equipment) to a Redis server (as an example of a cache server). The MISP edge platform (as an example of an application end) can use the energy management module to visualize and manage the received production line energy consumption information and device control information (as an example of platform test information). The device energy consumption data includes simulated data for different energy consumption types, such as electricity data, gas data, and water data, which are used to characterize the consumption of electricity, gas resources, and water resources by the equipment during the production process. The device status attribute data includes simulated data for different operating states, such as power on, power off, sleep, and wake-up states, which are used to characterize the state changes of the equipment under different operating modes. These simulated data can be uniformly pushed to the Redis server through the simulated data sending module to achieve data caching and efficient reading. The MISP edge platform (as an example of an application end) can use the energy management module to visualize and manage the received production line energy consumption information and device control information (as an example of platform test information). Specifically, the energy consumption management module of the MISP edge platform can include a production line energy consumption display interface and a device control interface. The production line energy consumption display interface is used to display the consumption of electricity, gas, and water, helping users to intuitively understand the energy consumption characteristics of the virtual production line; the device control interface is used to display the device status information of power on, power off, sleep, and wake up, supporting users to simulate monitoring and management of device status.
[0051] In this application scenario example, by calling the platform test information generation device to collect and process the energy consumption data and status data of the production line equipment, the cost of R&D and testing of the Internet of Things platform can be reduced.
[0052] In some embodiments, before receiving the target attributes of the virtual production line device, the method may further include: creating the virtual production line device using an application end; and configuring at least one attribute of the virtual production line device.
[0053] See also Figure 2 , Figure 2 This is a flowchart of sending simulation data of target attributes of virtual production line equipment provided by one embodiment of the present application. Figure 2As shown, in a specific application scenario, the test tool (as an example of a platform test information generating device) obtains the production line equipment information of production line equipment 1 (as an example of a virtual production line equipment) and production line equipment 2 (as an example of a virtual production line equipment) in the platform to be tested (as an example of an application end), as well as the data acquisition equipment information, task group information, and signal variable information of the data acquisition equipment (as an example of an acquisition end). It can set the simulated signal real-time data (as an example of simulated data of the target attribute) for the production line equipment 1 and the production line equipment 2 in the platform to be tested, and obtain the simulated data of the target attribute of the virtual production line equipment and the configuration information of the target signal point of the virtual data acquisition device according to the preset correspondence between the obtained production line equipment information and the signal variable information, and generate platform test information. Then, the test tool can link to the MQTT server, send the generated platform test information to the MQTT server in the form of MQTT information, and store the signal point value information (as an example of platform test information) in the Redis database (as an example of a cache server), and finally realize visual display on the platform to be tested.
[0054] The application end can be an interface or tool for the IoT platform to interact with users of the IoT platform. The application end can manage and configure the created virtual production line equipment. In addition, the application end can also receive data from the virtual production line equipment and perform storage, analysis, visualization and other processing. Before receiving the target attribute of the virtual production line equipment, the platform test information generation device can use the application end to create the virtual production line equipment and configure at least one attribute of the virtual production line equipment. The target attribute of the virtual production line equipment can be one of the at least one attribute. For example, the platform test information generation device can use the application end to configure the power and gas volume of the virtual production line equipment. The target attribute of the virtual production line equipment can be power or gas volume.
[0055] This embodiment creates the virtual production line device using the application end and configures at least one attribute of the virtual production line device before receiving the target attributes of the virtual production line device, thereby providing necessary preliminary conditions for receiving the target attributes and improving the efficiency of platform test information generation.
[0056] In some implementations, the simulation data of the target attribute may be determined according to received attribute setting information.
[0057] See also Figure 4 , Figure 4 A schematic diagram of constructing simulation data of target attributes of virtual production line equipment provided in one embodiment of the present application. Figure 4As shown, in a specific application scenario, the welding production line equipment attribute real-time signal data construction tool (as an example of a platform test information generation device) queries the "power on" attribute (as an example of a target attribute of a virtual production line device) in the "loading station" of the "energy consumption production line verification" line in the "energy consumption test workshop" at the corresponding factory location from the MISP edge platform (as an example of an application end). Then, it can receive the user's viewing instruction through the "view attribute details" control to display the task group, variable name, attribute value source, and other information corresponding to the "power on" attribute. Then, the welding production line equipment attribute real-time signal data construction tool can receive the real-time data of the "power on" attribute input by the user through the input control to the right of "real-time data" (as an example of simulated data of the target attribute), and receive the user's sending instruction through the "send real-time data" control to send the real-time data of the "power on" attribute to the MISP edge platform (as an example of an application end).
[0058] This implementation reduces the cost of IoT platform development and testing by receiving user-defined attribute configuration information to determine simulated data for the target attribute. Furthermore, users can conveniently enter simulated data through the application rather than directly configuring data in the code, reducing the cost and difficulty of code maintenance.
[0059] In some embodiments, before receiving the target attributes of the virtual production line device, the method may further include: using the acquisition terminal to create the virtual data acquisition device corresponding to the physical data acquisition device; and for at least one physical signal point of the physical data acquisition device, configuring a signal point corresponding to the physical signal point for the virtual data acquisition device.
[0060] In this embodiment, before receiving the target attributes of the virtual production line equipment, the platform test information generation device can use the acquisition end to create the virtual data acquisition device corresponding to the physical data acquisition device. The acquisition end is the data acquisition end of the Internet of Things platform. The acquisition end can be an interface or tool for collecting and transmitting data in the Internet of Things platform. The acquisition end can collect various data of real production line equipment in the industrial production line through physical data acquisition devices such as sensors or data acquisition cards, and transmit these data to the application end of the Internet of Things platform for further processing and analysis.
[0061] Before receiving the target attributes of the virtual production line equipment, the platform test information generation device can use the acquisition terminal to create the virtual data acquisition device corresponding to the physical data acquisition device. In some embodiments, for example, the physical data acquisition device can be a sensor, and the sensor can collect various data of the real production line equipment through multiple physical signal points. For example, physical signal point 1 can be used to collect the power data of the real production line equipment, and physical data point 2 can be used to collect the gas volume data of the real production line equipment. The platform test information generation device can configure the signal point corresponding to the physical signal point for the virtual data acquisition device with respect to at least one physical signal point of the sensor. For example, the platform test information generation device can configure signal point a for the virtual data acquisition device with respect to the physical signal point 1 of the sensor. The platform test information generation device can configure signal point b for the virtual data acquisition device with respect to the physical signal point 2 of the sensor. The platform test information generating device can configure task groups and signal point variables for the signal points a and b. For example, the signal point variable of the signal point a can be configured with a signal point identifier representing electricity data, and the signal point variable of the signal point b can be configured with a signal point identifier representing gas volume data. The task groups of the signal points a and b can be configured as energy consumption task groups.
[0062] After configuring the virtual data acquisition device with a signal point corresponding to the physical signal point, the platform test information generation device can bind the signal point to the attributes of the virtual production line device. For example, after configuring the signal point variable of signal point a with a signal point identifier representing power data, the platform test information generation device can bind signal point a to the power attribute of the virtual production line device, thereby forming a corresponding relationship between signal point a and the power attribute of the virtual production line device. There is a one-to-one correspondence between the signal points of the virtual data acquisition device and the attributes of the virtual production line device.
[0063] This embodiment uses the acquisition end to create the virtual data acquisition device corresponding to the physical data acquisition device, and configures a signal point corresponding to the physical signal point for the virtual data acquisition device for at least one physical signal point of the physical data acquisition device. This allows the signal point of the virtual data acquisition device to form a correspondence with the attributes of the virtual production line device, thereby improving the efficiency and accuracy of platform test information generation.
[0064] In some implementations, the configuration information of the target signal point is determined based on the configuration information of a corresponding physical signal point of the physical data acquisition device.
[0065] In this embodiment, the platform test information generation device can determine the target signal point of the virtual data acquisition device based on the target attribute and target correspondence of the virtual production line device. For example, the target attribute of the virtual production line device can be power, and signal point a of the virtual data acquisition device is configured with a signal point identifier representing power data. A target correspondence is formed between the power and signal point a of the virtual data acquisition device. The platform test information generation device can then determine signal point a as the target signal point.
[0066] After the platform test information generating device determines signal point a as the target signal point, it can determine the corresponding entity signal point of the entity data acquisition device based on the signal point identifier representing the power data of signal point a. The configuration information of the entity signal point may include multiple types of configuration information, and the configuration information of the target signal point may be at least one of the multiple types of configuration information.
[0067] This embodiment determines the configuration information of the target signal point through the correspondence between the target signal point and the physical data acquisition device. It can accurately locate the target signal point of the virtual data acquisition device corresponding to the target attribute according to the target attribute of the virtual production line device, and determine the configuration information of the target signal point, thereby improving the efficiency and accuracy of platform test information generation. Since the configuration information of the target signal point is determined based on the configuration information of the corresponding physical signal point of the physical data acquisition device, it can be closer to the test effect of the physical signal point of the physical data acquisition device during the platform test process, and can eliminate the user's manual configuration process, reducing the time cost and configuration difficulty of the configuration process, and improving test efficiency and test results.
[0068] In some implementations, the configuration information of the physical signal point includes one or more of a device identifier, a signal point name, a signal point variable type, a signal point identifier, a signal point read / write type, and a serial number.
[0069] See also Figure 5 、 Figure 6 、 Figure 7 , Figure 5 The Python message format diagram corresponding to the platform test information provided in one embodiment of this application is as follows: Figure 6 The following is a flowchart of a Python tool execution provided for one embodiment of the present application: Figure 7 This is a Python message result diagram corresponding to the platform test information provided in one embodiment of the present application.
[0070] In this embodiment, the device identifier, signal point name, signal point variable type, signal point identifier, signal point read / write type and serial number of the physical signal point correspond to Figure 5、 Figure 6 、 Figure 7 In "deviceId", "pointName", "point", "pointId", "RWType", "series". Figure 5 、 Figure 6 、 Figure 7 The "pointValue" in it can be the real-time data of the attribute corresponding to the physical signal point set by the user, and the "timestamp" can be the timestamp corresponding to the real-time data. The configuration information of the physical signal point may include one or more of the above information. For example, the device identifier can be the identifier of the physical data acquisition device where the physical signal point is located, the signal point identifier can be the identification information of the physical signal point, the signal point variable type can form a corresponding relationship with the attribute of the virtual production line device, and the signal point read and write type can indicate whether the physical signal point supports read and write operations.
[0071] In some embodiments, the platform test information is generated based on the simulation data of the target attributes of the virtual production line equipment and the configuration information of the target signal points of the virtual data acquisition equipment, including: combining the simulation data of the target attributes and the configuration information of the target signal points through a python tool to generate the platform test information.
[0072] See also Figure 6 , Figure 6 The following is a flowchart of the Python tool execution provided by one embodiment of the present application. In a specific application scenario, such as Figure 6 As shown, after receiving the data acquisition configuration information provided by the data acquisition configuration information source (as an example of the configuration information of the target signal point of the virtual data acquisition device) and various types of simulation data of the virtual production line equipment (as an example of the simulation data of the target attribute), the platform test information generation device can complete the generation and sending of the platform test information through the following steps based on the execution process shown in the figure.
[0073] First, the platform test information generation device constructs various types of simulation data based on the configuration information sources of sensor-type data acquisition equipment and the data acquisition software system platform, combining energy consumption data such as temperature, humidity, pressure, gas volume, electricity, and water volume, as well as equipment operating states such as power on, power off, sleep, and wake-up. The above-mentioned data acquisition equipment includes but is not limited to data acquisition card devices, network protocol data devices, and portable data devices. The data acquisition software platform includes a general management platform, a development interface platform, a data visualization platform, and a mobile management platform. Data source configuration is achieved by combining hardware equipment manuals and software interface documentation.
[0074] Then, the platform test information generation device attempts to establish an MQTT connection based on the configured MQTT proxy server information, including the server address, port number, and hold time. If the connection fails, a failure message is returned; if the connection is successful, based on the data acquisition configuration information and various types of simulation data, an MQTT format message data body is generated according to the structural example shown on the right side of the figure and converted into a recognizable JSON format message. For example, the generated data body includes "deviceId", "deviceName", "groupId", "groupName", "series", and a nested "data" array, which contains fields such as "pointId", "pointName", "pointValue", "RWType", and "timestamp".
[0075] Furthermore, the platform test information generation device retrieves the preset message body information, randomly generates a unique client ID, and sends an MQTT message containing the complete JSON message content to the target proxy server. Successfully sent messages are stored in a Redis database for subsequent test verification and result tracking. If message generation or sending fails, a failure prompt is returned.
[0076] This implementation effectively utilizes Python tools to implement data combination and format generation through the illustrated process, and combines MQTT message push with Redis data storage to automatically generate test information for virtual production line equipment and virtual data acquisition equipment. This improves the data preparation efficiency and verification coverage capabilities of the IoT platform during the R&D and testing process, and reduces the cost of relying on real equipment testing.
[0077] In some implementations, the method further includes: sending the platform test information to a cache server, so that the application end obtains the platform test information from the cache server and performs a visual display of the platform test information.
[0078] See also Figure 8 、 Figure 9 、 Figure 10 , Figure 8 This is a simulation data effect display diagram of the target attributes of the virtual production line equipment provided by one embodiment of the present application. Figure 9 This is a diagram showing the effect of using energy consumption simulation data in a production line energy consumption management module provided in one embodiment of the present application. Figure 10 This is a diagram showing the device simulation status display effect in a production line energy consumption management module provided in one embodiment of the present application.
[0079] In this embodiment, after generating the platform test information, the platform test information generating device can send the platform test information to the cache server, and according to the actual needs of the user, use the application end to obtain the platform test information from the cache server and perform a visual display of the platform test information. For example, when a user needs to view an attribute of a real production line device, such as Figure 8 As shown in “Power on”, the platform test information generating device can use the application end to obtain the platform test information corresponding to the attribute of the real production line equipment from the cache server, and perform a visual display of the platform test information.
[0080] In some embodiments, the platform test information generating device can also process a large amount of platform test information obtained from the cache server and display it in an interface chart, such as the total power consumption, total gas consumption and other energy consumption data of the production line where the real production line equipment is located, corresponding to Figure 9 In some embodiments, the platform test information generating device can also manage the virtual production line equipment corresponding to the platform test information after visually displaying the platform test information. For example, the platform test information generating device can Figure 10 Switch the status of different virtual production line devices in the "Energy Consumption Test Workshop" shown in the figure, such as "On" or "Offline", and verify the triggering effect of the "Association Strategy" of different virtual production line devices in different states.
[0081] This embodiment stores the platform test information in a cache server and uses the application end to obtain the platform test information in the cache server to achieve visual display of the platform test information. It can display energy consumption data in an interface chart and manage virtual production line equipment, thereby improving the efficiency of IoT platform functional testing.
[0082] See also Figure 11 , Figure 11 This is a business scenario flow chart of a method for generating platform test information provided in one embodiment of this application. Figure 11 As shown in the figure, in a specific application scenario, after the platform test information generation device creates an energy-consuming device (as an example of a virtual production line device) at the MISP edge end (as an example of an application end), it can configure data acquisition link information and device attributes for the energy-consuming device. The data acquisition link information includes connection parameters for associating data acquisition devices, and the device attributes include information such as the device's identification, model, installation location, and management ownership.
[0083] At the same time, a data acquisition device (an example of a virtual data acquisition device) is created on the MISP data acquisition terminal (an example of an acquisition terminal) and task groups and signal point variables are configured for the data acquisition device. The task group is used to organize and manage the acquisition tasks of multiple signal points, and the signal point variables are used to describe the temperature, humidity, pressure, gas volume, electricity volume, water volume, and other data collected by various sensors.
[0084] Subsequently, the platform test information generation device can bind the device attributes of the energy-consuming device to the signal point variables of the data acquisition device, forming a data correspondence between the energy-consuming device and the data acquisition device. The platform test information generation device then supports the selection of a database test environment, such as MySQL or ClickHouse, to store the collected test data.
[0085] During the data flow process, the platform test information generation device can obtain the bound point attributes of the energy-consuming equipment through real-time data collection based on the above-mentioned binding relationship, and obtain the data acquisition configuration information of the data acquisition equipment based on the correspondence between the bound point attributes and the signal point variables. The platform test information generation device further receives real-time data set by the user (as an example of simulated data of the target attribute) and generates test data (as an example of platform test information) based on the data acquisition configuration information and real-time data.
[0086] The platform test information generation device can send the generated test data via MQTT subscription messages to Redis (as an example of a cache server) for subsequent data reading and verification. Finally, users log in to the MISP system (as an example of an IoT platform) and can view the corresponding data information in the energy consumption management module or BOM management module, including real-time energy consumption data, equipment status data, binding relationship data, etc., to achieve a comprehensive test of the virtual production line energy consumption management and equipment data verification functions.
[0087] See also Figure 13 , Figure 13 A schematic diagram of a module of a platform test information generation device provided for one embodiment of the present application. One embodiment of the present application also provides a platform test information generation device, comprising: a receiving module for receiving target attributes of a virtual production line device; a corresponding module for determining a target signal point of a virtual data acquisition device based on the target attributes of the virtual production line device and a target correspondence; the target correspondence is a correspondence between the attributes of the virtual production line device and the signal points of the virtual data acquisition device; and a generating module for generating platform test information based on simulation data of the target attributes of the virtual production line device and configuration information of the target signal points of the virtual data acquisition device.
[0088] In this embodiment, the specific functions and effects achieved by the platform test information generating device can be explained by referring to other embodiments of the present application and will not be repeated here.
[0089] See also Figure 14 , Figure 14 A schematic diagram of an electronic device provided for one embodiment of the present application. This embodiment of the present application may provide an electronic device comprising: a memory, and one or more processors communicatively coupled to the memory; the memory storing instructions executable by the one or more processors, the instructions being executed by the one or more processors to cause the one or more processors to implement the aforementioned platform test information generation method.
[0090] In some embodiments, the electronic device may include a processor, a storage medium, and a communication interface connected by a system bus. The storage medium may store a related computer program.
[0091] The embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the processor implements the platform test information generating method as described above.
[0092] The user information or user account information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, etc.) involved in multiple implementation methods of this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0093] It should be understood that the specific examples herein are only intended to help those skilled in the art better understand the embodiments of the present application, rather than to limit the scope of the present invention.
[0094] It can be understood that in the various implementation methods of this application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation method of this application.
[0095] It can be understood that the various embodiments described in this application can be implemented individually or in combination, and the embodiments of this application are not limited to this.
[0096] Unless otherwise indicated, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art in the technical field of the present application. The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit the scope of this application. The term "and / or" used in this application includes any and all combinations of one or more related listed items. The singular forms "a", "above", and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise.
[0097] It is understood that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above-mentioned method embodiment can be completed by hardware integrated logic circuits in the processor or software instructions. The above-mentioned processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above-mentioned method.
[0098] It will be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0099] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0100] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices and units can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.
[0101] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0102] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of this embodiment.
[0103] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0104] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0105] The above description is merely a specific embodiment of the present application, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for generating platform test information, characterized in that: The method comprises: Receive target attributes of virtual production line equipment; Determining a target signal point of a virtual data acquisition device according to the target attributes and target correspondence of the virtual production line device; the target correspondence is a correspondence between the attributes of the virtual production line device and the signal point of the virtual data acquisition device; Platform test information is generated based on the simulation data of the target attributes of the virtual production line equipment and the configuration information of the target signal points of the virtual data acquisition equipment.
2. The platform test information generating method according to claim 1, characterized in that: Before receiving the target attributes of the virtual production line equipment, the method further includes: Using the application end to create the virtual production line equipment; Configure at least one attribute of the virtual production line equipment.
3. The platform test information generating method according to claim 1, characterized in that: The simulation data of the target attribute is determined according to the received attribute setting information.
4. The platform test information generating method according to claim 1, characterized in that: Before receiving the target attributes of the virtual production line equipment, the method further includes: Using the acquisition terminal to create the virtual data acquisition device corresponding to the physical data acquisition device; For at least one physical signal point of the physical data acquisition device, a signal point corresponding to the physical signal point is configured for the virtual data acquisition device.
5. The platform test information generating method according to claim 4, characterized in that: The configuration information of the target signal point is determined according to the configuration information of the corresponding physical signal point of the physical data acquisition device.
6. The platform test information generating method according to claim 5, characterized in that: The configuration information of the physical signal point includes one or more of a device identifier, a signal point name, a signal point variable type, a signal point identifier, a signal point read / write type, and a serial number.
7. The platform test information generating method according to claim 1, characterized in that: The generating of platform test information based on the simulation data of the target attributes of the virtual production line equipment and the configuration information of the target signal points of the virtual data acquisition equipment includes: The simulation data of the target attributes and the configuration information of the target signal points are combined through a Python tool to generate the platform test information.
8. The platform test information generating method according to claim 1, characterized in that: The method further comprises: The platform test information is sent to a cache server so that the application end obtains the platform test information from the cache server and performs a visual display of the platform test information.
9. A platform test information generating device, characterized in that: include: A receiving module, used to receive target attributes of virtual production line equipment; A corresponding module, configured to determine a target signal point of a virtual data acquisition device according to a target attribute and a target corresponding relationship of the virtual production line device; the target corresponding relationship being a corresponding relationship between the attribute of the virtual production line device and the signal point of the virtual data acquisition device; A generation module is used to generate platform test information based on the simulation data of the target attributes of the virtual production line equipment and the configuration information of the target signal points of the virtual data acquisition equipment.
10. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the platform test information generating method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one computer program, and when the at least one computer program is executed by a processor, the platform test information generating method according to any one of claims 1 to 8 can be implemented.