Equipment access method and device, electronic equipment and storage medium

By acquiring point table information of IoT devices and generating point description information, and using domain-specific language templates for configuration updates, the problems of high development costs and poor maintainability when accessing IoT devices are solved, achieving efficient device compatibility and low-cost access process.

CN121077894APending Publication Date: 2025-12-05LIANGYUN SMART ENERGY (GUANGDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410719498.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing technologies require modifications to the gateway software when IoT devices are connected, resulting in high software development and maintenance costs, as well as poor scalability and maintainability.

Method used

By obtaining the point table information of the devices to be connected, generating point description information, and using domain-specific language templates for configuration updates, the target gateway execution code is generated without modifying the already configured gateway execution code in the system.

Benefits of technology

It reduces the development cost of device access, improves the efficiency of device compatibility processing, and enhances the maintainability of the gateway.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121077894A_ABST
    Figure CN121077894A_ABST
Patent Text Reader

Abstract

The invention provides an equipment access method and device, electronic equipment and a storage medium, and relates to the technical field of Internet of Things. The method comprises the steps that point table information of current equipment to be accessed is acquired, point location description information of the equipment to be accessed is generated according to the point table information, and the point location description information comprises related configuration information of the equipment to be accessed to a target system; updating currently configured device point location description information of the target system according to the point location description information of the to-be-accessed device to obtain updated device point location description information; and generating a target gateway execution code according to the updated device point location description information and running the target gateway execution code so as to access the current device to be accessed to the target system, and performing data acquisition on the device accessed to the target system. According to the scheme, the point table information of the to-be-accessed device is obtained and converted to generate the point position description information of the to-be-accessed device, rapid compatibility of information of the new device is realized based on the point position description information of the to-be-accessed device, and the development cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things, in particular to a device access method and device, electronic equipment and storage medium. BACKGROUND

[0002] The gateway is mainly responsible for monitoring and control functions of Internet of Things devices, and is a pivotal role of device end and service display end. With the development of science and technology and the diversified needs of people for Internet of Things systems, the types and functions of devices are becoming more and more rich, and the number of devices that need to be accessed to the gateway is also increasing.

[0003] At present, when a new device needs to be accessed to the Internet of Things system, the commonly used solution is to modify the source code of the acquisition strategy, acquisition point, reporting strategy, etc. in the gateway software to be compatible with the new device.

[0004] The above method will cause a large number of changes to the gateway software, increase the software development and maintenance cost, and the scalability and maintainability of the gateway software are poor. SUMMARY

[0005] The present application aims at the deficiencies in the prior art, and provides a device access method, device, electronic equipment and storage medium, so as to make the compatibility iteration of the gateway to the device more efficient and stable.

[0006] To achieve the above object, the technical scheme adopted by the embodiments of the present application is as follows:

[0007] In a first aspect, the embodiments of the present application provide a device access method, comprising: acquiring point table information of a current to-be-accessed device, and generating point position description information of the to-be-accessed device according to the point table information, the point position description information comprising relevant configuration information of the to-be-accessed device accessing a target system;

[0008] According to the point position description information of the to-be-accessed device, updating the device point position description information currently configured in the target system to obtain updated device point position description information;

[0009] Generating target gateway execution code according to the updated device point position description information and running the target gateway execution code to access the current to-be-accessed device to the target system and collect data of the device accessed to the target system.

[0010] Optionally, the generating the point position description information of the to-be-accessed device according to the point table information comprises:

[0011] extracting, from the point table information, relevant configuration information of the target system to which the to-be-accessed device is to access; the relevant configuration information at least includes device information of the to-be-accessed device, a data collection strategy, a data packaging strategy, and a data reporting strategy;

[0012] generating point site description information of the to-be-accessed device according to the relevant configuration information and a domain-specific language template.

[0013] Optionally, the generating the point site description information of the to-be-accessed device according to the relevant configuration information and the domain-specific language template comprises:

[0014] matching the relevant configuration information to a corresponding position in the domain-specific language template to generate the point site description information adapted to the to-be-accessed device.

[0015] Optionally, the updating the device point site description information currently configured for the target system according to the point site description information of the to-be-accessed device to obtain updated device point site description information comprises:

[0016] adding the point site description information of the to-be-accessed device to the device point site description information currently configured to obtain the updated device point site description information.

[0017] Optionally, the device point site description information currently configured comprises private point site description information and public point site description information; and the adding the point site description information of the to-be-accessed device to the device point site description information currently configured to obtain the updated device point site description information comprises:

[0018] if the public point site description information in the point site description information of the to-be-accessed device already exists in the public point site description information in the device point site description information currently configured, adding the private point site description information in the point site description information of the to-be-accessed device to the private point site description information in the device point site description information currently configured.

[0019] Optionally, the generating the target gateway execution code according to the updated device point site description information comprises:

[0020] performing code compilation according to the updated point site description information and a gateway basic code to generate the target gateway execution code.

[0021] Optionally, the collecting data from the devices that have accessed the target system comprises:

[0022] collecting data of each device that has accessed the target system according to a data collection strategy of each device;

[0023] packaging the collected data of each device that has accessed the target system according to a data packaging strategy of each device that has accessed the target system;

[0024] reporting the packaged data of each device that has accessed the target system to a server for display according to a data reporting strategy of each device that has accessed the target system.

[0025] In a second aspect, the embodiments of the present application further provide a device access apparatus, comprising a generating module, an updating module and an executing module;

[0026] The generating module is configured to acquire point table information of a current to-be-accessed device, and generate point position description information of the to-be-accessed device according to the point table information, wherein the point position description information comprises relevant configuration information of the to-be-accessed device accessing a target system.

[0027] The updating module is configured to update device point position description information that has been configured in the target system according to the point position description information of the to-be-accessed device, to obtain updated device point position description information.

[0028] The executing module is configured to generate target gateway execution code according to the updated device point position description information, and run the target gateway execution code, to access the current to-be-accessed device to the target system, and collect data of devices that have accessed the target system.

[0029] Optionally, the generating module is specifically configured to extract the relevant configuration information of the to-be-accessed device accessing the target system from the point table information, wherein the relevant configuration information at least comprises device information of the to-be-accessed device, a data collection strategy, a data packaging strategy and a data reporting strategy.

[0030] The point position description information of the to-be-accessed device is generated according to the relevant configuration information and a domain-specific language template.

[0031] Optionally, the generating module is specifically configured to match the relevant configuration information to a corresponding position in the domain-specific language template, to generate point position description information that is adapted to the to-be-accessed device.

[0032] Optionally, the updating module is specifically configured to add the point position description information of the to-be-accessed device to the device point position description information that has been configured, to obtain the updated device point position description information.

[0033] Optionally, the updating module is specifically configured to add the private point location description information of the device to be accessed into the private point location description information of the currently configured device point location description information if the public point location description information in the point location description information of the device to be accessed already exists in the public point location description information of the currently accessed device point location description information.

[0034] Optionally, the executing module is specifically configured to perform code compilation according to the updated point location description information and gateway basic code to generate the target gateway execution code.

[0035] Optionally, the executing module is specifically configured to collect data of each device that has accessed the target system according to a data collection strategy of each device that has accessed the target system.

[0036] Optionally, the executing module is specifically configured to perform packaging processing on the collected data of each device that has accessed the target system according to a data packaging strategy of each device that has accessed the target system.

[0037] Optionally, the executing module is specifically configured to report the packaged data of each device that has accessed the target system to a server for display according to a data reporting strategy of each device that has accessed the target system.

[0038] In a third aspect, an electronic device is provided, including a processor, a storage medium and a bus, the storage medium stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine readable instructions to implement the device access method provided in the first aspect.

[0039] In a fourth aspect, a computer readable storage medium is provided, the storage medium stores a computer program, and the computer program is run by a processor to execute the device access method provided in the first aspect.

[0040] The beneficial effects of the present application are as follows:

[0041] The application provides a device access method and device, an electronic device and a storage medium, including: obtaining point table information of a current device to be accessed, and generating point position description information of the device to be accessed according to the point table information, the point position description information including relevant configuration information of the device to be accessed to access a target system; updating device point position description information currently configured by the target system according to the point position description information of the device to be accessed, to obtain updated device point position description information; generating target gateway execution code according to the updated device point position description information and running the target gateway execution code, to access the current device to be accessed to the target system, and collect data of the device accessed to the target system. When a new device needs to access the system, the point table information of the device to be accessed is obtained, and the point position description information of the device to be accessed is converted and generated, so that the device point position description information configured by the system can be quickly updated based on the point position description information of the device to be accessed. In this way, the information compatibility of the new device can be realized without modifying the gateway execution code configured by the system, and the development cost is reduced.

[0042] In addition, the relevant configuration information extracted from the point table information is adapted by the domain-specific language template, and the point position description information corresponding to the device to be accessed is generated, which can reduce the development threshold of the developer and improve the efficiency of device compatibility processing. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the application, and therefore should not be regarded as a limitation to the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0044] Figure 1 A flowchart of a device access method provided by an embodiment of the application is shown in the figure.

[0045] Figure 2 A flowchart of another device access method provided by an embodiment of the application is shown in the figure.

[0046] Figure 3 A flowchart of another device access method provided by an embodiment of the application is shown in the figure.

[0047] Figure 4 A schematic diagram of a device access device provided by an embodiment of the application is shown in the figure.

[0048] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the application is shown in the figure. DETAILED DESCRIPTION

[0049] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of description and illustration, and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowcharts used in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts under the guidance of the content of the present application.

[0050] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0051] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0052] First, a brief introduction to the related background art:

[0053] The Internet of Things device can access the system for data collection, and the gateway is usually mainly responsible for the monitoring and control functions of the device. The gateway plays a pivotal role in the device end and service display end in the system. Taking the Internet of Things device as a circuit breaker as an example, with the development of science and technology and the diversification of people's demand for power systems, the types and functions of circuit breaker devices are becoming more and more rich, and the requirements for circuit breaker gateway are becoming higher and higher. When a new circuit breaker product needs to be connected to the power system, the current common solution is to modify the collection strategy, collection point, and reporting format part in the gateway software to be compatible, which requires a large number of modifications to the gateway software and then repeated testing and deployment to realize the compatibility of the new circuit breaker product. The deployment means reprogramming the business code program into an executable file and deploying it on the gateway. It must be operated by a professional software development engineer.

[0054] The problem caused by modifying the gateway software after adding new devices is:

[0055] 1. The functions of various types of devices differ greatly, so the point table, collection strategy, packaging format, etc. need to modify the software, and the deployment also needs the participation of professional software personnel, which increases the software implementation cost of the project in this process.

[0056] 2. The readability, scalability and maintainability of the gateway software deteriorate in the iteration process.

[0057] Based on the existence of this problem, the present scheme provides a device access method, which introduces DSL (Domain Specific Language), when a new device needs to access the network, by converting the point table information of the new device into a DSL file, the gateway execution code can be quickly updated, on the one hand, the threshold of generating a DSL file is low, which is convenient for maintenance personnel to handle, on the other hand, when updating the gateway execution code through the DSL way, the access of the new device does not need to make a lot of changes to the related configuration information of other devices that have been accessed, so the modification of the gateway execution code is small, which reduces the software implementation cost.

[0058] Figure 1 A flowchart of a device access method provided by an embodiment of the present application; the execution subject of the method can be a terminal, a server or other computer device. As shown in the figure, Figure 1 The method can include:

[0059] S101, obtaining the point table information of the current device to be accessed, and generating the point position description information of the device to be accessed according to the point table information, the point position description information including the related configuration information of the target system accessed by the device to be accessed.

[0060] The method can be applied to the access processing of the related system of the Internet of Things device. The Internet of Things device includes but is not limited to: circuit breaker device, sensor device, etc.

[0061] The target system can refer to the system to be accessed by the device to be accessed, for example, when the device to be accessed is a circuit breaker, the target system can be a power system.

[0062] When a new device needs to access the target system, the point position description information of the device to be accessed can be generated based on the obtained point table information of the current device to be accessed.

[0063] It is worth noting that the point table of the Internet of Things device plays an important role in the automation control system, which usually refers to the list or summary of each variable point in the system. These variable points can include switch value input point (DI), switch value output point (DO), analog value input point (AI), analog value output point (AO) and communication point, etc.

[0064] In an industrial Internet of Things (IIoT) environment, the point table of an Internet of Things device can also contain other information related to device communication, data collection, remote control, etc. These information is crucial for realizing functions such as real-time monitoring, fault diagnosis, predictive maintenance, etc. of the device.

[0065] Specifically, the point table of an Internet of Things device can contain the following information:

[0066] Device basic information: including device name, model, manufacturer, production date, etc.

[0067] Variable information: including variable name, data type (such as digital quantity, analog quantity, etc.), measurement range, unit, etc.

[0068] Communication information: including communication protocol, communication address (such as IP address, MAC address, etc.), port number, etc.

[0069] Control information: including control commands, control parameters, etc. for realizing remote control functions.

[0070] Collection information: including collection frequency, collection method (such as timed collection, triggered collection, etc.) for realizing real-time data collection functions.

[0071] The point table information of the device to be accessed can be directly obtained from the database, and by converting the point table information, the point position description information of the device to be accessed can be generated, and the point position description information can include the related configuration information required by the device to be accessed when accessing the target system. The related configuration information can include one or more of the point table information.

[0072] S102, updating the device point position description information currently configured in the target system according to the point position description information of the device to be accessed, to obtain updated device point position description information.

[0073] Before the device to be accessed accesses the target system, some devices have been accessed in the target system, and the point position description information of the accessed devices has been configured.

[0074] In this embodiment, the point position description information of the device to be accessed can be used to update the device point position description information currently configured in the target system, so as to configure the point position description information of the device to be accessed in the target system.

[0075] By this way, the point position description information of the device to be accessed can be used to quickly update the device point position description information currently configured in the target system, without the need to modify a large amount of code of the gateway corresponding to the devices currently accessed in the target system, which can reduce development cost.

[0076] S103, generating target gateway execution code according to the updated device point position description information and running the target gateway execution code to access the current to-be-accessed device to the target system and collect data of the device accessed to the target system.

[0077] Optionally, based on the obtained updated device point position description information, the updated device point position description information can be compiled into target gateway execution code or downloaded into a gateway storage database, so that the target gateway execution code is executed by gateway software, and in the process of code execution, the to-be-accessed device is accessed to the target system, and data collection is performed according to the point position description information of each device accessed to the target system in the target gateway execution code. Thus, the compatibility of the to-be-accessed device is quickly completed.

[0078] To sum up, the device access method provided in the embodiment includes: obtaining point table information of a current to-be-accessed device, and generating point position description information of the to-be-accessed device according to the point table information, the point position description information including relevant configuration information of the to-be-accessed device accessing a target system; updating device point position description information currently configured for the target system according to the point position description information of the to-be-accessed device, to obtain updated device point position description information; generating target gateway execution code according to the updated device point position description information and running the target gateway execution code to access the current to-be-accessed device to the target system and collect data of the device accessed to the target system. When a new device needs to access the system, the point table information of the to-be-accessed device can be obtained to convert and generate the point position description information of the to-be-accessed device, so that the device point position description information currently configured for the system can be quickly updated based on the point position description information of the to-be-accessed device. In this way, the information compatibility of the new device can be realized without modifying the gateway execution code currently configured for the system, and the development cost is reduced.

[0079] Figure 2 Another flowchart of a device access method provided in the embodiment of the application is shown in the figure. Optionally, in step S101, generating the point position description information of the to-be-accessed device according to the point table information can include:

[0080] S201, extracting relevant configuration information of the to-be-accessed device accessing the target system from the point table information; the relevant configuration information at least including device information of the to-be-accessed device, a data collection strategy, a data packaging strategy, and a data reporting strategy.

[0081] Based on the above description of the point table information, the relevant configuration information required by the to-be-accessed device when accessing the target system can be extracted from the point table information of the to-be-accessed device. In the embodiment, the extracted relevant configuration information can include but is not limited to device information of the to-be-accessed device, a data collection strategy, a data packaging strategy, and a data reporting strategy.

[0082] The device information of the device to be accessed can include the category of the device, a point address, a point data length, a point type, a point description, a point data format, and the like; the data collection strategy can refer to the rate, frequency, content, and the like of the data collection of the gateway to the device; the collection strategies of different devices can be different; the data packaging strategy can refer to packaging the collected original data of the device into a preset data format, facilitating the data recognition and analysis of the server, and the preset data format can be, for example, a JSON format; and the data reporting strategy can refer to uploading the packaged data to the server for storage and display.

[0083] The category of the device can be, for example, a circuit breaker, a temperature and humidity sensor, an access control sensor, and the like; the point address of the temperature and humidity sensor can include, for example, a temperature point and a humidity point; and the point address of the access control sensor can include, for example, a switch point.

[0084] In some embodiments, the data collection strategies, the data packaging strategies, and the data reporting strategies corresponding to different devices can be completely different, but can also be the same. In particular, the data packaging strategies and the data reporting strategies can be shared by multiple devices.

[0085] S202, generating point description information of the device to be accessed according to the related configuration information and the domain-specific language template.

[0086] Optionally, the related configuration information extracted from the point table information can be converted into the point description information of the device to be accessed according to the extracted related configuration information of the device to be accessed and the domain-specific language template.

[0087] The domain-specific language template can refer to a DSL basic template. DSL is a computer programming language with limited expressiveness for a specific field. It is different from general-purpose computer languages (GPLs) and is only used in certain specific fields, such as HTML for displaying web pages and Emacs LISP language used by Emacs.

[0088] The design goal of DSL is to improve development efficiency, abstract the construction model through DSL, extract common code, and reduce repetitive labor. In addition, domain experts can build the functions of the system through DSL, and DSL can make up for the limitations of the host language.

[0089] Optionally, in step S202, the point description information of the device to be accessed can be generated according to the related configuration information and the domain-specific language template, which can include matching the related configuration information to the corresponding positions in the domain-specific language template to generate the point description information adapted to the device to be accessed.

[0090] The basic common code is provided in the domain-specific language template, and only the related configuration information of the device to be accessed needs to be filled in the corresponding position in the domain-specific language template to generate the point location description information adapted to the device to be accessed.

[0091] That is, the related basic code is provided in the domain-specific language template, and only the related configuration information of the device to be accessed needs to be filled in the corresponding position in the template to obtain the point location description language corresponding to the device to be accessed.

[0092] The point location description information corresponding to the device to be accessed is generated from the point table information of the device to be accessed by the above manner, which can be understood as generating the DSL file corresponding to the device to be accessed. Since the basic common code is provided in the DSL template, only the extracted related configuration information of the device to be accessed needs to be matched to the template to quickly generate the DSL file of the device to be accessed. For the developer, only the provided DSL basic template can realize the compatible processing of the new device, and the learning threshold is low.

[0093] Optionally, in step S102, the device point location description information currently configured by the target system is updated according to the point location description information of the device to be accessed to obtain updated device point location description information, which can include: adding the point location description information of the device to be accessed to the device point location description information currently configured to obtain the updated device point location description information.

[0094] In some embodiments, the device corresponding point location description information (DSL) file is generated for each device in the present scheme, that is, one DSL file is generated for each device, and the device point location description information currently configured by the target system includes the DSL files corresponding to the devices that have accessed the target system.

[0095] The DSL file corresponding to the device to be accessed can be used to update the DSL file currently configured by the target system to obtain an updated DSL file.

[0096] It is worth noting that the form of the generated DSL file can be a piece of other language, a TXT text file, or an EXECL table, and the file form is not limited.

[0097] Optionally, the currently configured device point location description information includes private point location description information and public point location description information; the step of adding the point location description information of the device to be accessed into the currently configured device point location description information to obtain updated device point location description information can include: if the public point location description information in the point location description information of the device to be accessed already exists in the public point location description information of the currently configured device point location description information, then the private point location description information in the point location description information of the device to be accessed is added into the private point location description information of the currently configured device point location description information.

[0098] In an implementable manner, the currently configured device point location description information of the target system can be divided into private point location description information and public point location description information. The public point location description information can refer to point location description information common to all accessed devices, for example, data packaging strategy, data reporting strategy, etc. It is possible that the data packaging strategy and the data reporting strategy of all devices are completely the same, and thus the same can be stored as public point location description information. The private point location description information is used to store part of point location information specific to each device, for example, the device information of each device is unique and is stored separately as private point location description information.

[0099] By dividing the configured device point location description information into public point location description information and private point location description information, storage space can be saved, all devices can jointly maintain a copy of the public point location description information, and when the configured device point location description is updated, only the private point location description information in the configured device point location description information is updated according to the private point location description information in the point location description information of the device to be accessed. The updating efficiency is improved, and resource storage space is saved.

[0100] In another implementable manner, the currently configured device point location description information of the target system is not divided into public and private parts, that is, each device corresponds to a DSL file and is stored separately. It is similar to that a plurality of subfiles are stored under a folder, and each subfile corresponds to a DSL file of a device. The DSL file of each device is maintained separately.

[0101] In this way, when the currently configured device point location description information of the target system is updated according to the point location description information of the device to be accessed, the point location description information (DSL file) of the device to be accessed can be added to the configured device point location description information as a separate file.

[0102] For example, the device point position description information currently configured by the target system is stored in a preset folder, the folder contains 5 subfolders, and the 5 subfolders are respectively DSL files corresponding to 5 accessed devices. The update of the configured device point position description information can be writing the DSL file of the to-be-accessed device into the preset folder, and then the preset folder contains 6 subfolders.

[0103] In this way, when there is a to-be-accessed device, a DSL file is added to the device point position description information currently configured by the target system. When some configuration information of the devices is the same, some repeated contents exist in the DSL files of the devices. However, this does not affect the implementation of the scheme.

[0104] Optionally, in step S103, generating the target gateway execution code according to the updated device point position description information can include: performing code compilation according to the updated point position description information and a gateway basic code to generate the target gateway execution code.

[0105] In some embodiments, the target gateway execution code can be compiled and generated according to the updated point position description information and the gateway basic code. The gateway basic code can refer to a code generation script, for example, a gateway program. The updated point position description information and the gateway basic code are collectively subjected to code compilation to generate the target gateway execution code.

[0106] By generating the target gateway execution code, the related configuration information of the to-be-accessed device can be compatible with the related configuration information of the accessed device.

[0107] Figure 3 Another device access method provided by the embodiment of the present application is provided. Optionally, in step S103, collecting data of the devices accessed to the target system can include:

[0108] S301, collecting data of each accessed device according to a data collection strategy of each accessed device.

[0109] Optionally, based on the generated target gateway execution code, running the target gateway execution code can access the to-be-accessed device to the target system, and perform data collection, processing, packaging, uploading and other operations on each device accessed to the target system according to the DSL execution designed in the target gateway code.

[0110] Optionally, the data of each accessed device can be collected according to the data collection strategy of the accessed device, the set collection frequency, collection rate and collection content.

[0111] S302, package the collected data of each device that has accessed the target system according to the data packaging strategy of each device that has accessed the target system.

[0112] According to the data packaging strategy of the accessed device, the collected data of each accessed device is packaged into a specified data format.

[0113] S303, report the packaged data of each device that has accessed the target system to the server for display according to the data reporting strategy of each device that has accessed the target system.

[0114] According to the data reporting strategy of the accessed device, the packaged data of each accessed device is uploaded to the server for storage and display.

[0115] In summary, the device access method provided in the embodiment includes: obtaining point table information of a current device to be accessed, and generating point position description information of the device to be accessed according to the point table information, the point position description information including relevant configuration information of the device to be accessed accessing a target system; updating device point position description information currently configured by the target system according to the point position description information of the device to be accessed, to obtain updated device point position description information; generating target gateway execution code according to the updated device point position description information and running the target gateway execution code, to access the target system by the current device to be accessed, and to collect data of the device accessing the target system. When a new device needs to access the system, the point table information of the device to be accessed can be obtained, and the point position description information of the device to be accessed is converted and generated, so that the device point position description information currently configured by the system can be quickly updated based on the point position description information of the device to be accessed. In this way, the information compatibility of the new device can be realized without modifying the gateway execution code currently configured by the system, thereby reducing the development cost.

[0116] In addition, the relevant configuration information extracted from the point table information is adapted by the domain-specific language template to generate the point position description information corresponding to the device to be accessed, which can reduce the development threshold of the developer and improve the efficiency of device compatibility processing.

[0117] The following describes the device, apparatus, and storage medium for executing the device access method provided in the present application, and the specific implementation process and technical effects are described above. The following will not be described again.

[0118] Figure 4 A schematic diagram of a device access apparatus provided in an embodiment of the present application is shown. The functions implemented by the device access apparatus correspond to the steps of the method described above. The apparatus can be understood as the computer device described above. As shown in the figure, the apparatus can include a generation module 410, an update module 420, and an execution module 430. Figure 4 ​

[0119] The generating module 410 is configured to acquire point table information of a current device to be accessed, and generate point position description information of the device to be accessed according to the point table information, the point position description information including relevant configuration information of the device to be accessed to access a target system;

[0120] The updating module 420 is configured to update device point position description information currently configured in the target system according to the point position description information of the device to be accessed, to obtain updated device point position description information.

[0121] The executing module 430 is configured to generate target gateway execution code according to the updated device point position description information, and run the target gateway execution code, so as to access the current device to be accessed to the target system, and collect data of the device accessed to the target system.

[0122] Optionally, the generating module 410 is specifically configured to extract, from the point table information, relevant configuration information of the device to be accessed to access the target system; the relevant configuration information at least includes device information of the device to be accessed, a data collection strategy, a data packaging strategy, and a data reporting strategy.

[0123] The point position description information of the device to be accessed is generated according to the relevant configuration information and a domain-specific language template.

[0124] Optionally, the generating module 410 is specifically configured to match the relevant configuration information to a corresponding position in the domain-specific language template, to generate the point position description information adapted to the device to be accessed.

[0125] Optionally, the updating module 420 is specifically configured to add the point position description information of the device to be accessed to the device point position description information currently configured, to obtain the updated device point position description information.

[0126] Optionally, the updating module 420 is specifically configured to, if common point position description information in the point position description information of the device to be accessed already exists in common point position description information of the device point position description information currently accessed, add private point position description information in the point position description information of the device to be accessed to private point position description information of the device point position description information currently configured.

[0127] Optionally, the executing module 430 is specifically configured to perform code compilation according to the updated point position description information and a gateway basic code, to generate the target gateway execution code.

[0128] Optionally, the executing module 430 is specifically configured to collect data of each device accessed to the target system according to a data collection strategy of each device accessed to the target system.

[0129] According to the data packaging strategy of each device accessing the target system, the collected data of each device accessing the target system is packaged.

[0130] According to the data reporting strategy of each device accessing the target system, the packaged data of each device accessing the target system is reported to the server for display.

[0131] The apparatus is configured to perform the method provided by the foregoing embodiments, and has similar implementation principles and technical effects, which will not be described here.

[0132] The above modules can be one or more integrated circuits configured to implement the above method, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), and the like. For example, when a certain module above is implemented in the form of a processing element scheduling code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can invoke program code. For another example, the modules can be integrated together in the form of a system on a chip (SOC).

[0133] The above modules can be connected or communicate with each other via wired or wireless connections. The wired connection can include metal cables, optical cables, hybrid cables, or any combination thereof. The wireless connection can include connections in the form of LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any one module can be divided into two or more units. Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and apparatus described above can refer to the corresponding process in the method embodiment, which will not be described here.

[0134] Figure 5 A structural schematic diagram of an electronic device according to an embodiment of the present application is provided. The device can be a computing device with data processing function.

[0135] The device can include a processor 801 and a storage medium 802.

[0136] The storage medium 802 is configured to store a program, and the processor 801 invokes the program stored in the storage medium 802 to execute the above-mentioned method embodiments. The specific implementation manners and technical effects are similar, and will not be described here.

[0137] The storage medium 802 stores program codes, and when the program codes are executed by the processor 801, the processor 801 performs various steps in the device access method according to various exemplary embodiments of the present application described in the above “Exemplary Method” section of the specification.

[0138] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.

[0139] The storage medium 802 is a non-volatile computer readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The storage medium can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card type storage medium, random access memory (RAM), static random access memory (SRAM), programmable read only memory (PROM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), magnetic storage medium, magnetic disk, optical disk, etc. The storage medium is any other medium capable of carrying or storing desired program codes in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The storage medium 802 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used to store program instructions and / or data.

[0140] Optionally, the present application also provides a program product, for example, a computer readable storage medium, comprising a program which, when executed by a processor, is used to execute the above-mentioned method embodiments.

[0141] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the described embodiments of the apparatus are merely schematic, and the division of the units is merely logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0142] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.

[0143] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of hardware plus software function units.

[0144] The integrated unit implemented in the form of software function units can be stored in a computer readable storage medium. The software function unit stored in the storage medium includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods described in the embodiments of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (English: Read-Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), a magnetic disk or an optical disk, and various media that can store program codes.

Claims

1. A device access method, characterized by, The method comprises the following steps: acquiring point table information of a current device to be accessed, and generating point location description information of the device to be accessed according to the point table information, wherein the point location description information comprises relevant configuration information of the device to be accessed for accessing a target system; updating device point location description information currently configured in the target system according to the point location description information of the device to be accessed, to obtain updated device point location description information; generating target gateway execution code according to the updated device point location description information, and running the target gateway execution code, so as to access the current device to be accessed to the target system, and collect data of the device accessed to the target system.

2. The method of claim 1, wherein, The step of generating the point location description information of the device to be accessed according to the point table information comprises the following steps: extracting relevant configuration information of the device to be accessed for accessing the target system from the point table information, wherein the relevant configuration information at least comprises device information of the device to be accessed, a data collection strategy, a data packaging strategy and a data reporting strategy; generating the point location description information of the device to be accessed according to the relevant configuration information and a domain-specific language template.

3. The method of claim 2, wherein, The step of generating the point location description information of the device to be accessed according to the relevant configuration information and the domain-specific language template comprises the following step: matching the relevant configuration information to a corresponding position in the domain-specific language template, to generate the point location description information adapted to the device to be accessed.

4. The method of claim 1, wherein, The step of updating the device point location description information currently configured in the target system according to the point location description information of the device to be accessed, to obtain updated device point location description information comprises the following step: adding the point location description information of the device to be accessed to the device point location description information currently configured, to obtain the updated device point location description information.

5. The method of claim 4, wherein, The device point location description information currently configured comprises private point location description information and public point location description information; the step of adding the point location description information of the device to be accessed to the device point location description information currently configured, to obtain the updated device point location description information comprises the following step: if the public point location description information in the point location description information of the device to be accessed already exists in the public point location description information in the device point location description information currently configured, then adding the private point location description information in the point location description information of the device to be accessed to the private point location description information in the device point location description information currently configured.

6. The method of claim 1, wherein, The step of generating the target gateway execution code according to the updated device point location description information comprises the following step: performing code compilation according to the updated point location description information and a gateway basic code, to generate the target gateway execution code.

7. The method of claim 1, wherein, The step of collecting data of the device accessed to the target system comprises the following steps: collecting data of each device accessed to the target system according to the data collection strategy of each device accessed to the target system; performing packaging processing on the collected data of each device accessed to the target system according to the data packaging strategy of each device accessed to the target system. The packaged data of each device accessed to the target system is reported to a server according to a data reporting strategy of each device accessed to the target system for display.

8. A device access apparatus, comprising: The method comprises: The generating module is configured to acquire point table information of a current to-be-accessed device, and generate point position description information of the to-be-accessed device according to the point table information, wherein the point position description information comprises relevant configuration information of the to-be-accessed device accessing a target system. The updating module is configured to update device point position description information currently configured by the target system according to the point position description information of the to-be-accessed device, to obtain updated device point position description information. The executing module is configured to generate target gateway execution code according to the updated device point position description information, and run the target gateway execution code, so as to access the current to-be-accessed device to the target system, and collect data of devices accessed to the target system. The method comprises:

9. An electronic device, comprising: The processor, the storage medium and the bus, the storage medium stores program instructions executable by the processor, when the electronic device runs, the processor and the storage medium through the bus communication, the processor executes the program instructions, to realize as claim 1 to 7 any one of the device access method. The storage medium stores a computer program, and the computer program is run by the processor to realize the device access method in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, ​