CN116627668A - Control device and method of user interaction panel, medium and electronic equipment - Google Patents

Control device and method of user interaction panel, medium and electronic equipment Download PDF

Info

Publication number
CN116627668A
CN116627668A CN202310532709.5A CN202310532709A CN116627668A CN 116627668 A CN116627668 A CN 116627668A CN 202310532709 A CN202310532709 A CN 202310532709A CN 116627668 A CN116627668 A CN 116627668A
Authority
CN
China
Prior art keywords
event
module
target
request
executed
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
CN202310532709.5A
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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN202310532709.5A priority Critical patent/CN116627668A/en
Publication of CN116627668A publication Critical patent/CN116627668A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The disclosure relates to the technical field of computers, and in particular relates to a control device, a control method, a control medium and electronic equipment of a user interaction panel. The control device comprises a main process module, a plurality of driving modules and a plurality of hardware modules, wherein the driving modules and the hardware modules are in one-to-one correspondence; the main process module is used for determining a request event which is requested to be executed by the client according to an event triggering request sent by the client and sending the request event to each driving module; and the driving module is used for determining target operation to be executed by the corresponding hardware module according to the event definition of the request event relative to the corresponding hardware module under the condition that the executable event supported by the corresponding hardware module comprises the request event, and controlling the corresponding hardware module to execute the target operation. Therefore, the coupling between the service logic and the direct operation code of the hardware can be released, and the code modification amount during service adjustment can be reduced during service adjustment.

Description

Control device and method of user interaction panel, medium and electronic equipment
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a control device, a control method, a control medium and electronic equipment of a user interaction panel.
Background
Currently, a driver control program, upon receiving a request to operate hardware, needs to process the request consistently. That is, the interface portion of the drive control program receiving the request and the drive portion of the operating hardware have one-to-one interface definition. Therefore, the function maintenance can be conveniently carried out, the front and back functions are clear and visual, and the problem is convenient to position.
However, the hardware functions may be different, and if interfaces are defined for each hardware function, the driver control program interfaces may be too many. If new hardware is configured or the functions of the existing hardware are modified, a large amount of bottom codes of the drive control program are required to be modified, and the association risk caused by the modified codes is extremely high; but also the time period required for the floor-based implementation of each service change is excessive.
Disclosure of Invention
The purpose of the present disclosure is to provide a control device, a method, a medium and an electronic device for a user interaction panel, so as to reduce the dependence of a hardware function on underlying code, and reduce the code modification amount when the hardware function is modified.
In order to achieve the above object, a first aspect of the present disclosure provides a control device for a user interaction panel, including a main process module, a plurality of driving modules, and a plurality of hardware modules, where the driving modules and the hardware modules are in one-to-one correspondence;
The main process module is used for determining a request event which is requested to be executed by the client according to an event triggering request sent by the client, and sending the request event to each driving module;
the driving module is configured to determine a target operation to be executed by the corresponding hardware module according to an event definition of the request event relative to the corresponding hardware module when the request event is included in executable events supported by the corresponding hardware module, and control the corresponding hardware module to execute the target operation, where the event definition includes an event priority and an operation to be executed.
Optionally, the driving module is configured to determine, according to an event definition of the request event relative to the corresponding hardware module, a target operation to be performed by the corresponding hardware module by:
and determining the operation to be executed in the event definition with the highest event priority in the event definition of the request event relative to the corresponding hardware module as the target operation.
Optionally, an array is maintained in the driving module, elements in the array respectively correspond to a predefined event, and the element arrangement sequence corresponds to priority ordering among the predefined events;
The driving module is configured to determine, as the target operation, an operation to be performed in an event definition having a highest event priority, from among event definitions of the corresponding hardware modules, of the request event by:
according to the request event, setting an element corresponding to the request event in the array from an initial value to a target value, wherein the initial value is different from the target value;
determining a target element, wherein the target element is an element corresponding to the highest event priority among elements with the value of the array as the target value;
and determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
Optionally, the event definition further comprises a timeout function, and the driving module is further configured to:
if the time length from the determination of the target operation reaches the time length threshold represented by the timeout function and the target operation is executed, setting the target element from the target value to the initial value;
and re-executing the operation of determining the target element to the operation of determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
Optionally, the main process module is further configured to perform validity verification on the request event according to an event occurrence constraint condition of the request event; and sending the request event to each driving module under the condition that the request event passes the validity verification.
Optionally, the control device further includes a drive loading module, which is connected to the main process module and the plurality of drive modules, and is configured to load the drive modules when the control device is started, and to implement communication between the main process module and each of the drive modules.
Optionally, the control device further includes an input/output processing module, where the input/output processing module is connected to the main process module, and is used to implement communication between the client and the main process module.
Optionally, the user interaction panel is a user interaction panel of a desktop security gateway.
A second aspect of the present disclosure provides a control method of a user interaction panel, including:
the method comprises the steps that a main process module determines a request event which is requested to be executed by a client according to an event triggering request sent by the client, and sends the request event to each of a plurality of driving modules, wherein the driving modules are in one-to-one correspondence with a plurality of hardware modules;
And under the condition that the executable event supported by the corresponding hardware module comprises the request event, the driving module determines a target operation to be executed by the corresponding hardware module according to an event definition of the request event relative to the corresponding hardware module, and controls the corresponding hardware module to execute the target operation, wherein the event definition comprises an event priority and the operation to be executed.
Optionally, the determining, according to the event definition of the request event relative to the corresponding hardware module, the target operation to be performed by the corresponding hardware module includes:
and determining the operation to be executed in the event definition with the highest event priority in the event definition of the request event relative to the corresponding hardware module as the target operation.
Optionally, an array is maintained in the driving module, elements in the array respectively correspond to a predefined event, and the element arrangement sequence corresponds to priority ordering among the predefined events;
the determining the request event as the target operation relative to the operation to be executed in the event definition with the highest event priority in the event definition of the corresponding hardware module includes:
According to the request event, setting an element corresponding to the request event in the array from an initial value to a target value, wherein the initial value is different from the target value;
determining a target element, wherein the target element is an element corresponding to the highest event priority among elements with the value of the array as the target value;
and determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
Optionally, the event definition further comprises a timeout function, the method further comprising:
the driving module sets the target element from the target value to the initial value if the time length from the determination of the target operation reaches the time length threshold represented by the timeout function and the execution of the target operation is completed; and re-executing the step of determining the target element to the step of determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
Optionally, the sending the request event to each of the plurality of driving modules includes:
verifying the validity of the request event according to the event occurrence limit condition of the request event; and sending the request event to each driving module under the condition that the request event passes the validity verification.
A third aspect of the present disclosure provides a non-transitory computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the method provided by the second aspect of the present disclosure.
A fourth aspect of the present disclosure provides an electronic device, comprising:
a memory having a computer program stored thereon;
and a controller, the computer program implementing the steps of the method provided in the second aspect of the disclosure when executed by the controller.
In the above technical solution, the main process module can issue the determined request event to each driving module connected with the main process module; and each driving module can determine the target operation to be executed by the corresponding hardware module according to the event definition of the request event relative to the corresponding hardware module under the condition that the executable event supported by the corresponding hardware module comprises the request event, and control the corresponding hardware module to execute the target operation. Therefore, the coupling between the service logic and the hardware direct operation code can be relieved, the dependence of the hardware function on the bottom code is reduced, and the code modification amount during service adjustment is reduced, so that the adjustment of the hardware function is realized quickly and stably.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
fig. 1 is a block diagram of a control apparatus of a user interaction panel provided in an exemplary embodiment of the present disclosure.
Fig. 2 is a block diagram of a control device of a user interaction panel provided in an exemplary embodiment of the present disclosure.
Fig. 3 is a schematic diagram of a main process module and request events corresponding to respective driving modules according to an exemplary embodiment of the present disclosure.
FIG. 4 is a schematic diagram of an array provided by an exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram of a control device of a user interaction panel provided in an exemplary embodiment of the present disclosure.
Fig. 6 is a flowchart of a control method of a user interaction panel provided in an exemplary embodiment of the present disclosure.
Fig. 7 is a block diagram of an electronic device provided by an exemplary embodiment of the present disclosure.
Detailed Description
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
It should be noted that, all actions for acquiring signals, information or data in the present disclosure are performed under the condition of conforming to the corresponding data protection rule policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
Fig. 1 is a block diagram of a control device 100 of a user interaction panel provided in an exemplary embodiment of the present disclosure. As shown in fig. 1, the control apparatus 100 may include a main process module 101, a plurality of driving modules 102, and a plurality of hardware modules 103, where the driving modules 102 and the hardware modules 103 are in one-to-one correspondence.
It should be noted that the control device provided by the present disclosure may be applied to a user interaction panel for controlling various devices, for example, a user interaction panel for controlling a desktop security gateway. For a clearer understanding of the present disclosure, a user interaction panel, which is a desktop level security gateway, will be exemplified below. It should be understood, however, that the illustration of the user interaction panel as an example of a desktop level security gateway should not be construed as limiting the application area and scope of the present disclosure.
The main process module 101 is configured to determine a request event that the client requests to execute according to an event trigger request sent by the client, and send the request event to each driving module 102;
The driving module 102 is configured to determine, when the executable event supported by the corresponding hardware module 103 includes a request event, a target operation to be executed by the corresponding hardware module 103 according to an event definition of the request event relative to the corresponding hardware module 103, and control the corresponding hardware module 103 to execute the target operation.
Wherein the event definition may include an event priority and an operation to be performed.
For a clearer understanding of the present disclosure, the respective driving modules 102 and the respective hardware modules 103 are distinguished hereinafter, and as shown in fig. 2, a first driving module 1021 and a second driving module 1022 may be included in the plurality of driving modules 102, and the plurality of hardware modules 103 may include a first hardware module 1031 and a second hardware module 1032. The first driving module 1021 is connected to the first hardware module 1031, and can be used for controlling the first hardware module 1031 to operate; the second driving module 1022 is connected to the second hardware module 1032, and is used to control the second hardware module 1032 to operate.
For example, the underlying drive may be modularly packaged in advance to obtain a plurality of drive modules. For example, the plurality of hardware modules 103 in the user interaction panel may include a status indicator light and a buzzer, the status indicator light may be determined as the first hardware module 1031, and the status indicator light may be controlled by the first driving module 1021; a buzzer may be determined as the second hardware module 1032, which may be controlled by the second driving module 1022.
If the host process module 101 receives the event trigger request, the specific event trigger request may be converted into different request events by the event abstract definition stored in the host process module 101 in advance, and the determined request events may be issued to each driving module 102. In order to reduce the resources occupied during the issuing process of the request event as much as possible, the main process module 101 may issue a name of the request event or a tag, such as ID (Identity document), capable of characterizing the uniqueness of the event, to each driving module 102, so that each driving module 102 may determine, according to the received tag, whether the executable event supported by the corresponding hardware module 103 includes the request event.
The corresponding relation between the event triggering request and the request event in the event abstract definition can be preset according to the service requirement, so that the received event triggering request can be converted into a concrete request event through the event abstract definition.
For example, if the user clicks the option of "network environment detection" at the client, an event trigger request for network environment detection may be generated, and if the host process module 101 receives the event trigger request for network environment detection, and determines, through an event abstract definition, whether the connection of the detected terminal device is abnormal or not and whether a malicious network attack exists or not, two different request events, which may be sent to each driving module 102.
Fig. 3 is a schematic diagram of a main process module and request events corresponding to respective driving modules according to an exemplary embodiment of the present disclosure. As shown in fig. 3, the request event 301 that the main process module 101 can convert out includes: event one, event two, event three, event four, event five, and event six. The host process module 101 may convert the event trigger request into one or more of event one, event two, event three, event four, event five, and event six via a pre-stored event abstraction definition. The driver module 102 stores in advance event definitions of executable events supported by the corresponding hardware module 103 with respect to the corresponding hardware module 103. As shown in fig. 3, the event definition stored in the first driving module 1021 may include: event one, event two, and event four are defined with respect to the event of the first hardware module 1031; the event definitions stored in the second drive module 1022 may include: event one, event three, event four, and event six are defined with respect to events of the second hardware module 1032.
As described above, the host process module may issue a tag, such as a name or ID, of the requested event to each driver module, which may be used to characterize the event uniqueness, so that each event definition may further include a tag used to characterize the event, and match the received tag issued by the host process module.
Taking the example that the request event determined by the main process module 101 includes an event one and an event two, the main process module 101 may send the event one and the event two to the first driving module 1021 and the second driving module 1022. For the event one, the executable event supported by the first hardware module 1031 corresponding to the first driving module 1021 includes the event one, and the executable event supported by the second hardware module 1032 corresponding to the second driving module 1022 also includes the event one, so it may be determined that the first driving module 1021 and the second driving module 1022 may respond to the event one. For the second event, the executable event supported by the first hardware module 1031 corresponding to the first driving module 1021 includes the second event, and the executable event supported by the second hardware module 1032 corresponding to the second driving module 1022 does not include the second event, so the first driving module 1021 may respond to the second event, and the second driving module 1022 may not respond to the second event.
The hardware modules are different for the same event, and event definitions stored in the corresponding driving modules for the same event are also different. Taking an event as an example of 'equipment starting', assuming that in the process of equipment starting, the buzzer needs to be controlled to sound and the indicator lamp needs to be controlled to be on, the event definition for the event of equipment starting stored in the driving module connected with the buzzer is different from the event definition for the event of equipment starting stored in the driving module connected with the indicator lamp. Two event definitions, one based on control settings for the buzzer upon activation of the device; the other is based on control settings for the indicator lights upon initiation of the device.
In the above example, the second driving module 1022 may respond to the first event and not respond to the second event is described as an example. The second driving module 1022 may determine a target operation to be performed by the corresponding second hardware module 1032 through event definition of the event with respect to the second hardware module 1032, and control the second hardware module 1032 to perform the corresponding target operation. For example, the second driving module 1022 may respond to the first event, the second hardware module 1032 may be a buzzer, the target operation may be determined based on the event definition of the second hardware module 1032 corresponding to the first event stored in the second driving module 1022, and if the determined target operation is to control the buzzer to sound, the buzzer may be controlled by the second driving module 1022 to sound.
Thus, different hardware module actions can be supported through different driving modules according to actual requirements, and the process is dynamic and not fixed through codes. Thus, the main process module 101 can decouple the business logic and the hardware direct operation code by determining and issuing the request event, so as to reduce the modification amount of the code during business adjustment.
The driving module 102 completes the interfacing with the corresponding hardware module 103 on the lower side, and receives the request event sent by the main process module 101 on the upper side through a predefined consistency interface. I.e. the interfaces between each driver module 102 and the main process module 101, there is no need to have a one-to-one correspondence with the interface definitions corresponding to the hardware module 103, so that the number of interface definitions in the driver module can be reduced to reduce the code modification amount during service adjustment. Where an interface definition refers to a specific action of a certain device.
Therefore, when a safety manufacturer adapts to new user interaction panel hardware, a great amount of adaptation modification or redevelopment is not required to be performed on the original system, and only a new bottom layer adaptation is required to be provided for different events of the new hardware, so that the research and development efficiency of the safety manufacturer is greatly improved, and the research and development cost is reduced.
In the above technical solution, the main process module can issue the determined request event to each driving module connected with the main process module; and each driving module can determine the target operation to be executed by the corresponding hardware module according to the event definition of the request event relative to the corresponding hardware module under the condition that the executable event supported by the corresponding hardware module comprises the request event, and control the corresponding hardware module to execute the target operation. Therefore, the coupling between the service logic and the hardware direct operation code can be relieved, the dependence of the hardware function on the bottom code is reduced, and the code modification amount during service adjustment is reduced, so that the adjustment of the hardware function is realized quickly and stably.
Alternatively, the driving module 102 may be configured to determine the target operation to be performed by the corresponding hardware module 103 according to the event definition of the request event with respect to the corresponding hardware module 103 by:
and determining the operation to be executed in the event definition with the highest event priority in the event definition of the request event relative to the corresponding hardware module as a target operation.
In an alternative embodiment, one or more request events may be ordered relative to the event priority in the event definition of the corresponding hardware module, and the operation to be performed in the event definition with the highest event priority in each event definition is determined as the target operation.
For example, if the request event issued by the main process module 101 to each driving module 102 includes an event one and an event two, the executable event supported by the first hardware module 1031 corresponding to the first driving module 1021 includes an event one and an event two. The first and second events may be ordered according to their priorities, and if the first event has a higher priority than the second event, the first event may be determined to be a target operation.
In another alternative embodiment, the driving module 102 maintains an array, wherein the elements in the array respectively correspond to a predefined event, and the element arrangement sequence corresponds to a priority order among the predefined events;
the driving module 102 is configured to determine, as a target operation, an operation to be performed in an event definition having a highest event priority, among event definitions of the request event with respect to the corresponding hardware module 103, by:
according to the request event, setting an element corresponding to the request event in the array from an initial value to a target value, wherein the initial value is different from the target value;
determining a target element, wherein the target element is an element corresponding to the highest event priority among elements with a median value of a plurality of groups as a target value;
and determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
For example, binary is a system of numbers widely used in computing technology, and thus, an initial value may be set to 0 in advance and a target value may be set to 1 in advance. Taking the array maintained by the first driver module 1021 as an example, the array corresponds to the first hardware module 1031, if the array includes 6 elements, and the first driver module 1021 has just completed loading or just performed initializing operation, the array may be {0, 0}, where the arrangement order of the 6 elements corresponds to the priority order among the predefined events, and may be arranged from high to low, or from low to high, which is not limited herein.
For example, elements in the array are arranged from top to bottom in a predefined order of priority between events, with the elements in the array being in turn event four, event two, event six, event one, event five, and event three in a left to right order. If the request event issued by the main process module 101 to each driving module 102 includes an event one and an event two, the executable event supported by the first hardware module 1031 corresponding to the first driving module 1021 includes an event one and an event two. The array may then be updated to {0,1,0,1,0,0} in fig. 4, from which a second element in the array may be determined to be a target element, which corresponds to event two, and the event may be determined to be a target operation with respect to the operation to be performed in the event definition of the first hardware module 1031.
Optionally, the event definition may further include a timeout function, and the driving module 102 may further be configured to:
if the time length from the determination of the target operation reaches the time length threshold represented by the timeout function and the execution of the target operation is finished, setting the target element from the target value to an initial value;
and re-executing the operation of determining the target element to the operation of determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
Not all event definitions include a timeout function, and the timeout function may be added by a developer in advance according to a service requirement. The time-out function characterizes a time-length threshold value which can be used for monitoring the time length of the execution of the target operation. The time-out function may be configured according to a time length for which the target operation is normally executed, for example, if the target operation is immediately executed since the target operation is determined, the time length threshold may be set to be a time length for which the target operation is executed; if the target operation is performed after a period of time has elapsed since the determination of the target operation, the duration threshold may be set to the sum of the duration of completion of the execution of the target operation and the duration of the interval. While the target element is set to the initial value by the target value, the hardware module corresponding to the driving module may no longer perform the target operation corresponding to the target element.
If the array is {0,1,0,1,0,0}, the second bit in the array is determined to be the target element and corresponds to the event two, and if the duration from determining the target operation reaches the duration threshold represented by the timeout function and the target operation is performed, the array may be updated to {0,0,0,1,0,0}, the hardware module corresponding to the driving module may not perform the target operation corresponding to the original target element any more, and the fourth bit in the array may be determined to be the new target element. And re-executing the operation of determining the target element to the operation of determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
In this way, the driving module 102 may control the corresponding hardware module 103 to sequentially execute the received request events according to the priority of the events through setting the timeout function.
In updating the array from {0,1,0,1,0,0} to {0,0,0,1,0,0} in fig. 4, if the first driver module 1021 does not receive other request events, the array may be directly updated to {0,0,0,1,0,0} to determine the event as a new target operation with respect to the operation to be performed in the event definition of the first hardware module 1031.
In the above updating process (for example, the event one is not performed in the event definition corresponding to the first hardware module 1031, if the first driving module 1021 receives other request events, the array {0,1,0,1,0,0} in fig. 4 may be updated according to the newly received request event, for example, if the newly received request event is event four and the executable event supported by the first hardware module 1031 corresponding to the first driving module 1021 includes event four, the array in fig. 4 may be updated to {1,1,0,1,0,0}, and the element corresponding to the highest event priority in the element in the array with the value of the target value is determined as the target element, that is, the element corresponding to the highest event priority in the event definition corresponding to the first hardware module 1031 is determined as the target operation. In this case, the first execution operation in the event definition corresponding to the first hardware module 1031 may be re-executed when the first execution operation in the event definition corresponding to the first hardware module 1031 is completed.
Based on event-driven, an array is used to determine the target operation and the multi-priority state of the hardware module is implemented by the array. The up can be driven by event definition to realize business, the bottom driving logic of different hardware is shielded, and the down can realize different operation logic through different hardware modules. Therefore, the service logic is decoupled from the underlying technology, so that the unified control device can support different hardware modules, and extremely high expandability and maintainability are provided for the control device.
In addition to the event priority, the operation to be performed, and the timeout function described above, the event definition may further include a special event processing function, which may be set by a developer, to cooperate with the association actions between the plurality of hardware modules. I.e. according to the codes corresponding to the functions, a plurality of different hardware modules 103 are controlled to act successively according to the requirements. Thus, the adaptability of the control device of the user interaction panel provided by the disclosure can be improved.
Optionally, the main process module 101 may be further configured to perform validity verification on the request event according to an event occurrence constraint condition of the request event; in the case where the request event passes the validity verification, the request event is transmitted to each of the driving modules 102.
For example, the event occurrence restriction condition of the request event may be preset according to the request event itself, for example, if the request event is a connection network, the event occurrence restriction condition of the request event may be set to be that the router is in a power-on state. If the router is in the power-on state, the request event can be determined to be legal, and the request event can be sent to each driving module 102; if the router is not in the power-on state, it may be determined that the request event is not legal, the request event may not be sent to each driving module 102, and a prompt message may be generated according to an event occurrence constraint condition, for example, the generated prompt message may be "the router is not power-on" so as to prompt the user.
Optionally, as shown in fig. 5, the control device 100 may further include a driver loading module 104, connected to the main process module 101 and the plurality of driver modules 102, where the driver loading module 104 is configured to load the driver modules 102 when the control device 100 is started, and to implement communication between the main process module 101 and each of the driver modules 102.
For example, the driver loading module 104 may dynamically load the driver module 102 using a dlopen family of interfaces. When the user needs to support specific hardware, the links corresponding to the driver modules 102 corresponding to the specific hardware modules 103 may be placed in a specified directory in advance, and the driver loading module 104 loads all the driver modules 102 existing under the directory during the starting process of the control device 100. The driver loading module exists as an intermediate layer between the main process module 101 and the driver module 102, and functions not only to load the driver module, but also to transmit messages to the driver module 102 through a unified interface.
Optionally, the control device 100 may further include an input/output processing module 105, where the input/output processing module 105 is connected to the main process module 101, for implementing communication between the client and the main process module.
If the client and the control device 100 are in the same Linux system, the input/output processing module 105 may implement input/output multiplexing through an epoll mechanism, and the input/output processing module 105 may carry an interface for receiving an event trigger request through Unix Domain Socket.
The epoll is the poll which is improved by the Linux kernel for processing a large number of file descriptors, is an enhanced version of the multiplexing IO interface select/poll under Linux, and can obviously improve the system CPU utilization rate of the program under the condition that only a small amount of concurrent connection is active. When the event is acquired, traversing the descriptor set which is asynchronously awakened by the kernel IO event and added into the Ready queue. Unix Domain Socket is also called IPC (inter-process communication inter-process communication) socket, and is used for implementing inter-process communication on the same host. The control device 100 can realize the request monitoring service through the epoll driver and the interface carried by Unix Domain Socket, support concurrent operation, and simultaneously support the user mode and the kernel mode to send requests to the control device. If the input/output processing module 105 listens for an event trigger request sent by the client, the event trigger request may be sent to the main process module 101.
Based on the same inventive concept, the present disclosure also provides a control method of a user interaction panel. Fig. 6 is a flowchart of a control method of a user interaction panel provided in an exemplary embodiment of the present disclosure. As shown in fig. 6, the method may include S601 to S602.
S601, a main process module determines a request event which is requested to be executed by a client according to an event triggering request sent by the client, and sends the request event to each of a plurality of driving modules, wherein the driving modules are in one-to-one correspondence with the hardware modules.
S602, under the condition that the executable events supported by the corresponding hardware modules comprise request events, the driving module determines target operations to be executed by the corresponding hardware modules according to event definitions of the request events relative to the corresponding hardware modules, and controls the corresponding hardware modules to execute the target operations.
Wherein the event definition includes an event priority and an operation to be performed.
In the above technical solution, the main process module can issue the determined request event to each driving module connected with the main process module; and each driving module can determine the target operation to be executed by the corresponding hardware module according to the event definition of the request event relative to the corresponding hardware module under the condition that the executable event supported by the corresponding hardware module comprises the request event, and control the corresponding hardware module to execute the target operation. Therefore, the coupling between the service logic and the hardware direct operation code can be relieved, the dependence of the hardware function on the bottom code is reduced, and the code modification amount during service adjustment is reduced, so that the adjustment of the hardware function is realized quickly and stably.
Optionally, in S602, the determining, according to an event definition of the request event with respect to the corresponding hardware module, a target operation to be performed by the corresponding hardware module includes:
and determining the operation to be executed in the event definition with the highest event priority in the event definition of the request event relative to the corresponding hardware module as the target operation.
Optionally, an array is maintained in the driving module, elements in the array respectively correspond to a predefined event, and the element arrangement sequence corresponds to priority ordering among the predefined events;
in S602, the determining the request event as the target operation with respect to the operation to be performed in the event definition with the highest event priority in the event definition of the corresponding hardware module includes:
according to the request event, setting an element corresponding to the request event in the array from an initial value to a target value, wherein the initial value is different from the target value;
determining a target element, wherein the target element is an element corresponding to the highest event priority among elements with the value of the array as the target value;
And determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
Optionally, the event definition further includes a timeout function, and the control method of the user interaction panel provided by the present disclosure further includes:
the driving module sets the target element from the target value to the initial value if the time length from the determination of the target operation reaches the time length threshold represented by the timeout function and the execution of the target operation is completed; and re-executing the step of determining the target element to the step of determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
Optionally, the sending the request event to each of the plurality of driving modules includes:
verifying the validity of the request event according to the event occurrence limit condition of the request event; and sending the request event to each driving module under the condition that the request event passes the validity verification.
The specific manner in which the steps of the method of the above embodiment are described in detail in the embodiment of the related apparatus will not be explained in detail here.
Fig. 7 is a block diagram of an electronic device 700 provided in an exemplary embodiment of the present disclosure. As shown in fig. 7, the electronic device 700 may include: a processor 701, a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700, so as to complete all or part of the steps in the control method of the user interaction panel. The memory 702 is used to store various types of data to support operation on the electronic device 700, which may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact data, messages sent and received, pictures, audio, video, and so forth. The Memory 702 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 703 can include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 702 or transmitted through the communication component 705. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near Field Communication, NFC for short), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or one or a combination of more of them, is not limited herein. The corresponding communication component 705 may thus comprise: wi-Fi module, bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), digital signal processors (Digital Signal Processor, abbreviated as DSP), digital signal processing devices (Digital Signal Processing Device, abbreviated as DSPD), programmable logic devices (Programmable Logic Device, abbreviated as PLD), field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), controllers, microcontrollers, microprocessors, or other electronic components for performing the control method of the user interaction panel described above.
In another exemplary embodiment, a computer readable storage medium is also provided, comprising program instructions which, when executed by a processor, implement the steps of the control method of the user interaction panel described above. For example, the computer readable storage medium may be the memory 702 including program instructions described above, which are executable by the processor 701 of the electronic device 700 to perform the control method of the user interaction panel described above.
In another exemplary embodiment, a computer program product is also provided, comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the control method of the user interaction panel described above when executed by the programmable apparatus.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure, and all the simple modifications belong to the protection scope of the present disclosure.
In addition, the specific features described in the above embodiments may be combined in any suitable manner without contradiction. The various possible combinations are not described further in this disclosure in order to avoid unnecessary repetition.
Moreover, any combination between the various embodiments of the present disclosure is possible as long as it does not depart from the spirit of the present disclosure, which should also be construed as the disclosure of the present disclosure.

Claims (11)

1. The control device of the user interaction panel is characterized by comprising a main process module, a plurality of driving modules and a plurality of hardware modules, wherein the driving modules and the hardware modules are in one-to-one correspondence;
the main process module is used for determining a request event which is requested to be executed by the client according to an event triggering request sent by the client, and sending the request event to each driving module;
The driving module is configured to determine a target operation to be executed by the corresponding hardware module according to an event definition of the request event relative to the corresponding hardware module when the request event is included in executable events supported by the corresponding hardware module, and control the corresponding hardware module to execute the target operation, where the event definition includes an event priority and an operation to be executed.
2. The control device according to claim 1, wherein the driving module is configured to determine the target operation to be performed by the corresponding hardware module according to an event definition of the request event with respect to the corresponding hardware module by:
and determining the operation to be executed in the event definition with the highest event priority in the event definition of the request event relative to the corresponding hardware module as the target operation.
3. The control device according to claim 2, wherein an array is maintained in the driving module, elements in the array each correspond to a predefined event, and an element arrangement order corresponds to a prioritization among the predefined events;
The driving module is configured to determine, as the target operation, an operation to be performed in an event definition having a highest event priority, from among event definitions of the corresponding hardware modules, of the request event by:
according to the request event, setting an element corresponding to the request event in the array from an initial value to a target value, wherein the initial value is different from the target value;
determining a target element, wherein the target element is an element corresponding to the highest event priority among elements with the value of the array as the target value;
and determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
4. A control device according to claim 3, wherein the event definition further comprises a timeout function, the driver module further being configured to:
if the time length from the determination of the target operation reaches the time length threshold represented by the timeout function and the target operation is executed, setting the target element from the target value to the initial value;
and re-executing the operation of determining the target element to the operation of determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
5. The control device according to claim 1, further comprising a drive loading module connected to the main process module and the plurality of drive modules, the drive loading module configured to load the drive modules when the control device is started, and to implement communication between the main process module and each of the drive modules;
the control device also comprises an input/output processing module which is connected with the main process module and is used for realizing communication between the client and the main process module.
6. A method for controlling a user interaction panel, comprising:
the method comprises the steps that a main process module determines a request event which is requested to be executed by a client according to an event triggering request sent by the client, and sends the request event to each of a plurality of driving modules, wherein the driving modules are in one-to-one correspondence with a plurality of hardware modules;
and under the condition that the executable event supported by the corresponding hardware module comprises the request event, the driving module determines a target operation to be executed by the corresponding hardware module according to an event definition of the request event relative to the corresponding hardware module, and controls the corresponding hardware module to execute the target operation, wherein the event definition comprises an event priority and the operation to be executed.
7. The method of claim 6, wherein determining the target operation to be performed by the corresponding hardware module based on the event definition of the request event relative to the corresponding hardware module comprises:
and determining the operation to be executed in the event definition with the highest event priority in the event definition of the request event relative to the corresponding hardware module as the target operation.
8. The method of claim 7, wherein an array is maintained in the driver module, wherein elements in the array each correspond to a predefined event, and wherein an element ordering corresponds to a prioritization among the predefined events;
the determining the request event as the target operation relative to the operation to be executed in the event definition with the highest event priority in the event definition of the corresponding hardware module includes:
according to the request event, setting an element corresponding to the request event in the array from an initial value to a target value, wherein the initial value is different from the target value;
determining a target element, wherein the target element is an element corresponding to the highest event priority among elements with the value of the array as the target value;
And determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
9. The method of claim 8, wherein the event definition further comprises a timeout function, the method further comprising:
the driving module sets the target element from the target value to the initial value if the time length from the determination of the target operation reaches the time length threshold represented by the timeout function and the execution of the target operation is completed; and re-executing the step of determining the target element to the step of determining the operation to be executed in the event definition of the request event corresponding to the target element as the target operation.
10. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the method according to any of claims 6-9.
11. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 6-9.
CN202310532709.5A 2023-05-11 2023-05-11 Control device and method of user interaction panel, medium and electronic equipment Pending CN116627668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310532709.5A CN116627668A (en) 2023-05-11 2023-05-11 Control device and method of user interaction panel, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310532709.5A CN116627668A (en) 2023-05-11 2023-05-11 Control device and method of user interaction panel, medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116627668A true CN116627668A (en) 2023-08-22

Family

ID=87620569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310532709.5A Pending CN116627668A (en) 2023-05-11 2023-05-11 Control device and method of user interaction panel, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116627668A (en)

Similar Documents

Publication Publication Date Title
KR102224760B1 (en) Automatic application updates
US10528765B2 (en) Technologies for secure boot provisioning and management of field-programmable gate array images
US9253265B2 (en) Hot pluggable extensions for access management system
US9960912B2 (en) Key management for a rack server system
US10228954B2 (en) Broadcasting management information using fountain codes
CN103917949A (en) Component update using management engine
US20110185396A1 (en) Information-processing apparatus, information-processing method, and computer-readable storage medium
CN112395107A (en) Tax control equipment control method and device, storage medium and electronic equipment
CN111258723A (en) Transaction processing method, device, system, medium and equipment of distributed system
JP2021508880A (en) Terminal application management method, application server and terminal
CN111930678A (en) Data transmission method and device, electronic equipment and storage medium
CN115665265B (en) Request processing method, device, equipment, storage medium and system
CN116627668A (en) Control device and method of user interaction panel, medium and electronic equipment
CN114490135A (en) Task processing method and device, electronic equipment and storage medium
CN113515299A (en) Software development kit SDK hot upgrading method, device, equipment and storage medium
CN115220861A (en) Virtual client management method, apparatus, medium, and device
US20140074906A1 (en) Information processing apparatus, system, and method
JP2019175000A (en) Information processing apparatus and information processing method
CN110580179A (en) information processing method and device, electronic device and storage medium
CN113704274B (en) Data reading method and electronic equipment
CN116225576B (en) Application program data environment switching method and device, electronic equipment and medium
EP4273731A1 (en) Information processing method and apparatus
US20160183216A1 (en) Cross-account notification method and electronic device using the same
CN115509623A (en) BMC system starting method and device, electronic equipment and storage medium
CN116975871A (en) Method, device, computer equipment and medium for configuring safe starting 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