An image acquisition method and device based on an image system
Patent Information
- Application Number
- CN202211579271.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-12-08
AI Technical Summary
[0003]现有的技术方案中,通常需要操作人员自行选择对应的影像外设型号,进而安装对应的驱动程序,但是由于影像外设的型号较多,手动操作常由于错选而安装错误的驱动程序,导致难以执行影像采集操作,降低了影像采集效率,用户体验较差
[0042] One embodiment of the above invention has the following advantages or beneficial effects: Because it employs a method that responds to the startup of the imaging system by determining the target imaging peripheral connected to the imaging system and its corresponding target peripheral port from the peripheral port set; calling the target peripheral port to send an information acquisition request to the target imaging peripheral, and receiving the information acquisition result returned by the target imaging peripheral; and installing the driver corresponding to the target imaging peripheral in the imaging system according to the information acquisition result and the mapping table, and running the imaging system to perform image acquisition after the driver is successfully installed; wherein the mapping table indicates the mapping relationship between the device model of the imaging peripheral and the driver, it overcomes the technical problem in the prior art where the need for operators to manually select the imaging peripheral model leads to driver installation errors or low installation efficiency, affecting user experience. This achieves the technical effect of automatically identifying the imaging peripheral model based on the imaging system, automatically installing the corresponding driver, improving the automation level of the image acquisition process, increasing image acquisition efficiency, and enhancing user experience.
Smart Images

Figure CN115878135B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an image acquisition method and apparatus based on an image system. Background Technology
[0002] In business operations, imaging systems acquire images by connecting to imaging peripherals. However, in actual operation, these peripherals (acquisition devices connected externally to the imaging system) are usually from different manufacturers, and using devices from different manufacturers requires pre-installing corresponding drivers. But for image acquisition operators, situations frequently arise where drivers are not installed or are installed incorrectly. How to automatically identify imaging peripherals based on the imaging system and install the corresponding drivers is a pain point in the business use of imaging systems.
[0003] In existing technical solutions, operators usually need to select the corresponding imaging peripheral model and then install the corresponding driver. However, since there are many models of imaging peripherals, manual operation often results in the wrong driver being installed due to incorrect selection, making it difficult to perform image acquisition operations, reducing image acquisition efficiency, and resulting in a poor user experience. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide an image acquisition method and apparatus based on an image system, which can automatically identify the model of the image peripheral based on the image system, and then automatically install the corresponding driver, thereby improving the automation level of the image acquisition process, improving image acquisition efficiency, and enhancing user experience.
[0005] To achieve the above objectives, according to one aspect of the present invention, an image acquisition method based on an imaging system is provided, comprising:
[0006] In response to the startup of the imaging system, the target imaging peripherals connected to the imaging system and their corresponding target peripheral ports are determined from the set of peripheral ports.
[0007] Call the target peripheral port to send an information acquisition request to the target image peripheral, and receive the information acquisition result returned by the target image peripheral;
[0008] Based on the information acquisition results and the mapping table, the driver corresponding to the target image peripheral is installed in the imaging system, and the imaging system is run to acquire images after the driver is successfully installed; the mapping table indicates the mapping relationship between the device model of the image peripheral and the driver.
[0009] Furthermore, based on the information acquisition results, the step of installing the driver program corresponding to the target image peripheral within the imaging system includes:
[0010] Determine the device model of the target image peripheral corresponding to the information acquisition results;
[0011] Determine the target driver based on the device model and install the target driver within the imaging system.
[0012] Furthermore, before determining the device model of the target image peripheral corresponding to the information acquisition results, the method also includes:
[0013] Determine whether the information acquisition results include driver confirmation data; whereby driver confirmation data is used to indicate that the driver corresponding to the target image peripheral has been installed in the imaging system.
[0014] If so, then directly run the imaging system to acquire images;
[0015] If not, based on the information acquisition results, install the driver corresponding to the target image peripheral in the imaging system, and after the driver is successfully installed, run the imaging system to acquire images.
[0016] Furthermore, before the steps of calling the target peripheral port to send an information acquisition request to the target image peripheral and receiving the information acquisition result returned by the target image peripheral, the method also includes:
[0017] Obtain information on multiple image peripherals and determine the correspondence between each image peripheral and its driver based on the information.
[0018] A mapping table is constructed based on the corresponding relationships, and the mapping table is stored locally.
[0019] Furthermore, in response to the startup of the imaging system, the step of determining the target imaging peripheral connected to the imaging system and the corresponding target peripheral port from the set of peripheral ports includes:
[0020] In response to the startup of the imaging system, the system traverses the set of peripheral ports stored in the imaging system, determines the peripheral port that has been successfully connected based on the network transmission protocol as the target peripheral port, and the imaging peripheral corresponding to the target peripheral port is the target imaging peripheral.
[0021] Furthermore, the method also includes:
[0022] Set the traversal period, and traverse the peripheral port set periodically according to the traversal period to update the target image peripherals.
[0023] Furthermore, prior to the step of determining the target imaging peripheral connected to the imaging system and the corresponding target peripheral port from the set of peripheral ports in response to the startup of the imaging system, the method further includes:
[0024] Based on the network transmission protocol, determine the multiple peripheral ports corresponding to the imaging system. Based on the multiple peripheral ports and the port information corresponding to the multiple peripheral ports, construct a peripheral port set and store the peripheral port set locally.
[0025] According to another aspect of the present invention, an image acquisition device based on an image system is provided, comprising:
[0026] The target image peripheral determination module is used to determine the target image peripheral connected to the image system and the corresponding target peripheral port from the peripheral port set in response to the startup of the image system.
[0027] The receiving module is used to call the target peripheral port to send an information acquisition request to the target image peripheral and to receive the information acquisition result returned by the target image peripheral.
[0028] The image acquisition module is used to install the driver corresponding to the target image peripheral in the image system according to the information acquisition results and the mapping relationship table, and to run the image system to acquire images after the driver is successfully installed; the mapping relationship table indicates the mapping relationship between the device model of the image peripheral and the driver.
[0029] Furthermore, the image acquisition module is also used for:
[0030] Determine the device model of the target image peripheral corresponding to the information acquisition results;
[0031] Determine the target driver based on the device model and install the target driver within the imaging system.
[0032] Furthermore, the device also includes a judgment module, which, before determining the device model of the target image peripheral corresponding to the information acquisition results, is used to:
[0033] Determine whether the information acquisition results include driver confirmation data; whereby driver confirmation data is used to indicate that the driver corresponding to the target image peripheral has been installed in the imaging system.
[0034] If so, then directly run the imaging system to acquire images;
[0035] If not, based on the information acquisition results, install the driver corresponding to the target image peripheral in the imaging system, and after the driver is successfully installed, run the imaging system to acquire images.
[0036] According to another aspect of the present invention, an electronic device for image acquisition based on an imaging system is provided, comprising:
[0037] One or more processors;
[0038] Storage device for storing one or more programs.
[0039] When one or more programs are executed by one or more processors, the one or more processors implement any of the image acquisition methods based on the image system described above.
[0040] According to another aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements an image acquisition method based on an image system as described above.
[0041] To achieve the above objectives, according to another aspect of the present invention, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the image acquisition methods based on an image system described above.
[0042] One embodiment of the above invention has the following advantages or beneficial effects: Because it employs a method that responds to the startup of the imaging system by determining the target imaging peripheral connected to the imaging system and its corresponding target peripheral port from the peripheral port set; calling the target peripheral port to send an information acquisition request to the target imaging peripheral, and receiving the information acquisition result returned by the target imaging peripheral; and installing the driver corresponding to the target imaging peripheral in the imaging system according to the information acquisition result and the mapping table, and running the imaging system to perform image acquisition after the driver is successfully installed; wherein the mapping table indicates the mapping relationship between the device model of the imaging peripheral and the driver, it overcomes the technical problem in the prior art where the need for operators to manually select the imaging peripheral model leads to driver installation errors or low installation efficiency, affecting user experience. This achieves the technical effect of automatically identifying the imaging peripheral model based on the imaging system, automatically installing the corresponding driver, improving the automation level of the image acquisition process, increasing image acquisition efficiency, and enhancing user experience.
[0043] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0044] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0045] Figure 1 This is a schematic diagram of the main flow of an image acquisition method based on an image system according to an embodiment of the present invention;
[0046] Figure 2a This is a schematic diagram of the main flow of an image acquisition method based on an image system according to another embodiment of the present invention;
[0047] Figure 2b This is a schematic diagram of the main flow of an image acquisition method based on an image system according to another embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of the main modules of an image acquisition device based on an image system provided according to an embodiment of the present invention;
[0049] Figure 4 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0050] Figure 5 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0051] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0052] It should be noted that the collection, analysis, use, transmission, and storage of user personal information involved in the technical solution of this invention all comply with relevant laws and regulations, are used for legitimate and reasonable purposes, and are not shared, disclosed, or sold outside of these legitimate uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken to prevent unauthorized access to such personal information data, ensure that personnel authorized to access personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once this user personal information data is no longer needed, the risk should be minimized by restricting or even prohibiting data collection and / or deleting the data.
[0053] When applicable, including in certain relevant applications, data deidentification is used to protect user privacy, such as by removing specific identifiers (e.g., date of birth), controlling the amount or specificity of stored data (e.g., collecting location data at the city level rather than at the specific address level), controlling how data is stored, and / or other methods of deidentification.
[0054] Figure 1 This is a schematic diagram of the main flow of an image acquisition method based on an image system according to an embodiment of the present invention; as shown. Figure 1 As shown, the image acquisition method based on an image system provided in this embodiment of the invention mainly includes:
[0055] Step S101: In response to the startup of the imaging system, determine the target imaging peripheral connected to the imaging system and the corresponding target peripheral port from the peripheral port set.
[0056] Specifically, according to an embodiment of the present invention, the step of determining the target imaging peripheral connected to the imaging system and the corresponding target peripheral port in response to the startup of the imaging system includes:
[0057] In response to the startup of the imaging system, the system traverses the set of peripheral ports stored locally in the imaging system, determines the peripheral port that has been successfully connected based on the network transmission protocol as the target peripheral port, and sets the imaging peripheral corresponding to the target peripheral port as the target imaging peripheral.
[0058] Specifically, according to an embodiment of the present invention, the aforementioned network transmission protocol can be the WebSocket protocol. Since a peripheral port successfully connected via the WebSocket protocol (a new network protocol based on TCP that enables full-duplex communication between the browser and the server—allowing the server to actively send information to the client) indicates that the port has been listened to by the corresponding imaging peripheral, meaning that an imaging peripheral has already connected to the imaging system through this specific peripheral port (target peripheral port). Subsequently, only the device model of the target imaging peripheral connected to the imaging system through this target peripheral port needs to be identified to determine the target driver that needs to be installed.
[0059] Furthermore, according to embodiments of the present invention, the above method further includes:
[0060] Set the traversal period, and traverse the peripheral port set periodically according to the traversal period to update the target image peripherals.
[0061] Based on actual needs, there may be situations where current imaging peripherals malfunction, requiring replacement or addition of imaging peripherals. To ensure the normal operation of image acquisition, a traversal cycle can be set to periodically update the target imaging peripherals and promptly install the corresponding drivers, thereby further improving the user experience and ensuring the normal operation of image acquisition.
[0062] Preferably, according to an embodiment of the present invention, before the step of determining the target imaging peripheral connected to the imaging system and the corresponding target peripheral port from the peripheral port set in response to the startup of the imaging system, the above method further includes:
[0063] Based on the network transmission protocol, determine the multiple peripheral ports corresponding to the imaging system. Based on the multiple peripheral ports and the port information corresponding to the multiple peripheral ports, construct a peripheral port set and store the peripheral port set locally.
[0064] By setting up as described above, multiple peripheral ports corresponding to the imaging system are pre-determined through network transmission protocols. A peripheral port set is constructed based on the peripheral ports and their corresponding port information, and this peripheral port set is stored locally. This helps to quickly locate the peripheral ports that need to be traversed when the imaging system is started, thereby improving the identification efficiency of the device models of the imaging peripherals.
[0065] Step S102: Call the target peripheral port to send an information acquisition request to the target image peripheral, and receive the information acquisition result returned by the target image peripheral.
[0066] Step S103: Based on the information acquisition results and mapping relationship table, install the driver corresponding to the target image peripheral in the image system, and after the driver is successfully installed, run the image system to acquire images.
[0067] Specifically, according to an embodiment of the present invention, the step of installing a driver program corresponding to the target image peripheral within the imaging system based on the information acquisition results and the mapping relationship table includes:
[0068] Determine the device model of the target image peripheral corresponding to the information acquisition results;
[0069] The target driver is determined based on the mapping table and the device model, and then installed within the imaging system.
[0070] Furthermore, according to an embodiment of the present invention, before the steps of calling the target peripheral port to send an information acquisition request to the target image peripheral and receiving the information acquisition result returned by the target image peripheral, the method further includes:
[0071] Obtain information on multiple image peripherals and determine the correspondence between each image peripheral and its driver based on the information.
[0072] The mapping relationship table is constructed based on the correspondence, and the mapping relationship table is stored locally.
[0073] According to an embodiment of the present invention, before information collection, information on imaging peripherals produced by multiple manufacturers is first obtained, and then the driver corresponding to each imaging peripheral model is determined to establish a mapping table, which facilitates the subsequent quick and accurate determination of the driver to be installed.
[0074] Preferably, according to an embodiment of the present invention, before the step of determining the device model of the target image peripheral corresponding to the information acquisition result, the above method further includes:
[0075] Determine whether the information acquisition results include driver confirmation data; whereby driver confirmation data is used to indicate that the driver corresponding to the target image peripheral has been installed in the imaging system.
[0076] If so, then directly run the imaging system to acquire images;
[0077] If not, based on the information acquisition results, install the driver corresponding to the target image peripheral in the imaging system, and after the driver is successfully installed, run the imaging system to acquire images.
[0078] According to an embodiment of the present invention, if the information acquisition result includes driver confirmation information, it indicates that the imaging system already has a driver corresponding to the target image peripheral installed in the current environment, and no further installation is required; the image acquisition operation can be performed directly. If the information acquisition result does not include driver confirmation information, it is necessary to determine the device model of the target image peripheral corresponding to the information acquisition result based on the information acquisition result; determine the target driver based on the device model, and install the target driver in the imaging system.
[0079] According to the technical solution of this invention, by responding to the startup of the imaging system, determining the target imaging peripheral connected to the imaging system and its corresponding target peripheral port from the peripheral port set; calling the target peripheral port to send an information acquisition request to the target imaging peripheral, receiving the information acquisition result returned by the target imaging peripheral; installing the driver corresponding to the target imaging peripheral in the imaging system according to the information acquisition result and the mapping table, and running the imaging system to perform image acquisition after the driver is successfully installed, this overcomes the technical problem in the prior art where the need for operators to manually select the imaging peripheral model leads to driver installation errors or low installation efficiency, affecting the user experience. Therefore, it achieves the technical effect of automatically identifying the imaging peripheral model based on the imaging system, automatically installing the corresponding driver, improving the automation level of the image acquisition process, increasing image acquisition efficiency, and enhancing the user experience.
[0080] Figure 2a This is a schematic diagram of the main flow of an image acquisition method based on an image system according to another embodiment of the present invention; as shown Figure 2a As shown, the image acquisition method based on an image system provided in this embodiment of the invention mainly includes:
[0081] Step S201: Determine the multiple peripheral ports corresponding to the imaging system according to the WebSocket protocol, and store the port information corresponding to the multiple peripheral ports locally.
[0082] By setting up as described above, multiple peripheral ports corresponding to the imaging system are pre-determined via the WebSocket protocol and stored locally. This helps to quickly locate the peripheral ports that need to be traversed when the imaging system starts up, thereby improving the efficiency of identifying the device models of the imaging peripherals.
[0083] In step S202, in response to the startup of the imaging system, the multiple peripheral ports stored locally are traversed, and the peripheral port that has successfully connected based on the WebSocket protocol is determined as the target peripheral port. The imaging peripheral corresponding to the target peripheral port is the target imaging peripheral.
[0084] Since the peripheral port has successfully connected via the WebSocket protocol, it indicates that the port is being listened to by the corresponding imaging peripheral, meaning that an imaging peripheral has already connected to the imaging system through this specific peripheral port (target peripheral port). Subsequently, it is only necessary to identify the device model of the target imaging peripheral that connects to the imaging system through this target peripheral port to determine the target driver that needs to be installed.
[0085] Furthermore, according to embodiments of the present invention, the above method further includes:
[0086] Set a traversal period, and periodically traverse multiple peripheral ports of the imaging system according to the traversal period in order to update the target image peripherals.
[0087] Based on actual needs, there may be situations where current imaging peripherals malfunction, requiring replacement or addition of imaging peripherals. To ensure the normal operation of image acquisition, a traversal cycle can be set to periodically update the target imaging peripherals and promptly install the corresponding drivers, thereby further improving the user experience and ensuring the normal operation of image acquisition.
[0088] Step S203: Call the target peripheral port to send an information acquisition request to the target image peripheral, and receive the information acquisition result returned by the target image peripheral.
[0089] Step S204: Determine whether the information collection result includes driver confirmation data. If not, i.e., the information collection result does not include driver confirmation data, proceed to step S205; if yes, i.e., the information collection result includes driver confirmation data, proceed to step S206.
[0090] Among them, the driver confirmation data is used to characterize the driver that has been installed in the imaging system to correspond to the target image peripheral.
[0091] According to an embodiment of the present invention, if the information acquisition result includes driver confirmation information, it indicates that the imaging system already has a driver corresponding to the target image peripheral installed in the current environment, and no further installation is required; the image acquisition operation can be performed directly. If the information acquisition result does not include driver confirmation information, it is necessary to determine the device model of the target image peripheral corresponding to the information acquisition result based on the information acquisition result; determine the target driver based on the device model, and install the target driver in the imaging system.
[0092] Step S205: Based on the information acquisition results, determine the device model of the target image peripheral corresponding to the information acquisition results; determine the target driver based on the device model, and install the target driver in the image system.
[0093] Step S206: Run the imaging system to acquire images.
[0094] According to the technical solution of the present invention, by adopting the following technical means in response to the startup of the imaging system, determining the target imaging peripheral connected to the imaging system and the corresponding target peripheral port; calling the target peripheral port to send an information acquisition request to the target imaging peripheral, receiving the information acquisition result returned by the target imaging peripheral; installing the driver corresponding to the target imaging peripheral in the imaging system according to the information acquisition result, and running the imaging system to perform image acquisition after the driver is successfully installed, the technical problem in the prior art that the need for the operator to manually select the imaging peripheral model leads to driver installation errors or low installation efficiency, affecting the user experience, is overcome. This achieves the technical effect of automatically identifying the imaging peripheral model based on the imaging system, and automatically installing the corresponding driver, thereby improving the automation level of the image acquisition process, increasing image acquisition efficiency, and enhancing the user experience.
[0095] Figure 2b This is a schematic diagram of the main flow of an image acquisition method based on an image system according to yet another embodiment of the present invention; as shown Figure 2b As shown, the image acquisition method based on an image system provided in this embodiment of the invention mainly includes:
[0096] Step S211: Obtain information on multiple image peripherals, determine the correspondence between each image peripheral and its driver based on the image peripheral information, construct the mapping relationship table based on the correspondence, and store the mapping relationship table locally.
[0097] According to an embodiment of the present invention, before information collection, information on imaging peripherals produced by multiple manufacturers is first obtained, and then the driver corresponding to each imaging peripheral model is determined to establish a mapping table, which facilitates the subsequent quick and accurate determination of the driver to be installed.
[0098] Step S212: Determine multiple peripheral ports corresponding to the imaging system according to the network transmission protocol, construct a peripheral port set based on the multiple peripheral ports and the port information corresponding to the multiple peripheral ports, and store the peripheral port set locally.
[0099] By setting up as described above, multiple peripheral ports corresponding to the imaging system are pre-determined through network transmission protocols. A peripheral port set is constructed based on the peripheral ports and their corresponding port information, and this peripheral port set is stored locally. This helps to quickly locate the peripheral ports that need to be traversed when the imaging system is started, thereby improving the identification efficiency of the device models of the imaging peripherals.
[0100] Step S213: In response to the startup of the imaging system, traverse the set of peripheral ports stored locally in the imaging system, determine the peripheral port that has been successfully connected based on the network transmission protocol as the target peripheral port, and the imaging peripheral corresponding to the target peripheral port is the target imaging peripheral.
[0101] Step S214: Call the target peripheral port to send an information acquisition request to the target image peripheral, and receive the information acquisition result returned by the target image peripheral.
[0102] Step S215: Determine whether the information collection result includes driver confirmation data. If not, i.e., the information collection result does not include driver confirmation data, proceed to step S216; if yes, i.e., the information collection result includes driver confirmation data, proceed to step S217.
[0103] According to an embodiment of the present invention, if the information acquisition result includes driver confirmation information, it indicates that the imaging system already has a driver corresponding to the target image peripheral installed in the current environment, and no further installation is required; the image acquisition operation can be performed directly. If the information acquisition result does not include driver confirmation information, it is necessary to determine the device model of the target image peripheral corresponding to the information acquisition result based on the information acquisition result; determine the target driver based on the device model, and install the target driver in the imaging system.
[0104] Step S216: Based on the information acquisition results, determine the device model of the target image peripheral corresponding to the information acquisition results; determine the target driver based on the mapping table and the device model, and install the target driver in the image system.
[0105] Step S217: Run the imaging system to acquire images.
[0106] According to the technical solution of the present invention, by adopting the following technical means in response to the startup of the imaging system, determining the target imaging peripheral connected to the imaging system and the corresponding target peripheral port; calling the target peripheral port to send an information acquisition request to the target imaging peripheral, receiving the information acquisition result returned by the target imaging peripheral; installing the driver corresponding to the target imaging peripheral in the imaging system according to the information acquisition result, and running the imaging system to perform image acquisition after the driver is successfully installed, the technical problem in the prior art that the need for the operator to manually select the imaging peripheral model leads to driver installation errors or low installation efficiency, affecting the user experience, is overcome. This achieves the technical effect of automatically identifying the imaging peripheral model based on the imaging system, and automatically installing the corresponding driver, thereby improving the automation level of the image acquisition process, increasing image acquisition efficiency, and enhancing the user experience.
[0107] Figure 3 This is a schematic diagram of the main modules of an image acquisition device based on an image system according to an embodiment of the present invention; as shown. Figure 3 As shown, the image acquisition device 300 based on an image system provided in this embodiment of the invention mainly includes:
[0108] The target image peripheral determination module 301 is used to determine the target image peripheral connected to the image system and the corresponding target peripheral port from the peripheral port set in response to the startup of the image system.
[0109] Specifically, according to an embodiment of the present invention, the target image peripheral determination module 301 is further configured to:
[0110] In response to the startup of the imaging system, the system traverses the set of peripheral ports stored locally in the imaging system, determines the peripheral port that has been successfully connected based on the network transmission protocol as the target peripheral port, and sets the imaging peripheral corresponding to the target peripheral port as the target imaging peripheral.
[0111] Specifically, according to an embodiment of the present invention, the aforementioned network transmission protocol can be the WebSocket protocol. Since a peripheral port that has successfully connected via the WebSocket protocol indicates that the port has been monitored by the corresponding imaging peripheral, that is, an imaging peripheral has already connected to the imaging system through this specific peripheral port (target peripheral port). Subsequently, it is only necessary to identify the device model of the target imaging peripheral that connects to the imaging system through the target peripheral port to determine the target driver that needs to be installed.
[0112] Furthermore, according to an embodiment of the present invention, the image acquisition device 300 based on the image system further includes an update module, used for:
[0113] Set the traversal period, and traverse the peripheral port set periodically according to the traversal period to update the target image peripherals.
[0114] Based on actual needs, there may be situations where current imaging peripherals malfunction, requiring replacement or addition of imaging peripherals. To ensure the normal operation of image acquisition, a traversal cycle can be set to periodically update the target imaging peripherals and promptly install the corresponding drivers, thereby further improving the user experience and ensuring the normal operation of image acquisition.
[0115] Preferably, according to an embodiment of the present invention, the image acquisition device 300 based on the image system further includes a storage module. Before the step of determining the target image peripheral connected to the image system and the corresponding target peripheral port from the peripheral port set in response to the start of the image system, the storage module is used for:
[0116] Based on the network transmission protocol, determine the multiple peripheral ports corresponding to the imaging system. Based on the multiple peripheral ports and the port information corresponding to the multiple peripheral ports, construct a peripheral port set and store the peripheral port set locally.
[0117] By setting up as described above, multiple peripheral ports corresponding to the imaging system are pre-determined through network transmission protocols. A peripheral port set is constructed based on the peripheral ports and their corresponding port information, and this peripheral port set is stored locally. This helps to quickly locate the peripheral ports that need to be traversed when the imaging system is started, thereby improving the identification efficiency of the device models of the imaging peripherals.
[0118] The receiving module 302 is used to call the target peripheral port to send an information acquisition request to the target image peripheral and receive the information acquisition result returned by the target image peripheral.
[0119] The image acquisition module 303 is used to install the driver corresponding to the target image peripheral in the image system according to the information acquisition results and mapping relationship table, and to run the image system to acquire images after the driver is successfully installed.
[0120] Specifically, according to an embodiment of the present invention, the image acquisition module 303 is further configured to:
[0121] Determine the device model of the target image peripheral corresponding to the information acquisition results;
[0122] The target driver is determined based on the mapping table and the device model, and then installed within the imaging system.
[0123] Furthermore, according to an embodiment of the present invention, the image acquisition device 300 based on the image system further includes a mapping table construction module. Before the steps of calling the target peripheral port to send an information acquisition request to the target image peripheral and receiving the information acquisition result returned by the target image peripheral, the mapping table construction module is used to:
[0124] Obtain information on multiple image peripherals and determine the correspondence between each image peripheral and its driver based on the information.
[0125] The mapping relationship table is constructed based on the correspondence, and the mapping relationship table is stored locally.
[0126] According to an embodiment of the present invention, before information collection, information on imaging peripherals produced by multiple manufacturers is first obtained, and then the driver corresponding to each imaging peripheral model is determined to establish a mapping table, which facilitates the subsequent quick and accurate determination of the driver to be installed.
[0127] Preferably, according to an embodiment of the present invention, the image acquisition device 300 based on the image system further includes a judgment module. Before the step of determining the device model of the target image peripheral corresponding to the information acquisition result, the judgment module is used to:
[0128] Determine whether the information acquisition results include driver confirmation data; driver confirmation data is used to indicate that the driver corresponding to the target image peripheral has been installed in the imaging system.
[0129] If so, then directly run the imaging system to acquire images;
[0130] If not, based on the information acquisition results, install the driver corresponding to the target image peripheral in the imaging system, and after the driver is successfully installed, run the imaging system to acquire images.
[0131] According to an embodiment of the present invention, if the information acquisition result includes driver confirmation information, it indicates that the imaging system already has a driver corresponding to the target image peripheral installed in the current environment, and no further installation is required; the image acquisition operation can be performed directly. If the information acquisition result does not include driver confirmation information, it is necessary to determine the device model of the target image peripheral corresponding to the information acquisition result based on the information acquisition result; determine the target driver based on the device model, and install the target driver in the imaging system.
[0132] According to the technical solution of this invention, by responding to the startup of the imaging system, determining the target imaging peripheral connected to the imaging system and its corresponding target peripheral port from the peripheral port set; calling the target peripheral port to send an information acquisition request to the target imaging peripheral, receiving the information acquisition result returned by the target imaging peripheral; installing the driver corresponding to the target imaging peripheral in the imaging system according to the information acquisition result and the mapping table, and running the imaging system to perform image acquisition after the driver is successfully installed, this overcomes the technical problem in the prior art where the need for operators to manually select the imaging peripheral model leads to driver installation errors or low installation efficiency, affecting the user experience. Therefore, it achieves the technical effect of automatically identifying the imaging peripheral model based on the imaging system, automatically installing the corresponding driver, improving the automation level of the image acquisition process, increasing image acquisition efficiency, and enhancing the user experience.
[0133] Figure 4 An exemplary system architecture 400 is shown that can be applied to an image acquisition method or an image acquisition device based on an image system according to embodiments of the present invention.
[0134] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, and 403, a network 404, and a server 405. Network 404 serves as the medium for providing communication links between terminal devices 401, 402, and 403 and server 405. Network 404 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0135] Users can use terminal devices 401, 402, and 403 to interact with server 405 via network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, and 403, such as image capture applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0136] Terminal devices 401, 402, and 403 can be various electronic devices with displays that support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0137] Server 405 can be a server that provides various services, such as a server for users to use terminal devices 401, 402, and 403 (for image acquisition / data processing) (for example only). This server can analyze and process the received information acquisition results and other data, and feed back the processing results (such as target drivers - for example only) to the terminal devices.
[0138] It should be noted that the image acquisition method based on the image system provided in the embodiments of the present invention is generally executed by the server 405, and correspondingly, the image acquisition device based on the image system is generally set in the server 405.
[0139] It should be understood that Figure 4 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0140] The following is for reference. Figure 5 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing terminal devices or servers of the present invention. Figure 5 The terminal device or server shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0141] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0142] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.
[0143] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined above in the system of this invention.
[0144] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0146] The computer program product of this invention includes a computer program that, when executed by a processor, implements any of the image acquisition methods based on an image system described above.
[0147] The modules described in the embodiments of the present invention can be implemented in software or hardware. The described modules can also be housed in a processor; for example, a processor can be described as including a target image peripheral determination module, a receiving module, and an image acquisition module. The names of these modules do not necessarily limit the module itself; for example, the target image peripheral determination module can also be described as "a module that sends an image acquisition request to a connected server."
[0148] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to include: in response to the startup of the imaging system, determining, from a set of peripheral ports, a target imaging peripheral connected to the imaging system and its corresponding target peripheral port; invoking the target peripheral port to send an information acquisition request to the target imaging peripheral, and receiving the information acquisition result returned by the target imaging peripheral; installing a driver program corresponding to the target imaging peripheral within the imaging system according to the information acquisition result and a mapping table, and, after successful driver program installation, running the imaging system to perform image acquisition.
[0149] According to the technical solution of this invention, by responding to the startup of the imaging system, determining the target imaging peripheral connected to the imaging system and its corresponding target peripheral port from the peripheral port set; calling the target peripheral port to send an information acquisition request to the target imaging peripheral, receiving the information acquisition result returned by the target imaging peripheral; installing the driver corresponding to the target imaging peripheral in the imaging system according to the information acquisition result and the mapping table, and running the imaging system to perform image acquisition after the driver is successfully installed, this overcomes the technical problem in the prior art where the need for operators to manually select the imaging peripheral model leads to driver installation errors or low installation efficiency, affecting the user experience. Therefore, it achieves the technical effect of automatically identifying the imaging peripheral model based on the imaging system, automatically installing the corresponding driver, improving the automation level of the image acquisition process, increasing image acquisition efficiency, and enhancing the user experience.
[0150] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An image acquisition method based on an imaging system, characterized in that, include: In response to the startup of the imaging system, the system traverses the set of peripheral ports stored locally in the imaging system and determines the target imaging peripherals connected to the imaging system and their corresponding target peripheral ports from the set of peripheral ports. The target peripheral port is a peripheral port that has successfully connected based on a network transmission protocol; the network transmission protocol is the WebSocket protocol. The system calls the target peripheral port to send an information acquisition request to the target image peripheral and receives the information acquisition result returned by the target image peripheral. Based on the information acquisition results and the mapping relationship table, a driver corresponding to the target image peripheral is installed in the imaging system, and after the driver is successfully installed, the imaging system is run to acquire images; wherein, the mapping relationship table indicates the mapping relationship between the device model of the image peripheral and the driver. The step of installing a driver program corresponding to the target image peripheral within the imaging system based on the information acquisition results includes: Determine the device model of the target image peripheral corresponding to the information acquisition results; The target driver is determined according to the device model, and the target driver is installed in the imaging system; Before the step of determining the device model of the target image peripheral corresponding to the information acquisition result, the method further includes: Determine whether the information acquisition result includes driver confirmation data; wherein, the driver confirmation data is used to indicate that a driver corresponding to the target image peripheral has been installed in the imaging system; If so, then directly run the imaging system to acquire images; If not, based on the information acquisition results, install the driver corresponding to the target image peripheral in the imaging system, and after the driver is successfully installed, run the imaging system to acquire images; Before the steps of calling the target peripheral port to send an information acquisition request to the target image peripheral and receiving the information acquisition result returned by the target image peripheral, the method further includes: Acquire information on multiple image peripherals, and determine the correspondence between each image peripheral and its driver based on the image peripheral information; The mapping relationship table is constructed based on the correspondence, and the mapping relationship table is stored locally; Prior to the step of determining the target imaging peripheral connected to the imaging system and its corresponding target peripheral port from the peripheral port set in response to the startup of the imaging system, the method further includes: The imaging system is determined according to the network transmission protocol. A peripheral port set is constructed based on the multiple peripheral ports and the port information corresponding to the multiple peripheral ports, and the peripheral port set is stored locally.
2. The image acquisition method based on an imaging system according to claim 1, characterized in that, The step of determining the target imaging peripheral connected to the imaging system and its corresponding target peripheral port from the peripheral port set in response to the startup of the imaging system includes: In response to the startup of the imaging system, the peripheral port set stored in the imaging system is traversed, and the peripheral port that has been successfully connected based on the network transmission protocol is determined as the target peripheral port. The imaging peripheral corresponding to the target peripheral port is the target imaging peripheral.
3. The image acquisition method based on an imaging system according to claim 2, characterized in that, The method further includes: Set a traversal period, and traverse the peripheral port set periodically according to the traversal period to update the target image peripherals.
4. An image acquisition device based on an image system, characterized in that, include: The target image peripheral device determination module is used to, in response to the startup of the image system, traverse the peripheral port set stored locally in the image system, and determine the target image peripheral device connected to the image system and the corresponding target peripheral port from the peripheral port set; The target peripheral port is a peripheral port that has successfully connected based on a network transmission protocol; the network transmission protocol is the WebSocket protocol. The receiving module is used to call the target peripheral port to send an information acquisition request to the target image peripheral, and to receive the information acquisition result returned by the target image peripheral; The image acquisition module is used to install a driver program corresponding to the target image peripheral in the image system according to the information acquisition results and the mapping relationship table, and to run the image system to perform image acquisition after the driver program is successfully installed; wherein, the mapping relationship table indicates the mapping relationship between the device model of the image peripheral and the driver program; The image acquisition module is also used for: Determine the device model of the target image peripheral corresponding to the information acquisition results; The target driver is determined according to the device model, and the target driver is installed in the imaging system; The device further includes a judgment module, which, before the step of determining the device model of the target image peripheral corresponding to the information acquisition result, is used to: Determine whether the information acquisition result includes driver confirmation data; wherein, the driver confirmation data is used to indicate that a driver corresponding to the target image peripheral has been installed in the imaging system; If so, then directly run the imaging system to acquire images; If not, based on the information acquisition results, install the driver corresponding to the target image peripheral in the imaging system, and after the driver is successfully installed, run the imaging system to acquire images; Before the steps of calling the target peripheral port to send an information acquisition request to the target image peripheral and receiving the information acquisition result returned by the target image peripheral, the mapping relationship table construction module is used for: Acquire information on multiple image peripherals, and determine the correspondence between each image peripheral and its driver based on the image peripheral information; The mapping relationship table is constructed based on the correspondence, and the mapping relationship table is stored locally; Prior to the step of determining the target imaging peripheral connected to the imaging system and its corresponding target peripheral port from the peripheral port set in response to the startup of the imaging system, the peripheral port set construction module is configured to: The imaging system is determined according to the network transmission protocol. A peripheral port set is constructed based on the multiple peripheral ports and the port information corresponding to the multiple peripheral ports, and the peripheral port set is stored locally.
5. An electronic device for image acquisition based on an imaging system, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-3.
6. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-3.
7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-3.
Citation Information
Patent Citations
Driving program loading method in terminal startup process and terminal equipment
CN107145363A
Driving program processing method and device, electronic equipment and medium
CN113448630A