Internet of Things digital connection method and platform, electronic equipment and storage medium

By first configuring the tripartite IoT interface information, quickly finding and integrating configuration information to obtain target key-value pairs from the cache, the problems of low development efficiency and poor compatibility caused by changes in the IoT interface are solved, and fast adaptation and high efficiency are achieved Docking reduces development costs.

CN119094583AActive Publication Date: 2024-12-06SHENZHEN OKRA MUTUAL ENTERTAINMENT TECH CO LTD

Patent Information

Application Number
CN202410485464.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2024-12-06
Estimated Expiration
2044-04-22

AI Technical Summary

Technical Problem

The existing technology requires rewriting code and adjusting parameters when the Internet of Things interface changes, resulting in the project implementation time being extended, unable to respond to changes in time, and a lot of manpower and time are required to connect, and third-party Internet of Things interfaces cannot provide call capabilities in time. , front-end and back-end developers need to wait for the joint debugging to be completed.

Method used

By first configuring the configuration information of the tripartite IoT interface, quickly searching and integrating the configuration information according to the interface call request, obtaining the target key-value pairs from the cache as return data, achieving rapid adaptation and efficient docking, and improving compatibility and development efficiency.

Benefits of technology

It quickly adapts to various tripartite Internet of Things interface requirements, improves docking efficiency, reduces the risks brought about by modifying code, saves development time and development volume, and improves development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094583A_ABST
    Figure CN119094583A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things, and discloses an Internet of Things digital connection method and platform, electronic equipment and a storage medium, and the method comprises the steps: searching three-party Internet of Things interface configuration information configured in advance according to an Internet of Things interface call request received in advance, and obtaining to-be-configured information; obtaining target configuration information according to the Internet of Things interface calling request and the to-be-configured information; based on a cache field in the target configuration information as a write-in cache, determining whether a target key value pair corresponding to the target configuration information exists in the cache or not, and if yes, obtaining the corresponding target key value pair as return data to be returned; wherein the target key-value pair in the cache is obtained by caching a return target value obtained by calling a third-party Internet of Things interface based on the target configuration information and a target key generated according to the target configuration information in the form of the key-value pair. According to the invention, the compatibility and development efficiency of the three-party Internet of Things interface are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to an Internet of Things digital connection method, platform, electronic device and storage medium. Background Art

[0002] Usually, when implementing a system, most of them need the support of a third-party IoT interface service. In this case, most systems connect to the third-party IoT interface by writing code. Another scenario is that a third party provides an SDK, which can be used by the user by calling functions; in essence, the SDK encapsulates the third-party IoT interface service.

[0003] Usually, to connect an IoT interface, developers need to connect with the developers of the IoT interface provider. After writing the code, both parties will conduct joint debugging of the IoT interface call. Then submit it to the tester for business verification; or after packaging, provide the IoT interface to the front end of this system for direct use.

[0004] However, in the above method, once the IoT interface of the IoT interface provider changes, for example, the IoT interface performance is poor or the cache needs to be increased, it is necessary to rewrite the business code or adjust the parameters, and then re-develop and put it into production, which not only slows down the implementation of the project, but also requires human and material support, and cannot respond to changes in demand in a timely manner; in addition, relevant R&D personnel are needed to complete the docking by writing code, which inevitably requires a lot of manpower and a lot of time, and when the third-party IoT interface cannot provide calling capabilities in time, the front-end and back-end developers need to wait until the third-party IoT interface can be used before completing the joint debugging work. Summary of the invention

[0005] The present invention provides an Internet of Things digital connection method, platform, electronic device and storage medium, which are used to improve the compatibility and development efficiency of a three-party Internet of Things interface.

[0006] The technical solution of the present invention to solve the above technical problems is as follows:

[0007] A digital connection method for the Internet of Things, comprising:

[0008] According to the previously received IoT interface call request, searching for previously configured third-party IoT interface configuration information to obtain the information to be configured;

[0009] Obtain target configuration information according to the Internet of Things interface call request and the information to be configured;

[0010] Based on the cache field in the target configuration information being a write cache, determine whether there is a target key-value pair corresponding to the target configuration information in the cache; if so, obtain the corresponding target key-value pair and return it as return data; wherein, the target key-value pair in the cache is first cached in the form of a key-value pair by first calling a third-party Internet of Things interface based on the target configuration information and a target key generated according to the target configuration information.

[0011] According to the Internet of Things digital connection method provided by the present invention, the determining whether there is a target key-value pair corresponding to the target configuration information in the cache includes:

[0012] If the target key-value pair corresponding to the target configuration information does not exist in the cache, determining whether the baffle field in the target configuration information is an open baffle;

[0013] When it is determined that the baffle field in the target configuration information is an open baffle, the baffle data is returned as the return data.

[0014] According to the Internet of Things digital connection method provided by the present invention, after obtaining the target configuration information, the method includes:

[0015] Based on the cache field in the target configuration information being not to write to the cache, determining whether the baffle field in the target configuration information is to open the baffle;

[0016] When it is determined that the baffle field in the target configuration information is an open baffle, the baffle data is returned as the return data.

[0017] According to the Internet of Things digital connection method provided by the present invention, determining whether the baffle field in the target configuration information is an open baffle includes:

[0018] When it is determined that the baffle field in the target configuration information is not to open the baffle, a third-party Internet of Things interface call request is initiated according to the target configuration information, and a return result is parsed to obtain a target value;

[0019] Obtaining a target key-value pair according to the target value and the target configuration information;

[0020] Determine whether the cache field in the target configuration information is a write cache;

[0021] If it is determined that the cache field in the target configuration information is a write cache, writing the target key-value pair into the cache, and returning the target key-value pair as the return data;

[0022] Otherwise, the target key-value pair is returned as the return data.

[0023] According to the Internet of Things digital connection method provided by the present invention, a target key-value pair is obtained according to the target value and the target configuration information, including:

[0024] Using a preset encryption algorithm, encrypt the target configuration information to obtain a target key;

[0025] A target key-value pair is obtained according to the target value and the target key in the form of a key-value pair.

[0026] According to the Internet of Things digital connection method provided by the present invention, a third-party Internet of Things interface call request is initiated according to the target configuration information, including:

[0027] According to the request method field in the target configuration information, select the corresponding request method and initiate a third-party Internet of Things interface call request.

[0028] According to the Internet of Things digital connection method provided by the present invention, the Internet of Things interface call request includes an application programming Internet of Things interface source file and a request source;

[0029] Before obtaining the target configuration information according to the request parameters in the Internet of Things interface call request and the information to be configured, the method includes:

[0030] Determine that the application programming IoT interface source file is valid; or,

[0031] Determine whether the application programming Internet of Things interface source file is valid, and determine whether the request source is legal.

[0032] The present invention also provides an Internet of Things digital connection platform, comprising:

[0033] The information search module searches for the previously configured third-party IoT interface configuration information according to the previously received IoT interface call request to obtain the information to be configured;

[0034] A data integration module obtains target configuration information according to the Internet of Things interface call request and the information to be configured;

[0035] The data acquisition module determines whether there is a target key-value pair corresponding to the target configuration information in the cache based on the cache field in the target configuration information as a write cache. If so, the corresponding target key-value pair is obtained and returned as return data; wherein the target key-value pair in the cache is first cached in the form of a key-value pair by first calling a third-party Internet of Things interface based on the target configuration information and obtaining a return target value and a target key generated according to the target configuration information.

[0036] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for digital connection of the Internet of Things as described in any one of the above items is implemented.

[0037] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for digitally connecting the Internet of Things described in any one of the above items is implemented.

[0038] The present invention also provides a computer product having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for digitally connecting the Internet of Things described in any one of the above items is implemented.

[0039] The beneficial effects of the present invention are as follows: by configuring the configuration information of the third-party Internet of Things interface in advance, the third-party Internet of Things interface configuration information can be quickly searched according to the Internet of Things interface call request to obtain the required information to be configured, thereby integrating the information to be configured and the Internet of Things interface call request, so as to quickly obtain the target key-value pair from the cache as the return data of the Internet of Things interface call request according to the integrated target configuration information, thereby achieving the purpose of quickly adapting to various third-party Internet of Things interface requirements, efficiently docking the third-party Internet of Things interface, improving the compatibility with the third-party Internet of Things interface, and facilitating rapid deployment and production, greatly reducing various risks brought about by code modification, saving development time and development effort, and improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is one of the flow charts of the method for digital connection of the Internet of Things provided by the present invention;

[0041] Figure 2 This is the second flow chart of the method for digital connection of the Internet of Things provided by the present invention;

[0042] Figure 3 It is a structural schematic diagram of the Internet of Things digital connection platform provided by the present invention;

[0043] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0045] In the description of this application, 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. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0046] In the description of the present application, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details to obscure the description of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0047] Reference Figure 1 and Figure 2 , Figure 1 This is one of the flow charts of the method for digital connection of the Internet of Things provided by the present invention. Figure 2 This is a second flow chart of the method for digital connection of the Internet of Things provided by the present invention, which includes steps 10 to 30:

[0048] Step 10: According to the previously received IoT interface call request, the previously configured third-party IoT interface configuration information is searched to obtain the information to be configured.

[0049] In this embodiment, according to the previously received IoT interface call request, the previously configured third-party IoT interface configuration information is searched to obtain the information to be configured, including: passing the previously received IoT interface call request to the preset call entry to obtain the entry parameters; according to the entry parameters, searching the previously configured third-party IoT interface configuration information to obtain the information to be configured. It should be noted that the preset call entry can be set based on the actual configuration requirements in advance, and no further limitation is made here, for example:

[0050] / **api code* /

[0051] private String code;

[0052] / **Request source* /

[0053] private String source;

[0054] / **parameter* /

[0055] Private Map<String,Object> data;

[0056] In addition, the IoT interface call request includes the application programming IoT interface source file (API code), the request source and the request parameters. By passing the information in the IoT interface call request to the preset call entry, it is convenient to unify the forms of different requests, facilitate the subsequent search for configuration information, and achieve the purpose of quickly adapting to changes in demand.

[0057] In an optional embodiment, before obtaining the target configuration information based on the request parameters and the information to be configured in the IoT interface call request, it includes: determining that the application programming IoT interface source file is valid; or, determining that the application programming IoT interface source file is valid, and determining whether the request source is legal.

[0058] It should be added that determining whether the application programming IoT interface source file is valid includes: determining whether the corresponding information is configured in the previously configured third-party IoT interface configuration information, if so, it is valid, otherwise, it is invalid; and / or determining whether the request on the requesting side is sent incorrectly, if so, it is invalid, otherwise, it is valid.

[0059] It should be noted that if the corresponding information is not configured in the previously configured third-party IoT interface configuration information, it is also necessary to confirm whether the IoT interface called by the IoT interface call request is added to the corresponding IoT interface configuration information of the third-party IoT interface, and after the corresponding newly added information is configured in the third-party IoT interface configuration information, re-search the corresponding configuration information of the IoT interface call request. It can be seen that when the third-party IoT interface changes, it is only necessary to change or add the corresponding IoT interface information in the third-party IoT interface configuration information to quickly connect the third-party IoT interface to the front-end for use, so as to quickly adapt to various needs, especially in business scenarios where a large amount of data from the third-party IoT interface needs to be connected to be displayed in the system. Only the above configuration method is required to quickly connect the third-party IoT interface to the front-end for display.

[0060] In addition, determining whether the request source is legal includes: determining whether a corresponding request source exists in the preset source, if so, it is legal, otherwise, it is illegal; wherein, the preset source can be pre-set based on the request source corresponding to the request authority, and no further limitation is made here.

[0061] In an optional embodiment, the third-party Internet of Things interface configuration information includes fields, types, lengths, and whether they are controllable, wherein the fields include primary key id, business source business_source, business name business_type, Internet of Things interface name name, request address url, request method method, parameter type content_type, request header headers, parameter paras, timeout setting timout, return value type return_type, fields that need to be given in the return field return_fields, field name corresponding to the total number in the return value return_count_field, field name corresponding to the content in the return value return_data_field, field name corresponding to the status in the return value return_status_field, and remarks r emarks, cache field cache_second to indicate whether to cache, data source field excel_data_field in excel, timeout time for calling IoT interface timeout_second, baffle field has_forward to indicate whether to open the baffle, default return value api_data of IoT interface, whether to record the number of calls has_record_call, creation user name create_by_name, whether to verify data permission check_permission, updater update_by, creator create_by, update time modified_time and new time created_time; types include varchar for storing variable-length strings, int for storing integers and date and time datetime types.

[0062] Furthermore, id is of type int, with a length of 4 and is uncontrollable; business_source is of type varchar, with a length of 30 and is uncontrollable; business_type is of type varchar, with a length of 20 and is uncontrollable; name is of type varchar, with a length of 30 and is uncontrollable; url is of type varchar, with a length of 2000 and is uncontrollable; method is of type varchar, with a length of 20 and is uncontrollable; content_type is of type varchar, with a length of 30 and is uncontrollable; headers is of type varchar, with a length of 200 and is controllable; paras is of type varchar, with a length of 600 and is controllable; timeout is of type int, with a length of 4 and is uncontrollable; return_type is of type varchar, with a length of 20 and is controllable; return_fields is of type varchar, with a length of 300 and is controllable; return_count_field is of type varchar, with a length of 20 and is controllable; return_data_field is of type varchar, with a length of 20 and is controllable; return_status_field is of type varchar, with a length of 20 and is controllable; d is of type varchar, with a length of 20, which is controllable; remarks is of type varchar, with a length of 200, which is controllable; cache_second is of type int, with a length of 8, which is uncontrollable; excelexcel_data_field is of type varchar, with a length of 60, which is controllable; timeout_second is of type int, with a length of 8, which is controllable; has_forward is of type int, with a length of 8, which is controllable; api_data is of type varchar, with a length of 5000, which is controllable; has_record_call is of type varchar, with a length of 11, which is controllable; create_by_name is of type varchar, with a length of 255, which is uncontrollable; check_permission is of type varchar, with a length of 11, which is uncontrollable; update_by is of type varchar, with a length of 30, which is controllable; create_by is of type varchar, with a length of 30, which is controllable; modified_time is of type datetime, with a length of 16, which is uncontrollable; created_time is of type datetime, with a length of 16, which is uncontrollable.

[0063] In addition, return_type includes returning any object (reference data type) object and ordered string list list; cache_second is 0, which means no cache is used, and greater than 0 means the cache duration, the default value is 0; timeout_second is in seconds, the default value is 30 seconds; check_permission is 1 for verification, and 0 for no verification.

[0064] Step 20, obtaining target configuration information according to the Internet of Things interface call request and the information to be configured.

[0065] In this embodiment, the target configuration information is obtained according to the Internet of Things interface call request and the information to be configured, including: integrating the request parameters and the corresponding parameters in the information to be configured to obtain the target configuration information.

[0066] Step 30, based on the cache field in the target configuration information, determines whether there is a target key-value pair corresponding to the target configuration information in the cache. If so, obtains the corresponding target key-value pair and returns it as return data; wherein, the target key-value pair in the cache is first cached in the form of a key-value pair by first calling a third-party IoT interface based on the target configuration information and obtaining the return target value and the target key generated according to the target configuration information.

[0067] It should be noted that the target key-value pairs in the cache are cached during the previous request, so they can be directly obtained and returned during subsequent requests, thereby quickly connecting to the third-party IoT interface for front-end use, greatly saving development and implementation time.

[0068] In an optional embodiment, determining whether there is a target key-value pair corresponding to the target configuration information in the cache includes: if there is no target key-value pair corresponding to the target configuration information in the cache, determining whether the baffle field in the target configuration information is an open baffle; when it is determined that the baffle field in the target configuration information is an open baffle, returning the baffle data as return data.

[0069] In an optional embodiment, after obtaining the target configuration information, it includes: based on the cache field in the target configuration information being not written to the cache, determining whether the baffle field in the target configuration information is an open baffle; when it is determined that the baffle field in the target configuration information is an open baffle, returning the baffle data as return data.

[0070] It should be noted that by opening the baffle and returning simulated data, it is possible to avoid the situation where effective access cannot be provided in time due to failure of the third-party IoT interface during joint debugging with the third-party IoT interface, thereby not affecting the development progress of the front end.

[0071] In an optional embodiment, determining whether the baffle field in the target configuration information is an open baffle includes: when determining that the baffle field in the target configuration information is a non-open baffle, initiating a third-party Internet of Things interface call request and parsing the return result according to the target configuration information to obtain a target value; obtaining a target key-value pair according to the target value and the target configuration information; determining whether the cache field in the target configuration information is a write cache; if determining that the cache field in the target configuration information is a write cache, writing the target key-value pair to the cache, and returning the target key-value pair as return data; otherwise, returning the target key-value pair as return data.

[0072] It should be noted that, through the above method, when a new third-party IoT interface is added or there is a change in the third-party IoT interface, only adaptation and adjustment need to be made to achieve compatibility with the changes in the third-party IoT interface. In addition, in the case of poor performance of the IoT interface, the problem of poor performance of the IoT interface can be solved in time by timely adjusting the response timeout of the IoT interface or by configuring to increase the cache, thereby achieving rapid deployment and production, greatly reducing the various risks brought about by code modifications, and saving development time and effort.

[0073] Specifically, according to the target value and the target configuration information, a target key-value pair is obtained, including: using a preset encryption algorithm to encrypt the target configuration information to obtain a target key; according to the target value and the target key, in the form of a key-value pair, a target key-value pair is obtained. It should be added that the encryption algorithm can be selected according to actual design requirements, such as the MAD digest algorithm, etc., which is not further limited here.

[0074] In addition, according to the target configuration information, initiating a third-party IoT interface call request includes: selecting a corresponding request method according to the request method field in the target configuration information, and initiating a third-party IoT interface call request. It should be noted that if the request method in the configuration information includes GET, POST, and SOCKET, any method can be selected to initiate a third-party IoT interface call request.

[0075] In an optional embodiment, in order to facilitate the subsequent determination of the third-party IoT interface call status, that is, whether the request is successfully called and whether data is obtained, etc., after returning the target key-value pair as the return data, it includes: writing the request into the IoT interface call statistics information. It should be noted that the IoT interface call information can record the third-party IoT interface call status of this request in text form or in table form. For example, when it is in table form, see Table 1 below.

[0076] Table 1 Statistics of IoT interface calls

[0077]

[0078] The embodiment of the present invention configures the third-party Internet of Things interface configuration information in advance to quickly search for the third-party Internet of Things interface configuration information according to the Internet of Things interface call request, obtains the required information to be configured, and then integrates the information to be configured and the Internet of Things interface call request, so as to quickly obtain the target key-value pair from the cache as the return data of the Internet of Things interface call request according to the integrated target configuration information, thereby achieving the purpose of quickly adapting to various third-party Internet of Things interface requirements, efficiently docking the third-party Internet of Things interface, improving the compatibility with the third-party Internet of Things interface, and facilitating rapid deployment and production, greatly reducing various risks brought about by code modification, saving development time and development effort, and improving development efficiency.

[0079] The Internet of Things digital connection platform provided by the present invention is described below. The Internet of Things digital connection platform described below and the Internet of Things digital connection method described above can be referenced to each other. Figure 3 A schematic diagram of the structure of the Internet of Things digital connection platform provided by an embodiment of the present invention, such as Figure 3 As shown, the Internet of Things digital connection platform provided by the embodiment of the present invention includes:

[0080] The information search module 301 searches for the previously configured third-party Internet of Things interface configuration information according to the previously received Internet of Things interface call request, and obtains the information to be configured;

[0081] The data integration module 302 obtains target configuration information according to the IoT interface call request and the information to be configured;

[0082] The data acquisition module 303 is a write cache based on the cache field in the target configuration information, and determines whether there is a target key-value pair corresponding to the target configuration information in the cache. If so, the corresponding target key-value pair is obtained and returned as return data; wherein, the target key-value pair in the cache is first cached in the form of a key-value pair by calling a third-party Internet of Things interface based on the target configuration information and a target key generated according to the target configuration information.

[0083] In this embodiment, the information search module 301 includes: a parameter acquisition unit, which transmits the previously received Internet of Things interface call request to a preset call entry to obtain entry parameters; an information search unit, which searches for the previously configured third-party Internet of Things interface configuration information according to the entry parameters to obtain the information to be configured.

[0084] In an optional embodiment, the device includes: a validity judgment module, which determines that the application programming Internet of Things interface source file is valid before obtaining the target configuration information based on the request parameters and the information to be configured in the Internet of Things interface call request; or, determines that the application programming Internet of Things interface source file is valid, and determines whether the request source is legal.

[0085] It should be added that the validity judgment module is used to: determine whether the corresponding information is configured in the previously configured third-party Internet of Things interface configuration information, if so, it is valid, otherwise, it is invalid; and / or determine whether the request on the requesting side is sent incorrectly, if so, it is invalid, otherwise, it is valid.

[0086] In addition, the validity judgment module is used to determine whether there is a corresponding request source in the preset source. If so, it is legal, otherwise, it is illegal. Among them, the preset source can be set in advance based on the request source corresponding to the request authority, and no further limitation is made here.

[0087] The data integration module 302 includes: an integration unit that integrates the request parameters and corresponding parameters in the information to be configured to obtain target configuration information.

[0088] In an optional embodiment, the data acquisition module 303 also includes: a baffle judgment unit, which determines whether the baffle field in the target configuration information is an open baffle if the target key-value pair corresponding to the target configuration information does not exist in the cache; and a data return unit, which returns the baffle data as return data when it is determined that the baffle field in the target configuration information is an open baffle.

[0089] In an optional embodiment, the data acquisition module 303 also includes: a baffle judgment unit, after obtaining the target configuration information, determines whether the baffle field in the target configuration information is an open baffle based on the cache field in the target configuration information being not written to the cache; and a data return unit, when it is determined that the baffle field in the target configuration information is an open baffle, returns the baffle data as return data.

[0090] In an optional embodiment, the data acquisition module 303 also includes: a value acquisition unit, which, when determining that the baffle field in the target configuration information is not to open the baffle, initiates a third-party Internet of Things interface call request and parses the return result according to the target configuration information to obtain the target value; a key-value pair acquisition unit, which obtains the target key-value pair according to the target value and the target configuration information; a cache judgment unit, which determines whether the cache field in the target configuration information is a write cache; a cache writing unit, which writes the target key-value pair to the cache if it is determined that the cache field in the target configuration information is a write cache, and a data return unit that returns the target key-value pair as return data; otherwise, the data return unit returns the target key-value pair as return data.

[0091] Specifically, the key-value pair acquisition unit includes: an encryption subunit, which uses a preset encryption algorithm to encrypt the target configuration information to obtain a target key; a key-value pair acquisition subunit, which obtains a target key-value pair in the form of a key-value pair according to the target value and the target key. It should be added that the encryption algorithm can be selected according to actual design requirements, such as the MAD digest algorithm, etc., which is not further limited here.

[0092] In addition, the value acquisition unit includes: a request initiation subunit, which selects a corresponding request method according to the request method field in the target configuration information, and initiates a third-party Internet of Things interface call request. It should be noted that if the request method in the configuration information includes GET, POST and SOCKET, any method can be selected to initiate a third-party Internet of Things interface call request.

[0093] In an optional embodiment, in order to facilitate the subsequent determination of the third-party Internet of Things interface call status, that is, whether the request is successfully called and whether data is obtained, the device also includes: a statistical module, which writes the request into the Internet of Things interface call statistical information after returning the target key-value pair as return data.

[0094] The embodiment of the present invention configures the third-party Internet of Things interface configuration information in advance to quickly search for the third-party Internet of Things interface configuration information according to the Internet of Things interface call request, obtains the required information to be configured, and then integrates the information to be configured and the Internet of Things interface call request, so as to quickly obtain the target key-value pair from the cache as the return data of the Internet of Things interface call request according to the integrated target configuration information, thereby achieving the purpose of quickly adapting to various third-party Internet of Things interface requirements, efficiently docking the third-party Internet of Things interface, improving the compatibility with the third-party Internet of Things interface, and facilitating rapid deployment and production, greatly reducing various risks brought about by code modification, saving development time and development effort, and improving development efficiency.

[0095] See also Figure 4 , Figure 4 Schematic diagram of an embodiment of the electronic device provided by the present invention. Figure 4 As shown, an embodiment of the present invention provides an electronic device 400, including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, the following steps are implemented:

[0096] According to the previously received IoT interface call request, searching for previously configured third-party IoT interface configuration information to obtain the information to be configured;

[0097] Obtain target configuration information according to the Internet of Things interface call request and the information to be configured;

[0098] Based on the cache field in the target configuration information being a write cache, determine whether there is a target key-value pair corresponding to the target configuration information in the cache; if so, obtain the corresponding target key-value pair and return it as return data; wherein, the target key-value pair in the cache is first cached in the form of a key-value pair by first calling a third-party Internet of Things interface based on the target configuration information and a target key generated according to the target configuration information.

[0099] According to the Internet of Things digital connection method provided by the present invention, the determining whether there is a target key-value pair corresponding to the target configuration information in the cache includes:

[0100] If the target key-value pair corresponding to the target configuration information does not exist in the cache, determining whether the baffle field in the target configuration information is an open baffle;

[0101] When it is determined that the baffle field in the target configuration information is an open baffle, the baffle data is returned as the return data.

[0102] According to the Internet of Things digital connection method provided by the present invention, after obtaining the target configuration information, the method includes:

[0103] Based on the cache field in the target configuration information being not to write to the cache, determining whether the baffle field in the target configuration information is to open the baffle;

[0104] When it is determined that the baffle field in the target configuration information is an open baffle, the baffle data is returned as the return data.

[0105] According to the Internet of Things digital connection method provided by the present invention, determining whether the baffle field in the target configuration information is an open baffle includes:

[0106] When it is determined that the baffle field in the target configuration information is not to open the baffle, a third-party Internet of Things interface call request is initiated according to the target configuration information, and a return result is parsed to obtain a target value;

[0107] Obtaining a target key-value pair according to the target value and the target configuration information;

[0108] Determine whether the cache field in the target configuration information is a write cache;

[0109] If it is determined that the cache field in the target configuration information is a write cache, writing the target key-value pair into the cache, and returning the target key-value pair as the return data;

[0110] Otherwise, the target key-value pair is returned as the return data.

[0111] According to the Internet of Things digital connection method provided by the present invention, a target key-value pair is obtained according to the target value and the target configuration information, including:

[0112] Using a preset encryption algorithm, encrypt the target configuration information to obtain a target key;

[0113] A target key-value pair is obtained according to the target value and the target key in the form of a key-value pair.

[0114] According to the Internet of Things digital connection method provided by the present invention, a third-party Internet of Things interface call request is initiated according to the target configuration information, including:

[0115] According to the request method field in the target configuration information, select the corresponding request method and initiate a third-party Internet of Things interface call request.

[0116] According to the Internet of Things digital connection method provided by the present invention, the Internet of Things interface call request includes an application programming Internet of Things interface source file and a request source;

[0117] Before obtaining the target configuration information according to the request parameters in the Internet of Things interface call request and the information to be configured, the method includes:

[0118] Determine that the application programming IoT interface source file is valid; or,

[0119] Determine whether the application programming Internet of Things interface source file is valid, and determine whether the request source is legal.

[0120] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, platforms, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0122] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (platforms), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A platform that specifies the functionality of a box or boxes.

[0123] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction platform that implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0125] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0126] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A digital connection method for the Internet of Things, It is characterized in that include: According to the previously received IoT interface call request, searching for previously configured third-party IoT interface configuration information to obtain the information to be configured; Obtain target configuration information according to the Internet of Things interface call request and the information to be configured; Based on the cache field in the target configuration information being a write cache, determine whether there is a target key-value pair corresponding to the target configuration information in the cache; if so, obtain the corresponding target key-value pair and return it as return data; wherein, the target key-value pair in the cache is first cached in the form of a key-value pair by first calling a third-party Internet of Things interface based on the target configuration information and a target key generated according to the target configuration information.

2. The method for digital connection of the Internet of Things according to claim 1, It is characterized in that The determining whether a target key-value pair corresponding to the target configuration information exists in the cache includes: If the target key-value pair corresponding to the target configuration information does not exist in the cache, determining whether the baffle field in the target configuration information is an open baffle; When it is determined that the baffle field in the target configuration information is an open baffle, the baffle data is returned as the return data.

3. The method for digital connection of the Internet of Things according to claim 1, It is characterized in that After obtaining the target configuration information, the following steps are included: Based on the cache field in the target configuration information being not to write to the cache, determining whether the baffle field in the target configuration information is to open the baffle; When it is determined that the baffle field in the target configuration information is an open baffle, the baffle data is returned as the return data.

4. The method for digital connection of the Internet of Things according to claim 2 or 3, It is characterized in that Determining whether the baffle field in the target configuration information is an open baffle includes: When it is determined that the baffle field in the target configuration information is not to open the baffle, a third-party Internet of Things interface call request is initiated according to the target configuration information, and a return result is parsed to obtain a target value; Obtaining a target key-value pair according to the target value and the target configuration information; Determine whether the cache field in the target configuration information is a write cache; If it is determined that the cache field in the target configuration information is a write cache, writing the target key-value pair into the cache, and returning the target key-value pair as the return data; Otherwise, the target key-value pair is returned as the return data.

5. The method for digital connection of the Internet of Things according to claim 4, It is characterized in that According to the target value and the target configuration information, a target key-value pair is obtained, including: Using a preset encryption algorithm, encrypt the target configuration information to obtain a target key; A target key-value pair is obtained according to the target value and the target key in the form of a key-value pair.

6. The method for digital connection of the Internet of Things according to claim 4, It is characterized in that Initiate a third-party IoT interface call request based on the target configuration information, including: According to the request method field in the target configuration information, select the corresponding request method and initiate a third-party Internet of Things interface call request.

7. The method for digital connection of the Internet of Things according to claim 1, It is characterized in that The Internet of Things interface call request includes an application programming Internet of Things interface source file and a request source; Before obtaining the target configuration information according to the request parameters in the Internet of Things interface call request and the information to be configured, the method includes: Determine that the application programming Internet of Things interface source file is valid; or, Determine whether the application programming Internet of Things interface source file is valid, and determine whether the request source is legal.

8. An IoT digital connection platform, It is characterized in that include: The information search module searches for the previously configured third-party IoT interface configuration information according to the previously received IoT interface call request to obtain the information to be configured; A data integration module obtains target configuration information according to the Internet of Things interface call request and the information to be configured; The data acquisition module determines whether there is a target key-value pair corresponding to the target configuration information in the cache based on the cache field in the target configuration information as a write cache. If so, the corresponding target key-value pair is obtained and returned as return data; wherein the target key-value pair in the cache is first cached in the form of a key-value pair by first calling a third-party Internet of Things interface based on the target configuration information and obtaining a return target value and a target key generated according to the target configuration information.

9. An electronic device, It is characterized in that The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for digital connection of the Internet of Things as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium, It is characterized in that The storage medium stores a computer software program, and when the computer software program is executed by the processor, the method for digital connection of the Internet of Things as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Configuration information setting method and device and terminal management system

    CN109245928A

  • Method and device for realizing interface baffle

    CN115220822A

  • Test case baffle system based on socket protocol

    CN115658489A

  • Third-party interface request design method and device, and storage medium

    CN115811513A

  • Data processing method and device, equipment and storage medium

    CN116938739A

Cited By

  • Competition management method and device of network security CTF platform and computer equipment

    CN119847391A