CN116560760A - Cross-system peripheral operation method, device, equipment and medium based on external HUB - Google Patents

Cross-system peripheral operation method, device, equipment and medium based on external HUB Download PDF

Info

Publication number
CN116560760A
CN116560760A CN202310482592.4A CN202310482592A CN116560760A CN 116560760 A CN116560760 A CN 116560760A CN 202310482592 A CN202310482592 A CN 202310482592A CN 116560760 A CN116560760 A CN 116560760A
Authority
CN
China
Prior art keywords
peripheral
hub
target
operable
component
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
CN202310482592.4A
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.)
Eastcompeace Technology Co Ltd
Original Assignee
Eastcompeace Technology Co Ltd
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 Eastcompeace Technology Co Ltd filed Critical Eastcompeace Technology Co Ltd
Priority to CN202310482592.4A priority Critical patent/CN116560760A/en
Publication of CN116560760A publication Critical patent/CN116560760A/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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4494Execution paradigms, e.g. implementations of programming paradigms data driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • 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/547Remote procedure calls [RPC]; Web services
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a cross-system peripheral operation method, device, equipment and medium based on an external HUB, wherein the method comprises the following steps: acquiring a service request message sent by the client through the service middleware, and analyzing component description information from the service request message, wherein the component description information is used for indicating the control requirement of the client on the operable peripheral; acquiring a target functional component according to the component description information, calling the target functional component to control the operable peripheral to execute target operation and returning a target result; and sending the target result to the client through the service middleware. According to the technical scheme of the embodiment of the invention, the compatibility of the peripheral and the operating system of the PC is not required to be considered, and after the PC is connected with the HUB, the operable peripheral of any operating system can be directly controlled by the HUB to execute operation, so that the hardware cost is effectively reduced, and the flexibility of the PC is improved.

Description

Cross-system peripheral operation method, device, equipment and medium based on external HUB
Technical Field
The invention relates to the technical field of peripheral compatibility, in particular to a cross-system peripheral operation method, device, equipment and medium based on an external HUB.
Background
For business halls or counters and other scenes, it is often necessary to run a relevant client in a PC, and collect user information through a client control peripheral, for example, collect an image through a camera, or collect a fingerprint through a fingerprint collection device. Since the operating system of most computers is a foreign system, such as Windows or Linux, most peripheral drivers are developed based on the foreign operating system.
As information security is more and more emphasized, more business halls or counters start to use domestic operating systems in PCs, which causes incompatibility between PCs and peripherals in operating systems, and causes incomplete realization of functions of the peripherals, which affects normal development of business. In order to solve the problem, the external driver can be redeveloped, but the cost of the device is greatly increased, and compatible software is also available on the market, and the software is easy to tamper, so that the information security is not guaranteed.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, the invention provides a cross-system peripheral operation method, device, equipment and medium based on the external HUB, which can realize the cross-system compatibility of the peripheral, reduce the equipment cost and improve the flexibility of the PC.
In a first aspect, an embodiment of the present invention provides a method for operating a cross-system peripheral based on an external HUB, where the HUB is applied to a PC, a HUB operating system is built in the HUB, the HUB operating system is installed with a service middleware, the HUB is communicatively connected with a client of the PC through the service middleware, the HUB is externally connected with at least one operable peripheral, and the operating systems of the operable peripheral and the PC are different from each other, and the method for operating the cross-system peripheral based on the external HUB includes:
acquiring a service request message sent by the client through the service middleware, and analyzing component description information from the service request message, wherein the component description information is used for indicating the control requirement of the client on the operable peripheral;
acquiring a target functional component according to the component description information, calling the target functional component to control the operable peripheral to execute target operation and returning a target result;
and sending the target result to the client through the service middleware.
According to some embodiments of the present invention, the component description information is a component identifier, the HUB is communicatively connected to a background server through a network, and the obtaining a target functional component according to the component description information includes:
when the query in the local component pool is successful according to the component identification, acquiring the target functional component from the local component pool;
or when the query in the local component pool fails according to the component identification, downloading the target functional component from the background server according to the component identification, and storing the target functional component in the local component pool.
According to some embodiments of the invention, before the service request message sent by the client is obtained by the service middleware, the method further includes:
when the access of the operable peripheral is detected, acquiring the equipment identifier of the operable peripheral;
acquiring a driving program and configuration parameters of the operable peripheral from the background server according to the equipment identifier;
and deploying the driving program and the configuration parameters of the operable peripheral equipment locally.
According to some embodiments of the invention, the HUB has at least two of the operable peripherals connected thereto, the at least two of the operable peripherals being different in device type, and the method further comprises, after the locally deploying the driver and configuration parameters of the operable peripherals:
uploading the device identifications of at least two of the operable peripherals to the client through the service middleware;
when the service request message is acquired, analyzing a target equipment identifier from the service request message, and determining the operable peripheral corresponding to the target equipment identifier as a target peripheral;
and responding to the service request message based on the target peripheral.
According to some embodiments of the invention, before the service request message sent by the client is obtained by the service middleware, the method further includes:
starting the HUB operating system after power-on, and starting the service middleware in the HUB operating system;
and monitoring the service request message from the PC through the service middleware.
According to some embodiments of the present invention, the obtaining, by the service middleware, a service request packet sent by the client, and analyzing component description information from the service request packet, includes:
when a connection request sent by the client through a Websocket protocol is obtained, establishing communication connection with the client;
obtaining an encrypted message sent by the client through Websocket information, wherein the encrypted message is obtained by encapsulating the client into the service request message according to the set component description information, the target function name and the target function parameter and then encrypting the service request message;
and decrypting the encrypted message to obtain the service request message, and analyzing the component description information, the objective function name and the objective function parameter from the service request message.
According to some embodiments of the invention, the invoking the target function component controls the operable peripheral to perform a target operation and return a target result includes:
calling an objective function from the objective function component according to the objective function name, and applying the objective function parameter to the objective function to generate an objective instruction set, wherein the objective instruction set is used for indicating the objective operation;
sending the target instruction set to the operable peripheral so that the operable peripheral responds to the target instruction set to execute the target operation to obtain the target result;
and acquiring the target result returned by the operable peripheral equipment.
In a second aspect, an embodiment of the present invention provides an external HUB-based cross-system peripheral operating device, including at least one control processor and a memory for communicatively connecting with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the method of external HUB-based cross-system peripheral operation as described in the first aspect above.
In a third aspect, an embodiment of the present invention provides an electronic device, including a cross-system peripheral operating device based on an external HUB according to the second aspect.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium storing computer executable instructions for performing the method for operating a cross-system peripheral based on an external HUB according to the first aspect.
The external HUB-based cross-system peripheral operation method provided by the embodiment of the invention has at least the following beneficial effects: acquiring a service request message sent by the client through the service middleware, and analyzing component description information from the service request message, wherein the component description information is used for indicating the control requirement of the client on the operable peripheral; acquiring a target functional component according to the component description information, calling the target functional component to control the operable peripheral to execute target operation and returning a target result; and sending the target result to the client through the service middleware. According to the technical scheme of the embodiment of the invention, the compatibility of the peripheral and the operating system of the PC is not required to be considered, and after the PC is connected with the HUB, the operable peripheral of any operating system can be directly controlled by the HUB to execute operation, so that the hardware cost is effectively reduced, and the flexibility of the PC is improved.
Drawings
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of operating an external HUB-based cross-system peripheral according to another embodiment of the present invention;
FIG. 3 is a flow chart of an acquire target function component provided by another embodiment of the invention;
FIG. 4 is a flow chart of a configuration driver provided in another embodiment of the present invention;
FIG. 5 is a flow chart for supporting multiple operable peripherals provided in accordance with another embodiment of the present invention;
FIG. 6 is a flow chart for initializing a HUB provided by another embodiment of the present invention;
FIG. 7 is a flow chart of encrypted transmissions provided by another embodiment of the present invention;
FIG. 8 is a flow chart for controlling an operable peripheral device provided by another embodiment of the present invention;
fig. 9 is a block diagram of a cross-system peripheral operation device based on an external HUB according to another embodiment of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
In the description of the present invention, it should be understood that references to orientation descriptions such as upper, lower, front, rear, left, right, etc. are based on the orientation or positional relationship shown in the drawings, are merely for convenience of description of the present invention and to simplify the description, and do not indicate or imply that the apparatus or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the present invention.
In the description of the present invention, a number means one or more, a number means two or more, and greater than, less than, exceeding, etc. are understood to not include the present number, and above, below, within, etc. are understood to include the present number. The description of the first and second is for the purpose of distinguishing between technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless explicitly defined otherwise, terms such as arrangement, installation, connection, etc. should be construed broadly and the specific meaning of the terms in the present invention can be reasonably determined by a person skilled in the art in combination with the specific contents of the technical scheme.
The embodiment of the invention provides a cross-system peripheral operation method, device, equipment and storage medium based on an external HUB, wherein the cross-system peripheral operation method based on the external HUB comprises the following steps: acquiring a service request message sent by the client through the service middleware, and analyzing component description information from the service request message, wherein the component description information is used for indicating the control requirement of the client on the operable peripheral; acquiring a target functional component according to the component description information, calling the target functional component to control the operable peripheral to execute target operation and returning a target result; and sending the target result to the client through the service middleware. According to the technical scheme of the embodiment of the invention, the compatibility of the peripheral and the operating system of the PC is not required to be considered, and after the PC is connected with the HUB, the operable peripheral of any operating system can be directly controlled by the HUB to execute operation, so that the hardware cost is effectively reduced, and the flexibility of the PC is improved.
First, the system architecture of the present invention is illustrated, and the present example is not limited to the system architecture, but may be implemented as a specific implementation environment of the technical solution of the present invention, and referring to fig. 1, fig. 1 is a schematic diagram of the system architecture provided by the present invention, including: the HUB, the PC, the operable peripheral equipment and the background server can be in communication connection with the PC through a Websocket protocol; the operable peripheral is externally connected to the HUB, for example, the HUB can be provided with a USB interface, and the operable peripheral is connected with the HUB interface through a data line, or of course, a wireless connection mode can be adopted, which is not limited herein; the HUB and the backend server may communicate over the internet based on HTTP, enabling the HUB to download data from the backend server.
It should be noted that, as described above, the HUB may be an external microcomputer, and a USB interface is provided in the HUB to connect with an operable peripheral device. The operable peripheral may be a common external device such as a camera, a card reader, etc., and the embodiment does not limit the specific device type. The background server may be a cloud server or a computer as a server, and the specific device of the background server is not limited in this embodiment.
The control method according to the embodiment of the present invention is further described below based on the system architecture shown in fig. 1.
Referring to fig. 2, fig. 2 is a flowchart of a cross-system peripheral operation method based on an external HUB, where the method is applied to the HUB, and the cross-system peripheral operation method based on the external HUB includes:
s21, acquiring a service request message sent by a client through a service middleware, and analyzing component description information from the service request message, wherein the component description information is used for indicating the control requirement of the client on an operable peripheral;
s22, acquiring a target functional component according to the component description information, calling the target functional component to control the operable peripheral to execute target operation and returning a target result;
s23, the target result is sent to the client through the service middleware.
It should be noted that, in this embodiment, different operating systems are configured for the PC and the operable peripheral, for example, a domestic operating system is configured in the PC, and the driving of the operable peripheral is based on Windows system development, and if the operating systems of the PC and the operable peripheral are the same, the PC and the operable peripheral are directly connected to complete the operation, which is not in the scope of the discussion of this embodiment.
It should be noted that, the service middleware of the present embodiment is installed in the HUB operating system and is used for communicating with the client, where the client may be a browser based on a domestic operating system, or may be other application programs that may be installed in a PC, and may be capable of generating a control requirement for calling a peripheral. The HUB operating system may be the same operating system as the operable peripheral, or may be an operating system different from the operable peripheral, and may be capable of generating an operating instruction that the operable peripheral can recognize and respond after the target functional component is invoked, for example, when the HUB is the same as the operating system of the operable device, the HUB may implement control of the operable peripheral according to the operating instruction generated by the operating system; for another example, when the HUB is different from the operating system of the operable device, the HUB is internally provided with the instruction mapping relation of the operable device, for example, the analyzed control requirement is shooting, and the control instruction of shooting operation of the operable device is found out from the instruction mapping relation, so that the operable device is controlled. The HUB directly controls the operable equipment, so that the error calling component of the operable equipment when the operating systems are different can be avoided, the client-side cross-system calling of the operable peripheral equipment is realized, and the compatibility and the flexibility of the PC are improved.
It should be noted that, the component description information may be a component identifier or a description text, and the PC may be different from an operating system of the operable peripheral device, so that the target functional component may be identified through the HUB, so as to ensure that the correct target functional component is invoked. The HUB is used as an intermediate device, the HUB operating system needs to store the mapping relation between the component description information and the target functional component, when the component description information is the component identifier, the component mapping table built in the HUB operating system records the functional components corresponding to different component identifiers, when the component description information is the description text, the component mapping table records the functional components corresponding to different description text, for example, the identifier corresponding to the shooting functional component is 'AB', the corresponding description text is 'shooting', and when the HUB acquires the component identifier 'AB' or the description text 'shooting', the target functional component is determined to be the shooting functional component, so that the shooting functional component is called to control the operable peripheral to execute shooting operation.
It should be noted that, since the HUB invokes the target function component to control the operable peripheral to execute the target operation, the operable peripheral only executes the target operation, but does not perform the processes such as data storage, which would involve the control logic of the operating system, the present embodiment sets the return path of the target operation to obtain the target result in the HUB, so that the operable peripheral does not need to consider the difference on the operating system, and only needs to execute the target operation.
The client needs to call the camera to shoot an image, for example, the component description information is a component identifier, that is, the HUB analyzes to obtain a shooting component identifier, the shooting component is obtained according to the shooting component identifier as a target functional component, the target functional component is called to obtain the target operation as shooting, the storage path of the shot image is located in the HUB, the HUB sends a shooting instruction to the camera, the camera performs shooting to obtain the image and returns the image to the HUB as a target result, and the HUB sends the image to the client.
It should be noted that, in the related art, the client directly sends the service request message to the operable peripheral, and the operable peripheral executes the corresponding function according to the built-in operating system calling component thereof, which requires that the operable peripheral and the operating system of the PC need to be kept consistent, otherwise, an operation error may be caused, and the related art cannot be applied to a scenario where the operating systems of the PC and the operable peripheral are different. According to the embodiment, the HUB is used as intermediate equipment between the client and the operable peripheral, the HUB operating system is built in the HUB, the service middleware is utilized to obtain the service request message sent by the client of the PC, the service request message is not forwarded to the operable peripheral, the HUB locally analyzes the service request message through the HUB operating system, the target functional component capable of meeting the control requirement is obtained according to the obtained component description information, the operable peripheral is directly operated by the HUB by calling the target functional component locally, the obtained target result is directly fed back to the HUB, and then the HUB is fed back to the client for subsequent operation. According to the technical scheme of the embodiment, under the condition that the PC and the operating system of the operable peripheral are different, the information analysis and the control transfer based on the operating system are completed to the HUB, the operable peripheral is only used as an execution main body of the operating instruction, namely the operable peripheral is driven and controlled to run by the HUB, and the HUB is used as information processing transfer equipment among cross-system equipment, so that the PC can be suitable for the operable peripheral under various operating systems, the hardware cost is reduced, and the flexibility of the PC is improved.
In addition, in an embodiment, the component description information is a component identifier, and the HUB is communicatively connected to the background server through a network, and referring to fig. 3, step S22 of the embodiment shown in fig. 2 further includes, but is not limited to, the following steps:
s31, when the query in the local component pool is successful according to the component identification, acquiring a target functional component from the local component pool;
s32, when the query in the local component pool fails according to the component identification, downloading the target functional component from the background server according to the component identification, and storing the target functional component in the local component pool.
It should be noted that, because the types of the operable peripheral devices are more, and the functional components of each peripheral device are different, a local component pool can be locally set to store various functional components, and after the component identifier is obtained, the query is performed from the local component pool, so that the corresponding target functional component is obtained, the matching efficiency of the components is improved, and the response efficiency of the HUB is improved.
It should be noted that, if all the functional components are stored locally in the HUB, the HUB not only occupies the local storage space of the HUB, but also needs to download a large number of functional components in the initialization stage of the HUB, which consumes a long time.
In addition, in an embodiment, referring to fig. 4, before performing step S21 shown in fig. 2, the following steps are included, but not limited to:
s41, when the access of the operable peripheral is detected, acquiring the equipment identifier of the operable peripheral;
s42, acquiring a driving program and configuration parameters of the operable peripheral from the background server according to the equipment identifier;
s43, locally deploying a driver and configuration parameters of the operable peripheral.
It should be noted that, according to the description of the above embodiment, the HUB may set the USB interface to connect with the operable peripheral, and since the types of the operable peripheral are more, the HUB does not know the specific type of the operable peripheral before the access, and therefore, after the operable peripheral accesses the HUB, the HUB obtains the device identifier of the operable device, and determines the specific device type according to the device identifier.
In addition, in order to control the operable peripheral, a driver and configuration parameters of the operable peripheral may be deployed in the HUB, so that after the target functional component is determined, an operation instruction of the operable peripheral is generated by the driver, so as to control the operable peripheral, thereby realizing cross-system control.
In addition, in an embodiment, the HUB is connected with at least two operable peripherals, at least two operable peripherals having different device types, referring to fig. 5, after performing step S43 shown in fig. 4, the method further includes, but is not limited to, the following steps:
s51, uploading equipment identifiers of at least two operable peripherals to a client through a service middleware;
s52, when the service request message is obtained, analyzing the target equipment identifier from the service request message, and determining the operable peripheral corresponding to the target equipment identifier as the target peripheral;
s53, responding to the service request message based on the target peripheral equipment.
It should be noted that, for some clients, there may be multiple operable peripherals required for completing the service, for example, the HUB needs to take a photograph and enter a fingerprint, after connecting the camera and the fingerprint input device, two device identifiers may be uploaded to the client, and when the client initiates a service request message, the client writes the corresponding device identifier of the operable peripheral into the service message request, so that the HUB can determine the target peripheral from the multiple operable peripherals according to the target device identifier, and execute a subsequent operation, for example, when initiating a photographing operation through the client, obtain the device identifier uploaded by the camera and write the service request message, so that the HUB can invoke the target function component of the camera to execute the photographing operation.
In addition, in an embodiment, referring to fig. 6, before performing step S21 shown in fig. 2, the following steps are included, but not limited to:
s61, starting the HUB operating system after power-on, and starting a service middleware in the HUB operating system;
s62, monitoring the service request message from the PC through the service middleware.
It should be noted that, the HUB starts the built-in HUB operating system after being electrified, and starts the service middleware to establish connection with the client of the PC, and communication interaction can be performed between the service middleware and the client based on the Websocket protocol, so that the efficiency of data transmission is effectively improved.
After the HUB and the client establish communication connection, the service middleware can monitor the service request message from the PC, so as to timely respond to the control operation for the operable peripheral.
In addition, referring to fig. 7, in an embodiment, step S21 of the embodiment shown in fig. 2 further includes, but is not limited to, the following steps:
s71, when a connection request sent by a client through a Websocket protocol is obtained, establishing communication connection with the client;
s72, obtaining an encrypted message sent by a client through Websocket information, wherein the encrypted message is obtained by encapsulating the client into a service request message according to set component description information, an objective function name and an objective function parameter and then encrypting the service request message;
s73, decrypting the encrypted message to obtain a service request message, and analyzing the component description information, the objective function name and the objective function parameter from the service request message.
In order to improve information security, in this embodiment, encryption and decryption keys may be configured in the client and the HUB, and for a scene such as a counter or a business hall, the HUB may not be frequently connected to different PCs, so that the correspondence relationship between devices may be considered to be relatively fixed.
When a client initiates a service request, the client can acquire operation to be performed and corresponding component description information, indicate a required target function component through the component description information, indicate a control requirement through a target function name and a target function parameter, and package the information to obtain a service request message. For example, the target function component is indicated to be a photographing component by the component description information, the function to be executed is indicated to be photographing by the target function name, and the camera parameters and the number of photographing are indicated by the target function parameter.
In addition, referring to fig. 8, in an embodiment, step S22 of the embodiment shown in fig. 2 further includes, but is not limited to, the following steps:
s81, calling a target function from the target function component according to the target function name, applying target function parameters to the target function, and generating a target instruction set, wherein the target instruction set is used for indicating target operation;
s82, the target instruction set is sent to the operable peripheral equipment, so that the operable peripheral equipment responds to the target instruction set to execute target operation to obtain a target result;
s83, obtaining a target result returned by the operable peripheral.
It should be noted that, the target function component may include a plurality of functions capable of implementing different functions, for example, for photographing, one function is set for photographing one image, another function is set for continuously photographing a plurality of images, and the target function component calls a corresponding target function according to a specific target function name, so as to ensure that the operable peripheral can be controlled to complete the target operation of actual requirements, and improve the accuracy of control.
It should be noted that, according to the description of the embodiment shown in fig. 2, in order to implement cross-system control of the operable peripheral device, the control function of the embodiment is moved up from the operable peripheral device to the HUB, and the operable peripheral device does not perform component call and function recognition, but performs operation only according to instructions, based on which, the embodiment obtains a target instruction set according to the target function parameters and the target function and sends the target instruction set to the operable peripheral device, so that the operable peripheral device can execute the instructions in the target instruction set to complete the target operation. The target operation may be one operation or a set of a plurality of operations, which is not limited in this embodiment.
As shown in fig. 9, fig. 9 is a block diagram of a cross-system peripheral operation device based on an external HUB according to an embodiment of the present invention. The invention also provides a cross-system peripheral operation device based on the external HUB, which comprises:
the processor 901 may be implemented by a general purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing related programs to implement the technical solutions provided by the embodiments of the present application;
the Memory 902 may be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a random access Memory (Random Access Memory, RAM). The memory 902 may store an operating system and other application programs, and when the technical solution provided in the embodiments of the present disclosure is implemented by software or firmware, relevant program codes are stored in the memory 902, and the processor 901 is used to invoke and execute the external HUB-based cross-system peripheral operation method in the embodiments of the present disclosure;
an input/output interface 903 for inputting and outputting information;
the communication interface 904 is configured to implement communication interaction between the device and other devices, and may implement communication in a wired manner (e.g. USB, network cable, etc.), or may implement communication in a wireless manner (e.g. mobile network, WIFI, bluetooth, etc.);
a bus 905 that transfers information between the various components of the device (e.g., the processor 901, the memory 902, the input/output interface 903, and the communication interface 904);
wherein the processor 901, the memory 902, the input/output interface 903 and the communication interface 904 are communicatively coupled to each other within the device via a bus 905.
The embodiment of the application also provides electronic equipment, which comprises the cross-system peripheral operation device based on the external HUB.
The embodiment of the application also provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program realizes the cross-system peripheral operation method based on the external HUB when being executed by a processor.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The apparatus embodiments described above are merely illustrative, in which the elements illustrated as separate components may or may not be physically separate, implemented to reside in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and may include any information delivery media.
While the preferred embodiment of the present invention has been described in detail, the present invention is not limited to the above embodiments, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit and scope of the present invention, and these equivalent modifications or substitutions are included in the scope of the present invention as defined in the appended claims.

Claims (10)

1. The utility model provides a cross-system peripheral equipment operation method based on external HUB, its characterized in that is applied to the HUB, the HUB is external to the PC, the HUB embeds there is HUB operating system, the HUB operating system installs service middleware, the HUB pass through service middleware with the customer end communication connection of PC, the HUB external has at least one operable peripheral equipment, the operating system of operable peripheral equipment with the operating system of PC is mutually different, cross-system peripheral equipment operation method based on external HUB includes:
acquiring a service request message sent by the client through the service middleware, and analyzing component description information from the service request message, wherein the component description information is used for indicating the control requirement of the client on the operable peripheral;
acquiring a target functional component according to the component description information, calling the target functional component to control the operable peripheral to execute target operation and returning a target result;
and sending the target result to the client through the service middleware.
2. The method for operating a cross-system peripheral device based on an external HUB according to claim 1, wherein the component description information is a component identifier, the HUB is communicatively connected to a background server through a network, and the obtaining a target functional component according to the component description information includes:
when the query in the local component pool is successful according to the component identification, acquiring the target functional component from the local component pool;
or when the query in the local component pool fails according to the component identification, downloading the target functional component from the background server according to the component identification, and storing the target functional component in the local component pool.
3. The method for operating a cross-system peripheral based on an external HUB according to claim 2, wherein before the service request message sent by the client is obtained by the service middleware, the method further comprises:
when the access of the operable peripheral is detected, acquiring the equipment identifier of the operable peripheral;
acquiring a driving program and configuration parameters of the operable peripheral from the background server according to the equipment identifier;
and deploying the driving program and the configuration parameters of the operable peripheral equipment locally.
4. A method of operating a peripheral device across a system based on an external HUB according to claim 3, wherein said HUB has at least two of said operable peripheral devices connected thereto, said at least two of said operable peripheral devices being of different device types, said method further comprising, after said locally deploying drivers and configuration parameters of said operable peripheral devices:
uploading the device identifications of at least two of the operable peripherals to the client through the service middleware;
when the service request message is acquired, analyzing a target equipment identifier from the service request message, and determining the operable peripheral corresponding to the target equipment identifier as a target peripheral;
and responding to the service request message based on the target peripheral.
5. The method for operating a cross-system peripheral based on an external HUB according to claim 1, wherein before the service request message sent by the client is obtained by the service middleware, the method further comprises:
starting the HUB operating system after power-on, and starting the service middleware in the HUB operating system;
and monitoring the service request message from the PC through the service middleware.
6. The external HUB-based cross-system peripheral operation method according to claim 5, wherein the obtaining, by the service middleware, the service request message sent by the client, and analyzing component description information from the service request message, includes:
when a connection request sent by the client through a Websocket protocol is obtained, establishing communication connection with the client;
obtaining an encrypted message sent by the client through Websocket information, wherein the encrypted message is obtained by encapsulating the client into the service request message according to the set component description information, the target function name and the target function parameter and then encrypting the service request message;
and decrypting the encrypted message to obtain the service request message, and analyzing the component description information, the objective function name and the objective function parameter from the service request message.
7. The method for operating the external HUB-based cross-system peripheral according to claim 6, wherein the calling the target function component controls the operable peripheral to execute a target operation and return a target result comprises:
calling an objective function from the objective function component according to the objective function name, and applying the objective function parameter to the objective function to generate an objective instruction set, wherein the objective instruction set is used for indicating the objective operation;
sending the target instruction set to the operable peripheral so that the operable peripheral responds to the target instruction set to execute the target operation to obtain the target result;
and acquiring the target result returned by the operable peripheral equipment.
8. An external HUB-based cross-system peripheral operating device, comprising at least one control processor and a memory for communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the method of external HUB-based cross-system peripheral operation of any one of claims 1 to 7.
9. An electronic device comprising the external HUB-based cross-system peripheral operating device of claim 8.
10. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method of external HUB-based cross-system peripheral operation of any of claims 1 to 7.
CN202310482592.4A 2023-04-28 2023-04-28 Cross-system peripheral operation method, device, equipment and medium based on external HUB Pending CN116560760A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310482592.4A CN116560760A (en) 2023-04-28 2023-04-28 Cross-system peripheral operation method, device, equipment and medium based on external HUB

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310482592.4A CN116560760A (en) 2023-04-28 2023-04-28 Cross-system peripheral operation method, device, equipment and medium based on external HUB

Publications (1)

Publication Number Publication Date
CN116560760A true CN116560760A (en) 2023-08-08

Family

ID=87499417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310482592.4A Pending CN116560760A (en) 2023-04-28 2023-04-28 Cross-system peripheral operation method, device, equipment and medium based on external HUB

Country Status (1)

Country Link
CN (1) CN116560760A (en)

Similar Documents

Publication Publication Date Title
KR20190134922A (en) A method and a electronic device connecting a plurality of electronic devices to a server through a hub
US10419822B2 (en) Method, device, and system for switching at a mobile terminal of a smart television and acquiring information at a television terminal
CN111309279B (en) Multi-screen interactive display method and device
CN111512655A (en) Method for providing communication service by using secure element and electronic device
US10165058B2 (en) Dynamic local function binding apparatus and method
EP3902239A1 (en) Camera sharing method and apparatus
CN110493028A (en) A kind of clustered deploy(ment) method, system, device and computer readable storage medium
CN107526595B (en) Method for supporting remote loading of multiple operating systems
US20200186985A1 (en) Method and apparatus for pairing iot devices and iot service in heterogeneous iot ecosystem
CN107817987B (en) Hardware configuration method, system, terminal and server
WO2024037032A1 (en) Account login method and electronic device
JP6195465B2 (en) Remote card content management using synchronous server-side scripting
WO2016119623A1 (en) Method and device for realizing network sharing
CN104486371A (en) Equipment and method for downloading file on batch
KR101833709B1 (en) Communication apparatus, information processing apparatus, and control method for the same
CN116560760A (en) Cross-system peripheral operation method, device, equipment and medium based on external HUB
JP6201122B2 (en) Management server, monitoring system, and control method and program therefor
CN107659621B (en) RAID control card configuration method and device
JP6086183B2 (en) Information processing system, information processing method, server, control method thereof, and control program
CN110933014A (en) Cloud service access method, device and computer-readable storage medium
CN104714760A (en) Method and device for read and write storage device
CN114585055A (en) Vehicle-mounted WiFi access method, vehicle controller, cloud server and mobile terminal
JP2002095071A (en) Network system and control method of apparatus
KR20130056539A (en) Apparatas and method for performing communication with media transfer protocol supported device in a portable terminal
JP6399172B2 (en) Management server and control method and program thereof

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