CN110971461B - Sensor node configuration method and system based on Internet of things - Google Patents

Sensor node configuration method and system based on Internet of things Download PDF

Info

Publication number
CN110971461B
CN110971461B CN201911245225.2A CN201911245225A CN110971461B CN 110971461 B CN110971461 B CN 110971461B CN 201911245225 A CN201911245225 A CN 201911245225A CN 110971461 B CN110971461 B CN 110971461B
Authority
CN
China
Prior art keywords
sensor
configuration
function
thread
node
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
CN201911245225.2A
Other languages
Chinese (zh)
Other versions
CN110971461A (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.)
Beijing Guolian Video Information Technology Co ltd
Original Assignee
Beijing Guolian Video Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Guolian Video Information Technology Co ltd filed Critical Beijing Guolian Video Information Technology Co ltd
Priority to CN201911245225.2A priority Critical patent/CN110971461B/en
Publication of CN110971461A publication Critical patent/CN110971461A/en
Application granted granted Critical
Publication of CN110971461B publication Critical patent/CN110971461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/0889Techniques to speed-up the configuration process
    • 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/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • 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/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0843Configuration by using pre-existing information, e.g. using templates or copying from other elements based on generic templates
    • 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/0893Assignment of logical groups to network elements
    • 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/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Telephonic Communication Services (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

The invention belongs to the field of software, and provides a sensor node configuration method and a system based on the Internet of things, wherein the method comprises the following steps: the sink node determines the sensor nodes to be subjected to function configuration in the sensor node list; the sink node determines a function number corresponding to the OID identification prefix uploaded by the sensor node; the sink node acquires a sensor configuration script corresponding to the determined function number from the corresponding relation between the pre-stored function number and the sensor configuration script; the sink node sends a function configuration instruction to the sensor node; the sensor node receives the function configuration instruction, reads the sensor configuration script, runs the read sensor configuration script, and generates and uploads the running result of the sensor configuration script; and the sink node determines the configuration result of the sensor node under the sensor configuration script according to the operation result. The invention can configure the corresponding function of the application field for the sensor node, and is beneficial to improving the function configuration efficiency of the sensor.

Description

Sensor node configuration method and system based on Internet of things
Technical Field
The invention relates to the field of software, in particular to a sensor node configuration method and system based on the Internet of things.
Background
The sensor node is a miniature embedded device, and the tip of the sensor node can sense and check the external world. The sensor node needs to complete various tasks such as acquisition and conversion of monitoring data, management and processing of data, response of task requests of the sink node, node control and the like.
However, the existing sensor node configuration method cannot configure the sensor node with a corresponding function according to the application field of the sensor node, and the configured function has no pertinence, which is not beneficial to improving the configuration efficiency.
Disclosure of Invention
In view of the above disadvantages of the prior art, an object of the present invention is to provide a method and a system for configuring a sensor node based on the internet of things, which are used to solve the problem that the sensor node configuration method in the prior art cannot configure corresponding functions for the sensor node according to the application field of the sensor node.
In order to achieve the above and other related objects, the present invention provides a sensor node configuration method applied to a sink node and a sensor node of the internet of things, the method including:
the sink node determines the sensor nodes to be subjected to function configuration in the sensor node list;
the sink node acquires an Object Identifier (OID) identification prefix uploaded by the sensor node, and determines a function number corresponding to the OID identification prefix uploaded by the sensor node from a corresponding relation between prestored OID identification prefixes and function numbers;
the sink node acquires a sensor configuration script corresponding to the determined function number from the corresponding relation between the pre-stored function number and the sensor configuration script;
the sink node sends a function configuration instruction to the sensor node, wherein the function configuration instruction is used for triggering a function configuration thread built in the sensor node, and the function configuration instruction carries a function configuration identifier and the sensor configuration script;
the sensor node receives the function configuration instruction, reads the sensor configuration script by using the built-in function configuration thread, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script;
and the sink node acquires the operation result of the sensor configuration script and determines the configuration result of the sensor node under the sensor configuration script according to the operation result.
Further, in the method, the sink node determines the sensor node to be configured with the function in the sensor node list, specifically:
the sink node displays a sensor node list, the sensor node list comprises equipment identifications of sensor nodes communicated with the sink node, a sensor node selection instruction input by a user is received, and the sensor nodes to be configured functionally in the sensor node list are determined according to the sensor node selection instruction.
Further, in the method, the sensor node receives the function configuration instruction, reads the sensor configuration script by using the built-in function configuration thread, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script, specifically:
the sensor node receives the function configuration instruction, runs the function configuration thread through a function configuration identifier in the function configuration instruction, and stores the sensor configuration script to a preset storage unit through a preset transmission channel, so that the function configuration thread can read the sensor configuration script from the preset storage unit and run the read sensor configuration script, and the running result of the sensor configuration script is generated and uploaded.
Further, in the method, the sink node obtains an operation result of the sensor configuration script, and determines a configuration result of the sensor node under the sensor configuration script according to the operation result, specifically:
the sink node acquires the running result of the sensor configuration script, extracts the status code of the running result, determines that the configuration of the sensor node is successful under the sensor configuration script if the status code of the running result is a successful status code, and determines that the configuration of the sensor node is failed under the sensor configuration script if the status code of the running result is a failed status code.
Further, in the method, before the sink node records a first login account, where the first login account is an account of a login script server, and acquires a sensor configuration script corresponding to a determined function number from a correspondence between pre-stored function numbers and sensor configuration scripts, the method further includes:
and the sink node logs in the script server according to the first login account, downloads the sensor configuration script from the script server according to the function number, establishes the corresponding relation between the sensor configuration script and the function number, and stores the sensor configuration script in a storage space.
The invention provides a sensor node configuration system which is applied to a sink node and a sensor node of the Internet of things, wherein the sink node comprises a first determining module, a second determining module, a sensor configuration script acquiring module, a sending module, a generating module and a third determining module;
the first determining module is configured to determine, by the sink node, a sensor node to be configured functionally in the sensor node list;
the second determining module is configured to acquire, by the sink node, an object identifier OID identifier prefix uploaded by the sensor node, and determine, from a correspondence between a prestored OID identifier prefix and a function number, a function number corresponding to the OID identifier prefix uploaded by the sensor node;
the sensor configuration script acquisition module is used for acquiring a sensor configuration script corresponding to the determined function number from the corresponding relationship between the pre-stored function number and the sensor configuration script by the sink node;
the sending module is configured to send a function configuration instruction to the sensor node by the sink node, where the function configuration instruction is used to trigger a function configuration thread built in the sensor node, and the function configuration instruction carries a function configuration identifier and the sensor configuration script;
the generating module is used for the sensor node to receive the function configuration instruction, read the sensor configuration script by using the built-in function configuration thread and run the read sensor configuration script, and generate and upload the running result of the sensor configuration script;
the third determining module is configured to obtain, by the sink node, an operation result of the sensor configuration script, and determine, according to the operation result, a configuration result of the sensor node under the sensor configuration script.
Further, in the system, the first determining module is specifically configured to: the sink node displays a sensor node list, the sensor node list comprises equipment identifications of sensor nodes communicated with the sink node, a sensor node selection instruction input by a user is received, and the sensor nodes to be configured functionally in the sensor node list are determined according to the sensor node selection instruction.
Further, in the system, the generating module is specifically configured to: the sensor node receives the function configuration instruction, runs the function configuration thread through a function configuration identifier in the function configuration instruction, stores the sensor configuration script to a preset storage unit through a preset transmission channel, so that the function configuration thread can read the sensor configuration script from the preset storage unit and run the read sensor configuration script, and generates and uploads a running result of the sensor configuration script.
Further, in the system, the third determining module is specifically configured to: the sink node acquires the operation result of the sensor configuration script, extracts the state code of the operation result, determines that the configuration of the sensor node is successful under the sensor configuration script if the state code of the operation result is a successful state code, and determines that the configuration of the sensor node is failed under the sensor configuration script if the state code of the operation result is a failed state code.
Further, in the system, the sink node further includes:
and the storage module is used for logging in the script server by the sink node according to the first login account, downloading the sensor configuration script from the script server according to the function number, establishing a corresponding relation between the sensor configuration script and the function number, and storing the sensor configuration script into a storage space.
As described above, the sensor node configuration method and system based on the internet of things of the present invention have the following beneficial effects: the sensor node can be configured with the function corresponding to the application field according to the application field of the sensor node, and the function configuration efficiency of the sensor is improved.
Drawings
Fig. 1 is a schematic diagram illustrating a method for configuring a sensor node according to the present invention.
Fig. 2 is a schematic diagram of a sensor node configuration system according to the present invention.
Detailed Description
Referring to fig. 1, the present invention provides a sensor node configuration method, applied to a sink node and a sensor node of the internet of things, the method including:
s101, the sink node determines a sensor node to be configured with functions in the sensor node list;
and when the sink node is communicated with the sensor node, acquiring the equipment identifier of the sensor node. Networking and communication between the sensor nodes and the sink node are performed by an access protocol, the access protocol comprises any one of ZigBee, bluetooth, wiFi and LoRa, and the access process is not described herein any more.
Further, S101 specifically includes:
the sink node displays a sensor node list, the sensor node list comprises equipment identifiers of sensor nodes communicated with the sink node, a sensor node selection instruction input by a user is received, and the sensor nodes to be configured in functions in the sensor node list are determined according to the sensor node selection instruction.
The sink node may be externally connected to a display screen, a human-computer interaction interface of the display screen may provide an input box, and a user may input different sensor node selection instructions through the input box, for example, the sensor node selection instruction input by the user may be: select device identification. The device identification is the number of the sensor node or the MAC address of the sensor node.
Wherein the OID identifies a prefix (Object Identifier). The OID identifier prefix represents the application field of the sensor node, and the OID identifier prefixes of the sensor nodes in different application fields are different.
S102, the sink node acquires an Object Identifier (OID) identification prefix uploaded by the sensor node, and determines a function number corresponding to the OID identification prefix uploaded by the sensor node from a pre-stored corresponding relationship between the OID identification prefix and the function number;
it should be noted that: s102, specifically:
the sink node acquires an Object Identifier (OID) identification prefix uploaded by the sensor node, displays a function number corresponding to the OID identification prefix uploaded by the sensor node according to a pre-stored correspondence relationship between the OID identification prefix and the function number, acquires a function number selection instruction input by a user, and determines a function number corresponding to a function configuring the sensor node in the function number corresponding to the OID identification prefix uploaded by the sensor node according to the function number selection instruction.
The sink node may be externally connected to a display screen, a man-machine interaction interface of the display screen may provide an input box, and a user may input different function number selection instructions through the input box, for example, the function number selection instruction input by the user may be: select function number.
It should be noted that: the sink node records a corresponding relationship between a configuration account and a management account, the configuration account is an account registered by a user at the sink node, the management account is an account registered by a user management server, and before S101, the method includes:
step A: the sink node receives an OID identifier prefix to be prestored and the configuration account number, which are sent by a sensor function client, wherein the prestored OID identifier prefix is the OID identifier prefix of a target sensor to be prestored by the sensor function client;
determining whether a function number corresponding to the target sensor is stored in the sink node according to the pre-stored OID identifier prefix;
when it is determined that the function number is not stored in the sink node, determining the management account corresponding to the configuration account;
logging in the management server according to the management account;
downloading the function number from the management server according to the pre-stored OID identification prefix;
and establishing and storing a corresponding relation between the function number and the pre-stored OID identifier prefix.
After the mapping is established for the function numbers corresponding to the pre-stored OID identifier prefixes, other OID identifier prefixes can be manually set, and the process is repeatedly executed, so that the function numbers corresponding to all the OID identifier prefixes can be obtained.
S103, the sink node acquires a sensor configuration script corresponding to the determined function number from the corresponding relationship between the pre-stored function number and the sensor configuration script;
the sensor configuration script is a script for configuring the sensor function, and the content of the script is an instruction for configuring the sensor function. The instructions for configuring the sensor functions are related to the prior art and are not described herein.
After mapping is established for the sensor configuration scripts corresponding to the pre-stored function numbers, other function numbers can be set manually, and the process is repeatedly executed, so that the sensor configuration scripts corresponding to all the function numbers can be obtained.
The sink node obtains the sensor configuration scripts corresponding to the determined function numbers sequentially from the corresponding relationship between the pre-stored function numbers and the sensor configuration scripts according to the sequence numbers of the function numbers.
Further, the sink node records a first login account, where the first login account is an account for logging in the script server, and before S103, the method further includes:
and B: and the sink node logs in the script server according to the first login account, downloads the sensor configuration script from the script server according to the function number, establishes the corresponding relation between the sensor configuration script and the function number, and stores the sensor configuration script in a storage space.
It should be noted that: step B is performed after step a and step B is performed before S101.
The script server is a server which stores the sensor configuration script corresponding to the function number.
S104, the sink node sends a function configuration instruction to the sensor node, the function configuration instruction is used for triggering a function configuration thread built in the sensor node, and the function configuration instruction carries a function configuration identifier and the sensor configuration script;
the sink node stores the function configuration identifier when leaving the factory.
Wherein the functional configuration is identified as a binary string, such as defined as 1000111, 110101, and the like. The function configuration identifier is set by the user, or may be a default of the system, which is not limited herein.
The built-in function configuration thread of the sensor node is a thread created by a processor of the sensor node in an executable file, and the content of a custom field of a program header of the executable file comprises a function configuration identifier. The sensor node stores the executable file at the time of factory shipment.
S105, the sensor node receives the function configuration instruction, reads the sensor configuration script by using the built-in function configuration thread, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script;
further, S105 specifically includes:
the sensor node receives the function configuration instruction, runs the function configuration thread through a function configuration identifier in the function configuration instruction, stores the sensor configuration script to a preset storage unit through a preset transmission channel, so that the function configuration thread can read the sensor configuration script from the preset storage unit and run the read sensor configuration script, and generates and uploads a running result of the sensor configuration script.
It should be noted that the sensor node receives the function configuration instruction, parses the function configuration instruction through a receiving thread, when the receiving thread parses the function configuration identifier, stores the sensor configuration script in a preset storage unit, records a storage address of the sensor configuration script in the storage unit, and sends a first sensor event to a sensor driver, where the first sensor event carries the function configuration identifier and the storage address of the sensor configuration script in the storage unit;
after receiving the first sensor event, the sensor driver acquires a thread of which the current state is a ready state or a blocked state, detects whether the content of a custom field of a program header of an executable file where the thread is located contains a function configuration identifier, if the content of the custom field of the program header of the executable file where the thread is located contains the function configuration identifier, the sensor driver identifies the thread as a function configuration thread, and transmits a second sensor event to a processor, wherein the second sensor event comprises a thread ID and a thread state change identifier of the function configuration thread;
after receiving the second sensor event, the processor changes the current state of the function configuration thread into a running state according to the thread ID and the thread state change identifier of the function configuration thread;
and the function configuration thread reads the sensor configuration script from the storage unit by using the storage address, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script.
If the content of the custom field of the program header of the executable file where the thread is located comprises the function configuration identifier, the thread is identified as the function configuration thread, and the problem that the sensor node cannot find the function configuration thread in the thread is solved.
Wherein the thread state change identifier is user defined or system set.
It should be noted that the thread state change identifier is used to indicate a change of the current state of the functional configuration thread in the sensor node. For ease of identification, the thread state change identifier and the code of the current state of the thread in the sensor node are customized.
Wherein the thread state change identifier is defined as: read _ ID _ STATE _ CHANGED.
The current state of a thread in a sensor node is defined as: read _ ID _ ATTRIBUTE _ STATE.
The THREAD _ ID represents a THREAD ID corresponding to a THREAD of which the current state needs to be changed in the sensor node, that is, the THREAD ID of the function configuration THREAD; STATE denotes the current STATE, CHANGED denotes the change flag, and ATTRIBUTE is a parameter for identifying the current STATE of read _ ID.
Wherein the processor modifies ATTRIBUTE in the READ _ IDATTRIBUTE _ STATE to RUNNING. Therefore, the current state of the function configuration thread can be changed into the running state, the sensor configuration script is run in time, and the problem that the current state of the function configuration thread cannot be changed into the running state by the sensor node is solved.
The function configuration thread reads the sensor configuration script from the storage unit by using the storage address, and the storage address is transmitted without directly transmitting the sensor configuration script, so that the data volume transmitted inside the sensor node is small, and the power consumption of the sensor node can be reduced.
And S106, the sink node acquires the operation result of the sensor configuration script and determines the configuration result of the sensor node under the sensor configuration script according to the operation result.
Further, S106 specifically includes:
the sink node acquires the running result of the sensor configuration script, extracts the status code of the running result, determines that the sensor node is successfully configured under the sensor configuration script if the status code of the running result is a successful status code, and determines that the sensor node is failed to be configured under the sensor configuration script if the status code of the running result is a failed status code.
The successful status code and the failed status code are set by the user or default of the system, and are not limited herein.
According to the invention, the sensor node can be configured with the function corresponding to the application field according to the application field of the sensor node, and the function configuration efficiency of the sensor is improved.
Referring to fig. 2, the present invention provides a sensor node configuration system, which is applied to a sink node and a sensor node of an internet of things, where the sink node includes a first determining module, a second determining module, a sensor configuration script obtaining module, a sending module, a generating module, and a third determining module, and the sensor node includes a generating module;
the first determining module is configured to determine, by the sink node, a sensor node to be configured functionally in the sensor node list;
the second determining module is configured to acquire, by the sink node, an object identifier OID identifier prefix uploaded by the sensor node, and determine, from a correspondence between a prestored OID identifier prefix and a function number, a function number corresponding to the OID identifier prefix uploaded by the sensor node;
the sensor configuration script acquisition module is used for acquiring the sensor configuration script corresponding to the determined function number from the corresponding relation between the pre-stored function number and the sensor configuration script by the sink node;
the sending module is configured to send, by the sink node, a function configuration instruction to the sensor node, where the function configuration instruction is used to trigger a function configuration thread built in the sensor node, and the function configuration instruction carries a function configuration identifier and the sensor configuration script;
the generating module is used for the sensor node to receive the function configuration instruction, read the sensor configuration script by using the built-in function configuration thread and run the read sensor configuration script, and generate and upload the running result of the sensor configuration script;
the third determining module is configured to obtain, by the sink node, an operation result of the sensor configuration script, and determine, according to the operation result, a configuration result of the sensor node under the sensor configuration script.
In summary, the invention can configure the sensor node with the function corresponding to the application field according to the application field of the sensor node, and is beneficial to improving the function configuration efficiency of the sensor. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which may be made by those skilled in the art without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims (10)

1. A sensor node configuration method is applied to a sink node and a sensor node of the Internet of things, and is characterized by comprising the following steps:
the sink node determines a sensor node to be subjected to function configuration in a sensor node list;
the sink node acquires an Object Identifier (OID) identification prefix uploaded by the sensor node, and determines a function number corresponding to the OID identification prefix uploaded by the sensor node from a corresponding relation between prestored OID identification prefixes and function numbers; the OID identifier prefixes represent application fields of the sensor nodes, and the OID identifier prefixes of the sensor nodes in different application fields are different;
the sink node acquires a sensor configuration script corresponding to the determined function number from a corresponding relation between the pre-stored function number and the sensor configuration script;
the sink node sends a function configuration instruction to the sensor node, wherein the function configuration instruction is used for triggering a function configuration thread built in the sensor node, and the function configuration instruction carries a function configuration identifier and the sensor configuration script;
the sensor node receives the function configuration instruction, reads the sensor configuration script by using the built-in function configuration thread, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script;
the sink node acquires the operation result of the sensor configuration script and determines the configuration result of the sensor node under the sensor configuration script according to the operation result;
the sink node acquires an Object Identifier (OID) identification prefix uploaded by the sensor node, and determines a function number corresponding to the OID identification prefix uploaded by the sensor node from a corresponding relationship between prestored OID identification prefixes and function numbers, specifically:
the sink node acquires an Object Identifier (OID) identification prefix uploaded by the sensor node, displays a function number corresponding to the OID identification prefix uploaded by the sensor node according to a pre-stored correspondence relationship between the OID identification prefix and the function number, acquires a function number selection instruction input by a user, and determines a function number corresponding to a function for configuring the sensor node in the function number corresponding to the OID identification prefix uploaded by the sensor node according to the function number selection instruction;
the sensor node receives the function configuration instruction, reads the sensor configuration script by using the built-in function configuration thread, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script, specifically:
the sensor node receives the function configuration instruction, analyzes the function configuration instruction through a receiving thread, stores the sensor configuration script to a preset storage unit when the receiving thread analyzes the function configuration identifier, records a storage address of the sensor configuration script in the storage unit, and sends a first sensor event to a sensor driver, wherein the first sensor event carries the function configuration identifier and the storage address of the sensor configuration script in the storage unit;
after receiving the first sensor event, the sensor driver acquires a thread of which the current state is a ready state or a blocked state, detects whether the content of a custom field of a program header of an executable file where the thread is located contains a function configuration identifier, if the content of the custom field of the program header of the executable file where the thread is located contains the function configuration identifier, the sensor driver identifies the thread as a function configuration thread, and transmits a second sensor event to a processor, wherein the second sensor event comprises a thread ID and a thread state change identifier of the function configuration thread;
after receiving the second sensor event, the processor changes the current state of the function configuration thread into a running state according to the thread ID and the thread state change identifier of the function configuration thread;
the function configuration thread reads the sensor configuration script from the storage unit by using the storage address, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script;
wherein the thread state change identifier is defined as: read _ ID _ STATE _ CHANGED;
the current state of a thread in a sensor node is defined as: read _ ID _ ATTRIBUTE _ STATE;
the THREAD _ ID represents a THREAD ID corresponding to a THREAD of which the current state needs to be changed in the sensor node, that is, the THREAD ID of the function configuration THREAD; STATE denotes the current STATE, CHANGED denotes the change flag, and ATTRIBUTE is a parameter used to identify the current STATE of read _ ID.
2. The method according to claim 1, wherein the sink node determines the sensor node to be configured functionally in the sensor node list, specifically:
the sink node displays a sensor node list, the sensor node list comprises equipment identifications of sensor nodes communicated with the sink node, a sensor node selection instruction input by a user is received, and the sensor nodes to be configured functionally in the sensor node list are determined according to the sensor node selection instruction.
3. The method according to claim 1, wherein the sensor node receives the function configuration instruction, reads the sensor configuration script by using the built-in function configuration thread, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script, specifically:
the sensor node receives the function configuration instruction, runs the function configuration thread through a function configuration identifier in the function configuration instruction, stores the sensor configuration script to a preset storage unit through a preset transmission channel, so that the function configuration thread can read the sensor configuration script from the preset storage unit and run the read sensor configuration script, and generates and uploads a running result of the sensor configuration script.
4. The method according to claim 1, wherein the sink node obtains an operation result of the sensor configuration script, and determines a configuration result of the sensor node under the sensor configuration script according to the operation result, specifically:
the sink node acquires the operation result of the sensor configuration script, extracts the state code of the operation result, determines that the configuration of the sensor node is successful under the sensor configuration script if the state code of the operation result is a successful state code, and determines that the configuration of the sensor node is failed under the sensor configuration script if the state code of the operation result is a failed state code.
5. The method according to claim 1, wherein the sink node records a first login account, the first login account is an account of a login script server, and before the sink node acquires a sensor configuration script corresponding to a determined function number from a correspondence relationship between pre-stored function numbers and sensor configuration scripts, the method further comprises:
the sink node logs in the script server according to the first login account, downloads the sensor configuration script from the script server according to the function number, establishes a corresponding relation between the sensor configuration script and the function number, and stores the sensor configuration script in a storage space.
6. A sensor node configuration system is applied to a sink node and a sensor node of the Internet of things, and is characterized in that the sink node comprises a first determining module, a second determining module, a sensor configuration script obtaining module, a sending module, a generating module and a third determining module, and the sensor node comprises the generating module;
the first determining module is configured to determine, by the sink node, a sensor node to be configured functionally in a sensor node list;
the second determining module is configured to acquire, by the sink node, an object identifier OID identifier prefix uploaded by the sensor node, and determine, from a correspondence between a prestored OID identifier prefix and a function number, a function number corresponding to the OID identifier prefix uploaded by the sensor node; the OID identifier prefixes represent application fields of the sensor nodes, and the OID identifier prefixes of the sensor nodes in different application fields are different;
the sensor configuration script acquisition module is used for acquiring a sensor configuration script corresponding to the determined function number from the corresponding relationship between the pre-stored function number and the sensor configuration script by the sink node;
the sending module is configured to send a function configuration instruction to the sensor node by the sink node, where the function configuration instruction is used to trigger a function configuration thread built in the sensor node, and the function configuration instruction carries a function configuration identifier and the sensor configuration script;
the generating module is used for the sensor node to receive the function configuration instruction, read the sensor configuration script by using the built-in function configuration thread and run the read sensor configuration script, and generate and upload the running result of the sensor configuration script;
the third determining module is configured to obtain, by the sink node, an operation result of the sensor configuration script, and determine, according to the operation result, a configuration result of the sensor node under the sensor configuration script;
the sink node acquires an Object Identifier (OID) identification prefix uploaded by the sensor node, and determines a function number corresponding to the OID identification prefix uploaded by the sensor node from a corresponding relationship between prestored OID identification prefixes and function numbers, specifically:
the sink node acquires an Object Identifier (OID) identification prefix uploaded by the sensor node, displays a function number corresponding to the OID identification prefix uploaded by the sensor node according to a pre-stored correspondence relationship between the OID identification prefix and the function number, acquires a function number selection instruction input by a user, and determines a function number corresponding to a function for configuring the sensor node in the function number corresponding to the OID identification prefix uploaded by the sensor node according to the function number selection instruction;
the sensor node receives the function configuration instruction, reads the sensor configuration script by using the built-in function configuration thread, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script, specifically:
the sensor node receives the function configuration instruction, analyzes the function configuration instruction through a receiving thread, stores the sensor configuration script to a preset storage unit when the receiving thread analyzes the function configuration identifier, records a storage address of the sensor configuration script in the storage unit, and sends a first sensor event to a sensor driver, wherein the first sensor event carries the function configuration identifier and the storage address of the sensor configuration script in the storage unit;
after receiving the first sensor event, the sensor driver acquires a thread of which the current state is a ready state or a blocked state, detects whether the content of a custom field of a program header of an executable file where the thread is located contains a function configuration identifier, if the content of the custom field of the program header of the executable file where the thread is located contains the function configuration identifier, the sensor driver identifies the thread as a function configuration thread, and transmits a second sensor event to a processor, wherein the second sensor event comprises a thread ID and a thread state change identifier of the function configuration thread;
after receiving the second sensor event, the processor changes the current state of the function configuration thread into a running state according to the thread ID and the thread state change identifier of the function configuration thread;
the function configuration thread reads the sensor configuration script from the storage unit by using the storage address, runs the read sensor configuration script, and generates and uploads a running result of the sensor configuration script;
wherein the thread state change identifier is defined as: read _ ID _ STATE _ CHANGED;
the current state of a thread in a sensor node is defined as: read _ ID _ ATTRIBUTE _ STATE;
the THREAD _ ID represents a THREAD ID corresponding to a THREAD of which the current state needs to be changed in the sensor node, that is, the THREAD ID of the function configuration THREAD; STATE denotes the current STATE, CHANGED denotes the change flag, and ATTRIBUTE is a parameter used to identify the current STATE of read _ ID.
7. The system of claim 6, wherein the first determining module is specifically configured to: the sink node displays a sensor node list, the sensor node list comprises equipment identifications of sensor nodes communicated with the sink node, a sensor node selection instruction input by a user is received, and the sensor nodes to be configured functionally in the sensor node list are determined according to the sensor node selection instruction.
8. The system of claim 6, wherein the generation module is specifically configured to: the sensor node receives the function configuration instruction, runs the function configuration thread through a function configuration identifier in the function configuration instruction, stores the sensor configuration script to a preset storage unit through a preset transmission channel, so that the function configuration thread can read the sensor configuration script from the preset storage unit and run the read sensor configuration script, and generates and uploads a running result of the sensor configuration script.
9. The system of claim 6, wherein the third determination module is specifically configured to: the sink node acquires the running result of the sensor configuration script, extracts the status code of the running result, determines that the configuration of the sensor node is successful under the sensor configuration script if the status code of the running result is a successful status code, and determines that the configuration of the sensor node is failed under the sensor configuration script if the status code of the running result is a failed status code.
10. The system of claim 6, wherein the aggregation node further comprises:
and the storage module is used for logging in a script server by the sink node according to a first login account, downloading the sensor configuration script from the script server according to the function number, establishing the corresponding relation between the sensor configuration script and the function number, and storing the sensor configuration script into a storage space.
CN201911245225.2A 2019-12-06 2019-12-06 Sensor node configuration method and system based on Internet of things Active CN110971461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911245225.2A CN110971461B (en) 2019-12-06 2019-12-06 Sensor node configuration method and system based on Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911245225.2A CN110971461B (en) 2019-12-06 2019-12-06 Sensor node configuration method and system based on Internet of things

Publications (2)

Publication Number Publication Date
CN110971461A CN110971461A (en) 2020-04-07
CN110971461B true CN110971461B (en) 2022-12-23

Family

ID=70033247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911245225.2A Active CN110971461B (en) 2019-12-06 2019-12-06 Sensor node configuration method and system based on Internet of things

Country Status (1)

Country Link
CN (1) CN110971461B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638826A (en) * 2011-02-12 2012-08-15 苏州达联信息科技有限公司 Remote configuration updating method for railway track monitoring sensor node
KR20130067905A (en) * 2011-12-14 2013-06-25 한국전자통신연구원 Method for configuring identifier of node in sensor network
CN103634148A (en) * 2013-11-28 2014-03-12 中国电子器材总公司 Method, server and system for configuring sensor
CN106851655A (en) * 2015-12-04 2017-06-13 富士通株式会社 Wireless network configuration method and its device, access net system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638826A (en) * 2011-02-12 2012-08-15 苏州达联信息科技有限公司 Remote configuration updating method for railway track monitoring sensor node
KR20130067905A (en) * 2011-12-14 2013-06-25 한국전자통신연구원 Method for configuring identifier of node in sensor network
CN103634148A (en) * 2013-11-28 2014-03-12 中国电子器材总公司 Method, server and system for configuring sensor
CN106851655A (en) * 2015-12-04 2017-06-13 富士通株式会社 Wireless network configuration method and its device, access net system

Also Published As

Publication number Publication date
CN110971461A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
CN108667807B (en) Protocol self-adaption method and system based on monitoring cloud platform and gateway
CN105471686B (en) Terminal control method, device and system
KR100605209B1 (en) Converting apparatus for network
CN107450899B (en) Method and device for generating terminal control script
CN107592367B (en) Resource sharing method and device for household appliances and computer readable storage medium
CN112073471B (en) Control method and device of equipment, storage medium and electronic device
CN112492023B (en) Device control method, device, storage medium, and electronic apparatus
CN107566233B (en) Resource sharing method and device for household electrical appliance
CN108376078A (en) Upgrade method, device and the household appliance of equipment
CN105337787A (en) Multi-server monitoring method, device and system
CN112363775B (en) Method, system and storage medium for dynamically modifying microservice configuration information
WO2017143743A1 (en) Heterogeneous protocol communication method and controller
CN113039498A (en) Method for commissioning field devices in an industrial system network
CN114567620A (en) MQTT protocol-based digital model and physical equipment matching system and method
CN111651639B (en) Address space management method, device, equipment and medium
CN112445700A (en) Test method and device
KR102094041B1 (en) System having the Semantic Engine based on RDF Graph for Autonomous Interaction between IoT Devices in Real-Time
CN113965904A (en) Device registration method, device and storage medium
KR102019701B1 (en) Device profile based gateway platform system and method for integrated control and management of heterogeneous iot network
CN110971461B (en) Sensor node configuration method and system based on Internet of things
CN113557707A (en) Device registration mechanism
CN112019358A (en) Network configuration method, device, equipment and system
CN114114933A (en) Control method, device and equipment of Internet of things equipment and storage medium
CN112905212A (en) Firmware data processing method, device, equipment and storage medium
CN113282622A (en) Information transmission method and apparatus, storage medium, and electronic apparatus

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
TA01 Transfer of patent application right

Effective date of registration: 20221206

Address after: 100085 703, Building 1, No. 1, Shangdi Xinxi Road, Haidian District, Beijing

Applicant after: Beijing Guolian video information technology Co.,Ltd.

Address before: 518057 first floor, No. 2 Kefeng Road, high tech Zone, Nanshan District, Shenzhen, Guangdong

Applicant before: Li Bingyong

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 9th Floor, Building 3, Zone 6, No. 188 South Fourth Ring West Road, Fengtai District, Beijing, 100070

Patentee after: Beijing Guolian video information technology Co.,Ltd.

Address before: 100085 703, Building 1, No. 1, Shangdi Xinxi Road, Haidian District, Beijing

Patentee before: Beijing Guolian video information technology Co.,Ltd.

CP02 Change in the address of a patent holder