A method and device for managing peripheral components applied to government affairs terminal

By introducing a hardware abstraction layer and a unified management mechanism into government terminal equipment, the problem of inconsistent heterogeneous hardware interfaces is solved, achieving efficient power management and stable operation, and supporting rapid integration and expansion.

CN122172619APending Publication Date: 2026-06-09INSPUR SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INSPUR SOFTWARE CO LTD
Filing Date
2026-01-14
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

The lack of unified interface standards for heterogeneous hardware components in existing government terminal equipment leads to redundant development resources, crude power management, poor operational stability, and a lack of effective anomaly handling mechanisms.

Method used

By encapsulating drivers from various manufacturers through a hardware abstraction layer, providing standardized device interfaces, and implementing lifecycle management, power management, resource scheduling, and anomaly classification management at the hardware control layer, a unified management method and device for peripheral components of government terminals is constructed.

Benefits of technology

It achieves unified packaging of hardware from different manufacturers, reduces development complexity, improves power management efficiency, enhances system stability and fine-grained fault management, and supports rapid integration and expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122172619A_ABST
    Figure CN122172619A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of terminal management, and particularly provides a government affair terminal peripheral component management method and device, which has the following steps: S1, component standardized access, the differences of various manufacturers' drives are packaged through a hardware abstraction layer for hardware components, and a standardized equipment interface is provided; S2, on a hardware control layer, unified management of the components is realized, including life cycle management, a power management engine, resource scheduling management and abnormal hierarchical management; and S3, interface services are provided to application programs. Compared with the prior art, the application can simplify the development and maintenance process of related programs, and simultaneously improve the expansibility and running stability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of terminal management technology, and specifically provides a method and device for managing peripheral components of government terminals. Background Technology

[0002] Terminal devices are widely used in government service halls to provide efficient and convenient services to the public. However, to implement complex business processes, these devices need to integrate various heterogeneous hardware components, including ID card readers, cameras, QR code scanners, document scanners, and printers, with each component's interface being called by the application. Currently, the drivers and interfaces of these components vary greatly, posing significant challenges to application integration and maintenance.

[0003] Regarding component integration, the lack of a unified hardware abstraction has resulted in the failure to establish standardized interface specifications for various peripheral components, leading to significant heterogeneity in their integration methods. Developers are required to repeatedly implement underlying common functional modules for each independent component, such as parameter initialization configuration, runtime status maintenance, and exception handling mechanisms, resulting in redundant development resources and a significant reduction in efficiency. In terms of power management, traditional solutions generally adopt automatic start-up or continuous power supply modes, which cannot dynamically adjust the power status of components according to actual business needs, resulting in unnecessary increases in energy consumption and accelerated component aging.

[0004] In terms of concurrency control, when multiple applications access the same hardware resource at the same time, the lack of a centralized access arbitration mechanism poses a risk of resource conflict, which manifests as deadlock or service response delay, affecting system stability.

[0005] In terms of exception handling, there is a lack of real-time monitoring and tiered handling strategies. When a component call fails, the system relies solely on a simple retry mechanism, which makes it difficult to effectively distinguish the fault level, causing intermittent failures to easily escalate into continuous service interruptions.

[0006] Therefore, how to solve the problems caused by the decentralized hardware control, crude power supply strategy, insufficient scalability and operational instability defects in the existing technology is an urgent issue for those skilled in the art. Summary of the Invention

[0007] This invention addresses the shortcomings of the prior art by providing a standardized, easy-to-develop and maintain, scalable, stable, and highly practical method for managing peripheral components of government terminals.

[0008] A further technical objective of this invention is to provide a reasonably designed peripheral component management device for government terminals that is compatible with various heterogeneous hardware components and provides a unified interface service.

[0009] The technical solution adopted by this invention to solve its technical problem is: A method for managing peripheral components of government terminals includes the following steps: S1. Standardized component access: This feature encapsulates the differences in drivers from various manufacturers through a hardware abstraction layer, providing standardized device interfaces for hardware components. S2. At the hardware control layer, unified management and control of components is achieved, including: lifecycle management, power management engine, resource scheduling management and anomaly classification management; S3 provides interface services to applications.

[0010] Furthermore, in step S1, the dynamic link library (DLL) driver is directly loaded and called. For RS232, HTTP, or WebSocket communication protocols, a general parsing module is built to realize data pass-through and protocol conversion. Through standardized access specifications, different manufacturers' components are required to perform parameter initialization configuration, device opening, function execution, device closing, and status query operations. When adding a new component, it is implemented and deployed to the specified path according to the standardized access specification. The component parameters are registered in the configuration file, and the driver is automatically loaded and registered to the hardware control layer during initialization.

[0011] Furthermore, in step S2, the lifecycle management is the full lifecycle management during the use of the component. In the initialization phase, the configuration file is read to complete the parameter configuration, and power-on or power-off operations are performed based on the power policy. During the application's runtime phase, it dynamically responds to interface calls for opening, closing, and function requests. During the application's shutdown phase, it completes component shutdown and power-off operations.

[0012] Furthermore, the power management engine defines four types of business rule-driven power control modes, including: Rule 1 is always-on mode, which provides continuous power after initialization and is suitable for high-frequency core business components that require immediate response. Rule 2 is the normally off mode, which keeps the power off during operation and is suitable for reserved installation of expansion components; Rule 3: In energy-saving mode, equipment not in continuous operation will automatically shut off power to implement energy-saving operation strategies. Rule 4 is the associated mode. When the system calls a certain functional module, if the subsequent process depends on other associated modules, the associated modules are powered and initialized in advance in the execution chain. After the associated function is completed, the power will be automatically cut off.

[0013] Furthermore, the resource scheduling management includes exclusive resource scheduling and shared resource scheduling. For components that require exclusive access, the exclusive resource scheduling constructs a global request queue, and all call requests enter the queue according to the first-in-first-out principle to wait for scheduling. Implement a mutex lock mechanism and enforce serialized execution of component accesses through critical section protection.

[0014] Furthermore, the shared resource scheduling targets components with shared states, storing the latest state data in the component's memory area in real time. When an application requests a state value, it directly returns the current state value from the cache, avoiding the overhead of synchronization waiting and achieving an instant response.

[0015] Furthermore, the aforementioned anomaly classification management implements a multi-dimensional anomaly management strategy throughout the entire lifecycle of system components. It continuously collects component status data through heartbeats and adopts classified processing for abnormal situations of equipment, implementing soft reset, power failure restart, and service degradation classification strategies to achieve refined fault management.

[0016] Furthermore, in step S3, the application is provided with interface services using the Rest, Soap, or Websocket protocol. Different components are distinguished by the service address, and the specific request and return content is placed in the transmitted data. The component operation set is defined by JSON or XML.

[0017] A device for managing peripheral components of a government terminal includes: at least one memory, at least one processor, at least one network interface, and at least one power controller; The at least one memory is used to store a machine-readable program; The at least one processor is used to call the machine-readable program to execute a method for managing peripheral components of a government terminal. The at least one network interface is used to open a network interface and provide interface services to the application. The at least one power controller is used to control the power supply of the component and realize the power-on and power-off control of the component.

[0018] Compared with the prior art, the method and apparatus for managing peripheral components of government terminals according to the present invention have the following outstanding advantages: This invention effectively solves the technical challenges of poor compatibility, complex management, and low development efficiency in the integration of multi-source heterogeneous components. By defining standardized device access specifications, it achieves unified encapsulation of hardware drivers from different manufacturers. Employing a modular loading mechanism, the driver library is automatically loaded when new hardware is added by configuring it to be placed in the program directory. Four major management engines are built on the hardware control layer: 1) Lifecycle management enables full-process control over the use of hardware components; 2) The power management engine allows for flexible configuration to reduce device standby power consumption; 3) Resource scheduling and management improves response speed when multiple applications are running concurrently; 4) Anomaly classification management enables refined fault management.

[0019] Abstracting component operations into interface services reduces application development workload. Modular design ensures system reliability while reserving ample technical expansion space for rapid component integration. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the component catalog structure in a method for managing peripheral components of government terminals. Figure 2 This is a schematic diagram of an anomaly classification management method applied to the management of peripheral components of government terminals. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] The following is a preferred embodiment: This embodiment of a method for managing peripheral components of a government terminal includes the following steps: S1, Standardized component access For various hardware components such as ID card readers, binocular cameras, QR code scanners, and document scanners, a hardware abstraction layer is used to encapsulate the differentiated implementations of drivers from different manufacturers, providing standardized device interfaces.

[0024] For Dynamic Link Library (DLL) drivers, it directly loads and calls them. For RS232, HTTP, or WebSocket communication protocols, it builds a general parsing module to realize data pass-through and protocol conversion. Through standardized access specifications, it requires different manufacturers' components to implement parameter initialization configuration, device opening, function execution, device closing, and status query operations.

[0025] When adding a new component, it is implemented and deployed to the specified path according to the standardized access specification. The component parameters are registered in the configuration file, and the driver is automatically loaded and registered to the hardware control layer during system initialization.

[0026] S2. At the hardware control layer, unified management and control of components is achieved, including: lifecycle management, power management engine, resource scheduling management and anomaly classification management; Lifecycle management encompasses the entire lifecycle of components during their use. During system initialization, the system reads configuration files to complete parameter configuration and executes power-on / power-off operations based on power policies.

[0027] During application runtime, it dynamically responds to interface calls for opening, closing, and function requests. During application shutdown, it completes component shutdown and power-off operations.

[0028] The power management engine defines four types of power control modes driven by business rules: Rule 1 is the always-on mode, which provides continuous power after system initialization. It is suitable for high-frequency core business components that require immediate response, such as ID card readers for identity authentication. Rule 2 is the always-off mode, which keeps the system powered off during operation. This is applicable to pre-installed expansion components, such as QR code readers and fingerprint scanners, and is only enabled when the application is upgraded to use these components. Rule 3, the energy-saving mode, automatically cuts off power to devices that are not continuously running, and the system implements energy-saving operation strategies. For example, if a printer is only used in specific scenarios, its power will be automatically cut off if the device is not used or is in a non-working state within a preset time.

[0029] Rule 4, the association mode, stipulates that when the system calls a functional module, if its subsequent processes depend on other associated modules, the associated modules should be powered and initialized in advance during the execution chain. After the associated function is completed, the system will automatically cut off its power. For example, after calling an ID card reader, a binocular camera may be used for facial recognition liveness verification.

[0030] Resource scheduling management requires designing differentiated scheduling strategies based on component characteristics in scenarios where multiple applications concurrently call a single component, in order to ensure the component's real-time response capability.

[0031] For exclusive resource scheduling, such as lighting control modules, which require exclusive access, the following mechanisms are used to avoid deadlocks caused by multi-threaded contention: A global request queue is constructed, and all call requests enter the queue according to the first-in-first-out principle to await scheduling. A mutex lock mechanism is implemented: through critical section protection, the serialization of component access is enforced to ensure thread safety.

[0032] Shared resource scheduling, for components whose state can be shared, such as human body sensors, stores the latest state data in the component's memory area in real time. When the application requests it, it directly returns the current state value in the cache, avoiding the overhead of synchronization waiting and achieving instant response.

[0033] Anomaly classification management implements a multi-dimensional anomaly management strategy throughout the entire lifecycle of system components, continuously collecting component status data via heartbeats. Anomalies in equipment are handled in a tiered manner, including soft resets, power-off restarts, and service degradation strategies, enabling refined fault management.

[0034] S3. Provide interface services to applications; It uses REST, SOAP, or WebSocket protocols to provide interface services to applications, distinguishes different components by service addresses, and places specific requests and responses in the transmitted data.

[0035] Define component operation sets using JSON or XML, such as the open, read, and close operations of an ID card reader, or the open, face recognition, and close operations of a binocular camera. Example

[0036] like Figure 1-2 As shown, taking a service center that has deployed multiple self-service terminals as an example, these terminals integrate devices such as ID card readers (vendor A), binocular cameras (vendor B), QR code scanners (vendor C), printers (vendor D), and light controllers (vendor E) for services such as ID card verification, facial recognition, QR code payment, and document printing. The terminals need to meet the following requirements: components from different vendors must be uniformly connected to the system; component power management should improve energy efficiency; simultaneous operation of multiple applications should avoid access conflicts; and component anomalies should be handled in a tiered manner.

[0037] 1. Quickly connect to heterogeneous devices; The device driver calls the hardware component protocols provided by the manufacturer to implement standard access specification functions and complete the component driver program. Taking an ID card reader as an example, it inherits from the IDev and IIdcard interfaces and implements the functions bool Init(string name, stringpara), DevOperRtn Open(), DevOperRtn Read(IDReadPara para), and DevOperRtn Close().

[0038] Place the component's driver file (DevicesLibraryA.dll) in the program directory and add the configuration file mentioned above. When the program loads, it will locate the component's driver file based on the configuration and perform parameter initialization.

[0039] <add name="二代身份证" type="DevicesLibraryA.Idcard.AIdcard,DevicesLibraryA" para="" / > 2. Lifecycle management; When the program starts, it reads the configuration file, initializes parameters, sets power management policies, and enables the application programming interface (API) service. During operation, it responds to component opening, closing, and function execution. When the application exits, it shuts down components and performs a power-off operation.

[0040] 3. Power management engine; Configure power management rules in the component configuration, such as power="NormalOpen" for ID cards; power="Link|IdCard" for binocular cameras, specifying the associated component in the configuration; power="NormalClose" for QR code scanners because the QR code payment function is not enabled; and power="EnergySaving" for printers. During program initialization, the configuration file is read, and the power-on and power-off settings of components are automatically configured according to the rules in the configuration file. The associated mode and energy-saving mode are implemented by monitoring the function calls of the components.

[0041] 4. Resource scheduling and management; For components that require exclusive access, use mutex locks to establish critical sections and add a component processing queue (Queue). <deviceopt>This allows component calls to be performed serially; components can be shared, variables can be shared within a component, and the function can return directly when the application makes a function call.

[0042] 5. Anomaly classification management; In the component base class IDev, the component status DevStatus Status is defined, and exception information is recorded. A tiered approach is used to handle device anomalies, enabling fine-grained fault management.

[0043] Level 1 (soft reset): resend the command (up to 3 times).

[0044] Level 2 (Hard Reset): The component is powered off, and after a 500ms delay, it is powered on again and initialized.

[0045] Level 3 (Service Degradation): Mark the component as "unavailable" and notify the application.

[0046] 6. Application Programming Interface (API) services; Define a service interface IService, which includes void Setup(selfServiceConfig config), boolListener(), and void Close(), to implement the service initialization configuration, start and stop listening.

[0047] Use the attribute to bind the path string to the actual processing function in the dictionary.<string,FunOper> dictFun, the following function: [Url(" / device / idcard / open")] private string IdcardOpen(string req) After receiving a request, the API service automatically calls the processing function based on the path string, passes the received data as a parameter, and outputs the formatted data to the application.

[0048] Configure the specific interface services and parameters in the configuration file.

[0049] <selfservice type="InterfaceService.Services.ServiceTest,InterfaceService" url="http: / / 127.0.0.1:8020 / ">. Example

[0050] A device for managing peripheral components of a government terminal includes: at least one memory, at least one processor, at least one network interface, and at least one power controller; The at least one memory is used to store a machine-readable program; The at least one processor is used to call the machine-readable program to execute a method for managing peripheral components of a government terminal.

[0051] The at least one network interface is used to open a network interface and provide interface services to the application. The at least one power controller is used to control the power supply of the component and realize the power-on and power-off control of the component.

[0052] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.

[0053] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory devices, or other volatile solid-state storage devices.

[0054] The network interface is used to enable secure communication between the device and external devices, applications, and government management platforms to transmit management commands, status data, and configuration information of peripheral components of the government terminal. The network interface can be wired or wireless, such as an Ethernet interface (RJ45), Wi-Fi module, or government private network adapter interface. It supports protocols such as TCP / IP, HTTPS, and MQTT, and integrates security mechanisms such as authentication, data encryption, and access control to ensure the compliance and confidentiality of sensitive data transmission in government scenarios.

[0055] The power controller receives power control commands from the processor and manages the power supply to peripheral components of the government terminal through hardware circuits and logic control, supporting precise switching of component power supply status. The power controller can adopt a modular hardware architecture, based on a relay array-based switch control unit, a programmable power management IC (PMIC), or a dedicated power control chipset, adapting to the power supply requirements of peripheral components with different power levels; it provides a software control interface, allowing the processor to call it to achieve dynamic response and real-time scheduling.

[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.< / selfservice> < / deviceopt>

Claims

1. A method for managing peripheral components of government terminals, characterized in that, It has the following steps: S1. Standardized component access: This feature encapsulates the differences in drivers from various manufacturers through a hardware abstraction layer, providing standardized device interfaces for hardware components. S2. At the hardware control layer, unified management and control of components is achieved, including: lifecycle management, power management engine, resource scheduling management and anomaly classification management; S3 provides interface services to applications.

2. The method for managing peripheral components of a government terminal according to claim 1, characterized in that, In step S1, the dynamic link library (DLL) driver is directly loaded and called. For RS232, HTTP, or WebSocket communication protocols, a general parsing module is built to realize data pass-through and protocol conversion. Through standardized access specifications, different manufacturers' components are required to perform parameter initialization configuration, device opening, function execution, device closing, and status query operations. When adding a new component, it is implemented and deployed to the specified path according to the standardized access specification. The component parameters are registered in the configuration file, and the driver is automatically loaded and registered to the hardware control layer during initialization.

3. The method for managing peripheral components of a government terminal according to claim 1, characterized in that, In step S2, the lifecycle management is the full lifecycle management during the use of the component. In the initialization phase, the configuration file is read to complete the parameter configuration, and the power-on or power-off operation is performed based on the power policy. During the application's runtime phase, it dynamically responds to interface calls for opening, closing, and function requests. During the application's shutdown phase, it completes component shutdown and power-off operations.

4. The method for managing peripheral components of a government terminal according to claim 1, characterized in that, The power management engine defines four types of business rule-driven power control modes, including: Rule 1 is always-on mode, which provides continuous power after initialization and is suitable for high-frequency core business components that require immediate response. Rule 2 is the normally off mode, which keeps the power off during operation and is suitable for reserved installation of expansion components; Rule 3: In energy-saving mode, equipment not in continuous operation will automatically shut off power to implement energy-saving operation strategies. Rule 4 is the associated mode. When the system calls a certain functional module, if the subsequent process depends on other associated modules, the associated modules are powered and initialized in advance in the execution chain. After the associated function is completed, the power will be automatically cut off.

5. The method for managing peripheral components of a government terminal according to claim 1, characterized in that, The resource scheduling management includes exclusive resource scheduling and shared resource scheduling. The exclusive resource scheduling constructs a global request queue for components that require exclusive access. All call requests enter the queue according to the first-in-first-out principle and wait for scheduling. Implement a mutex lock mechanism and enforce serialized execution of component accesses through critical section protection.

6. The method for managing peripheral components of a government terminal according to claim 5, characterized in that, The shared resource scheduling is designed for components with shared states. The latest state data is stored in the component's memory area in real time. When the application requests it, the current state value in the cache is returned directly, avoiding the overhead of synchronization waiting and achieving an instant response.

7. The method for managing peripheral components of a government terminal according to claim 1, characterized in that, The aforementioned anomaly classification management implements a multi-dimensional anomaly management strategy throughout the entire lifecycle of system components. It continuously collects component status data through heartbeats and adopts a classification approach for abnormal equipment conditions, including soft reset, power failure restart, and service degradation classification strategies, to achieve refined fault management.

8. The method for managing peripheral components of a government terminal according to claim 1, characterized in that, In step S3, the application is provided with interface services using the Rest, Soap, or Websocket protocol. Different components are distinguished by the service address, and the specific request and return content is placed in the transmitted data. The component operation set is defined by JSON or XML.

9. A device for managing peripheral components of a government terminal, characterized in that, include: At least one memory, at least one processor, at least one network interface, and at least one power controller; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to perform the method according to any one of claims 1 to 8; The at least one network interface is used to open a network interface and provide interface services to the application. The at least one power controller is used to control the power supply of the component and realize the power-on and power-off control of the component.