Event Configuration Method, Device, System, Host Computer and Medium for Embedded Devices

Through the method of host computer parsing and conversion control logic as configuration information lines, the problem of insufficient chip space for embedded devices is solved, and flexible event configuration and function adjustment are achieved.

CN115509186BActive Publication Date: 2025-07-25SHENZHEN ENVICOOL INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211138922.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-19
Publication Date
2025-07-25
Estimated Expiration
2042-09-19

AI Technical Summary

Technical Problem

The human-computer interface configuration software for existing embedded devices uses XML format to store and encode, resulting in high chip space requirements, making it difficult to use in devices with small memory, and the configuration is inconvenient to add or adjust event responses.

Method used

The host computer obtains the event configuration data of the target control event, parses the control logic and converts it into the configuration information row of the predefined configuration field, forms a configuration information form, generates a logical data stream and writes it to the embedded device, reducing chip space requirements.

Benefits of technology

It realizes flexible event configuration, reduces the chip space requirements of embedded devices, and supports convenient event functions to increase or adjust.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115509186B_ABST
    Figure CN115509186B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention discloses an event configuration method, device, system, host computer and medium for an embedded device. The method includes: obtaining event configuration data of a target control event; parsing, according to the event configuration data, the control logic included in the target control event, converting the control logic into a configuration information line including predefined configuration fields, and forming a configuration information form according to the configuration information line; generating a logic data stream corresponding to the target control event based on the configuration information form; and the logic data stream is used to be written into the embedded device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of embedded control technology, and in particular, to an event configuration method, device, and system for an embedded device, a host computer, and a computer-readable storage medium. Background Art

[0002] Currently, in the field of industrial automation control technology, embedded devices are widely used to monitor, display, and change a specific process or field device. The human-machine interface of an embedded device is a medium for transmitting and exchanging information between a user and the embedded device. The user can configure different screens according to control needs and monitor the working status of field devices in the form of elements such as text, graphics, buttons, and charts on different screens. Among them, the development environment of configuration software usually runs on a computer. The development environment of configuration software is used to develop the configuration of the operation interface, and the configured information is encoded and transmitted to the embedded device.

[0003] However, in the process of implementing the present invention, the inventors found that the prior art has at least the following problems: The human-machine interface configuration software of most embedded devices stores and encodes configuration information in XML format. The embedded device needs to use an XML file to parse the configuration information, analyze and process the transmitted information encoding, and then display and operate on the display device according to the configuration information. However, using XML file parsing requires a relatively high chip space, which cannot be used for embedded devices with small memory in many application scenarios. Moreover, when there are new events or adjusted event response requirements in the future, it is necessary to use the underlying software, and the configuration is very inconvenient. Summary of the Invention

[0004] To solve the existing technical problems, embodiments of the present invention provide an event configuration method, device, and system for an embedded device, a host computer, and a computer-readable storage medium with high configuration flexibility and effectively reducing the chip space requirements for the embedded device.

[0005] The technical solution of the embodiments of the present invention is implemented as follows:

[0006] In a first aspect, an event configuration method for an embedded device is provided, which is applied to a host computer and includes:

[0007] Obtain event configuration data of a target control event;

[0008] According to the event configuration data, parse the control logic included in the target control event, convert the control logic into a configuration information line including predefined configuration fields, and form a configuration information form according to the configuration information line;

[0009] Generate a logical data stream corresponding to the target control event based on the configuration information form; the logical data stream is used to be written into the embedded device.

[0010] In a second aspect, an event configuration device for an embedded device is provided, including:

[0011] A configuration module, configured to obtain event configuration data of a target control event;

[0012] A form module, configured to parse the control logic included in the target control event according to the event configuration data, convert the control logic into a configuration information line including predefined configuration fields, and form a configuration information form according to the configuration information line;

[0013] A data stream module, configured to generate a logical data stream corresponding to the target control event based on the configuration information form; the logical data stream is used to be written into the embedded device.

[0014] In a third aspect, a host computer is provided, including a memory and a processor. When a computer program stored in the memory is executed by the processor, the processor is caused to execute the event configuration method according to any embodiment of the present application.

[0015] In a fourth aspect, an event configuration system is provided, including the host computer and the embedded device according to the embodiments of the present application;

[0016] The embedded device obtains the logical data stream, restores the control logic in the logical data stream to perform corresponding event management.

[0017] In a fifth aspect, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the processor is caused to execute the event configuration method provided in any embodiment of the present application.

[0018] For the event configuration method provided in the above embodiments of the present application, the host computer supports a user to configure a control event, parses the event configuration data of the obtained target control event, parses the control logic included in the target control event, represents each control logic through a configuration information line of predefined configuration fields, forms a configuration information form, generates a logical data corresponding to the target control event based on the configuration information form and sends it to the embedded device, and the embedded device can parse the control logic of the target control event according to the logical data stream. In this way, it is convenient to add or adjust the event function type according to application requirements, and the configuration flexibility is high; by the host computer parsing the control logic included in the event according to the event configuration data and representing the control logic by converting it into a configuration information line of predefined configuration fields, so as to implement that the logic processing with large chip overhead is completed by the host computer, which can effectively reduce the requirement for the chip space of the embedded device.

[0019] The event configuration device, event configuration system, and computer-readable storage medium provided in the above embodiments respectively belong to the same concept as the corresponding event configuration method embodiments, and thus respectively have the same technical effects as the corresponding event configuration method embodiments, which will not be elaborated herein again. Description of the Drawings

[0020] Figure 1 It is a system architecture diagram of an optional application scenario of the event configuration method in an embodiment;

[0021] Figure 2 It is a flowchart of the event configuration method in an embodiment;

[0022] Figure 3 It is a flowchart of the event configuration method in an optional specific example;

[0023] Figure 4 For Figure 3 The execution logic diagram of the event configuration method shown;

[0024] Figure 5 It is an architecture diagram of an event service in an embodiment;

[0025] Figure 6 It is a schematic structural diagram of an event configuration device in an embodiment;

[0026] Figure 7 It is a schematic structural diagram of a host computer in an embodiment. Detailed Embodiments

[0027] The technical solution of the present invention will be further elaborated in detail below in conjunction with the accompanying drawings of the specification and specific embodiments.

[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the protection scope of the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0029] In the following description, the expression "some embodiments" is described, which describes a subset of all possible embodiments. However, it should be understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.

[0030] Please refer to Figure 1, which is a system architecture diagram of an optional application scenario of the event configuration method provided by the embodiments of the present application, including a host computer 100 and an embedded device 200. The host computer 100 refers to a computer device with storage and computing capabilities, and a computer program for implementing the event configuration method described in the embodiments of the present application is loaded. The embedded device 200 can be communicatively connected to the host computer 100 through a specified communication protocol, can be arranged in the on-site environment of different application scenarios, and provides a development environment through the host computer 100, and receives the control logic of the target control event configured by the host computer 100 in the development environment to implement the corresponding event management in different application scenarios. The embedded device 200 can be an intelligent terminal product in different fields such as industry and life. In an optional example, the embedded device 200 refers to an LCD intelligent screen applied to an air conditioner.

[0031] Please refer to Figure 2 , which is an event configuration method for an embedded device provided by the embodiments of the present application, and can be applied to Figure 1 the host computer shown in

[0032] S101, obtain the event configuration data of the target control event;

[0033] The target control event is a customized function event for the embedded device to execute automatically. For example, any button operation supported by the embedded device through the human-computer interaction interface, and the function implemented in response to the button operation can be regarded as a target control event. As an optional specific example, the embedded device displays a power-on button in the human-computer interaction interface, and the user performs a single click operation on the power-on button. In response to the single click operation, the embedded device powers on as a target control event; the user performs a double click operation on the power-on button operation, and in response to the double click operation, the embedded device restarts as a target control event. In the embodiments of the present application, the target control event supports user-defined configuration, and can be a new function event for the embedded device to execute automatically configured on the basis of the existing built-in functions of the embedded device. For example, in addition to the built-in button events, timing events, and level events of the embedded device, by configuring custom events, the embedded device can execute corresponding functions under the configured trigger conditions. As an optional specific example, the custom event can be a function that when the state of interface 1 is in place and the data of the lower computer changes abnormally, the embedded device can automatically identify and correct the data.

[0034] Among them, obtaining the event configuration data of the target control event can be that the host computer provides a configuration interface for event configuration. Various configuration options can be preset in the configuration interface, and the user selects the configuration options in the configuration interface for setting. The host computer obtains the event configuration data of the target control event according to the configuration operation of the user in the configuration interface.

[0035] S103, parsing the control logic contained in the target control event according to the event configuration data, converting the control logic into a configuration information row containing predefined configuration fields, and forming a configuration information form according to the configuration information row;

[0036] Control logic (Logical Control) refers to the control rules that can be described by the Boolean algebra logic based on the analysis of the controller operation mechanism. For example, the target control event is the function that the embedded device can automatically identify and correct the data when the lower computer data changes abnormally when it is in the state of interface 1. In this target control event, "being in the state of interface 1" and "abnormal changes in the lower computer data" exist at the same time, which is the trigger condition for the embedded device to perform data correction. Summarized as a Boolean algebra expression, "being in the state of interface 1" and "abnormal changes in the lower computer data" are logically ANDed. Predefined configuration fields refer to the fields that are pre-set corresponding to the control logic using the Boolean algebra logic description. Each configuration information row contains the predefined configuration field, and the description of the control logic is described by the value corresponding to the predefined configuration field. The description of a control logic may include one or more configuration information rows. The configuration information form contains the configuration information row.

[0037] S105, generating a logic data stream corresponding to the target control event based on the configuration information form; the logic data stream is used to write into an embedded device.

[0038] A data stream refers to a data sequence of bytes that are ordered and have a starting point and an end point. A logical data stream refers to a data sequence that contains logical relationships and timing relationships in the execution of a target control event. The configuration information form includes a configuration information row that uses pan-Boolean algebra to logically describe the control rules corresponding to the control logic. Based on the meaning of the predefined configuration fields in the configuration information row and the values of the control logic of the target control event in each predefined configuration field, the target control event is converted into a corresponding logical data stream to achieve the purpose of effectively compressing the data content of the target control event and simplifying the logical description. For embedded devices, logical analysis of the logical data stream only requires the simplest logical judgment to obtain the logical function of the target control event that needs to be executed, greatly reducing the chip overhead requirements on the embedded device side.

[0039] In the event configuration method provided by the above embodiments, the host computer supports the user to configure control events, parses the event configuration data of the obtained target control event, parses out the control logic included in the target control event, and represents each of the control logics through the configuration information lines of predefined configuration fields to form a configuration information form. Based on the configuration information form, a logical data stream corresponding to the target control event is generated and sent to the embedded device. The embedded device can parse out the control logic of the target control event according to the logical data stream. In this way, it is convenient to add or adjust the event function type according to application requirements, and the configuration flexibility is high. By parsing the control logic included in the event by the host computer according to the event configuration data and converting the control logic into the configuration information lines of predefined configuration fields for representation, it is possible to complete the logic processing with large chip overhead by the host computer, which can effectively reduce the requirement for the chip space of the embedded device.

[0040] In some embodiments, S103, according to the event configuration data, parses the control logic included in the target control event, converts the control logic into a configuration information line including predefined configuration fields, and forms a configuration information form according to the configuration information line, includes:

[0041] According to the event configuration data, parse the control logic included in the target control event;

[0042] Extract the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition included in the control logic, and convert the control logic into a configuration information line including predefined configuration fields;

[0043] Form a configuration information form according to the configuration information line.

[0044] Among them, the target control event refers to the automation that the user currently wants to create. Automation refers to the process in which machine equipment, systems, or processes (production and management processes) achieve the expected goals through automatic detection, information processing, analysis and judgment, and manipulation and control according to human requirements with little or no direct human participation. Among them, one or more automations can form the automatic control scenario of the embedded device. The trigger condition refers to the condition that needs to be met before the embedded device included in the target automation executes the corresponding action. The execution action refers to the processing operation that the embedded device included in the target automation performs according to the preset settings when the corresponding trigger condition is met. The judgment logic includes multiple preset operation logics for performing various logical calculations on the trigger conditions and supports flexible configuration of custom events. In an optional specific example, the judgment logic includes, but is not limited to: logical negation, operation negation, multiplication, modulo, integer division, bit left shift, bit right shift, greater than, greater than or equal to, less than, less than or equal to, equal to, not equal to, numerical AND, numerical XOR, numerical OR, logical AND, logical OR. Extract the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition included in the control logic of the target control event, so as to convert the control logic into data content represented by the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition uniformly.

[0045] In the above embodiment, in the process of parsing the control logic included in the target control event and converting the control logic into a configuration information line including predefined configuration fields, a judgment logic is set to support various required logical calculations on the trigger conditions included in the control logic. The judgment logic can be set from the perspective of the smallest unit that supports the completion of user logic, which is beneficial to the flexible configuration of custom events. Moreover, the configuration information lines obtained by converting the trigger conditions with the same judgment logic can be conveniently reused in different control logics, which can effectively simplify the configuration information form.

[0046] Optionally, the predefined configuration fields included in the configuration information line include variable type, variable label, judgment logic, and target label;

[0047] The extraction of the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition included in the control logic, and the conversion of the control logic into a configuration information line including predefined configuration fields includes:

[0048] Extract the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition included in the control logic;

[0049] Convert the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition into a configuration information line characterized by the values of the variable type, variable label, judgment logic, and target label.

[0050] The predefined configuration fields include variable type, variable label, judgment logic, and target label. The variable type can be divided into variables and constants. Different variables can be defined by the values of the variable labels, and the values of different variable labels represent the meanings corresponding to the variables. For example, if the variable label value is "267", it means the corresponding variable is "Interface 1"; if the variable label value is "272", it means the corresponding variable is "No current operation". The value of the judgment logic in a configuration information line can be selected from the following according to the meaning of the logical operation performed on different variables expressed by the corresponding configuration information line: logical negation, arithmetic negation, multiplication, modulo, integer division, bitwise left shift, bitwise right shift, greater than, greater than or equal to, less than, less than or equal to, equal to, not equal to, numerical AND, numerical XOR, numerical OR, logical AND, logical OR. In an optional specific example, when the trigger condition in the control logic is "when there is no operation under Interface 1", the configuration information line characterized by the values of the variable type, variable label, judgment logic, and target label can be as shown in the following table:

[0051]

[0052] The variable label "269" of the variable + the judgment logic "equal to" + the variable label "1" of the judgment variable, representing "currently at Interface 1", and the target label corresponding to this operation logic is "269";

[0053] The variable label "272" of the variable + the judgment logic "equal to" + the variable label "0" of the judgment variable, representing "no current operation", and the target label corresponding to this operation logic is "270";

[0054] The variable label "269" of the variable + the judgment logic "logical AND" + the variable label "270" of the variable, representing "no operation under Interface 1" through this operation logic, and the target label corresponding to this operation logic is "271".

[0055] In the above embodiments, each information configuration line has predefined configuration fields including variable type, variable label, judgment logic, and target label. Converting the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition in the control logic into a configuration information line characterized by the values of the variable type, variable label, judgment logic, and target label supports various required logical calculations for the trigger conditions included in the control logic, supports flexible configuration of custom events, and facilitates the addition and other updates and upgrades of target control events.

[0056] In some embodiments, step S103 includes: parsing the control logic included in the target control event according to the event configuration data, converting the control logic into a configuration information line including predefined configuration fields, and forming a configuration information form based on the configuration information line, including:

[0057] Parsing the control logic included in the target control event according to the event configuration data;

[0058] Converting the control logic into a configuration information line including predefined configuration fields;

[0059] Based on the control logic being a key control logic, a timing trigger logic, a level trigger logic, or a custom function trigger logic, differentiating the configuration information line to form different types of configuration information forms; the types of the configuration information forms include an operation form, a background timing form, and a logic calculation form.

[0060] Among them, the event types mainly include key events, timing events, level events, and custom logic events. A key event refers to an event triggered by a key screen or a physical key in the display interface provided by the embedded device. A timing event refers to an event triggered by timing. A level event refers to an event triggered based on pre-built conditional parameters such as permissions and alarms. Level events are usually configured with different priorities. Usually, a level event with a high priority can override a level event with a low priority. In the embodiments of the present application, in addition to the pre-built key events, timing events, and level events in the embedded device, event function types can be added according to different requirements of actual application scenarios, and custom customized events can be added through logical configuration, conveniently realizing the function upgrade of the embedded device. A custom customized event refers to an event triggered by a user-defined logic function, and the trigger condition can also be a key, timing, set conditional parameters, or a combination thereof; thus, the control logic of the custom customized event can correspondingly be a key control logic, a timing trigger logic, a level trigger logic, or a custom function trigger logic composed of at least two of the key control logic, the timing trigger logic, and the level trigger logic. The types of the custom customized events are correspondingly key events, timing events, level events, or custom function events.

[0061] Convert the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition in the control logic into a configuration information line represented by the values of the variable type, variable label, judgment logic, and target label. Distinguish different types such as operation forms, background timing forms, and logical calculation forms according to the content of the configuration information line. The distinction of different types of configuration information forms is conducive to logic simplification and information compression, can be verified in different ways, and is also convenient to distinguish different data flows to send to the embedded device. For example, the configuration information line converted from the button control logic can be correspondingly formed as part of the operation form. The button trigger condition represented therein can usually be reused in different logical operations. For example, button A is pressed independently (judgment logic "equal") and buttons A and B (judgment logic "logical AND") are pressed simultaneously. The configuration information line corresponding to the button trigger condition of button A being pressed can be reused in the above two logical operations, so as to support various required logical calculations on the trigger conditions included in the control logic, achieve logic simplification and information compression, and facilitate the user to flexibly configure custom events.

[0062] In an optional example, the built-in functions that the operation form can trigger can be divided into: including interface operations (page turning, interface jumping, etc.), data operations (value modification, permission setting), memory copy, etc. For the operation form, it is usually triggered by the interface. The functions that the background timing form can trigger include functions that are periodically executed determined by the start condition and stop condition. For the background timing form, the function takes effect globally. The logical calculation form supports logical operations between variables / constants and stores the calculation results in memory. For the logical calculation form, the function takes effect globally.

[0063] In the above embodiment, the host computer parses the control logic in the target control event according to the event configuration data of the user for the target control event, and converts the control logic into a configuration information line described by predefined configuration fields. Different types of configuration information forms are distinguished according to the content meaning of the configuration information line. Different types of configuration information forms distinguish different data flows to send to the embedded device. On the one hand, on the host computer side, distinguishing different types of configuration information forms can verify the data of the form in different ways, facilitate logic simplification and information compression, and also facilitate reuse in logical operations; on the other hand, on the embedded device side, the data flow formed by distinguishing different types of configuration information forms can further lighten the logical parsing.

[0064] Optionally, the S105, generating a logical data flow corresponding to the target control event based on the configuration information form, includes:

[0065] Generate a logical data flow that characterizes the target control event through event parameters, event numbers, function numbers, and function parameters based on the configuration information form.

[0066] Among them, the logical data flow describes the target control event described in the configuration information form by converting it into the values of event parameters, event numbers, function numbers, and function parameters. Among them, the meanings of the values of function numbers and function parameters are mutually related through a mapping relationship with the meanings of the values of each predefined configuration field in the configuration information form, and effective compression of data content can be achieved.

[0067] Optionally, before generating the logical data flow that characterizes the target control event through event parameters, event numbers, function numbers, and function parameters based on the configuration information form, it further includes:

[0068] According to different types of the configuration information form, perform data checks through corresponding verification strategies respectively, and perform duplicate removal and error reporting processing on the duplicate logic and conflict logic included in the configuration information form until the verification passes.

[0069] The configuration information rows in the configuration information form are composed of predefined configuration fields. According to the values of each predefined configuration field in the configuration information row, the control logic included in the target control event corresponding to it can be restored. Since the constituent elements of each configuration information form, the configuration information row, use a unified logical description language to describe events, and the host computer is usually a computer device with a certain computing power, it is thus possible to support setting verification strategies for the configuration information form to automatically perform data checks, screen and identify the duplicate logic and conflict logic included in the configuration information form, perform duplicate removal processing on the identified duplicate logic, and perform error reporting processing on the conflict logic until the verification passes.

[0070] In the above embodiment, the verification strategy for automatically verifying the configuration information form can be set by using whether the control logic included in the event can be restored based on the content of the configuration information form. Therefore, not only is the configuration and parsing of the target control event completed using the operating environment provided by the host computer, but also the logical review of the configured target control event is realized using the computing power of the host computer.

[0071] Please refer to Figure 3 and Figure 4 For a more comprehensive understanding of the implementation of the event configuration method for the embedded device provided in the embodiments of the present application, the following takes the embedded device as an LCD screen as an example for illustration. The event configuration method includes:

[0072] S11, the host computer obtains the event configuration data of the target control event according to the user's configuration operation;

[0073] S12. The host computer generates a configuration information form according to the event configuration data; the configuration information form is divided into different types such as an operation form, a background timing form, and a logic calculation form.

[0074] Among them, the host computer extracts the control logic of the target control event from the event configuration data, and describes the control logic through configuration information lines using predefined configuration fields, so as to convert the target control event into a configuration information line that describes the corresponding control logic using general Boolean algebra logic, and form a corresponding configuration information form from the configuration information lines.

[0075] Example 1: The target control event is: "When the data of the slave computer changes abnormally under Interface 1 of the LCD screen, the LCD screen can automatically identify and correct the data";

[0076] The extracted control logic of the target control event includes:

[0077] Control logic 1: When it is not under Interface 1, put the read data A into the preset memory B

[0078] Control logic 2: When it is under Interface 1, judge whether A is consistent with B. If not, trigger control logic 3

[0079] Control logic 3: Send the data in the preset memory B through communication to update data A

[0080] In this way, the function that when the data of the slave computer changes abnormally under Interface 1, the LCD screen can automatically identify and correct the data is realized.

[0081] Example 2: The target control event is: "Under the language interface, the cursor position of the user option automatically follows the current data of the slave computer, and when there is a user operation, it is based on the user option position";

[0082] The extracted control logic of the target control event includes:

[0083] Interface operation control logic

[0084] 1. After the button "↑" is pressed, the user option shifts up one line (the system variable value of "the current user option" minus 1), and triggers the internal logic of "currently in settings", and the system variable flag in the settings is 1.

[0085] 2. After the button "↓" is pressed, the user option shifts down one line (the system variable value of "the current user option" plus 1), and triggers the internal logic of "currently in settings", and the system variable flag in the settings is 1.

[0086] 3. After the button "Enter" is pressed, copy the system variable value of "the current user option" to the memory address where "the current language" is located, and send it to the slave computer through communication.

[0087] Logic calculation control logic

[0088] 1. When the system variable value of "current interface" is equal to the constant 2 (2 indicates the current language interface), the local variable value of "the current interface is the language interface" is 1. Otherwise, it is 0.

[0089] 2. When the system variable value of "currently in settings" is equal to the constant 0 (0 indicates idle, 1 indicates in settings), the local variable value of "no current operation" is 1. Otherwise, it is 0.

[0090] 3. The result of the local variable value of "the current interface is the language interface" and the local variable value of "no current operation" above is stored in the local variable of "no operation in the current language interface".

[0091] Background timing control logic

[0092] 1. Trigger condition: The local variable value of "the current interface is the language interface" is equal to 1.

[0093] 2. Release condition: The local variable value of "the current interface is the language interface" is not equal to 1.

[0094] 3. Loop trigger event: Copy the lower-level machine communication data value of "current language" to the system variable value of "current user options".

[0095] In this way, by combining the background timing control logic and the logic calculation control logic, when entering the language interface and not starting to operate, the current language status value of the lower-level machine obtained from the communication is displayed at the user option position on the interface. By combining the interface operation control logic 1 and 2, the logic calculation control logic, and the background timing control logic, when starting to operate after entering the language interface, the user option value on the interface is determined by the current operation.

[0096] S13. The host computer distinguishes different data streams according to different types of configuration information forms, and different data streams are verified in different ways;

[0097] S14. The host computer screens and identifies the duplicate logic and conflict logic in the configuration information form, removes the duplicates from the duplicate logic, and verifies the conflict logic; It can realize logic simplification and information compression, and reduce the data type to achieve the purpose of information compression.

[0098] S15. The host computer generates a logic information data stream and writes it into the embedded device. The logic information data stream includes two parts, one is the data format and the other is the data content. The data format is used for the embedded device to determine what data type to identify the data content.

[0099] S16. The embedded device first parses the data format to determine what data format should be used for data processing, and then enters the logic parsing unit for parsing according to the logical information data stream;

[0100] S17. The embedded device restores the event trigger part and the function execution part of the target control event in the logical information data stream and provides them to the event service program.

[0101] Please refer to Figure 5 , which is the architecture diagram of the event service program of the embedded device. Based on the existing built-in events in the system of the embedded device, custom and customized events are added. The types of built-in events can include key events, timing events, and level events. The user configures the customized events for the functions required by the embedded device through the host computer, and can quote some control logics of the existing built-in events to customize new logical functions through logical operations. The event service program obtains the logical data stream of the customized events sent by the host computer for parsing, and according to the use of some control logics of the existing built-in events during the configuration process of the customized events, executes the customized event function by cross-mapping and calling the built-in events.

[0102] The event configuration method in the above embodiments has at least the following characteristics:

[0103] First, for the embedded device side, the development environment provided by the host computer can be utilized to customize and configure events based on the existing event functions in the system of the embedded device according to actual application requirements, and the type of event functions is increased;

[0104] Second, the host computer parses the control logic contained in the target control event according to the event configuration data, converts the control logic into a configuration information line of predefined configuration fields and forms a configuration information form, and generates a logical data stream of the configuration information form and sends it to the embedded device. In this way, the configuration and parsing of the target control event are completed through the operating environment provided by the host computer. For the embedded device, only the simplest logical judgment is required to perform logical parsing on the logical data stream to obtain the logical function of the target control event to be executed, greatly reducing the chip overhead requirements on the embedded device side. Among them, during the processing of converting the parsed control logic, a judgment logic that supports various required logical operations is introduced to provide all basic logical operations. The user can combine and configure trigger events and execution actions through logical operations, which is conducive to the flexible configuration of customized events;

[0105] Third, complete the configuration and parsing of the target control event through the operating environment provided by the host computer, transfer the logic processing with high chip overhead to the host computer for completion, and only retain the logical parsing part of the basic logical judgment function in the logical information data stream in the kernel of the embedded device, effectively reducing the chip space requirements for the embedded device.

[0106] Please refer to Figure 6 , on the other hand, an embodiment of the present application provides an event configuration device for an embedded device, including: a configuration module 211, configured to obtain event configuration data of a target control event; a form module 212, configured to parse the control logic included in the target control event according to the event configuration data, convert the control logic into a configuration information line including predefined configuration fields, and form a configuration information form according to the configuration information line; a data flow module 213, configured to generate a logical data flow corresponding to the target control event based on the configuration information form; the logical data flow is used to be written into the embedded device.

[0107] Optionally, the form module 212 is further configured to parse the control logic included in the target control event according to the event configuration data; extract the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition included in the control logic, and convert the control logic into a configuration information line including predefined configuration fields; form a configuration information form according to the configuration information line.

[0108] Optionally, the predefined configuration fields included in the configuration information line include variable type, variable label, judgment logic, and target label; the form module 212 is further configured to extract the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition included in the control logic; convert the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition into a configuration information line represented by the values of the variable type, variable label, judgment logic, and target label.

[0109] Optionally, the form module 212 is further configured to parse the control logic included in the target control event according to the event configuration data; convert the control logic into a configuration information line including predefined configuration fields; based on the control logic being a button control logic, a timing trigger logic, a level trigger logic, or a custom function trigger logic, distinguish and form different types of configuration information forms for the configuration information line; the types of the configuration information forms include an operation form, a background timing form, and a logical calculation form.

[0110] Optionally, the data flow module 213 is further configured to generate a logical data flow representing the target control event through event parameters, event numbers, function numbers, and function parameters based on the configuration information form.

[0111] Optionally, the data flow module 213 is further configured to perform data checks through corresponding verification policies according to different types of the configuration information form, and perform duplicate removal and error reporting processing on the duplicate logic and conflict logic included in the configuration information form until the verification passes.

[0112] It should be noted that the structure provided in the embodiments of the present application does not constitute a limitation on the event configuration device. Each of the above modules can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the controller of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form to facilitate the controller to call and execute the operations corresponding to each of the above modules. In other embodiments, the event configuration device may include more or fewer modules than shown in the figure.

[0113] Please refer to Figure 7 , on the other hand, the present application provides a host computer, including a memory 21 and a processor 22. The memory 21 stores a computer program. When the computer program is executed by the processor 22, the processor 22 is caused to execute the event configuration method provided in any of the above embodiments of the present application.

[0114] On the other hand, the embodiments of the present application provide an event configuration system, including the host computer and the embedded device described in the embodiments of the present application; the embedded device obtains the logical data flow and restores the control logic in the logical data flow to perform corresponding event management.

[0115] On the other hand, the embodiments of the present application further provide a storage medium storing a computer program. When the computer program is executed by a processor, the processor is caused to execute the event configuration method provided in any of the above embodiments of the present application.

[0116] Those of ordinary skill in the art can understand that all or part of the processes in the methods provided in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0117] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. The protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. An event configuration method for an embedded device, applied to a host computer, characterized in that Including: Obtaining event configuration data of a target control event; According to the event configuration data, parsing the control logic included in the target control event, converting the control logic into a configuration information line including predefined configuration fields, and forming a configuration information form according to the configuration information line; the control logic includes a trigger condition, a judgment logic corresponding to the trigger condition, and an execution action corresponding to the trigger condition; Generating a logic data stream corresponding to the target control event based on the configuration information form; the logic data stream is used to be written into an embedded device.

2. The event configuration method according to claim 1, wherein The step of, according to the event configuration data, parsing the control logic included in the target control event, converting the control logic into a configuration information line including predefined configuration fields, and forming a configuration information form according to the configuration information line, includes: According to the event configuration data, parsing the control logic included in the target control event; Extracting the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition included in the control logic, and converting the control logic into a configuration information line including predefined configuration fields; Forming a configuration information form according to the configuration information line.

3. The event configuration method according to claim 2, wherein The predefined configuration fields included in the configuration information line include variable type, variable label, judgment logic, and target label; The step of extracting the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition included in the control logic, and converting the control logic into a configuration information line including predefined configuration fields, includes: Extracting the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition included in the control logic; Converting the trigger condition, the judgment logic corresponding to the trigger condition, and the execution action corresponding to the trigger condition into a configuration information line characterized by the values of the variable type, variable label, judgment logic, and target label.

4. The event configuration method according to claim 1, wherein The step of, according to the event configuration data, parsing the control logic included in the target control event, converting the control logic into a configuration information line including predefined configuration fields, and forming a configuration information form according to the configuration information line, includes: According to the event configuration data, parsing the control logic included in the target control event; Converting the control logic into a configuration information line including predefined configuration fields; Based on the control logic being a key control logic, a timing trigger logic, a level trigger logic, or a custom function trigger logic, differentiating and forming different types of configuration information forms from the configuration information line; the types of the configuration information forms include an operation form, a background timing form, and a logic calculation form.

5. The event configuration method according to claim 4, wherein The step of generating a logic data stream corresponding to the target control event based on the configuration information form includes: Generating a logic data stream characterizing the target control event through event parameters, event numbers, function numbers, and function parameters based on the configuration information form.

6. The event configuration method according to claim 5, wherein Before the step of generating a logic data stream characterizing the target control event through event parameters, event numbers, function numbers, and function parameters based on the configuration information form, further includes: According to different types of the configuration information form, data checks are respectively performed through corresponding verification strategies, and duplicate logic and conflict logic included in the configuration information form are respectively de-duplicated and error-reported until the verification passes.

7. An event configuration device for an embedded device, characterized in that, It includes: A configuration module, configured to obtain event configuration data of a target control event; A form module, configured to parse control logic included in the target control event according to the event configuration data, convert the control logic into a configuration information line including predefined configuration fields, and form a configuration information form according to the configuration information line; the control logic includes a trigger condition, a judgment logic corresponding to the trigger condition, and an execution action corresponding to the trigger condition; A data flow module, configured to generate a logic data flow corresponding to the target control event based on the configuration information form; the logic data flow is used to be written into an embedded device.

8. An upper computer, characterized in that, It includes a memory and a processor. When the computer program stored in the memory is executed by the processor, the processor is caused to execute the event configuration method according to any one of claims 1 to 6.

9. An event configuration system, characterized in that, It includes the host computer and the embedded device according to claim 8; The embedded device obtains the logic data flow and restores the control logic in the logic data flow to perform corresponding event management.

10. The event configuration system according to claim 9, characterized in that, The logic data flow includes a data format part and a data content part. The embedded device first parses based on the data format part to determine the data format type, then calls a corresponding data interface to read the data content according to the data format type, and restores the control logic according to the data content.

11. The event configuration system according to claim 9, characterized in that, The embedded device is an embedded LCD display screen.

12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the processor is caused to execute the event configuration method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Business code development method and system and computer readable storage medium

    CN114816430A