An intelligent programmable response system

The intelligent programmable response system solves the problems of inconsistent interface drivers, non-programmable logic, and functional expansion in intelligent device simulation systems, realizing programmability and functional expansion of simulation testing, and improving the accuracy and reliability of simulation testing.

CN114115829BActive Publication Date: 2025-11-25ANGO SMART TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111435502.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-11-25
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

Existing intelligent device simulation systems suffer from inconsistent interface drivers, non-programmable operating logic, lack of message analysis capabilities, and difficulty in expanding functionality, making it difficult to guarantee the accuracy and reliability of simulation testing.

Method used

The system employs an intelligent programmable response system, which includes a programmable response module, an interface information configuration module, a message configuration information definition module, and an initialization module. Through interface information configuration, a message type library, and a processing description language, it enables the identification, parsing, and response to interfaces and messages, and supports logical operations and functional expansion.

Benefits of technology

The simulation system achieves programmability and functional scalability, enabling stress testing for unlimited durations. It provides interface functions and data storage, improving the accuracy and reliability of simulation testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114115829B_ABST
    Figure CN114115829B_ABST
Patent Text Reader

Abstract

The application relates to intelligent control, in particular to an intelligent programmable response system, which comprises a programmable response module, an interface information configuration module, a message configuration information definition module and an initialization module; the interface information configuration module performs interface information configuration; the message configuration information definition module defines structural models of all messages identifiable by the system from an abstract level; the initialization module determines an interface type and a starting action according to the interface information, and initializes a message type library and a processing process description language according to the structural models; the programmable response module judges the type of a received message, simultaneously senses a real running state of a message sender in a cycle, and constructs a specified type of a return message and an associated message to be respectively sent to the message sender and associated equipment; the technical scheme provided by the application can effectively overcome the defects of the prior art, such as unprogrammable running logic and difficulty in function expansion.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to intelligent control, in particular to an intelligent programmable response system. BACKGROUND

[0002] In the numerous intelligent devices and control software systems, how to verify the accuracy and reliability of the intelligent devices and control software in handling complex tasks in simulation mode has always been a difficult problem. There are mainly the following problems:

[0003] 1. Different interface drivers

[0004] Obviously, intelligent devices generally provide serial ports (including USB for high-speed data transmission), CAN ports, network ports and other interface forms for communication with control software systems, so the simulation system also needs to completely implement the corresponding interface driver or virtual driver, rather than a single and fixed interface of a dedicated simulation system;

[0005] 2. The running logic is not programmable for complex control of the control software

[0006] The dedicated simulation test software is not universal, and after the control logic is modified or the system is upgraded, the simulation system cannot continue to implement the simulation test function without corresponding adjustment or upgrade due to the lack of programmable function;

[0007] 3. Most dedicated simulation test software does not have a message analysis function

[0008] The simulation system must be able to build messages for specific testing at the initial stage, and also analyze and verify whether the returned messages meet the expectations;

[0009] 4. Difficult to extend functions

[0010] The simulation system generally needs to provide corresponding log records and result data after integration testing and stress testing, and implement functions such as analysis and export. SUMMARY

[0011] (I) Technical problems solved

[0012] In view of the above shortcomings of the prior art, the present application provides an intelligent programmable response system, which can effectively overcome the defects of the prior art that the running logic is not programmable and it is difficult to extend functions.

[0013] (II) Technical solutions

[0014] To achieve the above purposes, the present application is implemented by the following technical solutions:

[0015] The intelligent programmable response system comprises a programmable response module, an interface information configuration module, a message configuration information definition module and an initialization module, the interface information configuration module configures interface information, the message configuration information definition module defines a structural model of all messages identifiable by the system from an abstract level, the initialization module determines an interface type and a starting action according to the interface information, and initializes a message type library and a process description language according to the structural model, the programmable response module judges the type of a received message, simultaneously senses a real running state of a message sender in a cycle, and constructs a return message and an associated message of a specified type to be respectively sent to the message sender and an associated device.

[0016] Preferably, the execution process of the programmable response module comprises:

[0017] S1, starting an external input / output interface module;

[0018] S2, judging the type of a received message by constructing a message specification model, and constructing a message instance in combination with an example;

[0019] S3, deriving a message verification and analysis generalization algorithm based on the message specification model, and sensing a cyclically interacting message sender in a cycle by analyzing each field value in a functional model;

[0020] S4, after obtaining a signal of the message sender, controlling an output according to a control code segment.

[0021] Preferably, the sensing cycle comprises a main sensing cycle and a slave sensing cycle, the main sensing cycle acquires parameter state information of all associated devices, and realizes overall control of the order and frequency of multi-device linkage by constructing an associated message; the slave sensing cycle receives the associated message of the main sensing cycle, and sends parameter state information of all associated devices to the main sensing cycle.

[0022] Preferably, the programmable response module adopts multi-threading to realize concurrent running of multiple sensing cycles.

[0023] Preferably, the interface information configured by the interface information configuration module comprises an interface type and related parameters thereof, and the interface type comprises a serial port, a network port and a CAN port.

[0024] Preferably, the structural model defined by the message configuration information definition module comprises an offset address, a domain code, a data type, a data length and a value mode.

[0025] Preferably, the initialization module determines an interface type and a starting action according to the interface information, comprising:

[0026] If it is a serial port / CAN port, a serial port / CAN port read-write operation thread is started; if it is a network port, a network listening service or a network connection service is started.

[0027] Preferably, the message type library allows the programmable response module to identify any external input message.

[0028] Preferably, the processing procedure description language supports logical operation, comparison operation, arithmetic operation, flow control, variable definition and assignment, macro definition, built-in input / output function, and built-in utility function.

[0029] Preferably, the programmable response module interacts with a third party system through a request command message and a processing result message.

[0030] (Three) beneficial effects

[0031] Compared with the prior art, the intelligent programmable response system provided by the application has the following beneficial effects:

[0032] 1) A technical implementation route of programmable intelligent response is proposed, a technical idea of programmable response is realized by using compiling technology (only including lexical analysis and syntax analysis), and an instruction queue and a variable value table are used to control the execution process, so that the running process of programmable response is greatly simplified.

[0033] 2) Through double control of flow and concurrency, the function of “responding to changes with changes” is realized, and the cumbersome problem of being unable to correct in time and needing to specially develop various types of simulators in the prior art is completely broken through in intelligent response; through loop control, internal control of the simulator for an unlimited long time and unlimited times can be realized, and real pressure testing of the system is realized.

[0034] 3) An interface function is provided, an IO function interface of a disk file is internally controlled, a series of functions such as special file reading, log recording, and data storage (XML, CSV) of the running process can be realized, and the system is convenient for monitoring and analyzing the running behavior from the outside. BRIEF DESCRIPTION OF DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only some embodiments of the application, and for those skilled in the art, other drawings can be obtained from these drawings without creative labor.

[0036] Figure 1 The system schematic diagram of the application;

[0037] Figure 2This is a schematic diagram illustrating the execution process of the programmable response module in this invention;

[0038] Figure 3 This is a schematic diagram illustrating how the programmable response module in this invention uses multiple threads to run multiple sensing loops concurrently. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0040] An intelligent programmable response system, such as Figure 1 As shown, it includes a programmable response module, an interface information configuration module, a message configuration information definition module, and an initialization module. The interface information configuration module configures the interface information. The message configuration information definition module defines the structural model of all messages that the system can recognize from an abstract level. The initialization module determines the interface type and startup action based on the interface information, and initializes the message type library and processing description language based on the structural model. The programmable response module determines the type of the received message, and simultaneously senses and loops the actual operating status of the message sender, and constructs a return message and associated message of the specified type and sends them to the message sender and associated device, respectively.

[0041] The interface information configuration module configures interface information including interface type and related parameters. Interface types include serial port, Ethernet port, and CAN port. The interface information is shown in the table below:

[0042] Table 1 Interface Information Configuration Table

[0043]

[0044] The structure model defined by the message configuration information definition module includes offset address, field code, data type, data length (Byte_Num), and assignment method. The message itself is composed of a sequential byte stream. Defining its structure model facilitates the programmable response module to respond according to its corresponding function.

[0045] ① Offset address: The position of each information field within a message;

[0046] ② Field Code: Uniquely identifies each information field in a message;

[0047] ③ Data_Type: equivalent to the data type required by the variable definition in various programming languages. Since the process description language PDL belongs to the micro version of the process description language, the data type is limited, as shown in the following table:

[0048] Table 2 Built-in data type table of the process description language PDL

[0049]

[0050] In addition, the support for the base is only: decimal (default) and hexadecimal (prefix: 0x);

[0051] ④ Byte_Num: see Table 2, no longer described;

[0052] ⑤ Assign_Method: including constant assignment and variable assignment (built-in function return value is also included).

[0053] The offset of the structure model, the field code, the data type, the data length, and the value assignment method (Assign_Method) are defined, as shown in the following table:

[0054] Table 3 Structure model definition example

[0055]

[0056]

[0057] For constant assignment and variable assignment, as shown in the following table:

[0058] Table 4 Constant assignment and variable assignment table

[0059]

[0060] The initialization module determines the interface type and the starting action according to the interface information, including:

[0061] If it is a serial port / CAN port, the serial port / CAN port read-write operation thread is started; if it is a network port, the network listening service (port is the local port at this time) or the network connection service (port is the remote host address and port) is started.

[0062] According to the structure model, the message type library and the process description language PDL are initialized. The message type library allows the programmable response module to identify and judge any external input message.

[0063] PDL is a simplified version of C-like process description language, supporting logical operation, comparison operation, arithmetic operation, flow control, variable definition and assignment, macro definition, built-in input / output function, built-in utility function, etc. Each part is described as follows:

[0064] ① Logical operator

[0065] Logical operation includes three: and (symbol: &&), or (symbol: ||), not (symbol:!);

[0066] ② Comparison operator

[0067] Operator symbol supports six: greater than (>), greater than or equal to (> =), equal to (==), less than or equal to (< =), less than (<) and not equal to (! =);

[0068] ③ Arithmetic operator

[0069] Only six kinds of data types (I08, U08, I16, U16, I32, U32) arithmetic operation are supported, including: plus (+), minus (—), multiplication (*), division ( / ), remainder (%), power (^) and parentheses, priority: parentheses > power > (multiplication, division, remainder) > (addition, subtraction);

[0070] ④ Flow control

[0071] Only two kinds are supported: branch judgment (if {} else if {} else {}), loop (while ({}) ), which is defined the same as C language;

[0072] ⑤ Variable definition and assignment

[0073] 1) Ordinary variable: same as C language;

[0074] 2) Structure variable: support structure variable assignment (different from C language): "STRUCT_NAME s1 = s0;" (s0 in it is also a STRUCT_NAME type variable), and strong conversion assignment: "STRUCT_NAME s1 = (STRUCT_NAME) packet;" (packet in it is not a STRUCT_NAME type variable, but an I08 type array);

[0075] ⑥ Macro definition

[0076] Macro definition is shown in the following table:

[0077] Table 5 Macro definition table

[0078]

[0079]

[0080] ⑦Built-in input and output functions

[0081] For input and output, i.e. INI, XML, CSV three format text file read and write, use built-in functions to achieve:

[0082] Table 6 Built-in input and output function table

[0083]

[0084] ⑧Built-in utility functions

[0085] The built-in utility functions are shown in the following table:

[0086] Table 7 Built-in utility function table

[0087]

[0088]

[0089] The programmable response module is mainly implemented by an interpretation executor, which is essentially an interpretation execution of the system supported C-like language module file, and the programmable response module interacts with the third party system through request command messages and processing result messages. As shown in Figure 2 The execution process of the programmable response module includes:

[0090] S1, start the external input and output interface module;

[0091] S2, judge the type of received message by constructing message specification model, and construct message instance combined with instance;

[0092] S3, based on the message specification model, derive the message verification and analysis generalization algorithm, and through the analysis of each field value in the function model, the cyclic interaction of the message sender is perceived;

[0093] S4, after knowing the signal of the message sender, control the output according to the control code segment.

[0094] ①The system has four built-in external input and output interface modules: serial port read and write module, CAN port read and write module, network port passive module and network port active module. At present, a smart system exchanges data (read and write modules are implemented) with the bottom driver, controller, and the upper third party system, which are all in the above four modules. On the logical abstraction layer, it is the bottom driver of the system.

[0095] ② Any message sent by any device and received message must comply with a certain specification (for example, the MODBUS specification of the industry standard and custom specification). Therefore, the message construction must complete two tasks: the definition of the message specification model, and the construction of the message instance combined with the instance.

[0096] The message specification model is generally divided into: the base model (its structure is shown in Table 3) and the function model. The base model is an abstraction of the function model, and the function model is an instantiation of the base model, similar to the base class and inheritance relationship in object-oriented design (OOD).

[0097] Function model definition of the message specification model:

[0098]

[0099] Base model definition of the message specification model:

[0100]

[0101]

[0102] The physical entity of the specific message can be implemented using an XML file. For example, the MODBUS specification message is as follows:

[0103]

[0104] The combination of the two can realize the message construction of the function code (func Code = "01"). Similarly, multiple definitions of " can construct messages of multiple function codes. <func>< / func>

[0105] The defined information is read by the interpreter and initialized. According to the definition of the two models, the type of the received message can be determined at runtime, and the specified type of message (the so-called type is the "identification field value") can be constructed.

[0106] ③ According to the above two message specification models, the message verification and parsing generalization algorithm can also be derived:

[0107] For constant assignment, constant value comparison verification is performed;

[0108] For variable assignment, expression calculation verification is performed.

[0109] In the verification process, not only can the function model of the message be determined, but also each field value in the function model definition can be directly parsed. Further, the real running state and parameters of the message sender can be perceived. For a certain message, whether to reply and what kind of message to reply to are determined by the pre-compiled code file.​

[0110] Since the interaction with the message sender is generally in a loop (frequency can be high or low), thus realizing the perception cycle, the system can always perceive the latest running state and parameters of the message sender.

[0111] ④ After learning some / some signal of the message sender, according to the control code segment, the interpretation executor can be instructed to control the output:

[0112] 1) Construct a back message (for the source device or system of the current message);

[0113] 2) Call the built-in input / output functions and built-in utility functions supported by the system, save log records and analysis results data, and the specific content style can be customized by the writer using the process description language PDL;

[0114] 3) Construct multiple associated messages to send to the corresponding associated devices (or systems)

[0115] The specific identification and construction parameters of the associated device are specified in the code segment, and the interpretation executor constructs the message according to these conditions, and then sends it to the corresponding associated device (or system) according to the requirements of the code segment.

[0116] As shown in Figure 3 The perception cycle includes the main perception cycle and the slave perception cycle. The main perception cycle obtains the parameter state information of all associated devices, and realizes the overall control of the sequence and frequency of multi-device (or system) linkage by constructing associated messages. The slave perception cycle receives the associated messages of the main perception cycle and sends the parameter state information of all associated devices to the main perception cycle.

[0117] In reality, the system often has to face multiple associated devices (or systems) to realize multi-device (or system) linkage, and the interpretation executor needs to be able to synchronize the perception cycle process for multiple associated devices (or systems). It must use multi-threading in program design to realize the concurrent running of multiple perception cycles.

[0118] The specific function of the main perception cycle is: in addition to controlling its own response, it also needs to obtain the parameter state information of all associated devices (or systems) as the condition for its own perception cycle logic judgment, and realizes the overall control of the sequence and frequency of multi-device (or system) linkage by constructing associated messages.

[0119] After the initialization of the slave perception cycle, it only receives the associated messages of the main perception cycle and submits the parameter state information of all associated devices (or systems) to the main perception cycle, in addition to completing its own designated processing process (if not, the slave perception cycle is always in a waiting state).

[0120] The main sensing cycle and the slave sensing cycle must have built-in exception handling routines. Inside the slave sensing cycle, IO exceptions, especially IO timeouts, can occur, which can cause the slave sensing cycle to fail to submit parameter state information to the main sensing cycle in time, and thus cause the main sensing cycle, which depends on this, to fail to work normally. The slave sensing cycle needs to submit exception (fault) types, causes, etc., and the main sensing cycle learns whether to continue and issues specific messages to other associated devices (or systems), etc.

[0121] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced equivalently; and these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An intelligent programmable response system, characterized by: The programmable response module, the interface information configuration module, the message configuration information definition module and the initialization module, the interface information configuration module configures interface information, the message configuration information definition module defines the structure model of all messages that can be recognized by the system from the abstract level, the initialization module determines the interface type and the starting action according to the interface information, and initializes the message type library and the processing process description language according to the structure model, the programmable response module judges the type of the received message, simultaneously perceives the real running state of the message sender in a cycle, and constructs a back message of a specified type and an associated message to be sent to the message sender and the associated device respectively; The execution process of the programmable response module comprises: S1, starting an external input / output interface module; S2, judging the type of the received message by constructing a message specification model, and constructing a message instance in combination with an example; S3, deriving a message verification and analysis generalization algorithm based on the message specification model, and performing a perception cycle on the cyclically interacting message sender by analyzing each field value in the functional model; S4, controlling the output according to the control code segment after obtaining the signal of the message sender; The perception cycle comprises a master perception cycle and a slave perception cycle, the master perception cycle acquires the parameter state information of all associated devices, and realizes the overall control of the sequence and frequency of multi-device linkage by constructing an associated message; the slave perception cycle receives the associated message of the master perception cycle, and sends the parameter state information of all associated devices to the master perception cycle.

2. The intelligent programmable response system of claim 1, wherein: The programmable response module uses multi-threading to realize the concurrent running of multiple perception cycles.

3. The intelligent programmable response system of claim 1, wherein: The interface information configuration module configures interface information including interface types and related parameters, and the interface types include serial ports, network ports and CAN ports.

4. The intelligent programmable response system of claim 1, wherein: The structure model defined by the message configuration information definition module comprises offset addresses, domain codes, data types, data lengths and value modes.

5. The intelligent programmable response system of claim 1, wherein: The initialization module determines the interface type and the starting action according to the interface information, which comprises: If it is a serial port / CAN port, the serial port / CAN port read / write operation thread is started; if it is a network port, the network listening service or the network connection service is started.

6. The intelligent programmable response system of claim 5, wherein: The message type library allows the programmable response module to identify and judge any externally input message.

7. The intelligent programmable response system of claim 5, wherein: The processing process description language supports logical operations, comparison operations, arithmetic operations, flow control, variable definition and assignment, macro definition, built-in input / output functions and built-in utility functions.

8. The intelligent programmable response system of claim 1, wherein: The programmable response module interacts with a third-party system through a request command message and a processing result message.

Citation Information

Patent Citations

  • Interface device for prototype system and HLA simulation system

    CN101420437A

  • CAN equipment development system and method thereof

    CN110806855A