CN114513384A - Device control method, device, terminal and computer readable storage medium - Google Patents

Device control method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN114513384A
CN114513384A CN202210075563.1A CN202210075563A CN114513384A CN 114513384 A CN114513384 A CN 114513384A CN 202210075563 A CN202210075563 A CN 202210075563A CN 114513384 A CN114513384 A CN 114513384A
Authority
CN
China
Prior art keywords
equipment
information
control
type
message
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.)
Pending
Application number
CN202210075563.1A
Other languages
Chinese (zh)
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.)
Shenzhen Shinry Technologies Co Ltd
Original Assignee
Shenzhen Shinry Technologies 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 Shenzhen Shinry Technologies Co Ltd filed Critical Shenzhen Shinry Technologies Co Ltd
Priority to CN202210075563.1A priority Critical patent/CN114513384A/en
Publication of CN114513384A publication Critical patent/CN114513384A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • 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
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Abstract

The embodiment of the application provides a device control method, a device, a terminal and a computer readable storage medium, wherein the method comprises the following steps: receiving an equipment control message sent by a target application program, wherein the type of the equipment control message comprises a CAN message type; analyzing the equipment control message to obtain equipment identification and control information, wherein the equipment identification is the identification of equipment in an equipment group connected with the test application program; generating a control instruction according to the control information and the equipment identifier; the control instruction is sent to the equipment corresponding to the equipment identification, the control instruction CAN be sent to the test application program in a CAN message mode, and the equipment is controlled, so that the equipment control efficiency is improved.

Description

Device control method, device, terminal and computer readable storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a device control method, apparatus, terminal, and computer-readable storage medium.
Background
With the continuous development of society, automobiles have entered into people's daily lives. In the existing vehicle-mounted device, when a control device of the vehicle-mounted device communicates with other vehicle-mounted controlled devices, the controlled device is generally controlled by sending a GPIB instruction to the controlled device, but due to the increase of the demand of people on the vehicle, the quality of the vehicle is also improved, which leads to a rapid increase in the number of vehicle-mounted controlled devices, and since the speed of sending a GPIB (general purpose interface bus) instruction by an application program in the control device is slow, the instruction cannot be quickly sent to the controlled device, which leads to a low efficiency when instruction transmission is performed on a large number of controlled devices, and reduces the efficiency of controlling the controlled devices.
Disclosure of Invention
The embodiment of the application provides an equipment control method, an equipment control device, a terminal and a computer readable storage medium, which CAN send a control instruction to a test application program in a CAN message mode and control equipment, so that the equipment control efficiency is improved.
A first aspect of an embodiment of the present application provides an apparatus control method, which is applied to testing an application program, and the method includes:
receiving an equipment control message sent by a target application program, wherein the type of the equipment control message comprises a CAN message type;
analyzing the equipment control message to obtain equipment identification and control information, wherein the equipment identification is the identification of equipment in an equipment group connected with the test application program;
generating a control instruction according to the control information and the equipment identifier;
and sending the control instruction to the equipment corresponding to the equipment identification.
With reference to the first aspect, in a possible implementation manner, the generating a control instruction according to the control information and the device identifier includes:
determining port information according to the equipment identification, wherein the port information is information of a communication port of the test application program in communication connection with equipment corresponding to the equipment identification;
determining the type information of the control instruction according to the port information;
and generating the control instruction according to the control information and the type information.
With reference to the first aspect, in one possible implementation manner, the method further includes:
receiving state information in a current working cycle sent by first equipment in the equipment group, wherein the first equipment is any one of the equipment in the equipment group;
packaging the state information to obtain a feedback message, wherein the type of the feedback message comprises a CAN message;
and sending the feedback message to the target application program.
With reference to the first aspect, in one possible implementation manner, the method further includes:
determining the working state information and the equipment state information of the first equipment from the state information;
acquiring first offset information between the working state information and preset working state information, and acquiring second offset information between the equipment state information and preset equipment state information;
determining whether the first device is in an abnormal state according to the first offset information and the second offset information;
if the first equipment is determined to be in the abnormal state, determining the abnormal state type of the first equipment according to the first offset information and the second offset information;
and sending the abnormal state type, the first offset information and the second offset information to the target application program.
With reference to the first aspect, in a possible implementation manner, after the sending the abnormal state type, the first offset information, and the second offset information to the target application, the method further includes:
determining K first reference abnormal information processing templates according to the abnormal state type;
determining M second reference abnormal information processing templates from the K first reference abnormal information processing templates according to the first offset information and the second offset information;
generating an abnormal information processing parameter according to the M second reference abnormal information processing templates, the first offset information and the second offset information;
and sending the abnormal information processing parameters to the target application program.
A second aspect of an embodiment of the present application provides an apparatus control device, which is applied to test an application program, and includes:
the receiving module is used for receiving an equipment control message sent by a target application program, and the type of the equipment control message comprises a CAN message type;
the analysis module is used for analyzing the equipment control message to obtain an equipment identifier and control information, wherein the equipment identifier is an identifier of equipment in an equipment group connected with the test application program;
the generating module is used for generating a control instruction according to the control information and the equipment identifier;
and the sending module is used for sending the control instruction to the equipment corresponding to the equipment identifier.
With reference to the second aspect, in one possible implementation manner, the generating module is configured to:
determining port information according to the equipment identification, wherein the port information is information of a communication port of the test application program in communication connection with equipment corresponding to the equipment identification;
determining the type information of the control instruction according to the port information;
and generating the control instruction according to the control information and the type information.
With reference to the second aspect, in one possible implementation manner, the apparatus is further configured to:
receiving state information in a current working cycle sent by first equipment in the equipment group, wherein the first equipment is any one of the equipment in the equipment group;
packaging the state information to obtain a feedback message, wherein the type of the feedback message comprises a CAN message;
and sending the feedback message to the target application program.
With reference to the second aspect, in one possible implementation manner, the apparatus is further configured to:
determining the working state information and the equipment state information of the first equipment from the state information;
acquiring first offset information between the working state information and preset working state information, and acquiring second offset information between the equipment state information and preset equipment state information;
determining whether the first device is in an abnormal state according to the first offset information and the second offset information;
if the first equipment is determined to be in the abnormal state, determining the abnormal state type of the first equipment according to the first offset information and the second offset information;
and sending the abnormal state type, the first offset information and the second offset information to the target application program.
With reference to the second aspect, in one possible implementation manner, after the sending the exception status type, the first offset information, and the second offset information to the target application, the apparatus is further configured to:
determining K first reference abnormal information processing templates according to the abnormal state type;
determining M second reference abnormal information processing templates from the K first reference abnormal information processing templates according to the first offset information and the second offset information;
generating an abnormal information processing parameter according to the M second reference abnormal information processing templates, the first offset information and the second offset information;
and sending the abnormal information processing parameters to the target application program.
A third aspect of the embodiments of the present application provides a terminal, including a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the step instructions in the first aspect of the embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps as described in the first aspect of embodiments of the present application.
A fifth aspect of embodiments of the present application provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has at least the following beneficial effects:
the method comprises the steps of analyzing an equipment control message by receiving the equipment control message sent by a target application program, wherein the type of the equipment control message comprises a CAN message type to obtain an equipment identifier and control information, the equipment identifier is the identifier of equipment in an equipment group connected with a test application program, generating a control instruction according to the control information and the equipment identifier, and sending the control instruction to the equipment corresponding to the equipment identifier, so that the equipment control message CAN be received in a CAN message mode, the equipment control message is analyzed to obtain the equipment identifier and the control information, the equipment is controlled according to the control information, the control information CAN be quickly received by the CAN message sent by a CAN protocol, the equipment is controlled according to the control information, and the equipment control efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application 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, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an interaction diagram of an apparatus control method according to an embodiment of the present application;
fig. 2 is an interaction diagram of another apparatus control method provided in the embodiment of the present application;
fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus control device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The terms "first," "second," and the like in the description and claims of the present application and in the foregoing drawings are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Referring to fig. 1, fig. 1 is an interaction diagram of an apparatus control method according to an embodiment of the present disclosure. As shown in fig. 1, the device control method is applied to a test application, and the method includes:
s101, the target application program sends a device control message to the test application program.
The target application program may be a CANoe, the CANoe may perform fast communication with the test application program, and the communication content may include an output state of the device, and the like. Specifically, for example, the output state, the output parameter, and the like of the device are controlled. The type of the device control message includes a CAN (controller area network) message type.
The type of the device control message may be a CAN message type, or may be a message type of another communication mode such as LIN (local interconnect network) or FlexRay.
Before sending the control information and the device identifier to the test application program, the target application program needs to encapsulate the control information and the device identifier into a CAN message to obtain a device control message. And sending the equipment control message to the test application program through the CAN message. The device identifier may be identification information of the device itself, or may be a user-defined device identifier.
S102, the test application program analyzes the equipment control message to obtain equipment identification and control information.
The test application may parse the device control packet and obtain the device identification and control information from the load field of the packet. The device identifier may be an identifier of a device in the device group connected to the test application, and may specifically be an identifier of a device that the target application needs to control.
The device group includes a plurality of devices, and the target application program may control the plurality of devices in the device group at the same time, or may control one or more devices in the device group separately.
And S103, generating a control instruction by the test application program according to the equipment identification and the control information.
The test application may determine the port information according to the device identifier and determine the control instruction according to the port information and the control information. The port information may be information of a communication port through which the test application is communicatively connected to the device corresponding to the device identifier, for example, information of a GPIB port, information of a USB port, and the like.
And S104, the test application program sends the control instruction to the equipment corresponding to the equipment identification.
The test application may send the control instruction to the device according to the communication port between the devices corresponding to the device identification.
In this example, by receiving a device control message sent by a target application, the type of the device control message including a CAN message type, parsing the device control message, to obtain device identifications and control information, the device identifications being identifications of devices in a group of devices connected to the test application, generating a control instruction according to the control information and the equipment identifier, and sending the control instruction to the equipment corresponding to the equipment identifier, so that the equipment control message CAN be received in a CAN message mode, analyzing the device control message to obtain device identification and control information, controlling the device according to the control information, therefore, the control information CAN be rapidly received through the CAN message sent by the CAN protocol, and the equipment is controlled according to the control information, so that the equipment control efficiency is improved.
In one possible implementation manner, the method for generating a control instruction according to the control information and the device identifier includes:
a1, determining port information according to the device identifier, wherein the port information is information of a communication port for the communication connection between the test application program and the device corresponding to the device identifier;
a2, determining the type information of the control command according to the port information;
and A3, generating the control command according to the control information and the type information.
The port information may be obtained by querying through the device identifier, and specifically, the communication port for performing communication connection between the test application and the device corresponding to the device identifier may be recorded in the database, so that the port information may be obtained by querying from the database based on the device identifier. Or acquiring the equipment and the port information which are in communication connection with the test application program at present, and acquiring the port information according to the identification information of the equipment.
Different port information corresponds to different types of information, and the control instruction is matched with the port information. For example, the type information of the control instruction corresponding to the GPIB port is different from the type of the control instruction corresponding to the USB port.
The method of generating the control instruction according to the control information and the type information may employ a general instruction generation method.
In this example, the port information is determined through the device identification information, the type information of the control instruction is determined according to the port information, and the control instruction is generated according to the control information and the type information, so that the control instruction adapted to the communication port can be generated, and the accuracy of the control instruction generation is improved.
In one possible implementation, as shown in fig. 2, the test application may further receive status information sent by devices in the device group, and send the status information to the target application, specifically as follows:
b1, receiving state information in the current work cycle sent by a first device in the device group, wherein the first device is any one device in the device group;
b2, packaging the state information to obtain a feedback message, wherein the type of the feedback message comprises a CAN message;
and B3, sending the feedback message to the target application program.
The type of the feedback message may also be a message in other communication modes such as LIN, FlexRay, and the like. The state information may include operating state information after the device executes the control command, state information of the device itself, and the like. The current duty cycle may be understood as the cycle in which the instruction execution is ongoing, etc.
In this example, the received status information sent by the first device may be encapsulated to obtain a feedback message, where the feedback message may be a CAN message, and the feedback message is sent to the target application program, so that efficiency of sending the status information is improved.
In a possible implementation manner, a test application may further perform preliminary discrimination on the state of the device, and discriminate whether the device belongs to an abnormal state, or the like, specifically as follows:
c1, determining the working state information and the device state information of the first device from the state information;
c2, acquiring first offset information between the working state information and preset working state information, and acquiring second offset information between the equipment state information and preset equipment state information;
c3, determining whether the first device is in an abnormal state according to the first offset information and the second offset information;
c4, if the first device is determined to be in an abnormal state, determining the abnormal state type of the first device according to the first offset information and the second offset information;
c5, sending the abnormal state type, the first offset information and the second offset information to the target application program.
The operating state information and the device state information may be determined from the state information based on the state type information. The state type information of the operating state information and the device state information is different. Device state information may be understood as state information of hardware, etc. of the device while running. The operating state information may be understood as operating state information after execution of the control command, or the like.
The preset working state information and the preset equipment state information are set through experience values or historical data.
Whether the first offset information and the second offset information are in the abnormal offset information set or not can be judged, and if any one of the first offset information and the second offset information is in the abnormal offset information set, the first equipment is determined to be in an abnormal state; otherwise, determining that the first equipment is in a normal state.
If the first offset information is in the abnormal offset information set and the second offset information is not in the abnormal offset information set, determining that the abnormal state type is the first abnormal state type; if the first offset information is not in the abnormal offset information set and the second offset information is in the abnormal offset information set, determining that the abnormal state type is a second abnormal state type; if the first offset information is in the abnormal offset information set and the second offset information is in the abnormal offset information set, it may be determined that the abnormal state type is the third abnormal state type. Of course, other exception type corresponding manners may be available, which are not described herein again.
The abnormal state type, the first offset information and the second offset information CAN be subjected to CAN message encapsulation, and the encapsulated abnormal state type, the first offset information and the second offset information are sent to a target application program.
In this example, the state information of the first device may be determined, the abnormal state type is determined when the first device is in the abnormal state, and the abnormal state type and the offset information are sent to the target application program, so that the target application program reduces subsequent steps in performing state analysis on the first device, and the efficiency is improved.
In a possible implementation manner, after the abnormal state type, the first offset information, and the second offset information are sent to the target application program, the abnormal state of the first device may be further analyzed to obtain a corresponding abnormal information processing parameter, which is specifically as follows:
d1, determining K first reference abnormal information processing templates according to the abnormal state type;
d2, determining M second reference abnormal information processing templates from the K first reference abnormal information processing templates according to the first offset information and the second offset information;
d3, generating an abnormal information processing parameter according to the M second reference abnormal information processing templates, the first offset information and the second offset information;
d4, sending the exception information processing parameters to the target application program.
Wherein, different abnormal state types can correspond to different K reference abnormal information processing templates. The reference abnormality information processing template may be a template set in advance for generating abnormality information processing parameters.
The method for determining M second reference abnormal information processing templates from the K first reference abnormal information processing templates may be: m second reference abnormality information processing templates may be determined from the K first reference abnormality information processing templates based on the offset information of the unnecessary influence of the abnormal state in the first offset information and the second offset information.
The offset information of the unnecessary influence can be understood as: if the first offset information is in the abnormal offset information set, the second offset information is offset information which is not necessarily influenced, and if the second offset information is in the abnormal offset information set, the first offset information is offset information which is not necessarily influenced; if the first offset information is in the abnormal offset information set and the second offset information is in the abnormal offset information set, the offset information which is not necessarily influenced does not exist.
If there is no offset information that has an unnecessary influence, the K first reference abnormal information processing templates may be determined as M second reference abnormal information processing templates, where K is equal to M.
If offset information with unnecessary influence exists, the matching degree between each first reference abnormal information processing template in the K first reference abnormal information processing templates and the unnecessary offset information can be obtained, and the first reference abnormal information processing template with the matching degree higher than a preset value is determined as a second abnormal information processing template. The matching degree may be understood as a degree of association between the unnecessary offset information and the first reference exception information processing template, and specifically may be understood as whether the first reference exception information processing template affects the unnecessary offset information, where the greater the influence, the higher the degree of association, the smaller the influence, and the smaller the degree of association. Whether the first reference exception information handling template affects the unnecessary offset information may be understood as: after the abnormal information processing parameters generated by the first reference abnormal information processing template are executed, the larger the change degree is, the larger the influence is, and the smaller the change degree is, the smaller the influence is.
The first offset information and the second offset information may be input into M second reference abnormal information processing templates for parameter calculation to obtain abnormal information processing parameters.
The sending of the abnormal information processing parameter to the target application program may be in a CAN message mode.
In this example, the abnormal state of the first device is analyzed to obtain a corresponding abnormal information processing parameter, and the abnormal information processing parameter is sent to the target application program, so that the efficiency of the target application program in performing the abnormal analysis is improved.
In accordance with the foregoing embodiments, please refer to fig. 3, where fig. 3 is a schematic structural diagram of a terminal according to an embodiment of the present application, and as shown in the drawing, the terminal includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program, the computer program includes program instructions, the processor is configured to call the program instructions, and the program includes instructions for performing the following steps:
receiving an equipment control message sent by a target application program, wherein the type of the equipment control message comprises a CAN message type;
analyzing the equipment control message to obtain equipment identification and control information, wherein the equipment identification is the identification of equipment in an equipment group connected with the test application program;
generating a control instruction according to the control information and the equipment identifier;
and sending the control instruction to the equipment corresponding to the equipment identification.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the terminal includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the above-described functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the terminal may be divided into the functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In accordance with the above, please refer to fig. 4, and fig. 4 is a schematic structural diagram of an apparatus control device according to an embodiment of the present application. As shown in fig. 4, applied to a test application, the apparatus includes:
a receiving module 401, configured to receive an apparatus control packet sent by a target application program, where the type of the apparatus control packet includes a CAN packet type;
an analyzing module 402, configured to analyze the device control packet to obtain a device identifier and control information, where the device identifier is an identifier of a device in a device group connected to the test application;
a generating module 403, configured to generate a control instruction according to the control information and the device identifier;
a sending module 404, configured to send the control instruction to a device corresponding to the device identifier.
In one possible implementation manner, the generating module 403 is configured to:
determining port information according to the equipment identification, wherein the port information is information of a communication port of the test application program in communication connection with equipment corresponding to the equipment identification;
determining the type information of the control instruction according to the port information;
and generating the control instruction according to the control information and the type information.
In one possible implementation, the apparatus is further configured to:
receiving state information in a current working cycle sent by first equipment in the equipment group, wherein the first equipment is any one of the equipment in the equipment group;
packaging the state information to obtain a feedback message, wherein the type of the feedback message comprises a CAN message;
and sending the feedback message to the target application program.
In one possible implementation, the apparatus is further configured to:
determining the working state information and the equipment state information of the first equipment from the state information;
acquiring first offset information between the working state information and preset working state information, and acquiring second offset information between the equipment state information and preset equipment state information;
determining whether the first device is in an abnormal state according to the first offset information and the second offset information;
if the first equipment is determined to be in the abnormal state, determining the abnormal state type of the first equipment according to the first offset information and the second offset information;
and sending the abnormal state type, the first offset information and the second offset information to the target application program.
In one possible implementation manner, after the sending the exception status type, the first offset information, and the second offset information to the target application, the apparatus is further configured to:
determining K first reference abnormal information processing templates according to the abnormal state type;
determining M second reference abnormal information processing templates from the K first reference abnormal information processing templates according to the first offset information and the second offset information;
generating an abnormal information processing parameter according to the M second reference abnormal information processing templates, the first offset information and the second offset information;
and sending the abnormal information processing parameters to the target application program.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the apparatus control methods described in the above method embodiments.
Embodiments of the present application further provide a computer program product, the computer program product includes a non-transitory computer readable storage medium storing a computer program, and the computer program causes a computer to execute part or all of the steps of any one of the apparatus control methods as described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
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 integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several 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 the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash memory disks, read-only memory, random access memory, magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An apparatus control method applied to a test application, the method comprising:
receiving an equipment control message sent by a target application program, wherein the type of the equipment control message comprises a CAN message type;
analyzing the equipment control message to obtain equipment identification and control information, wherein the equipment identification is the identification of equipment in an equipment group connected with the test application program;
generating a control instruction according to the control information and the equipment identifier;
and sending the control instruction to the equipment corresponding to the equipment identification.
2. The method of claim 1, wherein generating a control instruction according to the control information and the device identifier comprises:
determining port information according to the equipment identification, wherein the port information is information of a communication port of the test application program in communication connection with equipment corresponding to the equipment identification;
determining the type information of the control instruction according to the port information;
and generating the control instruction according to the control information and the type information.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving state information in a current working cycle sent by first equipment in the equipment group, wherein the first equipment is any one of the equipment in the equipment group;
packaging the state information to obtain a feedback message, wherein the type of the feedback message comprises a CAN message;
and sending the feedback message to the target application program.
4. The method of claim 3, further comprising:
determining the working state information and the equipment state information of the first equipment from the state information;
acquiring first offset information between the working state information and preset working state information, and acquiring second offset information between the equipment state information and preset equipment state information;
determining whether the first device is in an abnormal state according to the first offset information and the second offset information;
if the first equipment is determined to be in the abnormal state, determining the abnormal state type of the first equipment according to the first offset information and the second offset information;
and sending the abnormal state type, the first offset information and the second offset information to the target application program.
5. The method of claim 4, wherein after sending the exception status type, the first offset information, and the second offset information to the target application, the method further comprises:
determining K first reference abnormal information processing templates according to the abnormal state type;
determining M second reference abnormal information processing templates from the K first reference abnormal information processing templates according to the first offset information and the second offset information;
generating an abnormal information processing parameter according to the M second reference abnormal information processing templates, the first offset information and the second offset information;
and sending the abnormal information processing parameters to the target application program.
6. An apparatus for controlling a device, the apparatus being adapted to test an application, the apparatus comprising:
the receiving module is used for receiving an equipment control message sent by a target application program, and the type of the equipment control message comprises a CAN message type;
the analysis module is used for analyzing the equipment control message to obtain an equipment identifier and control information, wherein the equipment identifier is an identifier of equipment in an equipment group connected with the test application program;
the generating module is used for generating a control instruction according to the control information and the equipment identifier;
and the sending module is used for sending the control instruction to the equipment corresponding to the equipment identifier.
7. The apparatus of claim 6, wherein the generating module is configured to:
determining port information according to the equipment identification, wherein the port information is information of a communication port of the test application program in communication connection with equipment corresponding to the equipment identification;
determining the type information of the control instruction according to the port information;
and generating the control instruction according to the control information and the type information.
8. The apparatus of claim 6 or 7, wherein the apparatus is further configured to:
receiving state information in a current working cycle sent by first equipment in the equipment group, wherein the first equipment is any one of the equipment in the equipment group;
packaging the state information to obtain a feedback message, wherein the type of the feedback message comprises a CAN message;
and sending the feedback message to the target application program.
9. A terminal, characterized in that it comprises a processor, an input device, an output device and a memory, said processor, input device, output device and memory being interconnected, wherein said memory is used to store a computer program comprising program instructions, said processor being configured to invoke said program instructions to perform the method according to any of the claims 1-5.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-5.
CN202210075563.1A 2022-01-22 2022-01-22 Device control method, device, terminal and computer readable storage medium Pending CN114513384A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210075563.1A CN114513384A (en) 2022-01-22 2022-01-22 Device control method, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210075563.1A CN114513384A (en) 2022-01-22 2022-01-22 Device control method, device, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114513384A true CN114513384A (en) 2022-05-17

Family

ID=81550191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210075563.1A Pending CN114513384A (en) 2022-01-22 2022-01-22 Device control method, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114513384A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060003754A (en) * 2004-07-07 2006-01-11 현대자동차주식회사 Test device of can telecommunication network on vehicle and method thereof
CN108337126A (en) * 2017-12-20 2018-07-27 深圳市沃特玛电池有限公司 CAN message test device and method
CN110191018A (en) * 2019-05-28 2019-08-30 百度在线网络技术(北京)有限公司 Method for monitoring abnormality, device and the computer equipment of vehicle CAN bus
CN111343143A (en) * 2020-01-23 2020-06-26 腾讯科技(深圳)有限公司 Data identification method, device and storage medium
CN113282069A (en) * 2021-04-06 2021-08-20 深圳元戎启行科技有限公司 Chassis line control test method and device, computer equipment and storage medium
CN113691422A (en) * 2021-08-27 2021-11-23 上海金脉汽车电子有限公司 Vehicle-mounted remote communication box test method and system
CN113946145A (en) * 2020-07-17 2022-01-18 北京车和家信息技术有限公司 Detection method and device for vehicle control unit

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060003754A (en) * 2004-07-07 2006-01-11 현대자동차주식회사 Test device of can telecommunication network on vehicle and method thereof
CN108337126A (en) * 2017-12-20 2018-07-27 深圳市沃特玛电池有限公司 CAN message test device and method
CN110191018A (en) * 2019-05-28 2019-08-30 百度在线网络技术(北京)有限公司 Method for monitoring abnormality, device and the computer equipment of vehicle CAN bus
CN111343143A (en) * 2020-01-23 2020-06-26 腾讯科技(深圳)有限公司 Data identification method, device and storage medium
CN113946145A (en) * 2020-07-17 2022-01-18 北京车和家信息技术有限公司 Detection method and device for vehicle control unit
CN113282069A (en) * 2021-04-06 2021-08-20 深圳元戎启行科技有限公司 Chassis line control test method and device, computer equipment and storage medium
CN113691422A (en) * 2021-08-27 2021-11-23 上海金脉汽车电子有限公司 Vehicle-mounted remote communication box test method and system

Similar Documents

Publication Publication Date Title
CN107294808B (en) Interface test method, device and system
CN107195131B (en) A kind of method and device of analog hardware equipment
CN110456725A (en) A kind of monitoring method of PLC device, device and intelligent terminal
CN108965293B (en) Message analysis method and device and electronic equipment
CN110545220B (en) Automobile diagnosis protocol detection method and related product
CN114185708A (en) Data analysis method and device based on distributed link tracking and electronic equipment
CN103814501B (en) Diagnosis for GOOSE communication
CN114089713A (en) Communication method based on UDS, ECU and upper computer
CN110940874B (en) Calibration method, server and medium for nuclear power station transformer protection device
CN114513384A (en) Device control method, device, terminal and computer readable storage medium
CN113819587B (en) Air conditioner control method and device and air conditioner
CN112415404B (en) Battery pack testing method and battery pack testing device
CN111193631A (en) Information processing method, system, and computer-readable storage medium
CN112631577B (en) Model scheduling method, model scheduler and model safety test platform
CN115237101A (en) Debugging method and intelligent debugging device for motor train unit and debugging system for motor train unit
CN109634203B (en) Control system for controlling IO terminal based on numerical control controller and corresponding method
CN112422693A (en) User online short video draft queue exporting method
CN112187536A (en) TMS configuration data-based information interaction method and device, storage medium and electronic device
CN116980869B (en) NFC tag life cycle management method based on detection line state
CN112235195B (en) Method for processing reported data and related equipment
CN112526949B (en) Module information setting method, acquisition method and device of industrial control system
US20230064755A1 (en) Data processing method and apparatus
US20230161303A1 (en) Data acquisition method and industrial device
CN112565041A (en) Hardware information configuration method, device and medium of FF field bus system
CN114968789A (en) Finished automobile test platform based on virtual environment

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