CN118075115B - Mounting method of Internet of things equipment, mounting device of Internet of things equipment and medium - Google Patents

Mounting method of Internet of things equipment, mounting device of Internet of things equipment and medium Download PDF

Info

Publication number
CN118075115B
CN118075115B CN202410473899.2A CN202410473899A CN118075115B CN 118075115 B CN118075115 B CN 118075115B CN 202410473899 A CN202410473899 A CN 202410473899A CN 118075115 B CN118075115 B CN 118075115B
Authority
CN
China
Prior art keywords
equipment
internet
things
information
mounting
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
CN202410473899.2A
Other languages
Chinese (zh)
Other versions
CN118075115A (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.)
Hong Kong University Of Science And Technology Guangzhou
Shenzhen Miracle Intelligent Network Co Ltd
Original Assignee
Hong Kong University Of Science And Technology Guangzhou
Shenzhen Miracle Intelligent Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hong Kong University Of Science And Technology Guangzhou, Shenzhen Miracle Intelligent Network Co Ltd filed Critical Hong Kong University Of Science And Technology Guangzhou
Priority to CN202410473899.2A priority Critical patent/CN118075115B/en
Publication of CN118075115A publication Critical patent/CN118075115A/en
Application granted granted Critical
Publication of CN118075115B publication Critical patent/CN118075115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/0836Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability to enhance reliability, e.g. reduce downtime
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4541Directories for service discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a mounting method of internet of things equipment, a mounting device of the internet of things equipment and a medium, wherein the method comprises the following steps: when an interrupt signal of equipment enumeration corresponding to equipment enumeration of equipment of the Internet of things in an equipment enumeration thread is received, acquiring equipment basic information carried by the interrupt signal; reading equipment protocol information corresponding to an equipment protocol library according to the equipment basic information, and initializing the Internet of things equipment based on the equipment protocol information; and when the initialization of the Internet of things equipment is completed and is in a normal state, creating equipment threads and equipment numbers of the Internet of things equipment, and mounting the Internet of things equipment to a user-state catalog. According to the invention, the device basic information is sent to the device hardware abstraction layer module in an interrupt mode, the hardware abstraction layer creates an independent device thread initialization device, allocates device resources, mounts the device to the system, and facilitates a user to operate the device through a system call interface, thereby avoiding poor stability caused by downtime of the device service.

Description

Mounting method of Internet of things equipment, mounting device of Internet of things equipment and medium
Technical Field
The invention relates to the field of internet of things, in particular to a mounting method of internet of things equipment, a mounting device of the internet of things equipment and a medium.
Background
When an internet of things device accesses a system, a corresponding device service is generally required to be created in a system application layer, and then the device application layer enumerates devices directly through a device protocol, initializes the devices, and identifies the devices according to the corresponding protocol. However, since the system application layer is designed to directly provide services for users to solve specific application requirements, the device protocol used in the system application layer can only provide an application layer private interface to operate the device, so that specific application requirements are solved, and the underlying call, that is, the standardized system call interface, cannot be provided.
Therefore, the system application layer enumeration and identification equipment cannot provide a standardized system equipment call interface, so that the enumeration and identification process of the equipment depends on application layer equipment service, and when equipment service is down, the system cannot identify the equipment, and further cannot provide the equipment service, so that the system stability is poor.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a mounting method of internet of things equipment, a mounting device of the internet of things equipment and a medium, and solves the problem of poor system stability caused by equipment service downtime in the prior art.
In order to achieve the above object, the present invention provides a method for mounting an internet of things device, the method comprising the following steps:
When an interrupt signal of equipment enumeration corresponding to equipment enumeration of equipment of the Internet of things in an equipment enumeration thread is received, acquiring equipment basic information carried by the interrupt signal;
reading equipment protocol information corresponding to an equipment protocol library according to the equipment basic information, and initializing the Internet of things equipment based on the equipment protocol information;
And when the initialization of the Internet of things equipment is completed and is in a normal state, creating equipment threads and equipment numbers of the Internet of things equipment, and mounting the Internet of things equipment to a user-state catalog.
Optionally, before the step of obtaining the device basic information carried by the interrupt signal when the interrupt signal of the device enumeration corresponding to the device enumeration thread is received by the device of the internet of things, the method further includes:
starting the device enumeration thread, reading the device content of a device protocol library based on the device enumeration thread, and taking the device corresponding to the device content as enumerated device;
Polling whether the access information of the device exists at present or not through the hardware interface service layer;
When the equipment access information exists, equipment information corresponding to the access information is read, and when equipment corresponding to the access information is not successfully enumerated, the interrupt signal is generated and sent;
And when the equipment access information does not exist, skipping to execute the step of reading the equipment content of the equipment protocol library based on the equipment enumeration thread, and taking the equipment corresponding to the equipment content as enumerated equipment.
Optionally, when the device access information exists, reading device information corresponding to the access information, and when the device corresponding to the access information is not successfully enumerated, generating and sending the interrupt signal includes:
when the equipment access information exists, equipment information corresponding to the access information is read;
and when the equipment is not the enumerated equipment, judging that the equipment is not enumerated successfully, generating the interrupt signal corresponding to the equipment of the Internet of things, and sending the interrupt signal to a hardware abstraction layer, wherein when the equipment is not enumerated successfully, the equipment is the equipment of the Internet of things.
Optionally, after the step of periodically polling whether the access information of the device exists at present through the hardware interface service layer, the method further includes:
when the equipment access information exists, equipment information corresponding to the access information is read;
and when the equipment is the enumerated equipment, judging that the equipment is enumerated successfully, skipping and executing the step of reading the equipment content of the equipment protocol library based on the equipment enumeration thread, and taking the equipment corresponding to the equipment content as the enumerated equipment.
Optionally, the step of reading device protocol information corresponding to the device protocol library according to the device basic information, and initializing the internet of things device based on the device protocol information includes:
Taking the basic information of the equipment as a query condition, and reading the equipment protocol information corresponding to the equipment protocol library;
and determining an equipment initialization instance corresponding to the equipment protocol information, and initializing the Internet of things equipment according to the equipment initialization instance.
Optionally, after the step of reading the device protocol information corresponding to the device protocol library according to the device basic information and initializing the internet of things device based on the device protocol information, the method further includes:
determining object model information of the Internet of things equipment according to the basic equipment information, wherein the object model information comprises equipment attributes, services, events and interaction protocols;
Determining a function of the object model information according to the attribute, the service, the event and the interaction protocol, and performing scheduling test based on the function;
and when the scheduling test result is normal, judging and determining that the Internet of things equipment is in a normal state.
Optionally, the step of determining the function of the object model information according to the attribute, the service, the event and the interaction protocol, and performing the scheduling test based on the function includes:
a function of determining the object model information according to the attribute, the service, the event, and the interaction protocol;
Generating a test scheduling method or a test scheduling instance based on the function, and testing the function according to the test scheduling method or the test scheduling instance to obtain test data;
Comparing the test data with target data corresponding to the function, and generating a normal result of the equipment when the comparison result is passing;
and when the comparison result is that the device fails, generating a result of equipment abnormality.
Optionally, when the initializing of the internet of things device is completed and in a normal state, the step of creating a device thread and a device number of the internet of things device and mounting the internet of things device to a user state directory includes:
When the initialization of the Internet of things equipment is completed and is in a normal state, determining the equipment type of the Internet of things equipment, and distributing a main equipment number and a secondary equipment number based on the equipment type;
and registering a device driver based on the primary device number and the secondary device number, and mounting the Internet of things device to the user state directory.
In addition, in order to achieve the above purpose, the invention also provides a mounting device of the internet of things device, the device comprises a memory, a processor and a mounting program of the internet of things device, wherein the mounting program of the internet of things device is stored in the memory and can run on the processor, and the mounting method of the internet of things device is implemented when the mounting program of the internet of things device is executed by the processor.
In addition, in order to achieve the above object, the present invention further provides a computer readable storage medium, on which a mounting program of an internet of things device is stored, where the steps of the mounting method of the internet of things device as described above are implemented when the mounting program of the internet of things device is executed by a processor.
The embodiment of the invention provides a mounting method of Internet of things equipment, a mounting device of Internet of things equipment and a medium, wherein when an interrupt signal which is not recorded by corresponding equipment in an equipment enumeration thread of the Internet of things equipment is received, equipment basic information carried by the interrupt signal is acquired, then corresponding equipment protocol information in an equipment protocol library is read according to the equipment basic information, the Internet of things equipment is initialized according to the equipment protocol information, and finally, when the initialization of the Internet of things equipment is completed and is in a normal state, the equipment thread and equipment number of the Internet of things equipment are created, and the Internet of things equipment is mounted in a user state catalog. Based on the method, the user can operate the Internet of things equipment through the system call interface without operating the equipment based on the application layer private interface, so that the condition of poor system stability caused by equipment service downtime can be avoided, and the stability of the system is effectively improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic diagram of a functional module of an application system of a mounting method of an internet of things device according to the present invention;
fig. 2 is a flow chart of a first embodiment of a mounting method of the internet of things device according to the present invention;
fig. 3 is a flow chart of a second embodiment of the mounting method of the internet of things device according to the present invention;
fig. 4 is a flow chart of a third embodiment of a mounting method of the internet of things device according to the present invention;
Fig. 5 is a flow chart of a fourth embodiment of the mounting method of the internet of things device according to the present invention;
Fig. 6 is a schematic diagram of a terminal hardware structure of each embodiment of the mounting method of the internet of things device according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
First embodiment
In this embodiment, in the mounting method of the internet of things device according to the present invention, the functional modules of the application system are shown in fig. 1, and mainly include three modules, namely, a device enumeration thread module, a hardware abstraction layer module, and a hardware interface service layer module, where device enumeration refers to a process of acquiring device basic information through a device instruction, determining a device type, and loading a suitable driver. Device enumeration threads refer to specialized threads in computer systems that handle device enumeration processes, in USB (Universal Serial Bus ) systems when a USB device is connected to a USB host, the host needs to identify the device and load the appropriate driver through the enumeration process. The device enumeration thread module belongs to a kernel mode of a built-in system, can read a device protocol library, and simultaneously reads the device information of the third-party Internet of things at fixed time through a hardware interface service layer, and sends out a software interrupt signal after the device information is successfully read, wherein the interrupt signal carries the device basic information. The hardware abstraction layer can receive the device basic information carried in the interrupt signal after receiving the interrupt signal sent by the device enumeration thread, read the corresponding device object model information according to the device protocol information corresponding to the device basic information reading device protocol library, finally initialize the device and verify whether the device is legal according to the device protocol, create the device number (primary device number and secondary device number) after the verification is completed, and mount the device under the user mode "/dev" directory. The hardware interface service layer provides basic device communication protocols such as rs485, modbusRTU, http, mqtt, tcp, udp, sip, rtsp and the like.
Specifically, referring to fig. 2, the method for mounting the internet of things device of the present invention includes the steps of:
step S10, when an interrupt signal of equipment enumeration corresponding to equipment enumeration of the equipment of the Internet of things in an equipment enumeration thread is received, acquiring equipment basic information carried by the interrupt signal;
An internet of things device refers to a non-standard computing device capable of connecting to a network and having data transfer capabilities. In this embodiment, the internet of things device refers to a device that does not perform device enumeration or fails enumeration at the system application layer. Thus, it can be appreciated that the internet of things device that has completed device enumeration and has access to the network system is the successfully enumerated device.
When the internet of things device accesses a new network system, a corresponding device service is generally created at a system application layer, and the device application layer service enumerates devices and initializes the devices directly through a device protocol, and identifies the devices according to the corresponding protocol. Because the device enumeration process is customized, the corresponding device interface is provided by the kernel of the operating system, that is, the device protocol can only provide the application layer private interface operating device, and can not provide the standardized system call interface operating device, when the device service is down, the internet of things device can not be used continuously, and the system stability is poor.
Based on this, in order to improve system stability, in this embodiment, when an internet of things device accesses to a network system, it needs to determine, through a device enumeration thread, whether the internet of things device is a device that has completed device enumeration, so that when the internet of things device does not perform device enumeration, the mounting process of the internet of things device is performed on the hardware abstraction layer module, thereby enabling to provide a standardized device system call interface.
Specifically, when the internet of things device is not successfully enumerated, the device enumeration thread generates a device enumeration interrupt signal, wherein the interrupt signal contains device basic information of the internet of things device, such as a device sn (Serial Number), a device firmware version Number and the like, and sends the interrupt signal to the hardware abstraction layer module, so that the hardware abstraction layer module obtains the device basic information carried by the hardware abstraction layer module when receiving the interrupt signal, and then mounts the internet of things device into a user directory according to the device basic information.
It should be noted that in a computer system, an interrupt signal is a mechanism that allows a hardware device to interrupt the execution flow of a central processor when needed to obtain the attention and response of the processor.
Step S20, equipment protocol information corresponding to an equipment protocol library is read according to the equipment basic information, and the equipment of the Internet of things is initialized based on the equipment protocol information;
In this embodiment, the device protocol library includes different device protocol information of a plurality of different devices of the internet of things, where the protocols may be transmission protocols or communication protocols, and the device protocol library may be stored in a cloud platform or a local server. The equipment protocol information needed when different internet of things equipment is accessed into a computer network system is different, so that after the equipment basic information is obtained, the equipment protocol information corresponding to the equipment basic information is read from an equipment protocol library according to the equipment basic information, and the internet of things equipment is initialized and subsequently mounted according to the equipment protocol information, so that a standardized equipment calling interface can be provided, and the stability of the system is improved. In order to complete necessary information authentication processing on the internet of things device, an initialization processing is required in a connection process.
As an optional implementation manner, the device basic information may be used as a query condition, then the device protocol information corresponding to the device protocol library is read, then when an initialization process is performed, a device initialization instance corresponding to the device protocol information is determined first, and the internet of things device is initialized according to the device initialization instance. By initializing the Internet of things equipment, the efficiency of mounting the Internet of things equipment can be effectively improved.
Step S30, when the initialization of the Internet of things equipment is completed and the equipment is in a normal state, equipment threads and equipment numbers of the Internet of things equipment are created, and the Internet of things equipment is mounted to a user-state catalog.
In this embodiment, when the initialization of the internet of things device is completed, and each scheduling function of the internet of things device is normal, that is, in a normal state, it is stated that the internet of things device can be applied to a computer network system, and in order to ensure that the internet of things device can be accurately connected to an internet of things platform corresponding to the computer network system and correctly identified and managed by the platform, a device thread and a device number of the internet of things device need to be created. The device number is a unique identifier of the internet of things device and is used for distinguishing each device on the internet of things platform, and the unique identifier is a basis for device access and communication, so that the platform can accurately identify data and instructions from specific devices. The device threads are logical channels for the devices to communicate with the platform of the internet of things, and each device thread represents a connection between the device and the platform, and through the device threads, the device of the internet of things can send data to the platform and can also receive commands from the platform. And the device thread is created, so that the efficient communication between the device and the platform can be realized, and meanwhile, the device thread allows the platform to process the connection requests of a plurality of devices at the same time, thereby improving the concurrent processing capacity of the computer network system.
The user-state directory may be a "/dev" directory under which user-state programs are allowed to perform operations such as disk reading and writing, serial access, etc. Based on the above, the device protocol information of the internet of things device is built in a system kernel mode, and the user mode application service can operate and read and write the device information through a system standard calling interface. The device is enumerated, identified and mounted through the hardware abstraction layer module and the device enumeration thread, the use difficulty of the device is reduced, the application layer service is enabled to be noninductive in the use process, namely, the operation on the application layer is not needed, and a user can directly operate the internet of things device in a system calling mode, so that the stability of a computer network system is improved.
In an optional implementation manner of mounting the internet of things device to the user-state directory, when the initialization of the internet of things device is completed and the internet of things device is in a normal state, a device type of the internet of things device is determined, a primary device number and a secondary device number are allocated based on the device type, then a device driver is registered based on the primary device number and the secondary device number, and the internet of things device is mounted to the user-state directory. The registration processing of the device driver is carried out through the main device number and the secondary device number, so that the device driver can be called according to a standardized system call interface, and further the Internet of things device can be called according to the device driver, and the stability of a computer network system is improved.
According to the technical scheme disclosed by the embodiment, when the interrupt signal corresponding to the Internet of things equipment is received, the equipment basic information carried by the interrupt signal can be obtained, then the equipment protocol information for carrying out equipment initialization processing is queried by taking the equipment basic information as a query condition, finally when the initialization of the Internet of things equipment is completed and is in a normal state, the Internet of things equipment is mounted in a user state directory, based on the equipment protocol information, enumeration, identification and mounting are carried out through a hardware abstraction layer module and an equipment enumeration thread, the equipment use difficulty is reduced, the application layer service is enabled to be insensitive in the use process, namely the operation on the application layer is not needed, and a user can directly operate the Internet of things equipment in a system call mode, so that the stability of a computer network system is improved.
Second embodiment
Referring to fig. 3, according to the first embodiment, step S10 further includes:
Step S40, starting the device enumeration thread, reading the device content of a device protocol library based on the device enumeration thread, and taking the device corresponding to the device content as enumerated device;
Step S50, the access information of the equipment is polled through the hardware interface service layer at regular time;
In this embodiment, before the device enumeration of the internet of things device is performed, a device enumeration thread needs to be started first, and then device information, which is stored in a current device protocol library and is successfully enumerated, is read by the device enumeration thread, so as to determine whether the device enumeration of the internet of things device is successful or not according to the enumerated device.
After the device enumeration thread is started, the access information of the device is checked through the timing polling of the hardware interface service layer, so as to judge whether a new Internet of things device is accessed into the current network system according to the access information.
Step S60, when the equipment access information exists, equipment information corresponding to the access information is read, and when equipment corresponding to the access information is not successfully enumerated, the interrupt signal is generated and sent.
In this embodiment, as an optional implementation manner, when the device access information exists, the device information corresponding to the access information is read, and then whether the device is an enumerated device is determined. And when the equipment is not the enumerated equipment, judging that the equipment is not enumerated successfully, generating the interrupt signal corresponding to the equipment of the Internet of things, and sending the interrupt signal to a hardware abstraction layer, wherein when the equipment is not enumerated successfully, the equipment is the equipment of the Internet of things. Based on the method, the access information of the equipment is polled regularly, the equipment is used as the equipment of the Internet of things when the equipment is not enumerated successfully, and an interrupt signal is generated and sent to a hardware abstraction layer so as to initialize and mount the equipment of the Internet of things, thereby improving the stability of a computer network system. When judging whether the device is an enumerated device, a judging function can be called, and whether the device is the enumerated device is judged according to the result of function feedback.
In addition, in another alternative implementation manner, when the device access information exists, the device information corresponding to the access information is read, and then whether the device is an enumerated device is judged. And when the equipment is the enumerated equipment, judging that the equipment is enumerated successfully, skipping and executing the step of reading the equipment content of the equipment protocol library based on the equipment enumeration thread, and taking the equipment corresponding to the equipment content as the enumerated equipment. Therefore, the successfully enumerated equipment is prevented from being mounted in the user state directory, and the utilization rate of system resources is improved.
Optionally, when the device access information does not exist, the step of reading the device content of the device protocol library based on the device enumeration thread and taking the device corresponding to the device content as an enumerated device may be skipped.
In the technical scheme disclosed in this embodiment, after a device enumeration thread is started, device content in a device protocol library is acquired through the device enumeration thread, then enumerated devices in the device protocol library are determined, then whether access information of the devices exists is polled regularly through a hardware interface service layer, and when the access information of the devices exists and the devices are new access devices, interrupt signals are generated and sent to a hardware abstraction layer, so that initialization and mounting processing are performed on the internet of things devices, and stability of a computer network system is improved.
Third embodiment
Referring to fig. 4, after step S20, according to the first embodiment, the method further includes:
Step S70, determining object model information of the Internet of things equipment according to the equipment basic information, wherein the object model information comprises equipment attributes, services, events and interaction protocols;
step S80, determining the function of the object model information according to the attribute, the service, the event and the interaction protocol, and performing scheduling test based on the function;
And step S90, judging and determining that the Internet of things equipment is in a normal state when the scheduling test result is normal.
In this embodiment, in the process of determining whether the internet of things device is in a normal state, the scheduling test of the device may be performed through the object model information of the internet of things device to determine. The object model comprises the attribute, service, time, interaction protocol and the like of the equipment, so that corresponding test examples can be generated according to the information, the functions of the equipment of the Internet of things are tested, and whether the functions are normal or not is judged through the object model.
In an alternative embodiment, the function of the object model information may be determined according to the attribute, the service, the event and the interaction protocol, then a test scheduling method or a test scheduling instance may be generated based on the function, the function may be tested according to the test scheduling method or the test scheduling instance to obtain test data, then the test data may be compared with target data corresponding to the function, when the comparison result is that the device passes, a normal result of the device may be generated, and when the comparison result is that the device does not pass, an abnormal result of the device may be generated. Based on the method, whether the equipment of the Internet of things is normal or not is judged through the information of the object model of the equipment, so that the verification efficiency of the equipment of the Internet of things is improved.
Fourth embodiment
In this embodiment, the implementation flow of mounting the internet of things device to the user state directory may be as shown in fig. 5.
Specifically, based on the functional module diagram of the application system shown in fig. 1, after the device enumeration thread is started, a hardware timer is started based on a hardware interface service layer, the successfully enumerated devices in a device protocol library are read, then access information of the devices is polled regularly, when the devices are accessed, basic information of the devices is read, whether the devices are successfully enumerated is judged according to the basic information of the devices, if yes, the content of the device protocol library is read again, otherwise, an interrupt signal of device enumeration needs to be sent to a hardware abstraction layer, the hardware abstraction layer reads the device protocol information, the device object model information and the like according to the basic information of the devices, the device protocol information is used for initializing the internet of things, the device object model information is used for verifying whether the internet of things is normal, corresponding device threads, device numbers and the like are created when the devices are normal, finally the internet of things is mounted in a user state directory, so that a user can call the internet of things according to a standardized system call interface, and therefore the situation that the internet of things cannot be called when the device service is down is avoided, and the stability of a computer network system is improved.
Referring to fig. 6, fig. 6 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 6, the terminal may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a network interface 1003, a memory 1004. Wherein the communication bus 1002 is used to enable connected communication between these components. The network interface 1003 may optionally include a standard wired interface, a wireless interface (e.g., a wireless FIdelity (WI-FI) interface). The Memory 1004 may be a high-speed RAM Memory (Random Access Memory, RAM) or a stable Non-Volatile Memory (NVM), such as a disk Memory. The memory 1004 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 6 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 6, an operating system, a data storage module, a network communication module, and a program installed on an internet of things device may be included in the memory 1004 as one type of computer storage medium.
In the terminal shown in fig. 6, the network interface 1003 is mainly used for connecting to a background server, and performing data communication with the background server; the processor 1001 may call a mount program of the internet of things device stored in the memory 1004, and perform the following operations:
When an interrupt signal of equipment enumeration corresponding to equipment enumeration of equipment of the Internet of things in an equipment enumeration thread is received, acquiring equipment basic information carried by the interrupt signal;
reading equipment protocol information corresponding to an equipment protocol library according to the equipment basic information, and initializing the Internet of things equipment based on the equipment protocol information;
And when the initialization of the Internet of things equipment is completed and is in a normal state, creating equipment threads and equipment numbers of the Internet of things equipment, and mounting the Internet of things equipment to a user-state catalog.
Further, the processor 1001 may call the mounting program of the internet of things device stored in the memory 1004, and further perform the following operations:
starting the device enumeration thread, reading the device content of a device protocol library based on the device enumeration thread, and taking the device corresponding to the device content as enumerated device;
Polling whether the access information of the device exists at present or not through the hardware interface service layer;
When the equipment access information exists, equipment information corresponding to the access information is read, and when equipment corresponding to the access information is not successfully enumerated, the interrupt signal is generated and sent;
And when the equipment access information does not exist, skipping to execute the step of reading the equipment content of the equipment protocol library based on the equipment enumeration thread, and taking the equipment corresponding to the equipment content as enumerated equipment.
Further, the processor 1001 may call the mounting program of the internet of things device stored in the memory 1004, and further perform the following operations:
when the equipment access information exists, equipment information corresponding to the access information is read;
and when the equipment is not the enumerated equipment, judging that the equipment is not enumerated successfully, generating the interrupt signal corresponding to the equipment of the Internet of things, and sending the interrupt signal to a hardware abstraction layer, wherein when the equipment is not enumerated successfully, the equipment is the equipment of the Internet of things.
Further, the processor 1001 may call the mounting program of the internet of things device stored in the memory 1004, and further perform the following operations:
when the equipment access information exists, equipment information corresponding to the access information is read;
and when the equipment is the enumerated equipment, judging that the equipment is enumerated successfully, skipping and executing the step of reading the equipment content of the equipment protocol library based on the equipment enumeration thread, and taking the equipment corresponding to the equipment content as the enumerated equipment.
Further, the processor 1001 may call the mounting program of the internet of things device stored in the memory 1004, and further perform the following operations:
Taking the basic information of the equipment as a query condition, and reading the equipment protocol information corresponding to the equipment protocol library;
and determining an equipment initialization instance corresponding to the equipment protocol information, and initializing the Internet of things equipment according to the equipment initialization instance.
Further, the processor 1001 may call the mounting program of the internet of things device stored in the memory 1004, and further perform the following operations:
determining object model information of the Internet of things equipment according to the basic equipment information, wherein the object model information comprises equipment attributes, services, events and interaction protocols;
Determining a function of the object model information according to the attribute, the service, the event and the interaction protocol, and performing scheduling test based on the function;
and when the scheduling test result is normal, judging and determining that the Internet of things equipment is in a normal state.
Further, the processor 1001 may call the mounting program of the internet of things device stored in the memory 1004, and further perform the following operations:
a function of determining the object model information according to the attribute, the service, the event, and the interaction protocol;
Generating a test scheduling method or a test scheduling instance based on the function, and testing the function according to the test scheduling method or the test scheduling instance to obtain test data;
Comparing the test data with target data corresponding to the function, and generating a normal result of the equipment when the comparison result is passing;
and when the comparison result is that the device fails, generating a result of equipment abnormality.
Further, the processor 1001 may call the mounting program of the internet of things device stored in the memory 1004, and further perform the following operations:
When the initialization of the Internet of things equipment is completed and is in a normal state, determining the equipment type of the Internet of things equipment, and distributing a main equipment number and a secondary equipment number based on the equipment type;
and registering a device driver based on the primary device number and the secondary device number, and mounting the Internet of things device to the user state directory.
Furthermore, it will be appreciated by those of ordinary skill in the art that implementing all or part of the processes in the methods of the above embodiments may be accomplished by computer programs to instruct related hardware. The computer program comprises program instructions, and the computer program may be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the control terminal to carry out the flow steps of the embodiments of the method described above.
Therefore, the present invention also provides a computer readable storage medium, where a mounting program of an internet of things device is stored, where each step of the mounting method of the internet of things device described in the above embodiment is implemented when the mounting program of the internet of things device is executed by a processor.
It should be noted that, because the storage medium provided in the embodiments of the present application is a storage medium used for implementing the method in the embodiments of the present application, based on the method described in the embodiments of the present application, a person skilled in the art can understand the specific structure and the modification of the storage medium, and therefore, the description thereof is omitted herein. All storage media adopted by the method of the embodiment of the application belong to the scope of protection of the application.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (8)

1. The method for mounting the Internet of things equipment is characterized by comprising the following steps of:
Starting a device enumeration thread, reading device content of a device protocol library based on the device enumeration thread, and taking a device corresponding to the device content as enumerated device;
Polling whether the access information of the device exists at present or not through the hardware interface service layer;
When the access information exists, reading equipment information corresponding to the access information; when the equipment is not enumerated equipment, judging that the equipment is not enumerated successfully, generating an interrupt signal corresponding to the equipment of the Internet of things, and sending the interrupt signal to a hardware abstraction layer;
when the access information does not exist, executing the step of reading the equipment content of the equipment protocol library based on the equipment enumeration thread, and taking the equipment corresponding to the equipment content as enumerated equipment;
when the interrupt signal of the corresponding equipment enumeration of the equipment enumeration thread of the equipment of the Internet of things is received, acquiring the equipment basic information carried by the interrupt signal;
reading equipment protocol information corresponding to an equipment protocol library according to the equipment basic information, and initializing the Internet of things equipment based on the equipment protocol information;
And when the initialization of the Internet of things equipment is completed and is in a normal state, creating equipment threads and equipment numbers of the Internet of things equipment, and mounting the Internet of things equipment to a user-state catalog.
2. The method for mounting an internet of things device according to claim 1, wherein after the step of reading device information corresponding to the access information when the access information exists, the method further comprises:
and when the equipment is enumerated equipment, judging that the equipment is enumerated successfully, skipping and executing the step of reading equipment content of an equipment protocol library based on the equipment enumeration thread, and taking the equipment corresponding to the equipment content as the enumerated equipment.
3. The method for mounting an internet of things device according to claim 1, wherein the step of reading device protocol information corresponding to a device protocol library according to the device basic information and initializing the internet of things device based on the device protocol information comprises:
Taking the basic information of the equipment as a query condition, and reading the equipment protocol information corresponding to the equipment protocol library;
and determining an equipment initialization instance corresponding to the equipment protocol information, and initializing the Internet of things equipment according to the equipment initialization instance.
4. The method for mounting an internet of things device according to claim 1, wherein after the step of reading device protocol information corresponding to the device base information and initializing the internet of things device based on the device protocol information, the method further comprises:
determining object model information of the Internet of things equipment according to the basic equipment information, wherein the object model information comprises equipment attributes, services, events and interaction protocols;
Determining a function of the object model information according to the attribute, the service, the event and the interaction protocol, and performing scheduling test based on the function;
and when the scheduling test result is normal, judging and determining that the Internet of things equipment is in a normal state.
5. The method for mounting an internet of things device according to claim 4, wherein the step of determining the function of the object model information according to the attribute, the service, the event, and the interaction protocol and performing the scheduling test based on the function comprises:
a function of determining the object model information according to the attribute, the service, the event, and the interaction protocol;
Generating a test scheduling method or a test scheduling instance based on the function, and testing the function according to the test scheduling method or the test scheduling instance to obtain test data;
Comparing the test data with target data corresponding to the function, and generating a normal result of the equipment when the comparison result is passing;
and when the comparison result is that the device fails, generating a result of equipment abnormality.
6. The method for mounting an internet of things device according to claim 1, wherein the step of creating a device thread and a device number of the internet of things device and mounting the internet of things device to a user-state directory when the initializing of the internet of things device is completed and in a normal state comprises:
When the initialization of the Internet of things equipment is completed and is in a normal state, determining the equipment type of the Internet of things equipment, and distributing a main equipment number and a secondary equipment number based on the equipment type;
and registering a device driver based on the primary device number and the secondary device number, and mounting the Internet of things device to the user state directory.
7. Mounting device of thing networking equipment, its characterized in that, the device includes: the method for mounting the internet of things device comprises a memory, a processor and a mounting program of the internet of things device, wherein the mounting program of the internet of things device is stored in the memory and can run on the processor, and the steps of the method for mounting the internet of things device according to any one of claims 1 to 6 are realized when the mounting program of the internet of things device is executed by the processor.
8. A computer-readable storage medium, wherein a mounting program of an internet of things device is stored on the computer-readable storage medium, and the mounting program of the internet of things device, when executed by a processor, implements the steps of the mounting method of the internet of things device according to any one of claims 1 to 6.
CN202410473899.2A 2024-04-19 2024-04-19 Mounting method of Internet of things equipment, mounting device of Internet of things equipment and medium Active CN118075115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410473899.2A CN118075115B (en) 2024-04-19 2024-04-19 Mounting method of Internet of things equipment, mounting device of Internet of things equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410473899.2A CN118075115B (en) 2024-04-19 2024-04-19 Mounting method of Internet of things equipment, mounting device of Internet of things equipment and medium

Publications (2)

Publication Number Publication Date
CN118075115A CN118075115A (en) 2024-05-24
CN118075115B true CN118075115B (en) 2024-07-09

Family

ID=91097614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410473899.2A Active CN118075115B (en) 2024-04-19 2024-04-19 Mounting method of Internet of things equipment, mounting device of Internet of things equipment and medium

Country Status (1)

Country Link
CN (1) CN118075115B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115905095A (en) * 2022-10-31 2023-04-04 深圳市广和通无线股份有限公司 USB drive-free communication method, device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6907482B2 (en) * 2001-12-13 2005-06-14 Microsoft Corporation Universal graphic adapter for interfacing with hardware and means for encapsulating and abstracting details of the hardware
US8850082B2 (en) * 2010-08-30 2014-09-30 Qualcomm Incorporated Virtual USB compound device enumeration
CN116436794A (en) * 2023-02-28 2023-07-14 杭州指令集智能科技有限公司 OPC real-time data integration and control method based on Internet of things model
CN116886749A (en) * 2023-07-31 2023-10-13 联想(北京)有限公司 Connection method, connection device and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115905095A (en) * 2022-10-31 2023-04-04 深圳市广和通无线股份有限公司 USB drive-free communication method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN118075115A (en) 2024-05-24

Similar Documents

Publication Publication Date Title
US7334162B1 (en) Dynamic distribution of test execution
CN108984389B (en) Application program testing method and terminal equipment
CN113419747B (en) Middleware deployment method, device, equipment and storage medium
CN113672441B (en) Method and device for testing intelligent equipment
CN115328752B (en) Cluster simulation method and system for Kubernetes control plane test
CN111190810A (en) Method, device, server and storage medium for executing test task
CN112269697B (en) Equipment storage performance testing method, system and related device
CN109240914B (en) Monitoring management method for security test task and terminal equipment
CN118075115B (en) Mounting method of Internet of things equipment, mounting device of Internet of things equipment and medium
CN112650677A (en) Interface calling method, device, server and storage medium
CN107688479B (en) Android system network cluster, construction method thereof, and Android system network cluster data processing method and system
CN108829495A (en) Verification method, device, equipment and the storage medium of multiple database modification affairs
CN106330595B (en) Heartbeat detection method and device for distributed platform
CN109039770B (en) Server CMC refreshing method and device and related equipment
CN113672260A (en) CPU initialization method for processor
CN112416750A (en) Application program boundary testing method and system
CN112130900A (en) User information management method, system, equipment and medium for BMC
CN117472516B (en) Virtual resource scheduling method, device, cluster system, electronic equipment and medium
US20110023018A1 (en) Software platform and method of managing application individuals in the software platform
CN115103020B (en) Data migration processing method and device
CN116089020B (en) Virtual machine operation method, capacity expansion method and capacity expansion system
CN112261051B (en) User registration method, device and system
CN116204402A (en) Script running task scheduling method for user acceptance test and related equipment
CN118244979A (en) NV parameter reading and writing method and device, electronic equipment and computer storage medium
CN117421189A (en) Recording method and device of failure information, storage medium and electronic device

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