CN112260879B - Method and device for determining running environment of equipment simulator and electronic equipment - Google Patents

Method and device for determining running environment of equipment simulator and electronic equipment Download PDF

Info

Publication number
CN112260879B
CN112260879B CN202011420142.5A CN202011420142A CN112260879B CN 112260879 B CN112260879 B CN 112260879B CN 202011420142 A CN202011420142 A CN 202011420142A CN 112260879 B CN112260879 B CN 112260879B
Authority
CN
China
Prior art keywords
simulator
target
equipment
browser client
operating environment
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
Application number
CN202011420142.5A
Other languages
Chinese (zh)
Other versions
CN112260879A (en
Inventor
陈垚亮
黄胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changsha Rootcloud Technology Co ltd
Rootcloud Technology Co Ltd
Original Assignee
Changsha Rootcloud Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Changsha Rootcloud Technology Co ltd filed Critical Changsha Rootcloud Technology Co ltd
Priority to CN202011420142.5A priority Critical patent/CN112260879B/en
Publication of CN112260879A publication Critical patent/CN112260879A/en
Application granted granted Critical
Publication of CN112260879B publication Critical patent/CN112260879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network

Abstract

The invention provides a method and a device for determining an operating environment of an equipment simulator and electronic equipment, and relates to the technical field of Internet of things. Therefore, the method can self-adaptively select a proper operating environment for the equipment simulator on the premise of ensuring the equipment simulation effect, is beneficial to scientific resource management, and can disperse the cost.

Description

Method and device for determining running environment of equipment simulator and electronic equipment
Technical Field
The invention relates to the technical field of Internet of things, in particular to a method and a device for determining an operating environment of an equipment simulator and electronic equipment.
Background
With the rapid development of the internet of things, the internet of things equipment is widely used in various technical fields, and generally, before the internet of things equipment is deployed on the spot, the application environment of the internet of things equipment is evaluated first, and the deployment can be arranged after no problem is confirmed. The equipment simulator utilizing the working condition data of the equipment of the Internet of things can help to quickly verify the function and the analysis logic of the data consumption end, and plays an important role in application. The internet of things equipment working condition data has the characteristics of continuity, high speed, a large amount of data and time sequence, if a platform server side is used for operating the equipment simulator, a large amount of resources are consumed, if a browser client side is used for operating the equipment simulator, once the browser is closed, data connection can be disconnected, and the stability is not high enough, so that how to select a proper operating environment for the equipment simulator becomes the technical problem to be solved urgently at present.
Disclosure of Invention
The invention aims to provide a method and a device for determining an operating environment of an equipment simulator and electronic equipment, so that a proper operating environment is adaptively selected for the equipment simulator on the premise of ensuring an equipment simulation effect, scientific resource management is facilitated, and cost can be dispersed.
In a first aspect, the present invention provides a method for determining an operating environment of a device simulator, including: acquiring configuration parameters of an equipment simulator; wherein the configuration parameters include: the total amount of equipment to be simulated and the total amount of data to be sent; determining a first target operating environment of the device simulator based on the configuration parameters; wherein the first target operating environment comprises any one of: a browser client, a non-browser client; if the first target operation environment is a non-browser client, responding to selection operation of a user, and determining a second target operation environment of the equipment simulator based on the selection operation; the second target operating environment comprises any one of: a platform server side and a native client side.
In an alternative embodiment, determining a first target operating environment for a device simulator based on the configuration parameters includes: acquiring a first preset threshold and a second preset threshold; the first preset threshold value represents the total amount of equipment which the browser client side allows the equipment simulator to simulate, and the second preset threshold value represents the total amount of data which the browser client side allows the equipment simulator to simulate and send; if the total amount of the equipment to be simulated is greater than the first preset threshold value, or the total amount of the data to be sent is greater than the second preset threshold value, taking the non-browser client as a first target operation environment of the equipment simulator; and if the total amount of the equipment to be simulated is not greater than the first preset threshold value and the total amount of the data to be sent is not greater than the second preset threshold value, taking the browser client as a first target operating environment of the equipment simulator.
In an alternative embodiment, determining a second target operating environment of the plant simulator in response to a selection operation by a user and based on the selection operation includes: judging whether a user selects to download a native client; if so, taking the native client as a second target operation environment of the equipment simulator; and if not, taking the platform server as a second target operation environment of the equipment simulator.
In an optional embodiment, after operating the browser client as the first target operating environment of the device simulator, the method further comprises: monitoring the working state of the browser client in real time; wherein the working state comprises any one of: an open state, a closed state; if the working state is the closing state, judging whether the equipment simulator completes the simulation total amount required by the configuration parameters; and if not, switching the operating environment of the equipment simulator to the second target operating environment based on the selection of the user.
In an optional embodiment, after responding to a selection operation of a user and determining a second target operating environment of the plant simulator based on the selection operation, the method further comprises: judging whether the number of the devices to be simulated by the device simulator at the current moment is greater than the first preset threshold value or not, and judging whether the data volume to be sent by the device simulator at the current moment is greater than the second preset threshold value or not; if not, judging whether the working state of the browser client is an open state or not; if so, stopping the operation of the equipment simulator in the second target operation environment, and switching the operation environment of the equipment simulator to the browser client.
In an optional embodiment, the configuration parameters further comprise at least one of: network parameters of the non-browser client, the geographic position of the non-browser client, and the operating cost of the non-browser client; after the platform server is used as a second target operation environment of the equipment simulator, the method further comprises the following steps: acquiring target parameters of a platform server and target parameters of all target clients; wherein the target parameters include: network parameters, geographic location, operating cost; the target client is a native client which provides an equipment simulator operating environment to the outside; and determining the running environment for running the equipment simulator according to the target parameters of the platform server and the target parameters of all the target clients based on the configuration parameters.
In an optional embodiment, after operating the non-browser client as the first target operating environment for the device simulator, the method further comprises: and controlling the browser client to synchronously display the running state of the equipment simulator.
In a second aspect, the present invention provides an apparatus for determining an operating environment of a device simulator, including: the first acquisition module is used for acquiring configuration parameters of the equipment simulator; wherein the configuration parameters include: the total amount of equipment to be simulated and the total amount of data to be sent; a first determination module to determine a first target operating environment of a device simulator based on the configuration parameters; wherein the first target operating environment comprises any one of: a browser client, a non-browser client; the second determining module responds to selection operation of a user if the first target operating environment is a non-browser client, and determines a second target operating environment of the equipment simulator based on the selection operation; the second target operating environment comprises any one of: a platform server side and a native client side.
In a third aspect, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the steps of the method according to any of the foregoing embodiments.
In a fourth aspect, the invention provides a computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any of the preceding embodiments.
The invention provides a method for determining the running environment of a device simulator, which comprises the following steps: acquiring configuration parameters of an equipment simulator; wherein, the configuration parameters comprise: the total amount of equipment to be simulated and the total amount of data to be sent; determining a first target operating environment of the device simulator based on the configuration parameters; wherein the first target operating environment comprises any one of: a browser client, a non-browser client; if the first target operation environment is a non-browser client, responding to the selection operation of a user, and determining a second target operation environment of the equipment simulator based on the selection operation; the second target operating environment includes any one of: a platform server side and a native client side.
In the prior art, each operating environment of the equipment simulator has respective advantages and disadvantages, and how to select a suitable operating environment for the equipment simulator becomes a technical problem to be solved urgently at present. The invention provides a method for determining the running environment of an equipment simulator, which can firstly determine whether the equipment simulator needs to be run at a browser client side or not by acquiring the total quantity of equipment to be simulated and the total quantity of data to be sent of the equipment simulator, and further determine that the equipment simulator needs to be run at a platform server side or a primary client side according to the selection operation of a user if the equipment simulator needs to be run at a non-browser client side. Therefore, the method can self-adaptively select a proper operating environment for the equipment simulator on the premise of ensuring the equipment simulation effect, is beneficial to scientific resource management, and can disperse the cost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for determining an operating environment of an equipment simulator according to an embodiment of the present invention;
FIG. 2 is a flowchart for determining a second target operating environment of the plant simulator in response to a selection operation by a user according to an embodiment of the present invention;
FIG. 3 is a functional block diagram of an apparatus for determining an operating environment of a device simulator according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
In the prior art, before deploying the internet of things equipment, the function and the analysis logic of a data consumption end on the internet of things platform need to be verified, and after confirming that no problem exists, a user can proceed to deploy the internet of things equipment; if the device simulator is run using the browser client, the connection is broken once the browser is closed, and the operation is relatively unstable. Related schemes for selecting a reasonable operation environment for the equipment simulator are not proposed in the prior art for a long time. In view of this, the embodiment of the present invention provides a method for determining an operating environment of an equipment simulator, so as to adaptively select a suitable operating environment for the equipment simulator on the premise of ensuring an equipment simulation effect, scientifically perform resource management, and disperse cost.
Example one
Fig. 1 is a flowchart of a method for determining an operating environment of an equipment simulator according to an embodiment of the present invention, and as shown in fig. 1, the method specifically includes the following steps:
step S102, obtaining configuration parameters of the equipment simulator.
Specifically, in the embodiment of the present invention, in order to determine the operating environment of the device simulator, first, configuration parameters of the device simulator need to be acquired, where the configuration parameters include: the total amount of the device to be simulated and the total amount of the data to be sent are generally given by a user who needs to run a device simulator, and in order to be able to more accurately simulate the device of the internet of things, the configuration parameters may further include: device attributes (e.g., temperature values, pressure values, runtime, etc.) of each device to be simulated, frequency of transmission of data, specific data types (e.g., text type, numerical type, etc.), amount of data for each data type, etc.
Step S104, determining a first target operation environment of the equipment simulator based on the configuration parameters.
After obtaining the configuration parameters of the device simulator, a first target operating environment may be determined for the device simulator according to the configuration parameters, where the first target operating environment includes any one of: browser client, non-browser client. Since the data processing capabilities of the browser client are weaker than the native client and the platform server, generally, if the total amount of simulation required in the configuration parameters exceeds the withstand capabilities of the browser client, then a non-browser client will be adaptively selected for the device simulator.
And step S106, if the first target operation environment is the non-browser client, responding to the selection operation of the user, and determining a second target operation environment of the equipment simulator based on the selection operation.
Specifically, the method of the present invention is applied to an equipment simulation scheduler, configured to schedule an operating environment for an equipment simulator, and if the equipment simulation scheduler preliminarily selects a non-browser client for the equipment simulator according to configuration parameters, a second target operating environment of the equipment simulator needs to be further determined according to a selection operation of a user, where in an embodiment of the present invention, the second target operating environment includes any one of: a platform server side and a native client side. That is, after the user performs the selection operation, the device simulator will run on the platform server or the native client, where the native client can be understood as a local client capable of running the device simulator, and the platform server is a server for running the device simulator in the cloud.
The invention provides a method for determining the running environment of a device simulator, which comprises the following steps: acquiring configuration parameters of an equipment simulator; wherein, the configuration parameters comprise: the total amount of equipment to be simulated and the total amount of data to be sent; determining a first target operating environment of the device simulator based on the configuration parameters; wherein the first target operating environment comprises any one of: a browser client, a non-browser client; if the first target operation environment is a non-browser client, responding to the selection operation of a user, and determining a second target operation environment of the equipment simulator based on the selection operation; the second target operating environment includes any one of: a platform server side and a native client side.
In the prior art, each operating environment of the equipment simulator has respective advantages and disadvantages, and how to select a suitable operating environment for the equipment simulator becomes a technical problem to be solved urgently at present. The invention provides a method for determining the running environment of an equipment simulator, which can firstly determine whether the equipment simulator needs to be run at a browser client side or not by acquiring the total quantity of equipment to be simulated and the total quantity of data to be sent of the equipment simulator, and further determine that the equipment simulator needs to be run at a platform server side or a primary client side according to the selection operation of a user if the equipment simulator needs to be run at a non-browser client side. Therefore, the method can self-adaptively select a proper operating environment for the equipment simulator on the premise of ensuring the equipment simulation effect, is beneficial to scientific resource management, and can disperse the cost.
The method for determining the operating environment of the plant simulator provided by the embodiment of the invention is briefly described above, and some method steps involved therein and other functions extended on the basis of the method of the invention are individually introduced below.
In an optional implementation manner, the step S104 of determining the first target operating environment of the device simulator based on the configuration parameters specifically includes the following steps:
step S1041, a first preset threshold and a second preset threshold are obtained.
If the total amount of the devices to be simulated is greater than the first preset threshold, or the total amount of the data to be sent is greater than the second preset threshold, executing step S1042; if the total amount of the devices to be simulated is not greater than the first preset threshold and the total amount of the data to be transmitted is not greater than the second preset threshold, step S1043 is executed.
Step S1042, using the non-browser client as a first target operating environment of the device simulator.
Step S1043, taking the browser client as a first target operating environment of the device simulator.
Specifically, as can be seen from the above description, the data processing capability of the browser client has a certain limitation, and therefore, in order to determine whether the browser client can serve as an operating environment of the device simulator, a first threshold and a second threshold are obtained first, where the first preset threshold represents a total amount of devices that the browser client allows the device simulator to simulate, and the second preset threshold represents a total amount of data that the browser client allows the device simulator to simulate and send; if the total amount of the equipment and the total amount of the data in the configuration parameters do not exceed the corresponding threshold values, determining that the browser client serves as a first target operation environment of the equipment simulator; on the contrary, if any one of the total amount of the device and the total amount of the data in the configuration parameters exceeds the corresponding threshold, the non-browser client needs to be used as the first target operating environment of the device simulator.
When the browser client serves as the running environment of the equipment simulator, the browser client directly sends the Internet of things equipment working condition data simulated by the equipment simulator to the Internet of things platform through the communication protocol of the websocket, after receiving the working condition data, the data consumption end or other application ends on the Internet of things platform perform related analysis processing on the working condition data, a user can check a processing result through the Internet of things platform, and whether the current equipment deployment environment and the environmental parameters can deploy the Internet of things equipment or not is judged. For example, if the user has an expected result, the consistency of the expected result with the actual running result can be checked; if the actual operational results are not known to the user, the user may also determine whether the current state is acceptable, and a determination may be made as to whether field deployment is possible.
In an optional embodiment, as shown in fig. 2, in step S106, responding to a selection operation of a user, and determining a second target operating environment of the device simulator based on the selection operation specifically includes the following steps:
step S1061, determining whether the user selects to download the native client.
If yes, go to step S1062; if not, step S1063 is executed.
Step S1062, using the native client as a second target operating environment of the device simulator.
And step S1063, taking the platform service end as a second target running environment of the equipment simulator.
Specifically, if the device simulation scheduler determines that the non-browser client is adopted to run the device simulator, it needs to further judge whether the user selects to download the native client, and if the download is determined, the native client is used as a second target running environment of the device simulator; and if the device simulator is not selected to be downloaded, the device simulation scheduler takes the platform service end as a second target operation environment of the device simulator.
In the embodiment of the invention, each user can download the native client through a regular channel, and before the native client runs the device simulator, the user needs to use the native client to connect with the cloud account (the cloud account stores the resources distributed by the cloud to the user), and then the native client can have the resources to run the device simulator when running locally. When the platform server serves as a second target operation environment of the device simulator, the internet of things device working condition data simulated by the device simulator are sent to the internet of things platform through a background MQTT (Message Queuing Telemetry Transport) protocol for subsequent data processing.
In an alternative embodiment, after the browser client is used as the first target operating environment of the device simulator, the method further includes the following steps:
step S1051, monitoring the working state of the browser client in real time; wherein, the working state comprises any one of the following: an open state and a closed state.
If the operating state is the off state, step S1052 is executed; if the operating state is the on state, step S1051 is executed.
Step S1052, determining whether the device simulator completes the simulation total amount required by the configuration parameter.
If not, go to step S1053; and if the operation is finished, closing the browser client.
And step S1053, switching the running environment of the equipment simulator to a second target running environment based on the selection of the user.
Specifically, when the browser client serves as an operating environment of the device simulator, the device simulation scheduler needs to monitor the operating state of the browser client in real time, and if it is monitored that the browser client is in a closed state and the device simulator has not completed a simulation total amount required by configuration parameters, the device simulation scheduler needs to switch the operating environment of the device simulator to a second target operating environment, and specifically, whether the platform server switched to the second target operating environment or the native client needs to be determined according to selection of a user. That is, if the user closes the browser client without completing the task of the device simulator, the device simulation scheduler will ask the user whether to choose to download the native client, and if so, the native client will be the second target operating environment of the device simulator, otherwise, the platform server will be the second target operating environment of the device simulator.
In an alternative embodiment, after responding to the selection operation of the user and determining the second target operating environment of the plant simulator based on the selection operation, the method further comprises the steps of:
step S1071, determining whether the number of devices to be simulated by the device simulator at the current time is greater than a first preset threshold, and determining whether the amount of data to be sent by the device simulator at the current time is greater than a second preset threshold.
If not, executing step S1072; and if the number of the devices to be simulated by the device simulator at the current moment is greater than a first preset threshold value, or the data volume to be sent by the device simulator at the current moment is greater than a second preset threshold value, maintaining the operation of the device simulator in a second target operation environment.
Step S1072, determine whether the operating state of the browser client is an open state.
If yes, executing step S1073; if not, the operation of the equipment simulator in the second target operation environment is maintained.
Step S1073, stop the operation of the device simulator in the second target operation environment, and switch the operation environment of the device simulator to the browser client.
Specifically, in the embodiment of the present invention, in order to perform resource allocation more reasonably, when the device simulator is operated in the second target operating environment, it may be further determined in real time whether the number of devices to be simulated by the device simulator at the current time is greater than a first preset threshold, and whether the amount of data to be sent by the device simulator at the current time is greater than a second preset threshold, if the analog quantity to be completed by the device simulator is greater, the operation of the device simulator in the second target operating environment needs to be maintained, but if the browser client can support the device simulator to complete the remaining analog quantity (which is not greater than the corresponding threshold), it needs to be further determined whether the browser client is in an open state, and if so, the operation of the device simulator in the second target operating environment is stopped, and the operating environment of the device simulator is switched to the browser client, therefore, the resource waste can be effectively reduced, and the operation cost of the equipment simulator is reduced; however, if the current browser client is in the closed state, the device simulator needs to be maintained to operate in the second target operating environment.
In an optional embodiment, the configuration parameters further comprise at least one of: network parameters of the non-browser client, the geographic position of the non-browser client, and the operating cost of the non-browser client;
after the platform server is used as a second target operation environment of the equipment simulator, the method further comprises the following steps:
acquiring target parameters of a platform server and target parameters of all target clients; wherein the target parameters include: network parameters, geographic location, operating cost; the target client is a native client which provides an equipment simulator operating environment to the outside; and determining the operation environment for operating the equipment simulator based on the configuration parameters, the target parameters of the platform server and the target parameters of all the target clients.
Specifically, the operation of the device simulator occupies cloud resources, different simulation scene requirements are different, if a real scene is simulated as much as possible, specific network conditions of different regions and the like are required to be utilized, if users select the platform server as the second target operation environment of the device simulator, for the platform server, the requirements are all operated and maintained by the platform server, and the complexity is high. Therefore, the embodiment of the invention also introduces the resource transaction of the native client, each user can self-bind the native client and mark the running environment of the native client, and in the implementation of the invention, the native client which can provide the running environment of the device simulator to the outside is called as the target client.
When the configuration parameters of the equipment simulator are given, a user can also select and configure one or more of network parameters of the non-browser client, the geographic position of the non-browser client and the operation cost of the non-browser client, and the equipment simulation scheduler can select an operation environment with the most matched conditions for the user to operate the equipment simulator by combining the target parameters of all the target clients and the target parameters of the platform service end.
In an alternative embodiment, after the non-browser client is used as the first target operating environment of the device simulator, the method further comprises: and controlling the browser client to synchronously display the running state of the equipment simulator.
Since the user cannot observe the running state of the device simulator by naked eyes when the native client or the platform server serves as the running environment of the device simulator, the device simulation scheduler can also control the browser client to synchronously display the running state of the device simulator after the non-browser client (the native client or the platform server) serves as the first target running environment of the device simulator, so that the user can conveniently view the running state of the device simulator.
In summary, the method for determining the operating environment of the device simulator provided in the embodiment of the present invention can adaptively select an appropriate operating environment (a browser client, a platform server, or a native client) for the device simulator on the premise of ensuring the device simulation effect, and can switch the operating environment according to the actual situation on the premise of not affecting the simulation process after selecting the operating environment, which is helpful for scientific resource management and can disperse the cost.
Example two
The embodiment of the present invention further provides a device for determining an operating environment of an equipment simulator, where the device for determining an operating environment of an equipment simulator is mainly used to execute the method for determining an operating environment of an equipment simulator provided in the first embodiment of the present invention, and the device for determining an operating environment of an equipment simulator provided in the embodiment of the present invention is described in detail below.
Fig. 3 is a functional block diagram of an apparatus for determining an operating environment of a device simulator according to an embodiment of the present invention, and as shown in fig. 3, the apparatus mainly includes: a first obtaining module 10, a first determining module 20, a second determining module 30, wherein:
a first obtaining module 10, configured to obtain configuration parameters of the device simulator; wherein, the configuration parameters comprise: the total amount of equipment to be simulated and the total amount of data to be sent.
A first determination module 20 for determining a first target operating environment of the device simulator based on the configuration parameters; wherein the first target operating environment comprises any one of: browser client, non-browser client.
A second determining module 30, configured to respond to a selection operation of a user if the first target operating environment is a non-browser client, and determine a second target operating environment of the device simulator based on the selection operation; the second target operating environment includes any one of: a platform server side and a native client side.
In the prior art, each operating environment of the equipment simulator has respective advantages and disadvantages, and how to select a suitable operating environment for the equipment simulator becomes a technical problem to be solved urgently at present. The embodiment of the invention provides a device for determining an operating environment of an equipment simulator, which can firstly determine whether the equipment simulator needs to be operated at a browser client side or not by acquiring the total quantity of equipment to be simulated and the total quantity of data to be transmitted of the equipment simulator, and further determine that the equipment simulator is operated at a platform server side or a primary client side according to the selection operation of a user if the equipment simulator needs to be operated at a non-browser client side. Therefore, the device can self-adaptively select a proper operating environment for the equipment simulator on the premise of ensuring the simulation effect of the equipment, is beneficial to scientific resource management and can disperse the cost.
Optionally, the first determining module 20 includes:
the device comprises an acquisition unit, a processing unit and a control unit, wherein the acquisition unit is used for acquiring a first preset threshold and a second preset threshold; the first preset threshold value represents the total amount of the equipment which the browser client side allows the equipment simulator to simulate, and the second preset threshold value represents the total amount of the data which the browser client side allows the equipment simulator to simulate and send.
And the first determining unit is used for taking the non-browser client as a first target operating environment of the equipment simulator if the total amount of the equipment to be simulated is greater than a first preset threshold value or the total amount of data to be sent is greater than a second preset threshold value.
And the second determining unit is used for taking the browser client as a first target operating environment of the equipment simulator if the total amount of the equipment to be simulated is not greater than the first preset threshold and the total amount of the data to be sent is not greater than the second preset threshold.
Optionally, the second determining module 30 includes:
and the judging unit is used for judging whether the user selects to download the native client.
And if so, taking the native client as a second target operation environment of the device simulator.
And if not, taking the platform service end as a second target operation environment of the equipment simulator.
Optionally, the apparatus further comprises:
the detection module is used for monitoring the working state of the browser client in real time; wherein, the working state comprises any one of the following: an open state and a closed state.
And the first judgment module is used for judging whether the equipment simulator completes the simulation total amount required by the configuration parameters or not if the working state is the closing state.
And the first switching module switches the running environment of the equipment simulator to a second target running environment based on the selection of the user if the operation is not finished.
Optionally, the apparatus further comprises:
and the second judging module is used for judging whether the number of the devices to be simulated of the device simulator at the current moment is greater than a first preset threshold value and judging whether the data volume to be sent of the device simulator at the current moment is greater than a second preset threshold value.
And the third judging module judges whether the working state of the browser client is an open state or not if the working state of the browser client is not greater than the opening state.
And if so, stopping the operation of the equipment simulator in the second target operation environment, and switching the operation environment of the equipment simulator to the browser client.
Optionally, the configuration parameters further include at least one of the following: network parameters of the non-browser client, geographic location of the non-browser client, and operating cost of the non-browser client.
The device also includes:
the second acquisition module is used for acquiring target parameters of the platform server and target parameters of all target clients; wherein the target parameters include: network parameters, geographic location, operating cost; the target client is a native client which provides the running environment of the device simulator for the outside.
And the third determining module is used for determining the operating environment for operating the equipment simulator based on the configuration parameters, the target parameters of the platform server and the target parameters of all the target clients.
Optionally, the apparatus further comprises:
and the control module is used for controlling the browser client to synchronously display the running state of the equipment simulator.
EXAMPLE III
Referring to fig. 4, an embodiment of the present invention provides an electronic device, including: a processor 60, a memory 61, a bus 62 and a communication interface 63, wherein the processor 60, the communication interface 63 and the memory 61 are connected through the bus 62; the processor 60 is arranged to execute executable modules, such as computer programs, stored in the memory 61.
The memory 61 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 62 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The memory 61 is used for storing a program, the processor 60 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 60, or implemented by the processor 60.
The processor 60 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 60. The Processor 60 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be 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, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 61, and the processor 60 reads the information in the memory 61 and, in combination with its hardware, performs the steps of the above method.
The method and apparatus for determining an operating environment of a device simulator and the computer program product of an electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing a non-volatile program code executable by a processor, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings or the orientations or positional relationships that the products of the present invention are conventionally placed in use, and are only used for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Furthermore, the terms "horizontal", "vertical", "overhang" and the like do not imply that the components are required to be absolutely horizontal or overhang, but may be slightly inclined. For example, "horizontal" merely means that the direction is more horizontal than "vertical" and does not mean that the structure must be perfectly horizontal, but may be slightly inclined.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly and may, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for determining the running environment of a device simulator is characterized by comprising the following steps:
acquiring configuration parameters of an equipment simulator; wherein the configuration parameters include: the total amount of equipment to be simulated and the total amount of data to be sent;
determining a first target operating environment of the device simulator based on the configuration parameters; wherein the first target operating environment comprises any one of: a browser client, a non-browser client;
if the first target operation environment is a non-browser client, responding to selection operation of a user, and determining a second target operation environment of the equipment simulator based on the selection operation; the second target operating environment comprises any one of: a platform server, a native client;
wherein determining a first target operating environment for the device simulator based on the configuration parameters comprises:
acquiring a first preset threshold and a second preset threshold; the first preset threshold value represents the total amount of equipment which the browser client side allows the equipment simulator to simulate, and the second preset threshold value represents the total amount of data which the browser client side allows the equipment simulator to simulate and send;
if the total amount of the equipment to be simulated is greater than the first preset threshold value, or the total amount of the data to be sent is greater than the second preset threshold value, taking the non-browser client as a first target operation environment of the equipment simulator;
and if the total amount of the equipment to be simulated is not greater than the first preset threshold value and the total amount of the data to be sent is not greater than the second preset threshold value, taking the browser client as a first target operating environment of the equipment simulator.
2. The method of claim 1, wherein determining a second target operating environment for the plant simulator in response to a user selection and based on the selection comprises:
judging whether a user selects to download a native client;
if so, taking the native client as a second target operation environment of the equipment simulator;
and if not, taking the platform server as a second target operation environment of the equipment simulator.
3. The method of claim 1, wherein after operating the browser client as a first target runtime environment for the device simulator, the method further comprises:
monitoring the working state of the browser client in real time; wherein the working state comprises any one of: an open state, a closed state;
if the working state is the closing state, judging whether the equipment simulator completes the simulation total amount required by the configuration parameters;
and if not, switching the operating environment of the equipment simulator to the second target operating environment based on the selection of the user.
4. The method of claim 1, wherein after responding to a selection operation by a user and determining a second target operating environment for the plant simulator based on the selection operation, the method further comprises:
judging whether the number of the devices to be simulated by the device simulator at the current moment is greater than the first preset threshold value or not, and judging whether the data volume to be sent by the device simulator at the current moment is greater than the second preset threshold value or not;
if not, judging whether the working state of the browser client is an open state or not;
if so, stopping the operation of the equipment simulator in the second target operation environment, and switching the operation environment of the equipment simulator to the browser client.
5. The method of claim 2, wherein the configuration parameters further comprise at least one of: network parameters of the non-browser client, the geographic position of the non-browser client, and the operating cost of the non-browser client;
after the platform server is used as a second target operation environment of the equipment simulator, the method further comprises the following steps:
acquiring target parameters of a platform server and target parameters of all target clients; wherein the target parameters include: network parameters, geographic location, operating cost; the target client is a native client which provides an equipment simulator operating environment to the outside;
and determining the running environment for running the equipment simulator according to the target parameters of the platform server and the target parameters of all the target clients based on the configuration parameters.
6. The method of claim 1, wherein after operating the non-browser client as a first target runtime environment for the device simulator, the method further comprises:
and controlling the browser client to synchronously display the running state of the equipment simulator.
7. An apparatus for determining an operating environment of a plant simulator, comprising:
the first acquisition module is used for acquiring configuration parameters of the equipment simulator; wherein the configuration parameters include: the total amount of equipment to be simulated and the total amount of data to be sent;
a first determination module to determine a first target operating environment of a device simulator based on the configuration parameters; wherein the first target operating environment comprises any one of: a browser client, a non-browser client;
the second determining module responds to selection operation of a user if the first target operating environment is a non-browser client, and determines a second target operating environment of the equipment simulator based on the selection operation; the second target operating environment comprises any one of: a platform server, a native client;
wherein the first determining module comprises:
the device comprises an acquisition unit, a processing unit and a control unit, wherein the acquisition unit is used for acquiring a first preset threshold and a second preset threshold; the first preset threshold value represents the total amount of equipment which the browser client side allows the equipment simulator to simulate, and the second preset threshold value represents the total amount of data which the browser client side allows the equipment simulator to simulate and send;
a first determining unit, configured to, if the total amount of the device to be simulated is greater than the first preset threshold, or the total amount of the data to be sent is greater than the second preset threshold, use the non-browser client as a first target operating environment of the device simulator;
and a second determining unit, configured to use the browser client as the first target operating environment of the device simulator if the total amount of the devices to be simulated is not greater than the first preset threshold and the total amount of the data to be sent is not greater than the second preset threshold.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any of claims 1 to 6 when executing the computer program.
9. A computer-readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any of claims 1 to 6.
CN202011420142.5A 2020-12-08 2020-12-08 Method and device for determining running environment of equipment simulator and electronic equipment Active CN112260879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011420142.5A CN112260879B (en) 2020-12-08 2020-12-08 Method and device for determining running environment of equipment simulator and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011420142.5A CN112260879B (en) 2020-12-08 2020-12-08 Method and device for determining running environment of equipment simulator and electronic equipment

Publications (2)

Publication Number Publication Date
CN112260879A CN112260879A (en) 2021-01-22
CN112260879B true CN112260879B (en) 2021-03-16

Family

ID=74225059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011420142.5A Active CN112260879B (en) 2020-12-08 2020-12-08 Method and device for determining running environment of equipment simulator and electronic equipment

Country Status (1)

Country Link
CN (1) CN112260879B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239346B (en) * 2021-05-20 2021-11-09 南京瑞师信息科技有限公司 Method and system for operation maintenance based on information security

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833311A (en) * 2012-07-17 2012-12-19 广东好帮手电子科技股份有限公司 Vehicle-mounted voice communication system and method
CN104253788A (en) * 2013-06-26 2014-12-31 腾讯科技(深圳)有限公司 Data processing method and system, client, and page engine
CN109413181A (en) * 2018-10-28 2019-03-01 广州中元软件有限公司 A kind of double architecture mode methods for realizing application program
CN111988861A (en) * 2020-08-18 2020-11-24 深圳市微网力合信息技术有限公司 Wireless communication method, device, system and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10382521B2 (en) * 2015-12-14 2019-08-13 Wyse Technology, L.L.C. Gateway that enables a browser-based application to communicate with a server-side application using a non-browser-compatible protocol
US10089219B1 (en) * 2017-01-20 2018-10-02 Intuit Inc. Mock server for testing
US11711353B2 (en) * 2018-12-07 2023-07-25 Salesforce, Inc. Authenticated service application sessions using visual authentication indicia

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833311A (en) * 2012-07-17 2012-12-19 广东好帮手电子科技股份有限公司 Vehicle-mounted voice communication system and method
CN104253788A (en) * 2013-06-26 2014-12-31 腾讯科技(深圳)有限公司 Data processing method and system, client, and page engine
CN109413181A (en) * 2018-10-28 2019-03-01 广州中元软件有限公司 A kind of double architecture mode methods for realizing application program
CN111988861A (en) * 2020-08-18 2020-11-24 深圳市微网力合信息技术有限公司 Wireless communication method, device, system and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
电力设备运行环境的远程监控系统软件的研究与实现;徐夜莺;《中国优秀硕士学位论文全文数据库 工程科技II辑》;20150415;第19-20、32-33页 *

Also Published As

Publication number Publication date
CN112260879A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
KR102089284B1 (en) Cloud verification and test automation
CN110704847B (en) Vulnerability scanning method and related device
CN109710346A (en) Server management method, device, equipment and computer readable storage medium
CN113055417A (en) Intelligent industrial Internet of things system
CN109672580A (en) Full link monitoring method, apparatus, terminal device and storage medium
US10057645B2 (en) Set top box upgrade method and apparatus
CN112260879B (en) Method and device for determining running environment of equipment simulator and electronic equipment
CN107180090B (en) Reading punch card method, electronic equipment and computer storage media based on e-book
CN109120451A (en) Equipment evaluation method, equipment and computer readable storage medium based on Internet of Things
US20240007346A1 (en) Method and Apparatus for Monitoring Application Service, Electronic Device, and Readable Storage Medium
CN111611140A (en) Reporting verification method and device of buried point data, electronic equipment and storage medium
CN111736938B (en) Information display method and device, storage medium and electronic device
CN110706392B (en) Security platform test method and device, storage medium and server
CN109523236A (en) Mail generation method, device, computer equipment and storage medium
CN110875825B (en) Fault judgment method and device
CN107770213A (en) Data processing method, device, server and terminal
CN107769951A (en) Chain processing method and device
CN111104331B (en) Software management method, terminal device and computer readable storage medium
CN111190801A (en) Recommendation system testing method and device and electronic equipment
CN110598797A (en) Fault detection method and device, storage medium and electronic device
CN109243437A (en) Reminding method, device, storage medium and the electronic device of information
CN109547439B (en) Processing method and device for service node access network
CN114090074A (en) Method and device for configuring operating environment, storage medium and electronic device
CN110417618A (en) Test macro and method based on data platform
CN109462423B (en) Method, device, equipment and medium for checking data transmission unit

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
TR01 Transfer of patent right

Effective date of registration: 20210512

Address after: No.1, 3rd floor, R & D building, Sany industrial city, No.1, Sany Road, Changsha Economic and Technological Development Zone, Changsha, Hunan 410000

Patentee after: CHANGSHA ROOTCLOUD TECHNOLOGY Co.,Ltd.

Patentee after: Shugen Internet Co.,Ltd.

Address before: No.1, 3rd floor, R & D building, Sany industrial city, No.1, Sany Road, Changsha Economic and Technological Development Zone, Changsha, Hunan 410000

Patentee before: CHANGSHA ROOTCLOUD TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right