CN111224768B - Response simulation method, device, equipment and computer readable storage medium - Google Patents

Response simulation method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN111224768B
CN111224768B CN202010226246.6A CN202010226246A CN111224768B CN 111224768 B CN111224768 B CN 111224768B CN 202010226246 A CN202010226246 A CN 202010226246A CN 111224768 B CN111224768 B CN 111224768B
Authority
CN
China
Prior art keywords
response
target
task information
subscription
information
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
CN202010226246.6A
Other languages
Chinese (zh)
Other versions
CN111224768A (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.)
Guangdong Bozhilin Robot Co Ltd
Original Assignee
Guangdong Bozhilin Robot 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 Guangdong Bozhilin Robot Co Ltd filed Critical Guangdong Bozhilin Robot Co Ltd
Priority to CN202010226246.6A priority Critical patent/CN111224768B/en
Publication of CN111224768A publication Critical patent/CN111224768A/en
Application granted granted Critical
Publication of CN111224768B publication Critical patent/CN111224768B/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
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0053Allocation of signaling, i.e. of overhead other than pilot signals
    • H04L5/0055Physical resource allocation for ACK/NACK
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to the technical field of Internet of things, in particular to a response simulation method, a response simulation device, response simulation equipment and a computer-readable storage medium. The answer simulation method provided by the embodiment of the application can set an answer mode queue corresponding to each preset subscription topic in a plurality of subscription topics, wherein the answer mode queue comprises a plurality of answer items, target task information related to the target topic is received from a server, the target task information is sent to the server by a scheduling device, an answer load corresponding to the target task information is constructed based on the answer mode queue corresponding to the target topic, and then the answer load is sent to the server so that the server can send the answer load to the scheduling device to complete answer simulation. The response simulation method, the response simulation device, the response simulation equipment and the computer readable storage medium can improve the testing efficiency of a multi-machine scheduling system.

Description

Response simulation method, device, equipment and computer readable storage medium
Technical Field
The application relates to the technical field of Internet of things, in particular to a response simulation method, a response simulation device, response simulation equipment and a computer-readable storage medium.
Background
In the technical field of internet of things, multi-machine scheduling generally refers to a manner in which a scheduling device performs information interaction with multiple pieces of mechanical equipment through a communication protocol to acquire real-time information of the mechanical equipment and control the mechanical equipment to execute a target task, and Message Queue Telemetry Transport (MQTT) is a Message protocol based on a publish/subscribe paradigm under an International Organization for Standardization (ISO), and is also one of communication protocols widely applied in the technical field of internet of things at present. In a multi-machine scheduling system using MQTT protocol communication, mechanical equipment performs information interaction with scheduling equipment through MQTT service and responds to each other to promote the whole scheduling process. Therefore, in the development and test stage of the multi-machine scheduling system, the physical mechanical device is usually required to cooperate with software debugging to ensure that the mechanical device can normally respond, and the method of cooperating with software debugging by the physical mechanical device undoubtedly reduces the test efficiency of the multi-machine scheduling system to a great extent.
Disclosure of Invention
An object of the embodiments of the present application is to provide a response simulation method, device, apparatus, and computer-readable storage medium to solve the above problems.
In a first aspect, a response simulation method provided in an embodiment of the present application includes:
setting a response mode queue corresponding to a subscription topic aiming at each preset subscription topic in a plurality of subscription topics, wherein the response mode queue comprises a plurality of response items;
receiving target task information related to a target theme from a server, wherein the target task information is sent to the server by scheduling equipment;
constructing a response load corresponding to the target task information based on a response mode queue corresponding to the target theme;
and sending the response load to the server so that the server sends the response load to the dispatching equipment to finish response simulation.
The response simulation method provided by the embodiment of the application can set a response mode queue corresponding to a subscription theme for each subscription theme in a plurality of preset subscription themes, wherein the response mode queue comprises a plurality of response items, target task information related to the target theme is received from a server, the target task information is sent to the server by a scheduling device, a response load corresponding to the target task information is constructed based on the response mode queue corresponding to the target theme, and then the response load is sent to the server so that the server sends the response load to the scheduling device to complete response simulation. Therefore, in the development and test stage of the multi-machine scheduling system, the response simulation method provided by the embodiment of the application can be used for realizing the simulation response of the mechanical equipment to the scheduling equipment so as to complete the software debugging of the multi-machine scheduling system under the condition of being separated from the entity mechanical equipment of the entity mechanical equipment, thereby omitting the operations of field arrangement, connection and the like of the entity mechanical equipment and further improving the test efficiency of the multi-machine scheduling system.
With reference to the first aspect, an embodiment of the present application further provides a first optional implementation manner of the first aspect, where for each preset subscription topic in a plurality of subscription topics, before setting a response mode queue corresponding to the subscription topic, the response simulation method further includes:
acquiring a plurality of task information sent to target mechanical equipment by scheduling equipment through a server and a protocol mode of each piece of task information in the plurality of task information to acquire a plurality of protocol modes;
a plurality of subscription topics are set based on a plurality of protocol schemas.
With reference to the first optional implementation manner of the first aspect, an embodiment of the present application further provides a second optional implementation manner of the first aspect, where the setting a plurality of subscription topics based on a plurality of protocol modes includes:
determining a plurality of protocol modes with semantic similarity from the plurality of protocol modes, wherein the semantic similarity is positioned in a preset threshold interval;
and setting a subscription theme according to a plurality of protocol modes with semantic similarity, wherein the semantic similarity is positioned in a preset threshold interval.
With reference to the first aspect, an embodiment of the present application further provides a third optional implementation manner of the first aspect, where receiving target task information related to a target topic from a server includes:
monitoring a server;
when the monitoring result indicates that the server receives the initial task information sent by the scheduling equipment, judging whether a subscription theme related to the initial task information exists in a plurality of subscription themes;
and when the subscription topic related to the initial task information exists in the plurality of subscription topics, taking the subscription topic related to the initial task information in the plurality of subscription topics as a target topic, and taking the initial task information as target task information.
With reference to the first aspect, an embodiment of the present application further provides a fourth optional implementation manner of the first aspect, where constructing a response load corresponding to target task information based on a response mode queue corresponding to a target topic includes:
extracting characteristic information from the target task information;
determining a response mode queue corresponding to a target subject as a target mode queue, and taking a plurality of response items included in the target mode queue as a plurality of target response items;
and based on the characteristic information, acquiring filling information of each target response item in the plurality of target response items, and constructing a response load.
With reference to the fourth optional implementation manner of the first aspect, an embodiment of the present application further provides a fifth optional implementation manner of the first aspect, where extracting feature information from target task information includes:
analyzing the target task information, and extracting identification information and an execution logic instruction of the target mechanical equipment from the target task information;
generating feature information including the identification information and the execution logic instructions.
With reference to the fourth optional implementation manner of the first aspect, an embodiment of the present application further provides a sixth optional implementation manner of the first aspect, where the obtaining, based on the feature information, filling information of each target response item in the multiple target response items, and constructing a response load includes:
aiming at each target response item in a plurality of target response items, acquiring a response format of the target response item;
determining a plurality of response points included in the target response item according to the response format;
and based on the characteristic information, acquiring filling information of each response point in the plurality of response points, and constructing a response load.
With reference to the first aspect, an embodiment of the present application further provides a seventh optional implementation manner of the first aspect, where sending the response load to the server, so that the server sends the response load to the scheduling device, and completes response simulation, where the method includes:
storing the response load in a release queue and waiting for release time;
and when the release time meets the preset release requirement, sending the response load to the server so that the server sends the response load to the scheduling equipment to finish response simulation.
In a second aspect, a response simulation apparatus provided in an embodiment of the present application includes:
the response mode queue setting module is used for setting a response mode queue corresponding to the subscription topic aiming at each subscription topic in a plurality of preset subscription topics, and the response mode queue comprises a plurality of response items;
the information receiving module is used for receiving target task information related to a target theme from the server, and the target task information is sent to the server by the scheduling equipment;
the response load construction module is used for constructing a response load corresponding to the target task information based on the response mode queue corresponding to the target theme;
and the response load sending module is used for sending the response load to the server so that the server sends the response load to the scheduling equipment to finish response simulation.
The response simulation apparatus provided in the embodiment of the present application has the same beneficial effects as the response simulation method provided in the first aspect or any one of the optional implementations of the first aspect, and details are not repeated here.
In a third aspect, the answer simulation apparatus provided in the embodiment of the present application includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program to implement the answer simulation method provided in the first aspect or any optional implementation manner of the first aspect.
The answer simulation device provided in the embodiment of the present application has the same beneficial effects as the answer simulation method provided in the first aspect or any one of the optional implementations of the first aspect, which are not described herein again.
In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed, the method for simulating a response provided by the first aspect or any optional implementation manner of the first aspect is implemented.
The computer-readable storage medium provided in the embodiment of the present application has the same beneficial effects as the response simulation method provided in the first aspect or any one of the optional implementation manners of the first aspect, and details are not described here.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural block diagram of a multi-machine scheduling system in the prior art.
Fig. 2 is a schematic structural block diagram of a multi-machine scheduling simulation system according to an embodiment of the present application.
Fig. 3 is a schematic view of an interaction process of information interaction between a scheduling apparatus and a floor tile paving robot according to an embodiment of the present disclosure.
Fig. 4 is a flowchart of a response simulation method according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a correspondence relationship between multiple subscription topics and multiple answer mode queues according to an embodiment of the present application.
Fig. 6 is a flowchart of a response simulation apparatus according to an embodiment of the present application.
Reference numerals: 10-a multi-machine scheduling system; 20-a multi-machine scheduling simulation system; 100-a scheduling device; 200-a server; 300-a mechanical device; 400-a response simulation device; 500-a response simulator; 510-answer mode queue setting module; 520-an information receiving module; 530-a responsive load building block; 540 — reply load sending module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Furthermore, 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.
Referring to fig. 1, the multi-machine dispatching system 10 includes a dispatching device 100, a server 200 and a plurality of mechanical devices 300, wherein the dispatching device 100 is connected to the plurality of mechanical devices 300 through the server 200, and the connection mode may be implemented based on MQTT protocol. In addition, the dispatching Device 100 may be a network server, a database server, or the like, or may be a terminal Device, for example, a smart phone, a tablet computer, a Personal Digital Assistant (PAD), a Mobile Internet Device (MID), or the like, while the server 200 may be an MQTT server, and the plurality of mechanical devices 300 may be determined according to a specific application industry of the multi-machine dispatching system 10, for example, when the multi-machine dispatching system is applied to a building industry, the plurality of mechanical devices 300 may include a floor tile paving robot, a net hanging and slurry filling robot, an indoor spraying robot, or the like.
Referring to fig. 2, for example, when the dispatching device 100 performs information interaction with the floor tile paving robot and controls the floor tile paving robot to execute a battery replacing task, a task action queue is preset in the dispatching device 100, and the task action queue includes six task actions: the method comprises the following steps of positioning a battery replacement robot, opening a bin gate by the floor tile paving and pasting robot to send out a battery, taking out the battery by the battery replacement robot, replacing a full-charge battery by the battery replacement robot, putting the battery into the battery replacement robot, receiving the battery by the floor tile paving and pasting robot to close the bin gate, and corresponding to each task action, an action control instruction queue, for example, the action instruction queue corresponding to the battery taking-out by the battery replacement robot comprises a battery taking instruction sending command and a battery taking completion signal.
In the prior art, at the development and test stage of the multi-machine scheduling system 10, usually, the entity mechanical device 300 is required to cooperate with software debugging to ensure that the mechanical device 300 can normally respond, which undoubtedly increases the development difficulty of the multi-machine scheduling system 10, based on this, the embodiment of the present application provides a response simulation device 400, and then constructs the multi-machine scheduling simulation system 20 shown in fig. 3 to implement the simulation response of the mechanical device 300 to the scheduling device 100, so as to complete the software debugging of the multi-machine scheduling system 10 in the case of being separated from the entity mechanical device 300, thereby reducing the development difficulty of the multi-machine scheduling system 10.
In the embodiment of the present application, the response simulation device 400 may be a network server, a database server, or the like, or may be a terminal device, such as a smart phone, a tablet computer, a PAD, a MID, or the like, and structurally, the response simulation device 400 may include a processor and a memory.
The processor and the memory are electrically connected, directly or indirectly, to enable data transfer or interaction, e.g., the components may be electrically connected to each other via one or more communication buses or signal lines. The response simulator includes at least one software module that may be stored in a memory in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the response simulator 400. The processor is used for executing executable modules stored in the memory, such as software functional modules and computer programs included in the response simulation device, and the like, so as to realize the response simulation method.
The processor may execute the computer program upon receiving the execution instruction. The processor may be an integrated circuit chip having signal processing capabilities. The Processor may also be a general-purpose Processor, for example, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a discrete gate or transistor logic device, a discrete hardware component, which may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application, and furthermore, the general-purpose Processor may be a microprocessor or any conventional Processor.
The Memory may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and electrically Erasable Programmable Read-Only Memory (EEPROM). The memory is used for storing a program, and the processor executes the program after receiving the execution instruction.
Referring to fig. 4, fig. 4 is a schematic flowchart of a response simulation method provided in the embodiment of the present application, which is applied to a response simulation device. It should be noted that the answer simulation method provided in the embodiment of the present application is not limited by the sequence shown in fig. 4 and the following, and the specific flow and steps of the answer simulation method are described below with reference to fig. 4.
Step S100, setting a response mode queue corresponding to a subscription topic for each of a plurality of preset subscription topics, where the response mode queue includes a plurality of response items.
The response simulation method provided in the embodiment of the present application may further include step S001 and step S002 before step S100 is executed.
Step S001, acquiring a plurality of task information sent to the target mechanical equipment by the scheduling equipment through the server and a protocol mode of each piece of task information in the plurality of task information to acquire a plurality of protocol modes.
In the embodiment of the present application, the protocol mode of the task information may be understood as an expression form of a set of instruction rules that the scheduling device and the target mechanical device negotiate for the communication information, and the expression form may include a task topic and a task load. Hereinafter, a protocol mode of the task information will be described by taking an example in which the scheduling device performs information interaction with the floor tile paving robot and controls the floor tile paving robot to execute a forward movement command.
Task subject: connect/{ deviceid }/movefront }
And (3) task load: {
"MsgID": "Msg001",
"DeviceCode": "Dev001",
"DeviceIP": "192.168.0.1",
"TaskData": {
"TaskID": "Task001",
"RouteData": {
"BIMMapCode": "BIMMap001",
"NumOfPoints": 1,
"RoutePts": {
"X": 6559.0,
"Y": 1838.0,
"Z": 0,
"Angle": 0,
"WorkState": 0
}
}
}
}
The task theme is used for representing information of a task, namely information for controlling the floor tile paving robot to execute a forward moving instruction, and the task load is a specific moving requirement, such as a specific target point of movement and the like.
In addition, in the embodiment of the present application, since there may be multiple pieces of task information sent by the scheduling device to the target mechanical device through the server, and the task actions performed by each task information controller robot are different, for example, the scheduling device performs information interaction with the tile paving robot, and may control the tile paving robot to execute a forward movement instruction, and may also control the tile paving robot to execute a backward movement instruction, the specific contents of the task theme and the task load are also different in the protocol modes of different pieces of task information. Therefore, in this embodiment of the application, when step S001 is executed, the protocol modes corresponding to all task information sent by the scheduling device to the target mechanical device through the server may be acquired, so as to acquire a plurality of protocol modes.
In step S002, a plurality of subscription topics are set based on a plurality of agreement patterns.
In this embodiment of the application, a plurality of subscription topics may be set based on the plurality of protocol patterns obtained in step S001, and the plurality of subscription topics correspond to the plurality of protocol patterns one to one.
It should be further noted that, in this embodiment of the application, in order to simplify the algorithm difficulty and improve the response simulation efficiency, when step S002 is executed, a plurality of protocol patterns having semantic similarity and the semantic similarity is located in a preset threshold interval may be determined from the plurality of protocol patterns, and thereafter, a subscription theme may be set according to the plurality of protocol patterns having semantic similarity and the semantic similarity is located in the preset threshold interval, where the preset threshold interval may be, but is not limited to, [50%, 100% ], and the calculation method of the semantic similarity may be calculated according to certain world knowledge (Ontology) or a classification system (Taxonomy), or may be statistical by using a corpus, which is not specifically limited in this embodiment of the application. For example, when the dispatching device performs information interaction with the floor tile paving robot and controls the floor tile paving robot to execute a forward movement instruction, the task in the protocol mode of the task information is as follows:
connect/{deviceid}/movefront
the dispatching equipment carries out information interaction with the floor tile paving robot, and when the floor tile paving robot is controlled to execute a backward movement instruction, the task theme in the protocol mode of the task information is as follows:
connect/{deviceid}/moveback
the task load of the two task topics has semantic similarity, the semantic similarity is located in a preset threshold interval, and meanwhile, the corresponding response rule also has the semantic similarity, so that the same subscription topic can be set:
connect/{deviceid}/move{direction}
in addition, in the embodiment of the present application, the set plurality of subscription topics may include an action instruction mode, a movement instruction mode, an offset instruction mode, and the like.
In step S100, for each subscription theme in the plurality of subscription themes, a response mode queue corresponding to the subscription theme may be set according to a specific service specification, and similarly, taking as an example that the scheduling device performs information interaction with the tile paving robot and controls the tile paving robot to execute a movement instruction, in a protocol mode of the task information, the subscription theme is connect/{ deviceid }/move { direction }, after receiving the task information, the tile paving robot takes the content that needs to be responded at the first time as a response item in the response mode queue, the response item is arranged in a response sequence, then the paving robot executes a first movement action specified in the task information, after completing the movement action, a response content is required, and then the response content is taken as a response mode queue, and a second response item is arranged in the response sequence, and so on.
In the embodiment of the application, for each subscription topic in a plurality of subscription topics, a response mode queue corresponding to the subscription topic is set, so that after the plurality of response mode queues are obtained, the plurality of subscription topics and the plurality of response mode queues can be stored in a form of a corresponding table, and meanwhile, the corresponding relation between the plurality of subscription topics and the plurality of response mode queues can also be represented in a form of the corresponding table.
In addition, it should be noted that, in the embodiment of the present application, each answer item in a plurality of answer items included in the answer mode queue has a corresponding answer format. Taking the subscription topic list shown in fig. 5 as an example, the first response mode queue corresponding to the action instruction mode includes a first response item and a second response item, the first response item corresponds to a response format 1, the second response item corresponds to a response format 2, the second response mode queue corresponding to the mobile instruction mode includes a third response item and a fourth response item, the third response item corresponds to a response format 1, the fourth response item corresponds to a response format 3, the third response mode queue corresponding to the offset instruction mode includes a fifth response item and a sixth response item, the fifth response item corresponds to a response format 1, and the sixth response item corresponds to a response format 2. It should also be noted that, in the embodiment of the present application, the response format corresponding to each response item may also be set according to a specific service specification, and details of this embodiment of the present application are not described herein.
And step S200, receiving target task information related to the target theme from the server, wherein the target task information is sent to the server by the scheduling equipment.
Based on step S001, step S002 and step S100, in the embodiment of the present application, step S200 may include step S210, step S220 and step S230.
Step S210, monitoring the server.
Step S220, when the monitoring result indicates that the server receives the initial task information sent by the scheduling device, determining whether a subscription topic related to the initial task information exists in the plurality of subscription topics.
Step S230, when there is a subscription topic related to the initial task information in the plurality of subscription topics, taking the subscription topic related to the initial task information in the plurality of subscription topics as a target topic, and taking the initial task information as target task information.
Similarly, taking the subscription topic list shown in fig. 5 as an example, it is assumed that in the embodiment of the present application, the initial task information is a move instruction, and since a subscription topic connect/{ deviceid }/move { direction } related to the move instruction exists in the subscription topic list, the connect/{ deviceid }/move { direction } may be used as a target topic, and the initial task information is used as target task information.
Step S230 is further described by taking the example that the dispatching device performs information interaction with the floor tile paving robot and controls the floor tile paving robot to execute the moving command.
Task subject: connect/{ deviceid }/move { direction }
And (3) task load: {
"MsgID": "Msg001",
"DeviceCode": "Dev001",
"DeviceIP": "192.168.0.1",
"TaskData": {
"TaskID": "Task001",
"RouteData": {
"BIMMapCode": "BIMMap001",
"NumOfPoints": 1,
"RoutePts": {
"X": 6559.0,
"Y": 1838.0,
"Z": 0,
"Angle": 0,
"WorkState": 0
}
}
}
}
Based on step S230, the determined target topic is:
connect/{deviceid}/move{direction}
the determined target task information is as follows:
task subject: connect/{ deviceid }/move { direction }
And (3) task load: {
"MsgID": "Msg001",
"DeviceCode": "Dev001",
"DeviceIP": "192.168.0.1",
"TaskData": {
"TaskID": "Task001",
"RouteData": {
"BIMMapCode": "BIMMap001",
"NumOfPoints": 1,
"RoutePts": {
"X": 6559.0,
"Y": 1838.0,
"Z": 0,
"Angle": 0,
"WorkState": 0
}
}
}
}
And step S300, constructing a response load corresponding to the target task information based on the response mode queue corresponding to the target theme.
With respect to step S300, in the embodiment of the present application, as an optional implementation manner, step S310, step S320, and step S330 may be included.
Step S310, feature information is extracted from the target task information.
In the embodiment of the application, the target task information can be analyzed, and information such as a message code of the target task information, an equipment code of the target mechanical equipment, an IP address of the target mechanical equipment, a task number, an execution logic instruction and the like can be determined and used as feature information together.
Step S320, determining a response mode queue corresponding to the target topic as a target mode queue, and taking a plurality of response items included in the target mode queue as a plurality of target response items.
In the embodiment of the application, the answer mode queue corresponding to the target theme can be determined by accessing the corresponding table to serve as the target mode queue, and a plurality of answer items included in the target mode queue are used as a plurality of target answer items.
Step S330, based on the characteristic information, acquiring filling information of each target response item in the plurality of target response items, and constructing a response load.
In the embodiment of the application, the response format of the target response item can be obtained for each target response item in the plurality of target response items, then the plurality of response points included in the target response item are determined according to the response format, and finally, the filling information of each response point in the plurality of response points is obtained based on the characteristic information to construct the response load.
TABLE 1
Message encoding of the target task information:
response coding:
executing the logic instructions:
and (3) executing the state:
for example, when the reply format of the target reply item is as shown in table 1, according to the reply format, it is determined that a plurality of reply points in the target reply item include the message encoding, the reply encoding, the execution logic instruction, and the execution state of the target task information, and thereafter, the identification information and the execution logic command of the target mechanical equipment can be extracted from the characteristic information and filled in the corresponding position, and meanwhile, the response code is obtained and the response state is generated, thereby realizing the purposes of acquiring the filling information of each target response item in a plurality of target response items and constructing response load based on the characteristic information, wherein, the response status may include successful execution and failed execution, when the response status is successful execution, the system is used for performing response simulation on the scene with successful execution, and when the response state is execution failure, the system is used for performing response simulation on the scene with failed execution.
And step S400, sending the response load to the server so that the server sends the response load to the dispatching equipment to finish response simulation.
In this embodiment of the application, the response load is sent to the server, so that when the server sends the response load to the scheduling device, a response topic corresponding to the response load may also be sent to the scheduling device, where the response topic corresponding to the response load is the target topic determined in step S230.
In addition, with respect to step S400, as an optional implementation manner, in the embodiment of the present application, the method may include storing the response load in a release queue, waiting for a release time, and when the release time meets a preset release requirement, sending the response load to the server, so that the server sends the response load to the scheduling device, and completes the response simulation. For example, the response load may be stored in a release queue, and then, according to a preset time interval, it is determined whether the response load to be released exists in the release queue, when the response load to be released exists in the release queue, a time difference between the current time and the storage time of the response load is calculated, and when the time difference is greater than the theoretical action time duration corresponding to the response load, it is determined that the release time meets a preset release requirement, the response load is sent to the server, so that the server sends the response load to the scheduling device, and response simulation is completed, where the preset time interval may be, but is not limited to, 1S or 2S, and the theoretical action time duration corresponding to the response load may be a task action theoretical execution time duration corresponding to the target task information corresponding to the response load.
Based on the same inventive concept as the above-mentioned response simulation method, the embodiment of the present application further provides a response simulation apparatus 500 applied to the response simulation device. Referring to fig. 6, the response simulator 500 according to the embodiment of the present disclosure includes a response mode queue setting module 510, an information receiving module 520, a response load constructing module 530, and a response load sending module 540.
A response mode queue setting module 510, configured to set, for each subscription topic in a plurality of preset subscription topics, a response mode queue corresponding to the subscription topic, where the response mode queue includes a plurality of response items;
the description of the answer mode queue setting module 510 may refer to the detailed description of step S100 in the above-mentioned answer simulation method related embodiment, that is, step S100 may be executed by the answer mode queue setting module 510.
And an information receiving module 520, configured to receive target task information related to the target topic from the server, where the target task information is sent to the server by the scheduling device.
The description of the information receiving module 520 may refer to the detailed description of the step S200 in the above embodiments related to the response simulation method, that is, the step S200 may be executed by the information receiving module 520.
And a response load construction module 530, configured to construct a response load corresponding to the target task information based on the response mode queue corresponding to the target topic.
The description of the response load constructing module 530 may refer to the detailed description of step S300 in the above embodiments related to the response simulation method, that is, step S300 may be executed by the response load constructing module 530.
And the response load sending module 540 is configured to send the response load to the server, so that the server sends the response load to the scheduling device, and completes response simulation.
The response load sending module 540 is specifically configured to store the response load in a release queue, wait for release time, and send the response load to the server when the release time meets a preset release requirement, so that the server sends the response load to the scheduling device to complete response simulation.
The description of the response load sending module 540 may refer to the detailed description of the step S400 in the above embodiments related to the response simulation method, that is, the step S400 may be executed by the response load sending module 540.
The answering simulation device 500 provided in the embodiment of the present application may further include a protocol mode obtaining module and a subscription theme setting module.
The protocol mode acquisition module is used for acquiring a plurality of pieces of task information sent to the target mechanical equipment by the scheduling equipment through the server and a protocol mode of each piece of task information in the plurality of pieces of task information so as to acquire a plurality of protocol modes.
The description of the protocol mode obtaining module may refer to the detailed description of step S001 in the above embodiment related to the response simulation method, that is, step S001 may be executed by the protocol mode obtaining module.
And the subscription theme setting module is used for setting a plurality of subscription themes based on a plurality of protocol modes.
The subscription theme setting module is specifically configured to determine a plurality of protocol patterns with semantic similarity located in a preset threshold interval from the plurality of protocol patterns, and set one subscription theme according to the plurality of protocol patterns with semantic similarity located in the preset threshold interval.
The description of the subscription theme setting module may refer to the detailed description of step S002 in the above embodiment related to the answer simulation method, that is, step S002 may be executed by the subscription theme setting module.
In this embodiment, the information receiving module 520 may include a monitoring unit, a determining unit, and an information receiving unit.
And the monitoring unit is used for monitoring the server.
The description of the listening unit may refer to the detailed description of step S210 in the above embodiments related to the response simulation method, that is, step S210 may be executed by the listening unit.
And the judging unit is used for judging whether a subscription theme related to the initial task information exists in the plurality of subscription themes or not when the monitoring result indicates that the server receives the initial task information sent by the scheduling equipment.
The description of the determining unit may refer to the detailed description of step S220 in the above embodiments related to the response simulation method, that is, step S220 may be executed by the determining unit.
And the information receiving unit is used for taking the subscription theme related to the initial task information in the plurality of subscription themes as a target theme and taking the initial task information as the target task information when the subscription theme related to the initial task information exists in the plurality of subscription themes.
The description of the information receiving unit may refer to the detailed description of step S230 in the above embodiments related to the response simulation method, that is, step S230 may be executed by the information receiving unit.
In this embodiment, the response load construction module 530 may include an information extraction unit, a target response item determination unit, and a response load construction unit.
And the information extraction unit is used for extracting the characteristic information from the target task information.
And the information extraction unit is specifically used for analyzing the target task information, extracting the identification information and the execution logic command of the target mechanical equipment from the target task information, and generating the characteristic information comprising the identification information and the execution logic command.
The description of the information extraction unit may refer to the detailed description of step S310 in the above-described embodiments related to the response simulation method, that is, step S310 may be performed by the information extraction unit.
And the target response item determining unit is used for determining a response mode queue corresponding to the target subject as a target mode queue and using a plurality of response items included in the target mode queue as a plurality of target response items.
The description of the target response item determination unit may refer to the detailed description of step S320 in the above-mentioned response simulation method related embodiment, that is, step S320 may be executed by the target response item determination unit.
And the response load construction unit is used for acquiring filling information of each target response item in the plurality of target response items based on the characteristic information and constructing the response load.
The response load construction unit is specifically configured to acquire a response format of the target response item for each of the plurality of target response items, determine a plurality of response points included in the target response item according to the response format, acquire filling information of each of the plurality of response points based on the feature information, and construct a response load.
The description of the response load constructing unit may refer to the detailed description of step S330 in the above embodiments related to the response simulation method, that is, step S330 may be executed by the response load constructing unit.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed, the method for simulating a response provided in the foregoing method embodiment is implemented.
To sum up, the answer simulation method, apparatus, device and computer-readable storage medium provided in the embodiments of the present application can set, for each subscription topic in a plurality of preset subscription topics, an answer mode queue corresponding to the subscription topic, where the answer mode queue includes a plurality of answer items, receive, from a server, target task information related to the target topic, where the target task information is sent to the server by a scheduling device, and construct, based on the answer mode queue corresponding to the target topic, an answer load corresponding to the target task information, and then send the answer load to the server, so that the server sends the answer load to the scheduling device, thereby completing the answer simulation. Therefore, in the development and test stage of the multi-machine scheduling system, the response simulation method provided by the embodiment of the application can be used for realizing the simulation response of the mechanical equipment to the scheduling equipment so as to complete the software debugging of the multi-machine scheduling system under the condition of being separated from the entity mechanical equipment of the entity mechanical equipment, thereby omitting the operations of field arrangement, connection and the like of the entity mechanical equipment and further improving the test efficiency of the multi-machine scheduling system.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a computer-readable storage medium, which 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 described in each embodiment of the present application. And the aforementioned computer-readable storage media comprise: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
Moreover, it is noted that, in this document, relational terms such as "first," "second," "third," and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Claims (10)

1. A method of response simulation, comprising:
setting a response mode queue corresponding to a preset subscription topic for each subscription topic in a plurality of subscription topics, wherein the response mode queue comprises a plurality of response items;
receiving target task information related to a target subject from a server, wherein the target task information is sent to the server by a scheduling device;
constructing a response load corresponding to the target task information based on a response mode queue corresponding to the target theme;
and sending the response load to the server so that the server sends the response load to the dispatching equipment to finish response simulation.
2. The answer simulation method according to claim 1, wherein before setting an answer pattern queue corresponding to each of a plurality of preset topics, the answer simulation method further comprises:
acquiring a plurality of task information sent to target mechanical equipment by the dispatching equipment through the server and a protocol mode of each piece of task information in the plurality of task information to acquire a plurality of protocol modes;
setting a plurality of subscription topics based on the plurality of protocol modes.
3. The answer simulation method of claim 2, wherein setting a plurality of subscription topics based on the plurality of protocol models comprises:
determining a plurality of protocol modes with semantic similarity from the plurality of protocol modes, wherein the semantic similarity is positioned in a preset threshold interval;
and setting a subscription theme according to the plurality of protocol modes with semantic similarity and the semantic similarity located in a preset threshold interval.
4. The response simulation method of claim 1, wherein receiving target task information related to a target topic from a server comprises:
monitoring the server;
when the monitoring result indicates that the server receives initial task information sent by the scheduling device, judging whether a subscription theme related to the initial task information exists in the plurality of subscription themes;
and when the subscription subjects related to the initial task information exist in the plurality of subscription subjects, taking the subscription subjects related to the initial task information in the plurality of subscription subjects as target subjects, and taking the initial task information as target task information.
5. The response simulation method according to claim 1, wherein the constructing of the response load corresponding to the target task information based on the response pattern queue corresponding to the target topic comprises:
extracting characteristic information from the target task information;
determining a response mode queue corresponding to the target subject as a target mode queue, and taking a plurality of response items included in the target mode queue as a plurality of target response items;
and acquiring filling information of each target response item in the plurality of target response items based on the characteristic information to construct the response load.
6. The response simulation method of claim 5, wherein the extracting feature information from the target task information comprises:
analyzing the target task information, and extracting identification information and an execution logic instruction of target mechanical equipment from the target task information;
generating feature information including the identification information and the execution logic instruction.
7. The response simulation method according to claim 5, wherein the obtaining of the padding information of each of the plurality of target response items based on the characteristic information to construct the response payload includes:
aiming at each target response item in the plurality of target response items, acquiring a response format of the target response item;
determining a plurality of response points included in the target response item according to the response format;
and based on the characteristic information, acquiring filling information of each response point in the plurality of response points, and constructing the response load.
8. A response simulator, comprising:
the system comprises a response mode queue setting module, a response mode queue setting module and a response mode queue processing module, wherein the response mode queue setting module is used for setting a response mode queue corresponding to a preset subscription topic for each subscription topic in a plurality of subscription topics, and the response mode queue comprises a plurality of response items;
the system comprises an information receiving module, a scheduling device and a processing module, wherein the information receiving module is used for receiving target task information related to a target theme from a server, and the target task information is sent to the server by the scheduling device;
the response load construction module is used for constructing a response load corresponding to the target task information based on a response mode queue corresponding to the target theme;
and the response load sending module is used for sending the response load to the server so that the server can send the response load to the scheduling equipment to finish response simulation.
9. A response simulation apparatus comprising a processor and a memory, the memory having a computer program stored thereon, the processor being configured to execute the computer program to implement the response simulation method of any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the response simulation method of any one of claims 1 to 7.
CN202010226246.6A 2020-03-27 2020-03-27 Response simulation method, device, equipment and computer readable storage medium Active CN111224768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010226246.6A CN111224768B (en) 2020-03-27 2020-03-27 Response simulation method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010226246.6A CN111224768B (en) 2020-03-27 2020-03-27 Response simulation method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111224768A CN111224768A (en) 2020-06-02
CN111224768B true CN111224768B (en) 2020-07-24

Family

ID=70831615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010226246.6A Active CN111224768B (en) 2020-03-27 2020-03-27 Response simulation method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111224768B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112738245B (en) * 2020-12-28 2023-03-28 青岛海尔科技有限公司 Method and device for determining equipment response information, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099801A (en) * 2014-05-07 2015-11-25 中国电信股份有限公司 Testing system for information management system, and testing environment simulation method
CN107018017A (en) * 2017-03-17 2017-08-04 普奥云信息科技(北京)有限公司 Emulation simulator and Internet of Things analogue system
CN107942721A (en) * 2017-10-30 2018-04-20 中国电力科学研究院有限公司 A kind of emulation mode and system of supporting scheduling system to verify
CN109521927A (en) * 2017-09-20 2019-03-26 阿里巴巴集团控股有限公司 Robot interactive approach and equipment
CN110815228A (en) * 2019-11-18 2020-02-21 广东博智林机器人有限公司 Cross-floor construction scheduling method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8606386B2 (en) * 2010-03-12 2013-12-10 Ana Maria Dias Medureira Pereira Multi-agent system for distributed manufacturing scheduling with Genetic Algorithms and Tabu Search
US10243983B2 (en) * 2015-12-08 2019-03-26 Sudhir Pendse System and method for using simulators in network security and useful in IoT security
CN110913020B (en) * 2019-12-20 2022-04-05 语联网(武汉)信息技术有限公司 Data transmission method and device for workgroup

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099801A (en) * 2014-05-07 2015-11-25 中国电信股份有限公司 Testing system for information management system, and testing environment simulation method
CN107018017A (en) * 2017-03-17 2017-08-04 普奥云信息科技(北京)有限公司 Emulation simulator and Internet of Things analogue system
CN109521927A (en) * 2017-09-20 2019-03-26 阿里巴巴集团控股有限公司 Robot interactive approach and equipment
CN107942721A (en) * 2017-10-30 2018-04-20 中国电力科学研究院有限公司 A kind of emulation mode and system of supporting scheduling system to verify
CN110815228A (en) * 2019-11-18 2020-02-21 广东博智林机器人有限公司 Cross-floor construction scheduling method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于遗传算法的多工序多机器调度优化研究";周福来;《软件》;20190615;第40卷(第6期);第123-126页 *

Also Published As

Publication number Publication date
CN111224768A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN111091200B (en) Updating method and system of training model, intelligent device, server and storage medium
CN111694644A (en) Message processing method and device based on robot operating system and computer equipment
CN103065235A (en) Systems and methods for event attendance notification
CN114048857A (en) Calculation capacity distribution method and device and calculation capacity server
CN111126604B (en) Model training method, device, server and storage medium
CN111224768B (en) Response simulation method, device, equipment and computer readable storage medium
CN110751458A (en) Business approval method, device and system
CN107704365B (en) Monitoring data reporting method and device for mobile terminal hybrid application
CN117439838B (en) Edge computing gateway master-slave machine-oriented self-adaptive rapid networking method
CN115220885A (en) Intelligent agent control method and device, storage medium, electronic equipment and server
CN112559124A (en) Model management system and target operation instruction processing method and device
CN116302448B (en) Task scheduling method and system
CN114157725B (en) Method, device, server, electronic equipment and storage medium for equipment linkage
CN103577299A (en) Monitoring method and device, data processing method and device, and distributed computing system
CN113676353B (en) Control method and device of equipment, storage medium and electronic device
CN114466088B (en) Data transmission method and device of sweeping robot, storage medium and terminal
CN112992142B (en) Voice message reply method, device, equipment and medium
CN111123727B (en) Unmanned vehicle simulation building method, device, equipment and computer readable medium
CN112667255A (en) Updating method, updating device, electronic equipment and storage medium
CN113128297A (en) Equipment docking method and device, electronic equipment and storage medium
CN114528076B (en) Satellite-borne software communication scheduling method and system
CN114124681B (en) Binding information sending method and device, storage medium and electronic device
CN109003031A (en) A kind of method, equipment and the storage medium of scheduling and planning product
CN111832735B (en) Method and system for performing a machine learning process based on templates
CN114217538A (en) Information reporting method, system, electronic device and 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