CN112330845B - Processing method, device and equipment for accessing same equipment - Google Patents

Processing method, device and equipment for accessing same equipment Download PDF

Info

Publication number
CN112330845B
CN112330845B CN201910656433.5A CN201910656433A CN112330845B CN 112330845 B CN112330845 B CN 112330845B CN 201910656433 A CN201910656433 A CN 201910656433A CN 112330845 B CN112330845 B CN 112330845B
Authority
CN
China
Prior art keywords
dynamic password
password lock
same
equipment
description name
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.)
Active
Application number
CN201910656433.5A
Other languages
Chinese (zh)
Other versions
CN112330845A (en
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.)
Sgsg Science & Technology Co ltd Zhuhai
Original Assignee
Sgsg Science & Technology Co ltd Zhuhai
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 Sgsg Science & Technology Co ltd Zhuhai filed Critical Sgsg Science & Technology Co ltd Zhuhai
Priority to CN201910656433.5A priority Critical patent/CN112330845B/en
Publication of CN112330845A publication Critical patent/CN112330845A/en
Application granted granted Critical
Publication of CN112330845B publication Critical patent/CN112330845B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/34User authentication involving the use of external additional devices, e.g. dongles or smart cards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • G06F21/46Structures or tools for the administration of authentication by designing passwords or checking the strength of passwords
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00817Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application discloses a processing method, a processing device and processing equipment for accessing the same equipment, relates to the technical field of communication, and can realize that one personal computer can access a plurality of dynamic password lock equipment which are the same at the same time, the production time of the dynamic password lock equipment cannot be increased additionally, and the labor resource cost is saved. The method comprises the following steps: when determining to access a plurality of same dynamic password lock devices according to PID and VID corresponding to the dynamic password lock devices, respectively configuring index identifications corresponding to the same dynamic password lock devices, wherein the index identifications are different from each other; and then starting the same dynamic password lock devices, and distinguishing the same dynamic password lock devices by using the index identifiers to perform data communication.

Description

Processing method, device and equipment for accessing same equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a processing method, an apparatus, and a device for accessing the same device.
Background
Dynamic coded locks, as the name implies, are locks in which the code is dynamic and are often used in places where security is high and money is involved. The dynamic password lock Device is connected with a Personal Computer (PC) through a USB, receives and sends a Human Interface Device (HID) protocol message and communicates with a background server through a PC client.
When the PCs access the same dynamic password lock device, since the Product ID (PID), the Vendor ID (VID) and the device descriptor of the HID devices are the same and cannot be distinguished, the same PC can generally only be connected to one dynamic password lock device for use, and cannot simultaneously access and use a plurality of the same dynamic password lock devices. To solve this problem, in the conventional method, when the dynamic password lock device is produced, different firmware is burned into each dynamic password lock device to distinguish PID, VID or device descriptor of the HID device.
However, the conventional method causes problems of lowering production efficiency, such as long production time of the dynamic coded lock device, shortage of production manpower resources, and the like, and is inconvenient to maintain in an application place of the dynamic coded lock.
Disclosure of Invention
In view of the above, the present application provides a processing method, an apparatus and a device for accessing the same device, and mainly aims to solve the technical problem that the production efficiency is reduced due to the fact that the traditional method is utilized to differentiate multiple pieces of the same dynamic password lock device accessed in the same PC, such as the production time of the dynamic password lock device and the shortage of production manpower resources.
According to an aspect of the present application, there is provided a processing method for accessing the same device, the method including:
when determining to access a plurality of same dynamic password lock devices according to PID and VID corresponding to the dynamic password lock devices, respectively configuring index identifications corresponding to the same dynamic password lock devices, wherein the index identifications are different from each other;
and starting the same dynamic password lock devices, and distinguishing the same dynamic password lock devices by using the index identification to perform data communication.
According to another aspect of the present application, there is provided a processing apparatus accessing the same device, the apparatus including:
the determining module is used for respectively configuring index identifications corresponding to a plurality of same dynamic password lock devices when determining to access the same dynamic password lock devices according to the corresponding PID and VID of the dynamic password lock devices, wherein the index identifications are different from each other;
the starting module is used for starting the same dynamic password lock devices;
and the communication module is used for distinguishing the same dynamic password lock devices by using the index identifier to carry out data communication.
According to yet another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described processing method for accessing the same.
According to still another aspect of the present application, there is provided a physical device accessing to the same device for processing, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, where the processor implements the processing method accessing to the same device when executing the program.
By means of the technical scheme, the processing method, the processing device and the processing equipment for accessing the same equipment are provided, when the access of a plurality of same dynamic password lock equipment is determined, index identifications corresponding to the dynamic password lock equipment are respectively configured, wherein the index identifications are different from one another, and then the same dynamic password lock equipment can be distinguished by the index identifications to carry out data communication. Compared with the traditional mode, the method has the advantages that when the dynamic coded lock devices are produced, different firmware is not required to be burned for each dynamic coded lock to distinguish the PID, VID or device descriptor of the device, the production time is not additionally prolonged, the labor cost is saved, the production efficiency is improved, and when the device corresponding to the dynamic coded lock is maintained, the device can be maintained independently, the maintenance flow is simplified, and the maintenance efficiency is improved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic flowchart illustrating a processing method for accessing the same device according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart illustrating another processing method for accessing the same device according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating an example application scenario provided in an embodiment of the present application;
fig. 4 is a system architecture diagram illustrating an application scenario provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram illustrating a processing apparatus accessing to the same device according to an embodiment of the present application;
fig. 6 shows a schematic structural diagram of another processing apparatus accessing the same device according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In order to solve the technical problems that the production time of the dynamic password lock device, the shortage of production human resources and the like reduce the production efficiency in the conventional manner in order to distinguish a plurality of same dynamic password lock devices accessed to the same PC, the embodiment provides a processing method for accessing the same device, as shown in fig. 1, the method includes:
101. when determining to access a plurality of same dynamic password lock devices according to the PID and VID corresponding to the dynamic password lock devices, respectively configuring the index identifications corresponding to the plurality of same dynamic password lock devices.
Wherein the index identifications of the configurations differ from one another to distinguish the same dynamic password lock devices. For example, if it is determined through searching that the PIDs and VIDs of two dynamic password lock devices are the same, it indicates that the PC currently accesses two identical dynamic password lock devices, and then configures the index identifiers, specifically D0, D1, corresponding to the two identical dynamic password lock devices, respectively.
The execution subject for the embodiment may be an auxiliary device or an apparatus for supporting the access of the same dynamic password lock apparatus to the PC, and may be specifically configured on the PC side. The dynamic password lock device in this embodiment may be a device that performs dynamic encryption to ensure security of a link before adding money, and the work flow includes: the staff verifies on the dynamic password lock equipment, after the verification succeeds, the background system server can generate a dynamic password and send the dynamic password to the dynamic password lock equipment, the dynamic password lock equipment judges whether the dynamic password is correct, and the dynamic password lock can be opened only when the dynamic password is correct.
102. And starting a plurality of same dynamic password lock devices, and distinguishing the same dynamic password lock devices by using the index identifiers to perform data communication.
For example, the data requested by the dynamic password lock device is forwarded to the server, and the index identifier of the dynamic password lock device sending the requested data is recorded; and after the request result data are obtained, forwarding the request result data to corresponding dynamic password lock equipment according to the recorded index identifier.
For this embodiment, when only one dynamic password lock device is accessed, data communication with the PC can be implemented by identifying the PID and VID of the access device; in addition, the following situation may exist that the dynamic password lock devices with the same PID and VID are accessed, and further, in order to better distinguish and avoid the index configuration error, the index identifier is allocated when the dynamic password lock device is accessed first, and then, if the devices with the same PID and VID are accessed again, the index identifier is accumulated on the basis of the index identifier.
The method provided by this embodiment can distinguish multiple same dynamic password lock devices that are accessed by using index identifiers that are respectively configured, thereby implementing a communication mechanism that enables the same dynamic password lock devices to be free from interference. Compared with the conventional mode, the PID and VID of the equipment or the descriptor of the equipment do not need to be distinguished by burning different firmware for each dynamic coded lock when the dynamic coded lock equipment is produced, the production time is not additionally prolonged, the labor cost is saved, and the production efficiency is improved.
Further, as a refinement and an extension of the specific implementation of the foregoing embodiment, in order to fully describe the implementation process of the present embodiment, another processing method for accessing the same device is provided, as shown in fig. 2, the method includes:
201. and searching the dynamic password lock equipment with the same PID and VID when determining to access a plurality of same dynamic password lock equipment according to the corresponding PID and VID of the dynamic password lock equipment.
202. And according to the sequence of the search results, accumulating and configuring the index identifications corresponding to the searched dynamic coded lock devices with the same PID and VID.
For example, a first dynamic password lock device searched under the condition that the PID and VID are the same is used as an index 0 device, and a corresponding index identifier D0 is configured; the second searched dynamic password lock device is used as an index 1 device, and a corresponding index identifier D1 is configured; the third searched dynamic password lock device is used as an index 2 device and is configured with corresponding index identifications D2 \8230, 8230and so on, all the dynamic password lock devices with the same PID and VID are searched out and are configured with corresponding index identifications respectively, and the index identifications are different from one another so as to be distinguished. And if the newly added dynamic password lock equipment with the same PID and VID exists, continuously accumulating the index identification according to the accumulated index identification to be used as the index identification corresponding to the newly added dynamic password lock equipment. By the method, each dynamic coded lock device with the same PID and VID can be accurately configured with the corresponding index identification, and the index identifications are different.
203. And starting a plurality of same dynamic password lock devices, and configuring device description names corresponding to the same dynamic password lock devices.
The same dynamic coded lock equipment accessed to different USB interfaces has different corresponding equipment description names.
For example, when multiple dynamic password lock devices are accessed at different USB interfaces, their respective corresponding configured device description names are different and may be randomly changed.
204. And distinguishing a plurality of same dynamic password lock devices for data communication by using the configured index identification and the device description name.
In this embodiment, for the same dynamic password lock device, because the index identifier and the device description name configured for each device are different, the index identifier and the device description name are combined for distinguishing, so that the same dynamic password lock device can be better identified, the identification accuracy is improved, and accurate data communication between the same dynamic password lock device and the server is ensured. The condition that the identification accuracy is influenced due to the fact that abnormity occurs when the index identification or the equipment description name is singly used for distinguishing can be avoided. Optionally, in addition to the manner of distinguishing by combining the index identifier and the device description name, the method may further distinguish by matching with a corresponding timestamp when the device accesses, and if the device accesses non-simultaneously, the access timestamps are different, so that the identification accuracy of the same dynamic password lock device may be further improved by the optional manner.
In the subsequent work of the dynamic password lock devices which are connected and started, the situation of disconnection in midway (such as manual plugging and unplugging, abnormal disconnection and the like) sometimes exists, and for the same dynamic password lock device, if the dynamic password lock devices are disconnected, the specific disconnected devices in the same dynamic password lock device cannot be judged in time because the dynamic password lock devices have the same PID and VID. At present, the traditional mode adopts the same plug and the same plug, for example, two same dynamic password lock devices, if one device is disconnected, the bus is unplugged, at the moment, the two devices are disconnected, then the bus is plugged again to restart the two devices, so as to ensure the normal operation of the two devices, however, the mode can influence the data communication of the connected devices.
Therefore, in order to identify the disconnected device in time and avoid the above problem, further, as an optional manner, the method of this embodiment may further include: respectively configuring device variable values for dynamic password lock devices corresponding to the index identifiers, starting threads for reading HID data of human interface devices, and monitoring whether the dynamic password lock devices corresponding to the index identifiers are online or not (if one thread is respectively started for each same device for monitoring, the targeted monitoring mode can improve the timeliness and accuracy of monitoring), wherein the corresponding device variable values are emptied when the dynamic password lock devices are disconnected; for example, a device variable value (e.g., K values such as K0, K1, and K2) may be allocated to each dynamic password lock device, and the device variable value corresponding to the device may be cleared when the device is disconnected, so that the thread reading the HID data is used to monitor the device variable value corresponding to the device variable value, and then whether the device variable value is cleared is determined to monitor whether the corresponding dynamic password lock device is online.
And if the condition that the equipment is disconnected is monitored, determining the dynamic password lock equipment disconnected by a plurality of same dynamic password lock equipment according to the emptied equipment variable value. By the mode, the disconnected dynamic password lock equipment can be timely identified when the equipment is disconnected, if conditions allow the equipment to be singly reconnected, different equipment can be respectively controlled, all the equipment cannot be restarted due to the fact that one equipment is disconnected, and management and labor division of the dynamic password lock equipment are more flexible.
For example, dynamic combination lock devices are used to encrypt cassettes to ensure the security of cassette usage. In a specific application, the banknote boxes are divided into different banknote boxes according to the currency amount, each dynamic password lock device controls the banknote boxes with different currency types respectively, and devices with the same PID and VID may exist in the dynamic password lock devices. By applying the method provided by the embodiment, one PC can simultaneously support access to a plurality of same dynamic password lock devices and maintain data communication. Therefore, only the target money box needing to be maintained can be opened during money adding, and the background can also identify the information of the target money box to be maintained. And other paper money boxes can not be broken, and data communication with the PC can be continuously kept.
If the thread monitoring device is started to monitor that the existing device is disconnected, further, in order to accurately distinguish when the subsequent device is reconnected, the method of this embodiment may further include: and after the disconnected dynamic password lock device is reconnected, searching the dynamic password lock devices with the same PID and VID again, and reconfiguring the index identifications and the device description names corresponding to the dynamic password lock devices with the same PID and VID.
For example, if the number of the dynamic password lock devices with the same PID and VID is two, after the disconnected dynamic password lock device is reconnected, the re-searching for the dynamic password lock device with the same PID and VID and re-configuring the index identifier and the device description name corresponding to each of the dynamic password lock devices with the same PID and VID may specifically include: if the disconnected dynamic coded lock device is a second searched dynamic coded lock device when two dynamic coded lock devices with the same PID and VID are accessed last time, in the process of searching the two dynamic coded lock devices again, the temporary device description name is saved when the dynamic coded lock devices are searched for the first time; when the dynamic password lock equipment is searched for the second time, comparing a first target equipment description name configured to the dynamic password lock equipment searched for the second time with a second target equipment description name configured to the dynamic password lock equipment searched for the first time when the two dynamic password lock equipment are accessed last time, wherein the temporary equipment description name is different from the first target equipment description name; if the first target device description name is the same as the second target device description name, the temporary device description name is configured to the current second searched dynamic password lock device instead of the first target device description name; and if the first target device description name is different from the second target device description name, determining to configure the first target device description name to the current second searched dynamic password lock device.
When the dynamic password lock device is disconnected and reconnected, since the newly connected USB port of the disconnected and reconnected device is different from the previously connected USB port, it is possible to identify the devices with the same index identifier when the dynamic password lock devices with the same PID and VID are searched again, thereby causing data communication errors. For example, there are 4 USB ports, port No. 1 to port No. 4, for a PC; for both dynamic password lock device 1 and device 2 of the same PID and VID, first device 1 is accessed to port No. 2 and device 2 is accessed to port No. 3. When searching is performed by the method of the embodiment, according to the sequence from small to large of field values in device description names correspondingly generated when devices are accessed to the USB ports (different USB ports are accessed and randomly changed), the device 1 is searched first, and then the device 2 is searched. Correspondingly, the index identifier corresponding to the configuration device 1 is a D0 device, and the index identifier corresponding to the configuration device 2 is a D1 device; and if the D1 device is disconnected and then the port 1 is reconnected, searching according to the sequence from small to large of the field values corresponding to the USB ports accessed by the device when the device is searched again. If the field value corresponding to the USB port to which the D1 device is connected is smaller than the field value corresponding to the USB port to which the D0 device is connected, the system may determine that the newly connected device is also the D0 device, however, in order to ensure data communication of the original D0 device, the index identifier and the device description name of the original D0 device are still retained, which is equivalent to that there are two D0 devices at this time, and the system may not distinguish the two D0 devices, which may cause a data communication error.
In order to solve the above problem, the above configuration manner according to this embodiment specifically includes: when the D1 device is disconnected and reconnected, a temporary device description name may be saved when the device is searched for the first time, then when the device is searched for the second time, the device description name a generated corresponding to the "new D1 device" is compared with the device description name B generated corresponding to the original D0 device when the device is accessed, if a is the same as B, the "new D1 device" is the original D0 device, and at this time, the device description name a is also given to the "new D1 device", which may result in the system finally searching and configuring to obtain two D0 devices (since the original D0 device is not disconnected, the index identifier and the device description name thereof are still retained), so in order to distinguish, the temporary device description name is given to the "new D1 device", and since the temporary device description name is different from the device description names a and B, the occurrence of a situation that the system finally searches and configures to obtain two D0 devices may be avoided. If A is different from B, which is equivalent to a new D1 device, and the original D0 device are different, the purpose of distinguishing can be achieved by giving the device description name A to the new D1 device.
Through the configuration mode, the problem can be prevented from occurring, and the same dynamic password lock equipment can be accurately distinguished subsequently. Therefore, different devices can be controlled respectively, all the devices cannot be restarted due to the fact that one device is disconnected, and management and labor division of the dynamic coded lock device are more flexible.
Further optionally, in order to meet more service requirements and improve the accuracy of subsequently distinguishing the same dynamic password lock device, the index identifier may further include a group characteristic, where the group characteristic is used to determine a device type corresponding to the same dynamic password lock device, and correspondingly, the method in this embodiment may further include: if the dynamic password lock equipment is newly accessed, detecting whether the newly accessed dynamic password lock equipment and a plurality of accessed same dynamic password lock equipment have the same PID and VID; if the newly accessed dynamic password lock device and a plurality of accessed same dynamic password lock devices have the same PID and VID, configuring a corresponding target index identifier for the newly accessed dynamic password lock device, wherein the target index identifier is different from the index identifiers corresponding to the same dynamic password lock devices and comprises the same group characteristics.
In this alternative, the device types may be divided according to actual requirements. For example, if there are 5 dynamic password lock devices having the same PID and VID and divided into two groups a and B (e.g., each group corresponds to a different maintenance unit, and each device is labeled with an identifier of its corresponding maintenance unit), when searching and configuring its corresponding index identifier, the corresponding index identifiers are sequentially configured as A1, B2, B3, A4, and B5 according to the search order and the labeled maintenance unit identifiers. Here, the maintenance units of the group a corresponding to the 1 st and 4 th searched devices are explained, and the maintenance units of the group B corresponding to the remaining 3 searched devices are explained. By recording the device data communication log in the mode, which group of devices are abnormal, specifically which device in the group and the like can be found out accurately from the same dynamic password lock devices according to the log. If the device with the same PID and VID is accessed newly, the corresponding index identification can be configured according to the maintenance unit identification marked by the new access device, for example, the index identification can be configured to be A6 when the maintenance unit corresponding to the group A is accessed.
Based on the above description, to further explain the specific implementation process of the above embodiment, taking the example of accessing two identical dynamic password lock devices to a PC, the following application scenarios are given, but not limited thereto:
in order to implement the distinction between two identical dynamic-password-locked devices accessed on the same PC, a device-initiated connection mechanism is first established, which is intended to prepare for reconnection and communication. The method specifically comprises the following steps:
(1) The first dynamic password lock device searched out under the condition that PID and VID are the same is used as an index 0 device (called D0);
(2) A second dynamic password lock device searched out under the condition that the PID and the VID are the same is used as an index 1 device (called D1);
(3) If the device D0 exists, starting the D0, and saving the device description name by using a variable I0 (such as:;
(4) If the device D1 exists in the search result, the device D1 is started, and a variable I1 is used for saving the device to obtain a device description name (such as:, \ \ hid # vid _046D &pid \ c31c &mi00 &7 &b4f3ed2&0&0000# {4D1e55b2-f16f-11cf-88cb-001111000030 });
(5) Two dynamic password lock HID devices, of which "#7&11e158f &0&0000#", "#7&b4f3ed2&0&0000#", are identical and randomly change when different USB ports are accessed, of the two values of (3) and (4) above. It should be noted that, when re-accessing, the D0 device may become the D1 device, the D1 device may also become the D0 device, and it should be considered that only the D0 device is provided when only one dynamic password lock device is accessed.
For example, before the D0 device and the D1 device are not disconnected, field values in device description names correspondingly generated by accessing the USB port are "#7&11e158f &0&0000#", "#7&b4f3ed2&0&0000#", respectively, where "11" in the first field value is smaller than "b4" in the second field value. When the D0 device is disconnected and then re-accesses an interface different from the previously inserted USB interface, a field value in a newly generated device description name is "#7&b6e158f &0&0000#", and then after the system re-search is performed according to the sequence of the field values from small to large, "b6" is greater than "b4", the original D1 device becomes the D0 device, and the original D0 device becomes the D1 device; or when the D1 device is disconnected and then re-accesses an interface different from the previously inserted USB interface, and the corresponding field value is "#7 &09158f &0&0000#", after the system re-search, the original D0 device becomes the D1 device, and the original D1 device becomes the D0 device.
In view of the above, a mechanism for disconnection processing reconnection is established with the object of preventing communication errors caused by the PC system reassigning indexes in order to disconnect processing reconnection. The method specifically comprises the following steps:
(a) Starting a thread for reading HID data to monitor whether the D0 equipment is on line or not;
(b) Starting a thread for reading HID data to monitor whether the D1 equipment is on line or not;
(c) And (3) monitoring that the equipment is disconnected, adopting an object-oriented processing mode, allocating an equipment variable K value (K0, K1) to each connected object, emptying the corresponding K0 and K1 variables when the connected object is disconnected, synchronously comparing and emptying the corresponding I0 and I1 together correspondingly (if the D0 equipment is disconnected when the K0 is emptied, the corresponding I0 is also emptied together), returning to the step (3) again to perform connection processing, and judging whether the disconnected object is D1. If the device is disconnected, a variable TEMP is stored when the device is searched for the first time, which is used for storing a temporary device description name, two identical devices search a second result, and the device description name a corresponding to the current D1 in the second result is compared with the device description name B corresponding to the I0 obtained in the above (3), if the two identical devices are identical, it is indicated that the current D1 device is the original D0 device, and at this time, the device description name a is also given to the current D1 device, which may cause the system to finally search and configure to obtain two D0 devices (since the original D0 device is not disconnected, the index identifier and the device description name thereof are still retained), so the temporary device description name stored by the TEMP is given to the current D1, and since the temporary device description name is different from the device description names a and B, the occurrence of the situation that the system finally searches and configures to obtain two D0 devices can be avoided. If A is different from B, which means that the current D1 device is different from the original D0 device, the purpose of distinguishing can be achieved by giving the device description name A to the current D1 device.
If the disconnection is D0, after two searches, when the device is searched for the second time, a variable TEMP is saved for saving the temporary device description name. The device description name C corresponding to the current D0 in the first result is compared with the device description name D corresponding to the I1 obtained in (4), if the two device description names are the same, it is indicated that the current D0 device is the original D1 device, and at this time, the device description name C is also given to the current D0 device, which may cause the system to finally search and configure to obtain two D1 devices (since the original D1 device is not disconnected, the index identifier and the device description name thereof are still retained), so the temporary device description name stored in the TEMP is given to the current D0, and since the temporary device description name is different from the device description names C and D, the occurrence of a situation that the system finally searches and configures to obtain two D1 devices may be avoided. If C is different from D, which is equivalent to that the current D0 device is different from the original D1 device, the purpose of distinguishing can be achieved by giving the device description name C to the current D0 device.
And finally, establishing a communication mechanism, wherein the purpose is to achieve the purpose of achieving the communication mechanism that two same dynamic password lock devices do not interfere with each other. It should be noted that the communication mechanism needs to be executed after the devices start the connection mechanisms (1) to (5) and the disconnection processing reconnection mechanisms (a) to (c) are established. As shown in fig. 3, specifically, when sending data, the client supports multithread transceiving, and then forwards the upload data of the dynamic password lock device to the server; the message replied by the server side is replied to the corresponding dynamic password lock through the indexes I0 and I1 of the client side, so that the message sending error can be effectively prevented, and the condition of serial connection of the messages can not occur. The overall system communication architecture is shown in fig. 4.
Based on the example process, the method is equivalent to providing a dynamic password lock method supporting two same USB connections in the same PC, so that one PC can be simultaneously connected with a plurality of same dynamic password locks (HID devices), and the problem that data possibly generated in communication data transmission caused by unplugging and plugging a USB line is transmitted to the HID devices which do not correspond to each other is solved. The dynamic password lock (HID device) is produced without burning different firmware for each dynamic password lock to distinguish the PID, VID or device descriptor of the HID device. The production time can not be additionally increased during production, the labor cost is saved, and the production efficiency is improved.
Further, as a specific implementation of the method shown in fig. 1, this embodiment provides a processing apparatus accessing the same device, and as shown in fig. 5, the apparatus includes: a determination module 31, an initiation module 32, and a communication module 33.
The determining module 31 is configured to, when determining to access a plurality of identical dynamic password lock devices according to PIDs and VIDs corresponding to the dynamic password lock devices, respectively configure index identifiers corresponding to the identical dynamic password lock devices, where the index identifiers are different from each other;
a starting module 32 operable to start the plurality of identical dynamic password lock devices;
and the communication module 33 may be configured to distinguish the plurality of identical dynamic password lock devices by using the index identifier to perform data communication.
In a specific application scenario, the communication module 33 is specifically configured to configure device description names corresponding to the multiple same dynamic password lock devices, where the device description names corresponding to the same dynamic password lock devices accessing different USB interfaces are different; and distinguishing the same dynamic password lock devices for data communication by using the index identification and the device description name.
In a specific application scenario, the determining module 31 may be specifically configured to search for dynamic password lock devices with the same PID and VID; and then, according to the sequence of the search results, accumulating and configuring the index identifications corresponding to the searched dynamic coded lock devices with the same PID and VID.
In a specific application scenario, as shown in fig. 6, the apparatus may further include: a listening module 34;
a monitoring module 34, configured to configure device variable values for the dynamic password lock devices corresponding to the index identifiers, respectively, start a thread for reading HID data of a human interface device, and monitor whether the dynamic password lock devices corresponding to the index identifiers are online, where the device variable values corresponding to the dynamic password lock devices are cleared when the dynamic password lock devices are disconnected;
the determining module 31 may be further configured to determine, if it is monitored that there is a device disconnection, a dynamic password lock device that is disconnected among the plurality of same dynamic password lock devices according to the cleared device variable value.
In a specific application scenario, the determining module 31 may be further configured to search for a dynamic password lock device with the same PID and VID again after the disconnected dynamic password lock device is reconnected, and reconfigure an index identifier and a device description name corresponding to each of the dynamic password lock devices with the same PID and VID.
In a specific application scenario, if the number of the dynamic password lock devices with the same PID and VID is two, the determining module 31 may be further specifically configured to, if the disconnected dynamic password lock device is a second searched dynamic password lock device when two dynamic password lock devices with the same PID and VID are accessed at the last time, store the temporary device description name when the dynamic password lock device is searched for the first time in the process of re-searching the two dynamic password lock devices; when the dynamic password lock equipment is searched for the second time, comparing a first target equipment description name configured by the dynamic password lock equipment searched for the second time with a second target equipment description name configured by the dynamic password lock equipment searched for the first time when the two dynamic password lock equipment are accessed for the last time, wherein the temporary equipment description name is different from the first target equipment description name; if the first target device description name is the same as the second target device description name, the temporary device description name is configured to the current searched dynamic password lock device for the second time instead of the first target device description name; and if the first target device description name is different from the second target device description name, determining to configure the first target device description name to the current second searched dynamic password lock device.
In a specific application scenario, optionally, the index identifier includes a group feature, and the group feature is used to determine a device type corresponding to the same dynamic password lock device; correspondingly, the device can also comprise: a detection module 35;
the detecting module 35 is configured to detect, if a dynamic password lock device is newly accessed, whether the newly accessed dynamic password lock device has the same PID and VID as a plurality of identical dynamic password lock devices that have been accessed;
the determining module 31 may be further configured to configure a corresponding target index identifier for the newly accessed dynamic password lock device if the newly accessed dynamic password lock device and the accessed multiple same dynamic password lock devices have the same PID and VID, where the target index identifier is different from the index identifiers corresponding to the multiple same dynamic password lock devices and includes the same group characteristics.
It should be noted that other corresponding descriptions of the functional units related to the processing apparatus accessing the same device provided in this embodiment may refer to the corresponding descriptions in fig. 1 and fig. 2, and are not described herein again.
Based on the methods shown in fig. 1 and fig. 2, correspondingly, the present embodiment further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the processing method for accessing the same device shown in fig. 1 and fig. 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, and the software product to be identified may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, or the like), and include several instructions to enable a computer device (which may be a personal computer, a server, or a network device, or the like) to execute the method described in the implementation scenarios of the present application.
Based on the method shown in fig. 1 and fig. 2 and the virtual device embodiments shown in fig. 5 and fig. 6, in order to achieve the above object, this embodiment further provides an entity device accessing the same device for processing, which may specifically be a personal computer, a server, a smart phone, a tablet computer, a smart watch, or other network devices, and the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the above processing method for accessing the same device as shown in fig. 1 and 2.
Optionally, the physical device may further include a user interface, a network interface, a camera, radio Frequency (RF) circuitry, a sensor, audio circuitry, a WI-FI module, and so on. The user interface may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
It can be understood by those skilled in the art that the structure of the physical device accessing the same device process provided in this embodiment does not constitute a limitation to the physical device, and may include more or less components, or combine some components, or arrange different components.
The storage medium can also comprise an operating system and a network communication module. The operating system is a program for managing the hardware of the entity device and the software resources to be identified which are accessed to the same device process, and supports the operation of the information processing program and other software and/or programs to be identified. The network communication module is used for realizing communication among components in the storage medium and communication with other hardware and software in the information processing entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. By applying the technical scheme of the application, one PC can be simultaneously accessed to a plurality of same dynamic coded locks (HID devices), and the problem that data transmission possibly occurring in communication data transmission caused by unplugging and plugging a USB line is transmitted to the HID devices which do not correspond to the USB lines is solved. The dynamic password lock (HID device) is produced without burning different firmware for each dynamic password lock to distinguish the PID, VID or device descriptor of the HID device. The production time can not be additionally increased during production, the labor cost is saved, and the production efficiency is improved.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art can understand that the modules in the device in the implementation scenario may be distributed in the device in the implementation scenario according to the implementation scenario description, and may also be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be considered by those skilled in the art are intended to fall within the scope of the present application.

Claims (8)

1. A processing method for accessing the same device is characterized by comprising the following steps:
when a plurality of same dynamic coded lock devices are determined to be accessed according to product identifiers PID and supplier identifiers VID corresponding to the dynamic coded lock devices, index identifiers corresponding to the same dynamic coded lock devices are respectively configured, wherein the index identifiers are different from one another;
starting the same dynamic password lock devices, and distinguishing the same dynamic password lock devices by using the index identification and the device description name to perform data communication;
if it is monitored that the device disconnection exists, searching the dynamic password lock device again after two identical dynamic password lock devices which are disconnected are reconnected, and reconfiguring the index identification and the device description name which correspond to the two identical dynamic password lock devices, specifically comprising the following processes:
if the disconnected dynamic coded lock device is a second searched dynamic coded lock device when two dynamic coded lock devices with the same PID and VID are accessed last time, in the process of searching the two dynamic coded lock devices again, the temporary device description name is saved when the dynamic coded lock devices are searched for the first time;
when the dynamic password lock equipment is searched for the second time, comparing a first target equipment description name configured by the dynamic password lock equipment searched for the second time with a second target equipment description name configured by the dynamic password lock equipment searched for the first time when the two dynamic password lock equipment are accessed for the last time, wherein the temporary equipment description name is different from the first target equipment description name;
if the first target device description name is the same as the second target device description name, the temporary device description name is configured to the current second searched dynamic password lock device instead of the first target device description name;
and if the first target device description name is different from the second target device description name, determining to configure the first target device description name to the current second searched dynamic password lock device.
2. The method of claim 1, wherein prior to distinguishing the plurality of identical dynamic password lock devices for data communication using the index identification and device description name, the method further comprises:
and configuring device description names corresponding to the same dynamic password lock devices, wherein the device description names corresponding to the same dynamic password lock devices accessed to different USB interfaces are different.
3. The method according to claim 2, wherein configuring respective index identifiers corresponding to the plurality of identical dynamic password lock devices respectively comprises:
searching for dynamic password lock equipment with the same PID and VID;
and according to the sequence of the search results, accumulating and configuring the index identifications corresponding to the searched dynamic coded lock devices with the same PID and VID.
4. The method of claim 3, further comprising:
respectively configuring device variable values for the dynamic password lock devices corresponding to the index identifiers, starting a thread for reading HID data of the human interface devices, and monitoring whether the dynamic password lock devices corresponding to the index identifiers are online or not, wherein the device variable values corresponding to the dynamic password lock devices are emptied when the dynamic password lock devices are disconnected;
and if the condition that the equipment is disconnected is monitored, determining the dynamic password lock equipment disconnected by the same dynamic password lock equipment according to the emptied equipment variable value.
5. The method according to claim 1, wherein the index identifier includes a group characteristic, and the group characteristic is used to determine device types corresponding to the same dynamic password lock device, and the method further includes:
if the dynamic password lock equipment is newly accessed, detecting whether the newly accessed dynamic password lock equipment and a plurality of accessed same dynamic password lock equipment have the same PID and VID;
if the newly accessed dynamic password lock device and the accessed multiple same dynamic password lock devices have the same PID and VID, configuring a corresponding target index identifier for the newly accessed dynamic password lock device, wherein the target index identifier is different from the index identifiers corresponding to the multiple same dynamic password lock devices and contains the same group characteristics.
6. A processing apparatus for accessing the same device, comprising:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for respectively configuring index identifications corresponding to a plurality of same dynamic coded lock devices when determining to access the same dynamic coded lock devices according to product identifications PID and supplier identifications VID corresponding to the dynamic coded lock devices, and the index identifications are different from one another;
the starting module is used for starting the same dynamic password lock devices;
the communication module is used for distinguishing the same dynamic password lock devices by using the index identification and the device description name to carry out data communication;
the determining module is further configured to, if it is monitored that there is a disconnection of the device, re-search the dynamic password lock device after two identical dynamic password lock devices disconnected from the device are re-accessed, and re-configure the index identifier and the device description name corresponding to each of the two identical dynamic password lock devices, specifically including the following processes:
if the disconnected dynamic password lock device is a second searched dynamic password lock device when two dynamic password lock devices with the same PID and VID are accessed at the last time, in the process of searching the two dynamic password lock devices again, the temporary device description name is stored when the dynamic password lock devices are searched for the first time; when the dynamic password lock equipment is searched for the second time, comparing a first target equipment description name configured by the dynamic password lock equipment searched for the second time with a second target equipment description name configured by the dynamic password lock equipment searched for the first time when the two dynamic password lock equipment are accessed for the last time, wherein the temporary equipment description name is different from the first target equipment description name; if the first target device description name is the same as the second target device description name, the temporary device description name is configured to the current second searched dynamic password lock device instead of the first target device description name; and if the first target device description name is different from the second target device description name, determining to configure the first target device description name to the current second searched dynamic password lock device.
7. A storage medium on which a computer program is stored, characterized in that the program, when executed by a processor, implements the processing method of any one of claims 1 to 5 for accessing the same.
8. A processing device accessing the same device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the processing method accessing the same device according to any one of claims 1 to 5 when executing the program.
CN201910656433.5A 2019-07-19 2019-07-19 Processing method, device and equipment for accessing same equipment Active CN112330845B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910656433.5A CN112330845B (en) 2019-07-19 2019-07-19 Processing method, device and equipment for accessing same equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910656433.5A CN112330845B (en) 2019-07-19 2019-07-19 Processing method, device and equipment for accessing same equipment

Publications (2)

Publication Number Publication Date
CN112330845A CN112330845A (en) 2021-02-05
CN112330845B true CN112330845B (en) 2023-01-24

Family

ID=74319438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910656433.5A Active CN112330845B (en) 2019-07-19 2019-07-19 Processing method, device and equipment for accessing same equipment

Country Status (1)

Country Link
CN (1) CN112330845B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101573876A (en) * 2006-05-23 2009-11-04 斯通斯迪壹有限公司 System and method for multi-radio control
CN103748569A (en) * 2011-06-27 2014-04-23 施耐德电气It公司 System and methods for driverless operation of USB device
CN109151010A (en) * 2018-08-09 2019-01-04 北京小米移动软件有限公司 Method for connecting network, device and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7009982B2 (en) * 1999-07-14 2006-03-07 Ericsson Inc. Combining narrowband applications with broadband transport
CN1941787A (en) * 2005-09-30 2007-04-04 乐金电子(昆山)电脑有限公司 Method for setting tag in A/V network apparatus
US7752029B2 (en) * 2006-06-23 2010-07-06 Kyocera Mita Corporation Method to change USB device descriptors from host to emulate a new device
CN103516587B (en) * 2012-06-30 2017-02-15 北京神州泰岳软件股份有限公司 Instant communication client terminal disconnection reconnection method and device
US20170083468A1 (en) * 2015-09-21 2017-03-23 Qualcomm Incorporated Identifying multiple identical devices on a shared bus
CN106612338A (en) * 2015-10-22 2017-05-03 阿里巴巴集团控股有限公司 Processing method and device of equipment identification information
CN206489559U (en) * 2016-12-08 2017-09-12 侍家(北京)科技有限公司 A kind of USB interface peripheral circuit
CN109495983A (en) * 2018-12-27 2019-03-19 上海乐今通信技术有限公司 A method of it is communicated for multiple equipment of the same race with host computer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101573876A (en) * 2006-05-23 2009-11-04 斯通斯迪壹有限公司 System and method for multi-radio control
CN103748569A (en) * 2011-06-27 2014-04-23 施耐德电气It公司 System and methods for driverless operation of USB device
CN109151010A (en) * 2018-08-09 2019-01-04 北京小米移动软件有限公司 Method for connecting network, device and storage medium

Also Published As

Publication number Publication date
CN112330845A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
CN108549580B (en) Method for automatically deploying Kubernets slave nodes and terminal equipment
US8832089B2 (en) Information processing device, method and server for determining type of electric appliance
US10601647B2 (en) Network configuration system
US9117191B2 (en) Automatic device inventory management for different types of devices
US9654458B1 (en) Unauthorized device detection in a heterogeneous network
US8949482B2 (en) Device management apparatus, device management system, information management method, information management program and recording medium storing the program therein
EP3214891B1 (en) Switching-on method, base station and storage medium
JPWO2006040810A1 (en) Software update program, software update apparatus, and software update method
CN109284140B (en) Configuration method and related equipment
CN102710436A (en) Network equipment management method, device, relative equipment and system
CN110572365A (en) multi-protocol server management method, system, terminal device and storage medium
US10659331B2 (en) Network system, device management method, network device, control method thereof, and non-transitory computer-readable medium
CN110619022B (en) Node detection method, device, equipment and storage medium based on block chain network
US20170235785A1 (en) Systems and Methods for Robust, Incremental Data Ingest of Communications Networks Topology
CN112330845B (en) Processing method, device and equipment for accessing same equipment
JP2005202919A (en) Method and apparatus for limiting access to storage system
CN111651235A (en) Virtual machine set task management method and device
CN115080191B (en) Method, device, equipment and readable medium for managing I2C link
CN109728924A (en) The method and apparatus for obtaining the configuration information of host
US11388061B2 (en) Automated OS networking configuration system
US20150195366A1 (en) Switching device, non-transitory computer readable medium and zoning setting method
CN106470124A (en) A kind of upgrade method of WAP and device
US9652340B2 (en) Computer switching method, computer system, and management computer
JP5464449B2 (en) Method for detecting inconsistency between processing units considering reboot due to failure, shared apparatus, and cluster system
US9270530B1 (en) Managing imaging of multiple computing devices

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
GR01 Patent grant
GR01 Patent grant