Search

CN-121166234-B - Hongmon system-oriented peripheral extension method, system and storage medium

CN121166234BCN 121166234 BCN121166234 BCN 121166234BCN-121166234-B

Abstract

The invention discloses a peripheral extension method, a peripheral extension system and a peripheral extension storage medium for a hong Mongolian system, which relate to the technical field of operating systems, and the peripheral extension method comprises the steps of calling a peripheral manager to carry out physical connection detection when a peripheral is accessed, completing protocol identification according to interface attributes, and forming a peripheral interaction data set; the method comprises the steps of constructing a peripheral identification reliability index Rpr to evaluate the access stability of a peripheral, writing stable peripheral information into a virtual bus abstraction layer and generating a logic peripheral object, calling a drive manager to load a drive, recording a peripheral call data set to construct a loading efficiency coefficient Elo, after the drive is loaded, carrying out abstract call through a standardized API interface by an application layer and recording call delay, and finally constructing a peripheral expansion performance index Pal to comprehensively evaluate the expansion performance of the peripheral. The invention realizes a unified expansion mechanism of cross-protocol peripheral access and function loading as required, and improves the stability and system performance of peripheral expansion.

Inventors

  • CHENG SHENGCHUN
  • FU QING
  • Pei Bibao

Assignees

  • 国开鸿(深圳)科技有限公司

Dates

Publication Date
20260508
Application Date
20250917

Claims (10)

  1. 1. A peripheral expansion method for a hong Monte system is characterized by comprising the following steps: s1, when a peripheral is connected to a hong Mongolian system terminal, a peripheral manager is called to detect physical connection, protocol identification is executed according to interface attributes, and a peripheral interaction data set is recorded; s2, analyzing the access stability of the peripheral according to the peripheral interaction data set, generating access stability evaluation of the peripheral, writing the access stable peripheral information into a virtual bus abstraction layer, generating a logic peripheral object, and storing through a JSON configuration file and meta parameters in a driving hap packet; s3, calling a drive manager to load the drive according to the identification of the logic peripheral object, binding the functional units with the standardized API interface, and recording peripheral call data groups of each functional unit in the loading process; S4, after the drive loading is completed, distributing access right information for the peripheral based on the distributed security framework, establishing an encrypted data channel, and after the security verification is completed, carrying out abstract call on a logic peripheral object by an application layer through a standardized API interface, and recording call delay Tl in the call process; s5, performing comprehensive performance expansion analysis on the external access, and generating expansion performance evaluation to perform sharing strategy adjustment.
  2. 2. The method for expanding a peripheral device for a Hongmon system according to claim 1, wherein S1 comprises S11 and S22; S11, when a peripheral is connected to a hong Mongolian system terminal, the hong Mongolian system calls a built-in peripheral manager to detect the physical connection state of the peripheral, and after a peripheral access event is detected, corresponding protocol identification operation is executed according to the interface attribute of the peripheral, wherein the USB interface equipment completes identification by reading a product identifier PID and a manufacturer identifier VID thereof, the Bluetooth interface equipment completes identification by analyzing ServiceUUID in a broadcast message thereof, and the I2C, SPI and the CAN bus peripheral execute address scanning in a bus address space and identify by combining handshake signal response; S12, in the process of identifying the protocol, the hong Mongolian system records the successful number Ns of handshakes, the total number Nt of handshakes and the response time Tr of the peripheral equipment to form a peripheral equipment interaction data set.
  3. 3. The method for expanding a peripheral device for a Hongmon system according to claim 2, wherein S2 comprises S21; s21, analyzing the access stability of the peripheral according to the peripheral interaction data set, constructing a peripheral identification reliability index Rpr, and quantifying the stability of peripheral identification under different bus protocols, wherein the access reliability of the peripheral protocol is analyzed by a specific formula: Where ln represents a logarithmic function and T ref represents the standard response time allowed by the hong system.
  4. 4. The method for expanding a peripheral device for a Hongmon system according to claim 3, wherein S2 further comprises S22; S22, collecting peripheral identification reliability indexes Rpr of all peripheral access protocols in one month of history, sorting from small to large, calculating a 5% score value through a percentile method, presetting the score value as a protocol reliability threshold Rt, and then evaluating the peripheral access stability with the peripheral identification reliability indexes Rpr acquired in real time, wherein a specific evaluation scheme is as follows; When the peripheral identification reliability index Rpr is smaller than the protocol reliability threshold Rt, judging that the peripheral access protocol is unstable, issuing a re-handshake instruction through a hong Mongolian system at the moment, and automatically switching the protocol mode if the peripheral identification reliability index Rpr is unstable twice continuously; When the peripheral identification reliability index Rpr is more than or equal to the protocol reliability threshold Rt, judging that the peripheral access protocol is stable, and executing driving dynamic loading analysis at the moment; The S2 further comprises S23; S23, after the peripheral access detection and protocol identification are completed, the hong-Meng system writes peripheral information with stable peripheral access protocol into a virtual bus abstraction layer, generates a logic peripheral object for the peripheral, binds a unified event identification mechanism in the process of registering the logic peripheral object, records model parameters, capability set parameters and protocol attribute parameters of the peripheral, and stores and invokes the model parameters in a JSON configuration file and a driving hap packet, wherein the logic peripheral object is used as abstract representation of a physical peripheral in the hong-Meng system, and packages the peripheral with different protocols into the logic object in a unified manner.
  5. 5. A method for expanding a peripheral device for a Hongmon system as recited in claim 4, wherein S3 comprises S31 and S32; S31, after the virtual bus abstraction layer registration is completed, a drive manager is called according to the identification of a logic peripheral object to load an external drive, the drive is split by taking a functional unit as granularity, all loaded functional units are automatically bound with a standardized API interface, and in the drive loading process, a hong Mongolian system continuously records the actual calling times Fu, the total calling times Ft, the drive occupied memory Mm and the system usable memory Ms of each functional unit to form a peripheral calling data set; S32, carrying out driving dynamic loading analysis according to the peripheral call data set, and constructing a loading efficiency coefficient Elo for measuring the efficiency and the resource utilization rate of driving loading, wherein the specific formula is as follows: where k represents the total number of functional units, fu i and Ft i represent the actual number of invocations and the total number of invocations of the ith functional unit, respectively.
  6. 6. A method for expanding a peripheral device for a Hongmon system as recited in claim 5, wherein S4 comprises S41 and S42; S41, after the drive loading is completed and before the logic peripheral object is called, the hong Mongolian system allocates rights Token for the peripheral based on the distributed security framework, verifies the identity of the calling party, establishes an encrypted data channel by adopting an encryption link built in the hong Mongolian system after verification is passed, and registers audit information comprising a calling main body, calling time and calling functions; S42, after the security verification is completed, the application layer performs abstract call on the function of the logic peripheral object through the standardized API interface, the hong Mongolian system maps the abstract call into specific protocol instruction execution data scheduling and state feedback, records call delay Tl in real time, and enters a unified API call execution stage.
  7. 7. The method for expanding a peripheral device for a hong and Monte-go system of claim 1, wherein S5 comprises S51; S51, after entering an API call execution stage, carrying out comprehensive performance expansion analysis on the external access according to an external identification reliability index Rpr, a loading efficiency coefficient Elo and a call delay Tl, constructing an external expansion performance index Pal, and measuring the overall expansion performance strength of the system under a cross-protocol access and function on-demand loading dual mechanism, wherein the specific formula is as follows: Where T max represents the maximum call delay allowed by the system.
  8. 8. The method for expanding a peripheral device for a hong and Monte-go system of claim 7 wherein S5 further comprises S52; s52, carrying out distribution statistics on the historical peripheral expansion performance index Pal, calculating an average value and a 90% split value, dividing the average value and the 90% split value by 2, presetting the average performance threshold Tc, and carrying out expansion performance evaluation with the peripheral expansion performance index Pal obtained in real time, wherein a specific evaluation scheme is as follows; When the peripheral expansion performance index Pal is smaller than the comprehensive performance threshold Tc, the peripheral expansion performance is insufficient, at the moment, the calling priority of the peripheral is reduced by one level, the peripheral is forbidden to participate in cross-equipment sharing, only local use is allowed, iterative analysis is carried out through S2, and if the continuous three comprehensive evaluations do not reach the standard, the current peripheral is automatically deactivated and the peripheral is prompted to be unavailable; when the peripheral extension performance index Pal is more than or equal to the comprehensive performance threshold Tc, the peripheral extension overall performance reaches the standard, the current logic peripheral object is marked as stable and available at the moment, and the current logic peripheral object is operated and shared to other nodes.
  9. 9. The peripheral extension system facing the hong system comprises the peripheral extension method facing the hong system, which is characterized by comprising an access identification module, a virtual registration module, a drive loading module, a security calling module and a performance evaluation module; The access identification module is used for calling the peripheral manager to detect physical connection when the peripheral is accessed to the hong Mongolian system terminal, executing protocol identification according to the interface attribute and recording the peripheral interaction data set; The virtual registration module is used for analyzing the access stability of the peripheral equipment according to the peripheral equipment interaction data set, generating peripheral equipment access stability assessment, writing the access stable peripheral equipment information into the virtual bus abstraction layer, generating a logic peripheral equipment object, and storing through the JSON configuration file and meta parameters in the drive hap packet; The drive loading module is used for calling a drive manager to load the drive according to the identification of the logic peripheral object, binding the functional units with the standardized API interface, and recording peripheral call data groups of each functional unit in the loading process; the security calling module is used for distributing access right information to the peripheral based on the distributed security framework after the driving loading is completed, establishing an encrypted data channel, carrying out abstract calling on a logic peripheral object by an application layer through a standardized API interface after the security verification is completed, and recording calling delay Tl in the calling process; The performance evaluation module is used for carrying out comprehensive performance expansion analysis on peripheral access, generating expansion performance evaluation and carrying out sharing strategy adjustment.
  10. 10. A hong system-oriented peripheral extension storage medium, characterized in that the storage medium stores a computer program which, when executed, implements a hong system-oriented peripheral extension method as claimed in any one of the preceding claims 1 to 8.

Description

Hongmon system-oriented peripheral extension method, system and storage medium Technical Field The invention relates to the technical field of operating systems, in particular to a peripheral extension method, a peripheral extension system and a storage medium for a hong system. Background Along with gradual evolution of an operating system to multiple terminals, across scenes and distributed directions, the expansion capability of peripheral equipment becomes an important foundation of whether the system can construct complete ecology. Peripheral extensions not only mean compatibility with legacy USB, bluetooth, etc. interfaces, but also involve adaptation to different bus protocols, different modes of deployment, and different application layer requirements. Particularly in a distributed environment, the peripheral of a single device is not limited to local call, but needs to be oriented to networking and cross-node shared access, which puts higher requirements on a peripheral extension method. Therefore, how to implement unified peripheral abstraction, stable driving loading and flexible calling mechanism has become a key topic in system architecture design. In the prior art, the access and the call of the peripheral are mostly realized under a single protocol and a single scene, and the capability of cross-protocol identification and stability quantitative analysis is lacking, so that identification delay and access failure are easy to occur in a complex application scene. Meanwhile, the traditional drive loading mechanism often emphasizes the usability of functions, but ignores the dynamic balance of loading efficiency and system resource occupation, so that partial drive calling times are insufficient to occupy resources for a long time, or system blocking occurs in a high concurrency scene. In addition, in the aspect of safety control and call delay management, most of the existing methods are in fracturing treatment, and the integrity and traceability requirements on external call in a distributed environment are difficult to support. These drawbacks make it difficult for peripheral extension methods to meet the high performance, high security requirements of current operating systems. Disclosure of Invention Aiming at the defects of the prior art, the invention provides a peripheral expansion method, a peripheral expansion system and a storage medium for a hong and Monte system, which solve the problems in the background art. In order to achieve the above purpose, the invention is realized by the following technical scheme that the peripheral expansion method facing the hong Monte system comprises the following steps: s1, when a peripheral is connected to a hong Mongolian system terminal, a peripheral manager is called to detect physical connection, protocol identification is executed according to interface attributes, and a peripheral interaction data set is recorded; s2, analyzing the access stability of the peripheral according to the peripheral interaction data set, generating access stability evaluation of the peripheral, writing the access stable peripheral information into a virtual bus abstraction layer, generating a logic peripheral object, and storing through a JSON configuration file and meta parameters in a driving hap packet; s3, calling a drive manager to load the drive according to the identification of the logic peripheral object, binding the functional units with the standardized API interface, and recording peripheral call data groups of each functional unit in the loading process; S4, after the drive loading is completed, distributing access right information for the peripheral based on the distributed security framework, establishing an encrypted data channel, and after the security verification is completed, carrying out abstract call on a logic peripheral object by an application layer through a standardized API interface, and recording call delay Tl in the call process; s5, performing comprehensive performance expansion analysis on the external access, and generating expansion performance evaluation to perform sharing strategy adjustment. Preferably, the S1 includes S11 and S22; S11, when a peripheral is connected to a hong Mongolian system terminal, the hong Mongolian system calls a built-in peripheral manager to detect the physical connection state of the peripheral, and after a peripheral access event is detected, corresponding protocol identification operation is executed according to the interface attribute of the peripheral, wherein the USB interface equipment completes identification by reading a product identifier PID and a manufacturer identifier VID thereof, the Bluetooth interface equipment completes identification by analyzing ServiceUUID in a broadcast message thereof, and the I2C, SPI and the CAN bus peripheral execute address scanning in a bus address space and identify by combining handshake signal response; S12, in the process of identifying the protocol, the