Sensor access method and device, terminal and computer readable storage medium

By obtaining the sensor type and generating a unified sensor model structure, the problem of writing a large amount of code for sensor access is solved, the sensor access is efficient and simple, and the development efficiency and device scalability are improved.

CN118869739APending Publication Date: 2024-10-29深圳开鸿数字产业发展有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410871249.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing technology requires R&D personnel to write a large amount of code for different types of sensors to achieve access, resulting in low development efficiency.

Method used

By obtaining the sensor type, determine the corresponding sensor model structure, read the sensor configuration information to achieve access, use the pre-built model database and rule engine to extract attributes, connection protocols and functional functions, generate a unified sensor model structure, and achieve various Unified management and access of various types of sensors.

Benefits of technology

It improves the development efficiency and simplicity of sensor access, reduces the access cost and complexity, accelerates the deployment and application of new equipment, and improves the scalability and flexibility of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869739A_ABST
    Figure CN118869739A_ABST
Patent Text Reader

Abstract

The invention provides a sensor access method and device, a terminal and a computer readable storage medium, and the method comprises the steps: obtaining a sensor type of a to-be-accessed sensor, determining a corresponding sensor model structure according to the sensor type, and defining sensor configuration information in the sensor model structure; and reading sensor configuration information in the sensor model structure, and accessing the sensor to be accessed according to the sensor configuration information. According to the method, unified management and access of various types of sensors are realized by acquiring the sensor model structure defined with the sensor configuration information, and research and development personnel do not need to write a large number of codes for different sensors to realize access of the sensors, so that the development efficiency is improved, and the access of the sensors is simpler and quicker.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sensor technology, and in particular to a sensor access method, device, terminal and computer-readable storage medium. Background Art

[0002] With the rapid development of the Internet of Things and smart devices, various types of sensors are widely used in industry, agriculture, medical and other fields. There are many types of sensors, covering various sensing capabilities such as temperature, humidity, pressure, light, motion, etc. In large-scale sensor networks, existing technologies require R&D personnel to write a lot of code for different sensors to achieve sensor access, which reduces development efficiency.

[0003] Therefore, the prior art has defects and needs to be improved and developed. Summary of the invention

[0004] The present application provides a sensor access method, device, terminal and computer-readable storage medium to solve the technical problem in related technologies that R&D personnel are required to write a large amount of code for different sensors to achieve sensor access, thereby reducing development efficiency.

[0005] To achieve the above objectives, this application adopts the following technical solutions:

[0006] A sensor access method, wherein the method comprises:

[0007] Acquire a sensor type of a sensor to be connected, and determine a corresponding sensor model structure according to the sensor type, wherein the sensor model structure defines sensor configuration information;

[0008] The sensor configuration information in the sensor model structure is read, and the sensor to be connected is connected according to the sensor configuration information.

[0009] In one embodiment of the present application, the sensor configuration information includes: sensor attributes, connection protocols, and functional functions.

[0010] In one embodiment of the present application, before obtaining the sensor type of the sensor to be connected and determining the corresponding sensor model structure according to the sensor type, the method further includes:

[0011] Acquire a pre-built model database, wherein the model database includes: correspondences between a plurality of sensor types and a plurality of sensor model structures;

[0012] Wherein, each of the sensor model structures is generated according to pre-collected sensor configuration files corresponding to each type of sensor.

[0013] In one embodiment of the present application, the step of constructing the model database includes:

[0014] Obtain the sensor configuration files corresponding to each type of sensor collected in advance;

[0015] Based on predefined rules, using a rule engine to extract attributes, connection protocols and functional functions in each of the sensor configuration files;

[0016] Generate a sensor model structure corresponding to each sensor type according to the attributes, connection protocols and functional functions;

[0017] Construct a model database based on the correspondence between each sensor type and the sensor model structure;

[0018] The sensor configuration file includes: the instruction manual and / or technical manual of the sensor.

[0019] In one embodiment of the present application, the step of obtaining the sensor type of the sensor to be connected and determining the corresponding sensor model structure according to the sensor type includes:

[0020] Receiving a user selection instruction, obtaining a sensor type of a sensor to be connected, and searching for the corresponding relationship according to the sensor type to obtain a sensor model structure corresponding to the sensor type;

[0021] Alternatively, the sensor identification information on the sensor to be connected is identified to obtain the sensor type of the sensor to be connected, and the corresponding relationship is searched according to the sensor type to obtain the sensor model structure corresponding to the sensor type.

[0022] In one embodiment of the present application, after obtaining the sensor type of the sensor to be connected, the method further includes:

[0023] Searching the model database, if the sensor type of the sensor to be connected does not exist in the model database, obtaining a sensor configuration file corresponding to the sensor to be connected;

[0024] Based on predefined rules, extracting attributes, connection protocols and functional functions of the sensor configuration file using a rule engine;

[0025] A corresponding sensor model structure is generated according to the attributes, connection protocol and functional function, and the corresponding relationship between the sensor type and the sensor model structure is saved in the model database.

[0026] In one embodiment of the present application, the sensor model structure is a structured data format document.

[0027] The present application also provides a sensor access device, wherein the device comprises:

[0028] An acquisition module, used for acquiring a sensor type of a sensor to be connected, and determining a corresponding sensor model structure according to the sensor type, wherein the sensor model structure defines sensor configuration information;

[0029] The access module is used to read the sensor configuration information in the sensor model structure and access the sensor to be accessed according to the sensor configuration information.

[0030] The present application also provides a terminal, which includes: a memory, a processor, and a sensor access program stored in the memory and executable on the processor, wherein the sensor access program implements the steps of the sensor access method described above when executed by the processor.

[0031] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program can be executed to implement the steps of the sensor access method as described above.

[0032] Beneficial effects of the present invention: The method of the embodiment of the present invention obtains the sensor type of the sensor to be connected, determines the corresponding sensor model structure according to the sensor type, and defines the sensor configuration information in the sensor model structure; reads the sensor configuration information in the sensor model structure, and connects the sensor to be connected according to the sensor configuration information. This application achieves unified management and access to various types of sensors by obtaining a sensor model structure that defines sensor configuration information, eliminating the need for R&D personnel to write a large amount of code for different sensors to achieve sensor access, improving development efficiency, and making sensor access simpler and faster. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a flow chart of a preferred embodiment of the sensor access method in the present invention.

[0034] Figure 2 It is a functional principle block diagram of a preferred embodiment of the sensor access device of the present invention;

[0035] Figure 3 It is a functional principle block diagram of a preferred embodiment of the terminal in the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0037] The sensor access method, system and computer-readable storage medium of the embodiments of the present application are described below with reference to the accompanying drawings. In view of the problem that the related technologies mentioned in the above background technology require R&D personnel to write a large amount of code for different sensors to achieve sensor access, which reduces the development efficiency, the present application provides a sensor access method, in which the sensor type of the sensor to be accessed is obtained, and the corresponding sensor model structure is determined according to the sensor type, and the sensor model structure defines sensor configuration information; the sensor configuration information in the sensor model structure is read, and the sensor to be accessed is accessed according to the sensor configuration information. The present application realizes unified management and access of various types of sensors by obtaining a sensor model structure defined with sensor configuration information, and does not require R&D personnel to write a large amount of code for different sensors to achieve sensor access, thereby improving development efficiency and making sensor access simpler and faster.

[0038] See also Figure 1 The sensor access method described in the embodiment of the present invention comprises the following steps:

[0039] Step S100: obtaining the sensor type of the sensor to be connected, and determining the corresponding sensor model structure according to the sensor type, wherein the sensor model structure defines sensor configuration information.

[0040] The embodiment of the present application determines a sensor model structure having sensor configuration information defined therein according to the sensor type, so as to facilitate reading of the sensor configuration information in the sensor model structure.

[0041] In an embodiment of the present application, the sensor configuration information includes: sensor properties, connection protocols, and function functions. The properties of a sensor refer to the data sensed by the sensor, such as the temperature and humidity of a temperature and humidity sensor. The connection protocol refers to the way of obtaining sensor data, such as reading data by connecting a sensor via a physical line (RS485), or by Bluetooth, WiFi, and the like. A function function refers to a template for a specific property or a specific protocol. The function function can be used to obtain the properties of the sensor in a manner determined in the protocol. The corresponding software establishes a connection with the actual device based on this function and obtains data.

[0042] The embodiment of the present application defines the properties, connection protocols and functional functions of the sensor in the sensor model structure, thereby providing a basis for accessing the sensor. There is no need for R&D personnel to write a large amount of code to implement sensor access, and the access method is simpler and faster.

[0043] In the embodiment of the present application, before step S100, the step further includes: obtaining a pre-built model database, wherein the model database includes: correspondences between a plurality of sensor types and a plurality of sensor model structures, wherein each of the sensor model structures is generated based on a sensor configuration file corresponding to each type of sensor collected in advance.

[0044] Specifically, when collecting data, all relevant sensor files can be collected, including specifications, technical manuals, actual usage data, etc. In order to ensure the accuracy and completeness of the data, the data is preprocessed to remove redundant and erroneous information.

[0045] The embodiments of the present application can reduce the cost and complexity of sensor access and accelerate the deployment and application of new devices by using a standardized sensor model structure; and can quickly adapt to new sensors and improve the scalability and flexibility of the device.

[0046] In one embodiment of the present application, the step of constructing the model database includes: obtaining pre-collected sensor configuration files corresponding to each type of sensor; based on predefined rules, using a rule engine to extract attributes, connection protocols and functional functions in each of the sensor configuration files; generating a sensor model structure corresponding to each sensor type according to the attributes, connection protocols and functional functions; constructing a model database according to the correspondence between each sensor type and the sensor model structure; wherein the sensor configuration file includes: the instruction manual and / or technical manual of the sensor.

[0047] Specifically, the embodiment of the present application maps the sensor configuration file to a unified model structure. First, define the general model structure, that is, design a general sensor model structure, including modules such as attributes, functions, and protocols, determine the fields and data types of each module, and ensure that all types of sensor characteristics can be covered. Second, using data modeling technology, the extracted sensor features, functions, and connection methods are mapped to the corresponding modules of the general model structure, and a detailed model instance is created for each type of sensor, including its unique attributes and functions. Third, develop an automated modeling tool to automatically generate corresponding sensor model instances by parsing sensor files or actual data, and continuously optimize the automated modeling algorithm to improve the accuracy and efficiency of model generation. Fourth, verify and test the generated sensor model to ensure its accuracy and reliability, iterate and optimize the model according to the test results, and ensure that the model can meet the needs of actual applications.

[0048] Sensors are usually equipped with corresponding instructions or technical manuals. These instructions or technical manuals are provided by sensor manufacturers to explain and illustrate the sensor's parameters, functions, usage methods, installation steps, maintenance methods, and possible troubleshooting solutions to users or technicians. These documents are important reference materials for understanding and using sensors. The instructions or technical manuals of sensors generally include the following:

[0049] First, product overview: introduce the basic information of the sensor, such as model, specifications, application scenarios, etc.

[0050] Second, technical parameters: list in detail the technical indicators of the sensor, such as measurement range, accuracy, resolution, response time, working environment conditions, etc.;

[0051] Third, installation and wiring: provide the installation steps, wiring methods and precautions of the sensor to ensure that the sensor can be correctly installed and connected to the system;

[0052] Fourth, Use and Maintenance: Explain the use of the sensor, daily maintenance requirements and precautions to help users use and maintain the sensor correctly;

[0053] Fifth, troubleshooting: List possible faults and their causes, provide troubleshooting and solutions, and help users solve problems quickly.

[0054] In the embodiment of the present application, AI technology can be used to extract attributes, connection protocols and functional functions to save time. Specifically, a rule-based system can be used. The rule-based AI system uses predefined rules to make decisions, and AI technology is used to extract information for each type of sensor, which greatly improves the extraction efficiency.

[0055] In one embodiment of the present application, the step S100 specifically includes: receiving a user selection instruction, obtaining the sensor type of the sensor to be connected, and searching the corresponding relationship according to the sensor type to obtain a sensor model structure corresponding to the sensor type; or, identifying sensor identification information on the sensor to be connected, obtaining the sensor type of the sensor to be connected, and searching the corresponding relationship according to the sensor type to obtain a sensor model structure corresponding to the sensor type.

[0056] The sensor types of the embodiments of the present application can be classified according to the physical quantity being measured. Specifically, they can include: temperature sensors for measuring temperature changes; humidity sensors for detecting ambient humidity; pressure sensors for measuring pressure; displacement sensors for detecting changes in the position of an object; flow sensors for measuring fluid flow; liquid level sensors for monitoring the height or position of a liquid; force sensors for measuring the force exerted on an object; acceleration sensors for measuring the acceleration of an object; torque sensors for measuring rotational torque; anemometers for measuring wind direction; and other types of sensors.

[0057] In the embodiment of the present application, when identifying the sensor type, the user can select the sensor type, which is simple and quick; or the terminal can automatically identify the identification information of the sensor, such as the label on the sensor, scanning a QR code, querying from a database, or obtaining it through other methods, avoiding the user's selection and providing convenience for the user.

[0058] like Figure 1 As shown, the sensor access method also includes the following steps:

[0059] Step S200: Read the sensor configuration information in the sensor model structure, and access the sensor to be connected according to the sensor configuration information.

[0060] The embodiment of the present application can parse the sensor model structure through software, so that when a certain type of sensor needs to be connected, the corresponding sensor model structure can be directly read, and a connection with the sensor can be established according to the properties, functional functions and connection protocols defined in the model.

[0061] In one embodiment of the present application, after obtaining the sensor type of the sensor to be connected, it also includes: searching the model database, and if the sensor type of the sensor to be connected does not exist in the model database, obtaining the sensor configuration file corresponding to the sensor to be connected; based on predefined rules, using a rule engine to extract the attributes, connection protocol and functional functions of the sensor configuration file; generating a corresponding sensor model structure according to the attributes, connection protocol and functional functions, and saving the correspondence between the sensor type and the sensor model structure to the model database.

[0062] The embodiments of the present application also support new sensor types. Specifically, when a new sensor type needs to be connected, it is only necessary to add the corresponding configuration file and parsing logic to automatically generate a new sensor model structure to support the connection of the new sensor.

[0063] In addition, since the embodiment of the present application can update the model database, the embodiment of the present application also establishes a version management mechanism and saves each version of the model database.

[0064] During the entire sensor access process, the embodiment of the present application also records detailed log information, including sensor type, configuration information, communication status, data reception status, etc. These log information are very important for subsequent problem troubleshooting and system maintenance.

[0065] In the embodiment of the present application, the sensor model structure is a structured data format document.

[0066] In an embodiment of the present application, data modeling and automated modeling techniques can be used to map the characteristics of sensors into a unified model structure; that is, by defining a common sensor model structure, the characteristics of various types of sensors are abstracted and standardized for subsequent intelligent access and management.

[0067] Specifically, the sensor model structure can be a document in JSON, XML or other structured data formats, or a record set in a database, depending on the system design and requirements. In this way, different types of sensors can share a unified interface, making system integration and management simpler and more efficient.

[0068] The data in a structured data format document is stored in a clear format and rules, and is usually organized and managed through tables, databases, or other programmable data models. This type of data has clear fields and attributes, and each field has a specific data type and value range, making the data easy to organize, store, and analyze. In addition, because the data in a structured data format document has a clear organizational structure and each data element has a clear identifier and attribute, the structured data is easy to be understood and processed by a computer system. This data format is highly readable and operable, and can be effectively processed and mined through various algorithms and tools.

[0069] The embodiment of the present application designs the sensor model structure as a structured data format document, which facilitates the reading of sensor configuration information and improves the convenience and efficiency of sensor access.

[0070] In addition, during the sensor access process, various errors may be encountered, such as communication errors, data format errors, etc. This application pre-writes the corresponding error handling logic so that appropriate measures can be taken when errors occur. Specifically, during the sensor access process, if an error prompt appears, retry, record error logs and / or notify the user.

[0071] The embodiment of the present application realizes unified management and access to various types of sensors through a unified sensor model structure, eliminating the need for R&D personnel to write a large amount of code for different sensors to achieve sensor access, thereby improving the intelligence level of the device. In addition, the standardized sensor model structure can reduce the cost and complexity of new sensor access and accelerate the deployment and application of new devices; through the definition of the sensor model structure, new sensors can be quickly adapted to improve the scalability and flexibility of the device.

[0072] In one embodiment, if Figure 2 As shown, based on the above sensor access method, the present invention also provides a sensor access device, including:

[0073] An acquisition module 100 is used to acquire a sensor type of a sensor to be connected, and determine a corresponding sensor model structure according to the sensor type, wherein the sensor model structure defines sensor configuration information;

[0074] The access module 200 is used to read the sensor configuration information in the sensor model structure and access the sensor to be accessed according to the sensor configuration information.

[0075] In one embodiment of the present application, the sensor configuration information includes: sensor attributes, connection protocols, and functional functions.

[0076] In one embodiment of the present application, the sensor access device further includes:

[0077] A database acquisition module is used to acquire a pre-built model database, wherein the model database includes: a correspondence between a plurality of sensor types and a plurality of sensor model structures;

[0078] Wherein, each of the sensor model structures is generated according to pre-collected sensor configuration files corresponding to each type of sensor.

[0079] In one embodiment of the present application, the database acquisition module further includes:

[0080] A file acquisition unit, used to acquire sensor configuration files corresponding to various types of sensors collected in advance;

[0081] An extraction unit, configured to extract attributes, connection protocols and functional functions in each of the sensor configuration files using a rule engine based on predefined rules;

[0082] A generating unit, used for generating a sensor model structure corresponding to each sensor type according to the attributes, connection protocol and functional function;

[0083] A construction unit, used for constructing a model database according to the corresponding relationship between each sensor type and the sensor model structure;

[0084] The sensor configuration file includes: the instruction manual and / or technical manual of the sensor.

[0085] In one embodiment of the present application, the acquisition module includes:

[0086] A first acquisition unit, configured to receive a user selection instruction, obtain a sensor type of a sensor to be connected, and search for the corresponding relationship according to the sensor type to obtain a sensor model structure corresponding to the sensor type;

[0087] The second acquisition unit is used to identify the sensor identification information on the sensor to be connected, obtain the sensor type of the sensor to be connected, and search the corresponding relationship according to the sensor type to obtain the sensor model structure corresponding to the sensor type.

[0088] In one embodiment of the present application, the sensor access device further includes:

[0089] A search module, used for searching the model database, and if the sensor type of the sensor to be connected does not exist in the model database, obtaining a sensor configuration file corresponding to the sensor to be connected;

[0090] A file extraction module, for extracting the attributes, connection protocols and functional functions of the sensor configuration file using a rule engine based on predefined rules;

[0091] The saving module is used to generate a corresponding sensor model structure according to the attributes, connection protocol and functional function, and save the corresponding relationship between the sensor type and the sensor model structure to the model database.

[0092] In one embodiment of the present application, the sensor model structure is a structured data format document.

[0093] It should be noted that the above explanations of the sensor access method embodiment are also applicable to the sensor access device of this embodiment, and will not be repeated here.

[0094] The present invention discloses a sensor access device, which obtains the sensor type of a sensor to be connected, determines the corresponding sensor model structure according to the sensor type, and defines sensor configuration information in the sensor model structure; reads the sensor configuration information in the sensor model structure, and accesses the sensor to be connected according to the sensor configuration information. This application achieves unified management and access to various types of sensors by obtaining a sensor model structure that defines sensor configuration information, and does not require R&D personnel to write a large amount of code for different sensors to achieve sensor access, thereby improving development efficiency and making sensor access simpler and faster.

[0095] Figure 3 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. The terminal may include:

[0096] A memory 501 , a processor 502 , and a computer program stored in the memory 501 and executable on the processor 502 .

[0097] When the processor 502 executes the program, the sensor access method provided in the above embodiment is implemented.

[0098] Furthermore, the terminal further includes:

[0099] The communication interface 503 is used for communication between the memory 501 and the processor 502 .

[0100] The memory 501 is used to store computer programs that can be executed on the processor 502 .

[0101] The memory 501 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0102] If the memory 501, the processor 502 and the communication interface 503 are implemented independently, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0103] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can communicate with each other through an internal interface.

[0104] The processor 502 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0105] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above sensor access method is implemented.

[0106] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0107] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0108] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes additional implementations, in which the order shown or discussed may not be followed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0109] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can read instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary and then storing it in a computer memory.

[0110] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0111] A person skilled in the art may understand that all or part of the steps in the above-mentioned embodiment method may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0112] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0113] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A sensor access method, characterized in that: The method comprises: Acquire a sensor type of a sensor to be connected, and determine a corresponding sensor model structure according to the sensor type, wherein the sensor model structure defines sensor configuration information; The sensor configuration information in the sensor model structure is read, and the sensor to be connected is connected according to the sensor configuration information.

2. The sensor access method according to claim 1, characterized in that: The sensor configuration information includes: sensor properties, connection protocols and functional functions.

3. The sensor access method according to claim 1, characterized in that: Before obtaining the sensor type of the sensor to be connected and determining the corresponding sensor model structure according to the sensor type, the method further includes: Acquire a pre-built model database, wherein the model database includes: correspondences between a plurality of sensor types and a plurality of sensor model structures; Wherein, each of the sensor model structures is generated according to pre-collected sensor configuration files corresponding to each type of sensor.

4. The sensor access method according to claim 3, characterized in that: The steps of constructing the model database include: Obtain the sensor configuration files corresponding to each type of sensor collected in advance; Based on predefined rules, using a rule engine to extract attributes, connection protocols and functional functions in each of the sensor configuration files; Generate a sensor model structure corresponding to each sensor type according to the attributes, connection protocols and functional functions; Construct a model database based on the correspondence between each sensor type and the sensor model structure; The sensor configuration file includes: the instruction manual and / or technical manual of the sensor.

5. The sensor access method according to claim 3, characterized in that: The obtaining of the sensor type of the sensor to be connected and determining the corresponding sensor model structure according to the sensor type includes: Receiving a user selection instruction, obtaining a sensor type of a sensor to be connected, and searching for the corresponding relationship according to the sensor type to obtain a sensor model structure corresponding to the sensor type; Alternatively, the sensor identification information on the sensor to be connected is identified to obtain the sensor type of the sensor to be connected, and the corresponding relationship is searched according to the sensor type to obtain the sensor model structure corresponding to the sensor type.

6. The sensor access method according to claim 3, characterized in that: After obtaining the sensor type of the sensor to be connected, the method further includes: Searching the model database, if the sensor type of the sensor to be connected does not exist in the model database, obtaining a sensor configuration file corresponding to the sensor to be connected; Based on predefined rules, extracting attributes, connection protocols and functional functions of the sensor configuration file using a rule engine; A corresponding sensor model structure is generated according to the attributes, connection protocol and functional function, and the corresponding relationship between the sensor type and the sensor model structure is saved in the model database.

7. The sensor access method according to claim 1, characterized in that: The sensor model structure is a structured data format document.

8. A sensor access device, characterized in that: The device comprises: An acquisition module, used for acquiring a sensor type of a sensor to be connected, and determining a corresponding sensor model structure according to the sensor type, wherein the sensor model structure defines sensor configuration information; The access module is used to read the sensor configuration information in the sensor model structure and access the sensor to be accessed according to the sensor configuration information.

9. A terminal, characterized in that: include: A memory, a processor, and a sensor access program stored in the memory and executable on the processor, wherein the sensor access program implements the steps of the sensor access method according to any one of claims 1 to 7 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program can be executed to implement the steps of the sensor access method according to any one of claims 1 to 7.