CN115061866B - Analog data generation method, system and computer equipment - Google Patents
Analog data generation method, system and computer equipment Download PDFInfo
- Publication number
- CN115061866B CN115061866B CN202210706788.2A CN202210706788A CN115061866B CN 115061866 B CN115061866 B CN 115061866B CN 202210706788 A CN202210706788 A CN 202210706788A CN 115061866 B CN115061866 B CN 115061866B
- Authority
- CN
- China
- Prior art keywords
- physical equipment
- configuration
- physical
- component
- simulation data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000004088 simulation Methods 0.000 claims abstract description 96
- 230000015654 memory Effects 0.000 claims description 31
- 238000004590 computer program Methods 0.000 claims description 23
- 230000005856 abnormality Effects 0.000 claims description 10
- 238000013524 data verification Methods 0.000 claims description 7
- 230000002159 abnormal effect Effects 0.000 claims description 6
- 238000012360 testing method Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 238000011161 development Methods 0.000 description 4
- 238000012795 verification Methods 0.000 description 4
- 239000007795 chemical reaction product Substances 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2289—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by configuration test
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application relates to a simulation data generation method, a simulation data generation system and computer equipment. The method comprises the following steps: setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule; acquiring corresponding physical equipment attributes according to the operation environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule; the method comprises the steps of obtaining configuration parameters of physical equipment, generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules, and improving the generation efficiency of the simulation data and the accuracy of the simulation data.
Description
Technical Field
The present application relates to the field of computer testing technologies, and in particular, to a method, a system, and a computer device for generating analog data.
Background
In the prior art, when developing corresponding management systems and software for physical devices such as memories and servers, in order to improve development and test efficiency, developers use simulation data (mock data) to simulate information such as resources and states of actual physical devices so as to get rid of dependence on the physical devices. Thus, the development and the test of related functions can be completed rapidly based on the analog data. The analog data is typically in a particular organization format and is stored in a text file or database. In order to meet specific functional debugging or testing scenes, developers need to write and modify simulation data manually frequently, so that the efficiency is low, writing errors are easy to occur, the simulation data is inconsistent with information such as actual physical equipment specifications and the like, and further the functional debugging and testing progress is affected.
Therefore, there is an urgent need to propose a simulation data generation method, system and computer device capable of improving the generation efficiency of simulation data and the accuracy of simulation data.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a simulation data generation method, system, and computer device that can improve the efficiency and accuracy of simulation data generation.
In one aspect, there is provided a simulation data generating method, the method comprising:
setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule;
acquiring corresponding physical equipment attributes according to the operation environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule;
And acquiring configuration parameters of the physical equipment, and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules.
In one embodiment, setting a configuration rule corresponding to a physical device attribute includes: defining each physical device component as a target physical device component, the physical device comprising at least one of the physical device components; setting configuration options of the target physical equipment component, wherein the configuration options of the target physical equipment component are at least one; acquiring a physical device component associated with the target physical device component; and setting configuration options of the physical equipment component based on each configuration option of the target physical equipment component, wherein the configuration options of the physical equipment component are at least one.
In one embodiment, the associated physical device component and the configuration options of the target physical device component are combined to form a configuration rule corresponding to the physical device attribute.
In one embodiment, obtaining configuration parameters of a physical device, generating simulation data corresponding to the physical device based on a combination of the configuration parameters of the physical device and the configuration rule, includes: based on the preset priority of the physical equipment parts, acquiring the physical equipment part with the highest priority in the physical equipment, and defining the physical equipment part as a first physical equipment part, wherein the physical equipment part in the physical equipment is at least one; setting configuration parameters of the first physical equipment component based on configuration options of the first physical equipment component; sequentially setting configuration parameters of physical equipment components in the physical equipment based on the configuration parameters of the first physical equipment components and preset physical equipment component priorities; generating simulated data speech segments corresponding to configuration parameters of each physical equipment component in the physical equipment; and generating simulation data based on the simulation data speech segments.
In one embodiment, before generating the analog data corresponding to the physical device, the method further includes: judging whether a physical equipment part with unset configuration parameters exists in the physical equipment or not; if the physical equipment parts with unset configuration parameters exist in the physical equipment, defining the physical equipment parts with unset configuration parameters as second physical equipment parts; and acquiring a physical equipment component associated with the second physical equipment component, and setting the configuration parameters of the physical equipment component based on the configuration parameters of the physical equipment component.
In one embodiment, when there is a physical device component in the physical device for which the configuration parameters are not set, the method further includes: and setting the configuration parameters of the physical equipment component based on preset configuration parameter default values or based on parameter attributes of the configuration parameters of the physical equipment component.
In one embodiment, setting the configuration parameters of the physical device component based on the parameter attributes of the configuration parameters of the physical device component includes: when the parameter attribute of the configuration parameter of the physical equipment component is a numerical value, the configuration parameter of the physical equipment component is: the method comprises the steps of generating in an incremental mode in a designated data range, or generating randomly in the designated range, or consistent with a designated numerical value; when the parameter attribute of the configuration parameter of the physical equipment component is character type, the configuration parameter of the physical equipment component is: randomly generating based on the length of the designated character or keeping consistent with the designated character; when the parameter attribute of the configuration parameter of the physical device is enumeration, the configuration parameter of the physical device component is: sequentially taking values within the enumeration value range, or randomly generating or consistent with the specified enumeration value.
In one embodiment, the method further comprises: based on a preset simulation data verification rule, verifying the simulation data, and judging whether the simulation data has abnormality or not; if the simulation data is abnormal, locating the simulation data speech segment with the abnormality, and highlighting the simulation data speech segment.
In another aspect, there is provided an analog data generation system, the system comprising:
The system comprises:
The setting unit is used for setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule;
the system comprises an acquisition unit, a configuration rule generation unit and a configuration rule generation unit, wherein the acquisition unit is used for acquiring corresponding physical equipment attributes according to the running environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule;
And the generation unit is used for acquiring the configuration parameters of the physical equipment and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules.
In yet another aspect, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule;
acquiring corresponding physical equipment attributes according to the operation environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule;
And acquiring configuration parameters of the physical equipment, and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules.
In yet another aspect, a computer readable storage medium is provided, having stored thereon a computer program which when executed by a processor performs the steps of:
setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule;
acquiring corresponding physical equipment attributes according to the operation environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule;
And acquiring configuration parameters of the physical equipment, and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules.
According to the simulation data generation method, the system and the computer equipment, the simulation data can be rapidly generated based on the configuration rule corresponding to the set physical equipment attribute, the generation efficiency of the simulation data is improved, and the influence of form errors and format errors caused by manual writing on function debugging and testing is avoided; the management efficiency of the simulation data is greatly improved, the problems of form problems and format errors caused by manual writing of the simulation data are avoided, and further the development and test efficiency of the whole physical equipment is improved.
Drawings
FIG. 1 is an application environment diagram of a simulated data generation method in one embodiment;
FIG. 2 is a flow diagram of a method of simulated data generation in one embodiment;
FIG. 3 is a flow diagram of a method of simulated data generation in one embodiment;
FIG. 4 is a flow diagram of a method of simulated data generation in one embodiment;
FIG. 5 is a block diagram of an exemplary data generation system in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The simulation data method provided by the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The server 104 stores the correspondence between the physical device attribute and the configuration rule, the server 104 obtains the configuration parameter of the physical device sent by the terminal 102, generates analog data corresponding to the physical device based on the combination of the configuration parameter of the physical device and the configuration rule, and returns the analog data to the terminal 102. The terminal 102 may be, but not limited to, various personal computers and notebook computers, and the server 104 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, there is provided a simulation data generating method, which is applied to the server example in fig. 1 for explanation, and includes the following steps:
setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule;
acquiring corresponding physical equipment attributes according to the operation environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule;
And acquiring configuration parameters of the physical equipment, and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules.
According to the simulation data generation method, the simulation data can be quickly generated based on the configuration rule corresponding to the set physical equipment attribute, the generation efficiency of the simulation data is improved, and the influence of form errors and format errors caused by manual writing on function debugging and testing is avoided; the management efficiency of the simulation data is greatly improved, the problems of form problems and format errors caused by manual writing of the simulation data are avoided, and further the development and test efficiency of the whole physical equipment is improved.
In one embodiment, the operating environment of the physical device is at least one. The physical device component configuration of each physical device under different operating environments may be different, that is, as the operating environment of the physical device changes, the physical device properties change accordingly. Taking a physical device of a memory as an example for explanation, when the operation scene of the memory is a standard operation scene, the number of main control cabinets of the memory can only be one, and the memory can be a high-end product or a low-end product; when the operation scene of the memory is a double-activity operation scene, the number of main control cabinets of the memory is two, and the memory can only be a high-end product.
Acquiring corresponding physical device attributes according to the running environment of the physical device, including but not limited to the following: the number, model and parameters of the physical devices.
In one embodiment, as shown in fig. 3, setting a configuration rule corresponding to a physical device attribute includes: defining each physical device component as a target physical device component, the physical device comprising at least one of the physical device components; setting configuration options of the target physical equipment component, wherein the configuration options of the target physical equipment component are at least one; acquiring a physical device component associated with the target physical device component; and setting configuration options of the physical equipment component based on each configuration option of the target physical equipment component, wherein the configuration options of the physical equipment component are at least one.
Specifically, taking a storage as an example, defining a cabinet as a target physical equipment component, and setting configuration options of the cabinet, wherein the configuration options of the cabinet include, but are not limited to, the following: the number, model and attribute names of the cabinets; based on the cabinet, physical equipment components associated with the cabinet are acquired, such as: physical equipment components such as controllers, hard disks, fans, power supplies, and the like. Based on each configuration option of the cabinet, configuration options of physical equipment components such as a controller, a hard disk, a fan, a power supply and the like are set. It should be understood that, defining each physical device component as a target physical device component, that is, traversing the physical device components in the physical device, may sequentially use each physical device component as a target physical device component according to a physical device component priority, or may sequentially use each physical device component as a target physical device component according to a specific rule by a person skilled in the art, and setting configuration options of physical device components associated with the target physical device component based on each configuration option of the target physical device component.
In one embodiment, the physical device components associated with the target device component include physical device components having direct association with the target device component, and further include physical device components having indirect association with the target device component. Such as: i.e., when a cabinet is targeted for a physical equipment component, a physical equipment component that is directly associated with the cabinet is acquired, such as: a controller, a hard disk, a fan, a power supply and the like; physical equipment components indirectly associated with the cabinet exist, such as: an add-in card disposed on the controller and having a direct association with the controller. In the application, the physical equipment component directly related to the target physical equipment component is obtained only based on the target physical equipment component, namely, when the cabinet is used as the target physical equipment component, the configuration options of the controller are set only based on each configuration option of the cabinet, and the configuration options of the external plug-in card are not further set. Further, the configuration option of the add-in card is set based on each configuration option of the controller only when the controller is the target physical device component.
In one embodiment, the configuration options of the physical device component are set based on each of the configuration options of the target device component, specifically: for example, when the target device component is an add-in card, the corresponding configuration options are multiple, including slot 1, slot 2 and slot 3; based on each configuration option of the external card, namely, the configuration options corresponding to the slot 1, the slot 2 and the slot 3 are respectively set, the configuration option of the slot 1 comprises a network card and an SAS card, the configuration option of the slot 2 comprises an FC card and an SAS card, and the configuration option of the slot 3 comprises an SAS card, a network card and an FC card.
In one embodiment, the associated physical device component and the configuration options of the target physical device component are combined to form a configuration rule corresponding to the physical device attribute. It should be understood that the physical device includes at least one physical device component, that is, a plurality of physical device components may form a physical device, and further, a configuration option combination of a plurality of physical device components corresponds to a configuration rule corresponding to a physical device attribute.
In one embodiment, as shown in fig. 4, obtaining a configuration parameter of a physical device, generating simulation data corresponding to the physical device based on a combination of the configuration parameter of the physical device and the configuration rule, includes: based on the preset priority of the physical equipment parts, acquiring the physical equipment part with the highest priority in the physical equipment, and defining the physical equipment part as a first physical equipment part, wherein the physical equipment part in the physical equipment is at least one; setting configuration parameters of the first physical equipment component based on configuration options of the first physical equipment component; sequentially setting configuration parameters of physical equipment components in the physical equipment based on the configuration parameters of the first physical equipment components and preset physical equipment component priorities; generating simulated data speech segments corresponding to configuration parameters of each physical equipment component in the physical equipment; and generating simulation data based on the simulation data speech segments.
Specifically, taking a physical device as an example, a memory, where the memory includes a cabinet, a controller, a hard disk, a power supply, a battery, an external card, and other physical device components, each corresponding to the physical device components generates a simulation data speech segment, and the simulation data speech segment corresponding to each physical device component forms simulation data. The simulation data speech segments are generated according to a preset simulation data speech segment template, and simulation data is generated corresponding to the preset simulation data template, so that on one hand, the standardization of the simulation data speech segments and the simulation data is realized; on the other hand, the verification of the analog data speech segments and the analog data is facilitated, and on the other hand, the verification of the configuration parameters of the physical equipment components is facilitated for a person skilled in the art according to actual application needs and the operation is performed on the configuration parameters of the physical equipment components.
In one embodiment, before generating the analog data corresponding to the physical device, the method further includes: judging whether a physical equipment part with unset configuration parameters exists in the physical equipment or not; if the physical equipment parts with unset configuration parameters exist in the physical equipment, defining the physical equipment parts with unset configuration parameters as second physical equipment parts; and acquiring a physical equipment component associated with the second physical equipment component, and setting the configuration parameters of the physical equipment component based on the configuration parameters of the physical equipment component. It should be understood that, when the configuration parameters of the physical device component are set, the parameters of the physical device component are sequentially configured from the physical device with the highest priority based on the preset priority of the physical device component, and in the process of configuring the parameters of the physical device component, the physical device component with the unset configuration parameters may exist. Before generating the simulation data, if the physical equipment component with the unset configuration parameters exists, the configuration parameters of the physical equipment component associated with the physical equipment component are acquired based on the physical equipment component with the unset configuration parameters, and generally, the configuration parameters of the physical equipment component with the unset configuration parameters are set based on the configuration parameters of the physical equipment component with the previous priority and the physical equipment component with the next priority of the physical equipment component with the unset configuration parameters only. It is to be understood that the configuration parameters of the corresponding physical device are known before the analog data is generated by the physical device, but that physical device components whose configuration parameters are unknown may be present in the physical device.
In one embodiment, when the configuration parameters of the physical device component whose current configuration parameters are not set are set based on the configuration parameters of the physical device component of the previous priority and the physical device component of the next priority, there may be a case that the configuration parameters of the current physical device component are not unique, and at this time, the configuration parameters of the current physical device component may be set randomly, or the optimal configuration parameters of the current physical device component may be obtained through reasonable processing operation. And (3) for the condition that the configuration parameters of the current physical equipment component are not unique, highlighting the corresponding analog data speech segments so as to ensure that operation and maintenance personnel can know the parameter configuration condition.
In one embodiment, when there is a physical device component in the physical device for which the configuration parameters are not set, the method further includes: and setting the configuration parameters of the physical equipment component based on preset configuration parameter default values or based on parameter attributes of the configuration parameters of the physical equipment component.
In one embodiment, setting the configuration parameters of the physical device component based on the parameter attributes of the configuration parameters of the physical device component includes: when the parameter attribute of the configuration parameter of the physical equipment component is a numerical value, the configuration parameter of the physical equipment component is: the method comprises the steps of generating in an incremental mode in a designated data range, or generating randomly in the designated range, or consistent with a designated numerical value; when the parameter attribute of the configuration parameter of the physical equipment component is character type, the configuration parameter of the physical equipment component is: randomly generating based on the length of the designated character or keeping consistent with the designated character; when the parameter attribute of the configuration parameter of the physical device is enumeration, the configuration parameter of the physical device component is: sequentially taking values within the enumeration value range, or randomly generating or consistent with the specified enumeration value.
Specifically, for example, the object currently configured is a cabinet, which has attributes such as ID, serial number, status, and the like. If no value is set for the serial number attribute in configuring the individual attributes of the cabinet, a string of characters is randomly generated as the serial number attribute value in generating mock data. If the serial number attribute is set to a value of 0AC98ED, then the serial number attribute of the cabinet is set to a value of 0AC98ED when generating the simulation data. For another example: if the state attribute of the cabinet is not set to a specific value, the state attribute value of the cabinet is a default online when mock data is generated, and if the specific value (offlip) is set, the state attribute value is offlip when analog data is generated.
In one embodiment, the method further comprises: based on a preset simulation data verification rule, verifying the simulation data, and judging whether the simulation data has abnormality or not; if the simulation data is abnormal, locating the abnormal simulation data language segments, and highlighting the simulation data language segments, wherein a preset simulation data verification rule is generated corresponding to the configuration rule setting corresponding to the physical equipment attribute.
It should be understood that, although the steps in the flowcharts of fig. 2-4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or steps.
In one embodiment, as shown in FIG. 5, there is provided an analog data generation system comprising: a setting unit, an acquisition unit, and a generation unit, wherein:
The setting unit is used for setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule;
the system comprises an acquisition unit, a configuration rule generation unit and a configuration rule generation unit, wherein the acquisition unit is used for acquiring corresponding physical equipment attributes according to the running environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule;
And the generation unit is used for acquiring the configuration parameters of the physical equipment and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules.
In one embodiment, the system further includes a verification unit, configured to verify the analog data based on a preset analog data verification rule, and determine whether the analog data has an anomaly.
In one embodiment, the verification unit further includes a positioning display module, configured to position the analog data segment in which the abnormality exists, and highlight the analog data segment.
In one embodiment, the setting unit further includes a query module and an editing module, where the query module is configured to obtain a correspondence between the physical device attribute and the configuration rule; the editing module is used for adding configuration rules corresponding to the physical equipment attributes and establishing the corresponding relation between the physical equipment attributes and the configuration rules.
For specific limitations on the analog data generation system, reference may be made to the above limitations on the analog data generation method, and no further description is given here. The various modules in the above-described analog data generation system may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of generating analog data. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule;
acquiring corresponding physical equipment attributes according to the operation environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule;
And acquiring configuration parameters of the physical equipment, and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules.
In one embodiment, the processor when executing the computer program further performs the steps of: defining each physical device component as a target physical device component, the physical device comprising at least one of the physical device components; setting configuration options of the target physical equipment component, wherein the configuration options of the target physical equipment component are at least one; acquiring a physical device component associated with the target physical device component; and setting configuration options of the physical equipment component based on each configuration option of the target physical equipment component, wherein the configuration options of the physical equipment component are at least one. And combining the associated physical equipment component with the configuration options of the target physical equipment component to form a configuration rule corresponding to the physical equipment attribute.
In one embodiment, the processor when executing the computer program further performs the steps of:
Based on the preset priority of the physical equipment parts, acquiring the physical equipment part with the highest priority in the physical equipment, and defining the physical equipment part as a first physical equipment part, wherein the physical equipment part in the physical equipment is at least one; setting configuration parameters of the first physical equipment component based on configuration options of the first physical equipment component; sequentially setting configuration parameters of physical equipment components in the physical equipment based on the configuration parameters of the first physical equipment components and preset physical equipment component priorities; generating simulated data speech segments corresponding to configuration parameters of each physical equipment component in the physical equipment; and generating simulation data based on the simulation data speech segments.
In one embodiment, the processor when executing the computer program further performs the steps of:
Judging whether a physical equipment part with unset configuration parameters exists in the physical equipment or not; if the physical equipment parts with unset configuration parameters exist in the physical equipment, defining the physical equipment parts with unset configuration parameters as second physical equipment parts; and acquiring a physical equipment component associated with the second physical equipment component, and setting the configuration parameters of the physical equipment component based on the configuration parameters of the physical equipment component.
In one embodiment, the processor when executing the computer program further performs the steps of:
And setting the configuration parameters of the physical equipment component based on preset configuration parameter default values or based on parameter attributes of the configuration parameters of the physical equipment component.
In one embodiment, the processor when executing the computer program further performs the steps of:
When the parameter attribute of the configuration parameter of the physical equipment component is a numerical value, the configuration parameter of the physical equipment component is: the method comprises the steps of generating in an incremental mode in a designated data range, or generating randomly in the designated range, or consistent with a designated numerical value; when the parameter attribute of the configuration parameter of the physical equipment component is character type, the configuration parameter of the physical equipment component is: randomly generating based on the length of the designated character or keeping consistent with the designated character; when the parameter attribute of the configuration parameter of the physical device is enumeration, the configuration parameter of the physical device component is: sequentially taking values within the enumeration value range, or randomly generating or consistent with the specified enumeration value.
In one embodiment, the processor when executing the computer program further performs the steps of:
based on a preset simulation data verification rule, verifying the simulation data, and judging whether the simulation data has abnormality or not; if the simulation data is abnormal, locating the simulation data speech segment with the abnormality, and highlighting the simulation data speech segment.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
Setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule; acquiring corresponding physical equipment attributes according to the operation environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule; and acquiring configuration parameters of the physical equipment, and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules.
In one embodiment, the computer program when executed by the processor further performs the steps of:
Defining each physical device component as a target physical device component, the physical device comprising at least one of the physical device components; setting configuration options of the target physical equipment component, wherein the configuration options of the target physical equipment component are at least one; acquiring a physical device component associated with the target physical device component; and setting configuration options of the physical equipment component based on each configuration option of the target physical equipment component, wherein the configuration options of the physical equipment component are at least one. And combining the associated physical equipment component with the configuration options of the target physical equipment component to form a configuration rule corresponding to the physical equipment attribute.
In one embodiment, the computer program when executed by the processor further performs the steps of:
Based on the preset priority of the physical equipment parts, acquiring the physical equipment part with the highest priority in the physical equipment, and defining the physical equipment part as a first physical equipment part, wherein the physical equipment part in the physical equipment is at least one; setting configuration parameters of the first physical equipment component based on configuration options of the first physical equipment component; sequentially setting configuration parameters of physical equipment components in the physical equipment based on the configuration parameters of the first physical equipment components and preset physical equipment component priorities; generating simulated data speech segments corresponding to configuration parameters of each physical equipment component in the physical equipment; and generating simulation data based on the simulation data speech segments.
In one embodiment, the computer program when executed by the processor further performs the steps of:
Judging whether a physical equipment part with unset configuration parameters exists in the physical equipment or not; if the physical equipment parts with unset configuration parameters exist in the physical equipment, defining the physical equipment parts with unset configuration parameters as second physical equipment parts; and acquiring a physical equipment component associated with the second physical equipment component, and setting the configuration parameters of the physical equipment component based on the configuration parameters of the physical equipment component.
In one embodiment, the computer program when executed by the processor further performs the steps of:
And setting the configuration parameters of the physical equipment component based on preset configuration parameter default values or based on parameter attributes of the configuration parameters of the physical equipment component.
In one embodiment, the computer program when executed by the processor further performs the steps of:
When the parameter attribute of the configuration parameter of the physical equipment component is a numerical value, the configuration parameter of the physical equipment component is: the method comprises the steps of generating in an incremental mode in a designated data range, or generating randomly in the designated range, or consistent with a designated numerical value; when the parameter attribute of the configuration parameter of the physical equipment component is character type, the configuration parameter of the physical equipment component is: randomly generating based on the length of the designated character or keeping consistent with the designated character; when the parameter attribute of the configuration parameter of the physical device is enumeration, the configuration parameter of the physical device component is: sequentially taking values within the enumeration value range, or randomly generating or consistent with the specified enumeration value.
In one embodiment, the computer program when executed by the processor further performs the steps of:
based on a preset simulation data verification rule, verifying the simulation data, and judging whether the simulation data has abnormality or not; if the simulation data is abnormal, locating the simulation data speech segment with the abnormality, and highlighting the simulation data speech segment.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
Claims (7)
1. A method of generating analog data, the method comprising:
setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule; acquiring corresponding physical equipment attributes according to the operation environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule;
Acquiring configuration parameters of physical equipment, and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules;
The configuration rule corresponding to the set physical equipment attribute comprises the following steps: defining each physical equipment component as a target physical equipment component, wherein the physical equipment comprises at least one physical equipment component, setting configuration options of the target physical equipment component, wherein the configuration options of the target physical equipment component are at least one; the associated physical equipment component and the configuration options of the target physical equipment component are combined to form a configuration rule corresponding to the physical equipment attribute;
The obtaining the configuration parameters of the physical device, generating the simulation data corresponding to the physical device based on the configuration parameters of the physical device and the configuration rule combination, includes: based on the preset priority of the physical equipment parts, acquiring the physical equipment part with the highest priority in the physical equipment, and defining the physical equipment part as a first physical equipment part, wherein the physical equipment part in the physical equipment is at least one; setting configuration parameters of the first physical equipment component based on configuration options of the first physical equipment component; sequentially setting configuration parameters of physical equipment components in the physical equipment based on the configuration parameters of the first physical equipment components and preset physical equipment component priorities; generating simulated data speech segments corresponding to configuration parameters of each physical equipment component in the physical equipment; and generating simulation data based on the simulation data speech segments.
2. The simulation data generating method according to claim 1, wherein before generating the simulation data corresponding to the physical device, the method further comprises:
judging whether a physical equipment part with unset configuration parameters exists in the physical equipment or not;
If the physical equipment parts with unset configuration parameters exist in the physical equipment, defining the physical equipment parts with unset configuration parameters as second physical equipment parts;
and acquiring a physical equipment component associated with the second physical equipment component, and setting the configuration parameters of the physical equipment component based on the configuration parameters of the physical equipment component.
3. The simulation data generation method according to claim 2, wherein when there is a physical device component whose configuration parameter is not set in the physical device, the method further comprises:
And setting the configuration parameters of the physical equipment component based on preset configuration parameter default values or based on parameter attributes of the configuration parameters of the physical equipment component.
4. A simulation data generating method according to claim 3, wherein setting the configuration parameters of the physical device section based on the parameter attributes of the configuration parameters of the physical device section comprises:
When the parameter attribute of the configuration parameter of the physical equipment component is a numerical value, the configuration parameter of the physical equipment component is: the method comprises the steps of generating in an incremental mode in a designated data range, or generating randomly in the designated range, or consistent with a designated numerical value;
when the parameter attribute of the configuration parameter of the physical equipment component is character type, the configuration parameter of the physical equipment component is: randomly generating based on the length of the designated character or keeping consistent with the designated character;
when the parameter attribute of the configuration parameter of the physical device is enumeration, the configuration parameter of the physical device component is: sequentially taking values within the enumeration value range, or randomly generating or consistent with the specified enumeration value.
5. The simulation data generation method according to any one of claims 1 to 4, wherein the method further comprises:
based on a preset simulation data verification rule, verifying the simulation data, and judging whether the simulation data has abnormality or not;
if the simulation data is abnormal, locating the simulation data speech segment with the abnormality, and highlighting the simulation data speech segment.
6. An analog data generation system implementing the analog data generation method according to any one of claims 1 to 5, characterized in that the system comprises:
The setting unit is used for setting configuration rules corresponding to physical equipment attributes, and establishing a corresponding relation between the physical equipment attributes and the configuration rules, wherein the physical equipment attributes at least correspond to one configuration rule;
the system comprises an acquisition unit, a configuration rule generation unit and a configuration rule generation unit, wherein the acquisition unit is used for acquiring corresponding physical equipment attributes according to the running environment of the physical equipment, and acquiring corresponding configuration rule combinations based on the physical equipment attributes, wherein the configuration rule combinations comprise at least one configuration rule;
And the generation unit is used for acquiring the configuration parameters of the physical equipment and generating simulation data corresponding to the physical equipment based on the combination of the configuration parameters of the physical equipment and the configuration rules.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 5 when the computer program is executed by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210706788.2A CN115061866B (en) | 2022-06-21 | 2022-06-21 | Analog data generation method, system and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210706788.2A CN115061866B (en) | 2022-06-21 | 2022-06-21 | Analog data generation method, system and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115061866A CN115061866A (en) | 2022-09-16 |
CN115061866B true CN115061866B (en) | 2024-07-05 |
Family
ID=83202266
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210706788.2A Active CN115061866B (en) | 2022-06-21 | 2022-06-21 | Analog data generation method, system and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115061866B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109165266A (en) * | 2018-09-03 | 2019-01-08 | 中国平安人寿保险股份有限公司 | List generation method, device, computer equipment and storage medium |
CN109491905A (en) * | 2018-11-02 | 2019-03-19 | 北京金山云网络技术有限公司 | Head end test method, apparatus and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111581271A (en) * | 2020-04-28 | 2020-08-25 | 平安国际智慧城市科技股份有限公司 | Interface parameter determination method and device, computer equipment and storage medium |
-
2022
- 2022-06-21 CN CN202210706788.2A patent/CN115061866B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109165266A (en) * | 2018-09-03 | 2019-01-08 | 中国平安人寿保险股份有限公司 | List generation method, device, computer equipment and storage medium |
CN109491905A (en) * | 2018-11-02 | 2019-03-19 | 北京金山云网络技术有限公司 | Head end test method, apparatus and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN115061866A (en) | 2022-09-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110209650B (en) | Data normalization and migration method and device, computer equipment and storage medium | |
CN108449313B (en) | Electronic device, Internet service system risk early warning method and storage medium | |
CN111026647B (en) | Method and device for acquiring code coverage rate, computer equipment and storage medium | |
CN111475494A (en) | Mass data processing method, system, terminal and storage medium | |
CN113254153B (en) | Method and device for processing flow task, computer equipment and storage medium | |
CN115061866B (en) | Analog data generation method, system and computer equipment | |
CN117851484A (en) | Data processing method and device based on rule engine and computer equipment | |
CN112861491A (en) | Report processing method and device, electronic equipment and computer readable storage medium | |
CN116149901A (en) | Data verification test method and device and computer readable storage medium | |
CN115903747A (en) | Data calibration method, device, equipment and storage medium | |
CN113824717B (en) | Configuration checking method and device | |
US20220188221A1 (en) | Regression testing method and regression testing apparatus | |
US11868693B2 (en) | Verification performance profiling with selective data reduction | |
CN111045891B (en) | Monitoring method, device, equipment and storage medium based on java multithreading | |
CN111083007B (en) | Test method, test device, computer equipment and storage medium | |
CN110515970B (en) | Service processing method, device, computer equipment and storage medium | |
CN113282476A (en) | Interface performance testing method and device and electronic equipment | |
CN112231232A (en) | Method, device and equipment for determining test data model and generating test data | |
CN113867975B (en) | Quick response method and device for command line and computer equipment | |
CN115033439B (en) | Server testing method and device | |
CN114896335B (en) | Data dumping method and system of database | |
CN115016780B (en) | Device view device, method and storage medium for automatically generating PDK base library through vcell | |
US7971164B2 (en) | Assessing resources required to complete a VLSI design | |
US11934300B2 (en) | Reducing computing power for generating test scenario files for decision models | |
CN110309038B (en) | Performance test method and device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |