Iot device migration method, apparatus, device, storage medium, and program product
By using an automated IoT device migration method, the high cost and inefficiency caused by manual entry of device identifiers in existing technologies are solved, realizing automatic migration of device identifiers without human intervention and improving migration efficiency.
Patent Information
- Application Number
- CN202411217176.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-08-30
AI Technical Summary
During the migration of existing IoT platform devices, a large amount of manual input of device identifiers is required, resulting in high labor costs and low efficiency.
This paper provides a method for migrating IoT devices. By receiving user operations, the method automatically creates a device identifier migration task, selects the source IoT platform and the list of device identifiers to be migrated, verifies and converts the target device identifier format, and realizes the automatic migration of device identifiers.
It reduced labor costs, improved equipment relocation efficiency, and enabled an automated equipment relocation process without human intervention.
Smart Images

Figure CN119052291B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of an Internet of Things platform, and particularly relates to an Internet of Things device migration method and device, equipment, a storage medium and a program product. BACKGROUND
[0002] With the development of the Internet of Things industry and the rapid growth of customer business scale, the original Internet of Things platform cannot match the business development needs, and how to migrate the devices and business on the original Internet of Things platform to a new Internet of Things platform has become a difficult problem for enterprises.
[0003] In related technologies, when implementing device migration, device manufacturers usually redevelop device-side business logic and application-side business logic according to the business process and technical standards of the new Internet of Things platform, and then adjust the success, migrate the device identifier of the old Internet of Things platform to the new Internet of Things platform through manual input, and finally switch the application-side data to the new Internet of Things platform and associate the new Internet of Things platform with the Internet of Things device. The whole process consumes human cost, especially when migrating the device identifier to the new Internet of Things platform, the user needs to manually input a large number of device identifiers, which is time-consuming and laborious and inefficient. SUMMARY
[0004] The embodiments of the application provide an Internet of Things device migration method, device, equipment, storage medium and program product, which can reduce human cost and improve migration efficiency.
[0005] In one aspect, the embodiments of the application provide an Internet of Things device migration method, which comprises:
[0006] Receiving a target operation of a user, the target operation being used to create a device identifier migration task, select a source Internet of Things platform and select a list of source device identifiers to be migrated;
[0007] In response to the target operation, migrating the source device identifiers corresponding to the list of source device identifiers from the source Internet of Things platform to a target platform according to the device identifier migration task and the list of source device identifiers, to obtain target device identifiers;
[0008] Verifying whether the source device identifiers are consistent with the identifier format of the target device identifiers on the target platform;
[0009] In the case where the source device identifiers are inconsistent with the target device identifiers, converting the target device identifiers and creating the converted target device identifiers on the target platform.
[0010] Optionally, before the response to the target operation, the method further comprises:
[0011] obtaining a working cycle of an Internet of Things device corresponding to the source device identifier;
[0012] determining a migration time of the Internet of Things device corresponding to the source device identifier according to the working cycle, the migration time being a first idle cycle of the Internet of Things device corresponding to the source device identifier;
[0013] triggering a migration task of the Internet of Things device corresponding to the source device identifier based on the migration time.
[0014] Optionally, after the target device identifier corresponding to the source device list is migrated from the source Internet of Things platform according to the device identifier migration task and the source device identifier list, the method further comprises:
[0015] determining a device type of the Internet of Things device corresponding to the target device identifier based on the target device identifier;
[0016] determining a data constraint condition of data transmission based on the device type;
[0017] performing data format analysis on the target device identifier based on the data constraint condition and a preset analysis manner, to obtain a standard data format of the target device identifier.
[0018] Optionally, before the target device identifier corresponding to the source device list is migrated from the source Internet of Things platform according to the device identifier migration task and the source device identifier list, the method further comprises:
[0019] obtaining a first idle cycle of a plurality of source Internet of Things devices;
[0020] selecting, for each first idle cycle, a same-batch source device identifier to be migrated from the source device identifier list to be migrated;
[0021] grouping the target device identifier according to the same-batch source device identifier to be migrated, to obtain a plurality of target device identifier groups;
[0022] migrating the target device corresponding to the source device list in the source Internet of Things platform to the target platform based on the identifier groups.
[0023] Optionally, before receiving the target operation of the user, the method further comprises:
[0024] obtaining a login message and a test device identifier of a preset test device in response to a login authentication request of the preset test device, the preset test device being configured to output a test device identifier corresponding to the source device identifier;
[0025] performing protocol analysis on the login message, to obtain a device authentication manner of the preset test device;
[0026] device authentication is performed on the preset test device based on the device authentication mode;
[0027] In the case where the device authentication is successful, a verification device identifier is searched in the target query platform;
[0028] In the case where the verification device identifier is consistent with the test device identifier, the preset test device is logged in successfully.
[0029] Optionally, the device authentication mode includes any one of a protocol interface authentication, a function authentication and a combined authentication, wherein the combined authentication includes the protocol interface authentication and the function authentication.
[0030] Optionally, after the converted target device identifier is created on the target platform, the method further includes:
[0031] A physical model is constructed based on the converted target device identifier;
[0032] The physical model meeting a preset screening condition is sent to a corresponding preset application interface to realize migration of the application interface.
[0033] In another aspect, an embodiment of the present application provides an Internet of Things device migration apparatus, the apparatus including:
[0034] A receiving module is configured to receive a target operation of a user, the target operation being used to create a device identifier migration task, select a source Internet of Things platform and select a list of source device identifiers to be migrated;
[0035] A migration module is configured to, in response to the target operation, migrate target device identifiers corresponding to the list of source device identifiers from the source Internet of Things platform according to the device identifier migration task and the list of source device identifiers;
[0036] An inspection module is configured to inspect whether the source device identifiers are consistent with the target device identifiers in terms of identifier format;
[0037] A conversion module is configured to, in the case where the source device identifiers are inconsistent with the target device identifiers, convert the target device identifiers and create converted target device identifiers on the target platform.
[0038] In still another aspect, an embodiment of the present application provides an electronic device, the device including a processor and a memory storing computer program instructions;
[0039] The processor, when executing the computer program instructions, implements the Internet of Things device migration method of the first aspect.
[0040] In still another aspect, an embodiment of the present application provides a computer storage medium, having computer program instructions stored thereon, which, when executed by a processor, implement the Internet of Things device migration method according to the first aspect.
[0041] In still another aspect, an embodiment of the present application provides a computer program product, instructions in the computer program product being executed by a processor of an electronic device to cause the electronic device to perform the Internet of Things device migration method according to the first aspect.
[0042] The Internet of Things device migration method, device, system and computer storage medium provided by the embodiments of the present application can reduce the labor cost and improve the migration efficiency, without human intervention in the whole process, when migrating the Internet of Things device. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced. Those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0044] Figure 1 is a flowchart of the Internet of Things device migration method provided by an embodiment of the present application;
[0045] Figure 2 is a flowchart of the login authentication method provided by an embodiment of the present application;
[0046] Figure 3 is a flowchart of the protocol interface authentication method provided by an embodiment of the present application;
[0047] Figure 4 is a flowchart of the custom function authentication method provided by an embodiment of the present application;
[0048] Figure 5 is a flowchart of the migration task generation method provided by an embodiment of the present application;
[0049] Figure 6 is a system architecture diagram of the Internet of Things device migration system provided by an embodiment of the present application;
[0050] Figure 7 is a structural schematic diagram of an Internet of Things device migration apparatus provided by another embodiment of the present application;
[0051] Figure 8 is a structural schematic diagram of an electronic device provided by yet another embodiment of the present application. DETAILED DESCRIPTION
[0052] The features and exemplary embodiments of various aspects of the present application will be described in detail below with reference to the drawings. The following description is merely exemplary in nature and is not intended to limit the present application. The present application can be implemented without some of the specific details, which are set forth below, by persons having ordinary skill in the art. The following description of the embodiments is merely provided to give a better understanding of the present application by showing examples of the present application.
[0053] It should be noted that, in this document, the terms such as first and second are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device that includes the elements.
[0054] To solve the problems in the prior art, the embodiments of the present application provide an Internet of Things device migration method, apparatus, device, storage medium and program product.
[0055] When migrating an Internet of Things device, a user creates a device identity migration task, selects a source Internet of Things platform, and selects a list of source device identities to be migrated, determines target device identities to be migrated, migrates the target device identities to a target platform, and verifies the identity format of the target device identities. In the case where the source device identities and the target device identities are inconsistent, the target device identities are converted, so that the target platform creates the converted target device identities, completing the migration of the source device identities from the source Internet of Things platform to the target platform. The entire process does not require human intervention, reduces labor costs, and improves migration efficiency.
[0056] The Internet of Things device migration method provided by the embodiments of the present application will be described below.
[0057] The features and exemplary embodiments of various aspects of the present application will be described in detail below with reference to the drawings. The following description is merely exemplary in nature and is not intended to limit the present application. The present application can be implemented without some of the specific details, which are set forth below, by persons having ordinary skill in the art. The following description of the embodiments is merely provided to give a better understanding of the present application by showing examples of the present application.Figure 1 A flowchart of a method for migrating an IoT device is shown. As shown in Figure 1 The method for migrating an IoT device can include the following steps S101-S104:
[0058] S101, receiving a target operation of a user.
[0059] Specifically, the target operation is used to create a device identity migration task, select a source IoT platform, and select a list of source device identities to be migrated.
[0060] In this embodiment, when migrating an IoT device from a source IoT platform to a target platform, not only is a device identity migration task created, but also the source IoT platform to be migrated and the list of original device identities to be migrated are selected in the target platform, i.e., the source device identities to be migrated are determined.
[0061] It is worth noting that the source device identity is the business data of the source IoT device stored in the source IoT platform, which can specifically include: location information reported by the device, running status reported by the device, business data reported by the device, and control instruction response reported by the device.
[0062] Referring to Figure 2 In another embodiment, before S101, the method can further include S201-S205:
[0063] S201, in response to a login authentication request of a preset test device, obtaining a login packet and a test device identity of the preset test device;
[0064] S202, performing protocol analysis on the login packet to obtain a device authentication mode of the preset test device;
[0065] S203, performing device authentication on the preset test device based on the device authentication mode;
[0066] S204, in the case of successful device authentication, searching for a verification device identity in the target query platform;
[0067] S205, in the case that the verification device identity is consistent with the test device identity, the preset test device is logged in successfully.
[0068] Specifically, in this embodiment, when the user wants to migrate the source device identity to the target platform, the migration of the source IoT platform and the target platform is first implemented, i.e., the target platform needs to be configured with the same protocol as the source IoT platform, so that the source IoT device can log in to the target platform and complete the subsequent migration of the IoT device identity.
[0069] In one embodiment, in order to ensure that the source IoT device can successfully log in to the target platform, a preset test device is used to test the target platform, that is, a test device identifier of the preset test device used for testing is first established on the target platform, and then the preset test device is used to simulate the source IoT device to verify whether the source IoT device can log in to and access the target platform.
[0070] The preset test device is configured to output a test device identifier corresponding to the source device identifier.
[0071] When performing login authentication, the preset test device sends a login message and a test device identifier to the target platform, the target platform performs protocol analysis on the login message according to the test device identifier to obtain a device authentication mode of the preset test device, and performs device authentication on the preset test device according to the device authentication mode to complete login authentication of the preset test device. In the process of device authentication, the preset test device and the target platform protocol are also authenticated.
[0072] In some embodiments, since different protocols are used by each source IoT device, in order to be able to log in to the target platform and upload and download data of the source IoT device, different authentication modes are used for each source IoT device to receive the upload and download data of the source IoT device and complete access of the source IoT device.
[0073] Specifically, the authentication mode can include any one of protocol interface authentication, function authentication, and combined authentication, wherein the combined authentication includes protocol interface authentication and function authentication.
[0074] In this embodiment, referring to Figure 3 , the protocol interface authentication is that a user configures a device authentication interface of the source IoT device according to a standard of an authentication request interface parameter of the target platform, and completes identity authentication of the source IoT device in the device authentication interface, that is, the target platform analyzes that the source IoT device uses protocol interface authentication, sends an authentication request to the corresponding device authentication interface, and in the case of receiving an authentication success response, indicates that the source IoT device passes the login authentication and the identity is legal, and can log in, and in the case of receiving an authentication failure response or not receiving an authentication response within a preset time, indicates that the source IoT device authentication fails at this time and is refused to log in.
[0075] It is worth noting that the new IoT platform provides the target platform for the embodiments of the present application.
[0076] As an example, the protocol interface authentication is authentication of a protocol used by the source IoT device, such as an HTTP protocol; the standard of the authentication request interface parameter can include request parameters such as a device username, a device identifier, authentication content, and response parameters such as a response code and error information.
[0077] Referring to Figure 4 The custom function authentication is that the target platform uses a script authentication function for login authentication, and the user permanently stores the script authentication function specified by the target platform into the database of the target platform. When a preset test device logs in, if the device authentication mode of the preset test device or the source Internet of Things platform is the custom function authentication, the stored script authentication function is loaded into a service process and executed, the device login authentication is completed, and the response code indicating the authentication result output by the script authentication function is waited for. If the output response code indicates that the device login is successful, the preset test device or the source Internet of Things device logs in successfully, otherwise, the login fails.
[0078] It is worth noting that the new Internet of Things platform provides the target platform for the embodiments of the present application.
[0079] In one embodiment, when the combined authentication mode is used, the protocol interface authentication and the custom function authentication can be combined in series or in parallel to form an authentication chain for login authentication. For example, when the combined authentication chain in series is used, both authentication modes need to be verified to pass the device identity authentication. If the combined authentication chain in parallel is used, only one authentication mode needs to be met to pass the device identity authentication.
[0080] After the device login authentication is completed, the login message needs to be parsed to obtain test device identification, user information, user certificate or dynamic password order and the like from the login message.
[0081] Then, the device identification is verified based on the user certificate, user information or dynamic password order on the target platform. If the device identification is consistent with the test device identification, the preset test device logs in successfully, and the preset test device is updated. If the device identification is not consistent with the test device identification, the preset test device fails to log in.
[0082] After the preset test device completes the login, it is determined that the protocol of the target platform is consistent with the protocol of the source Internet of Things platform, which can ensure that the source Internet of Things device is accurately accessed to the target platform, that is, the target platform can establish communication and interaction with the source Internet of Things device.
[0083] After the source Internet of Things device is accessed to the target platform, the user needs to create a device identification task on the target platform, select the corresponding source Internet of Things platform and the list of source device identifications to be migrated, determine the source device identification corresponding to the source Internet of Things device, and migrate the source device identification to the target platform.
[0084] S102, in response to the target operation, the source device identification corresponding to the source device identification list is migrated from the source Internet of Things platform to the target platform according to the device identification migration task and the source device identification list, and the target device identification is obtained.
[0085] Referring to Figure 5 In some embodiments, before S102, the following can also be included:
[0086] S501, acquiring a working period of an Internet of Things device corresponding to a source device identifier;
[0087] S502, determining a migration time of the Internet of Things device corresponding to the source device identifier according to the working period;
[0088] S503, triggering a migration task of the Internet of Things device corresponding to the source device identifier based on the migration time.
[0089] In S502, as an example, the migration time can be the first idle period of the Internet of Things device corresponding to the source device identifier.
[0090] In this embodiment, when the source device identifier needs to be migrated, since the migration operation will have a certain impact on the working state of the source Internet of Things device during the migration process, in order to reduce the impact of the migration operation on the source Internet of Things device, the migration time of each source Internet of Things device can be determined according to the working period of the source Internet of Things device, the first idle period of the source Internet of Things device corresponding to the source device identifier is determined, the first idle period can be the non-working time of the source Internet of Things device, and then the source device identifier is migrated based on the migration time.
[0091] It is worth noting that when the source device identifier is migrated according to the migration time, in order to ensure the accuracy of the format after migration and reduce the risk of migration failure, the source device identifiers in the source device identifier list can be migrated in full or incrementally, wherein full migration can be to migrate all source device identifiers at once, and incremental migration can be to migrate source device identifiers in batches.
[0092] Wherein, migrating the source device identifiers in batches can include:
[0093] Acquiring a first idle period corresponding to each of a plurality of source Internet of Things devices;
[0094] For each first idle period, filtering the same batch of source device identifiers to be migrated from the list of source device identifiers to be migrated;
[0095] Grouping the target device identifiers according to the same batch of source device identifiers to be migrated, to obtain a plurality of target device identifier groups;
[0096] Migrating the target devices corresponding to the source device list in the source Internet of Things platform to the target platform based on the identifier groups.
[0097] In the embodiment, since multiple source Internet of Things devices are bound on the source Internet of Things platform, and the first leisure period of each source Internet of Things device can be inconsistent, the source device identifiers to be migrated can be screened according to the first leisure period to obtain multiple target device identifier groups grouped according to the first leisure period, and then the migration is completed according to the target device identifier groups in the first leisure period.
[0098] For example, there are ten source Internet of Things devices, and their first leisure periods are 9:00-9:30, 9:00-9:30, 9:00-9:30, 10:00-10:30, 14:00-15:00, 14:00-15:30, 14:00-16:30, 15:00-15:30, 16:40-17:30, and 17:00-17:30, respectively. Then, the source Internet of Things devices corresponding to 9:00-9:30 can be divided into a batch, and the migration is performed at 9:00-9:30; the source Internet of Things devices corresponding to 10:00-10:30 are determined as a batch, and the migration is performed at 10:00-10:30; the source Internet of Things devices corresponding to 14:00-15:00, 14:00-15:30, 14:00-16:30, and 15:00-15:30 are determined as a batch, and the migration is performed at 14:00-15:30; and the source Internet of Things devices corresponding to 17:00-17:30 and 16:40-17:30 are determined as a batch, and the migration is performed at 17:00-17:30.
[0099] By migrating the target device identifiers to the target platform in batches in the first leisure period, the influence of the migration operation on the terminals of the source Internet of Things devices can be minimized, and the automatic and intelligent migration effect of the devices can be achieved.
[0100] In some embodiments, after S102, the method can further include:
[0101] Determining the device type of the Internet of Things device corresponding to the target device identifier based on the target device identifier;
[0102] Determining the data constraint condition of the data transmission based on the device type;
[0103] Performing data format analysis on the target device identifier based on the data constraint condition and the preset analysis manner to obtain the standard data format of the target device identifier.
[0104] Specifically, for different source Internet of Things devices, the target device identifier can have different data formats on the target platform, so different data constraint conditions need to be set for different target device identifiers to store them in the standard data format on the target platform.
[0105] In the embodiment, each device category has different data constraints, for example, for an MQTT protocol device, the data preset conditions include subscribed topics, published topics, and message quality assurance, etc., and the standard data format is obtained by preset parsing mode for these data constraints and in one.
[0106] Further, the operation flow of the preset parsing mode can be that the source IoT device publishes business data to the target platform through a topic A, the target platform parses the protocol data packet; then checks the topic authority and QoS (quality of service) of the parsed topic, checks whether the source IoT device has the publishing authority for the topic and whether it meets the QoS requirement, if the check fails, the data packet is rejected, if the check passes, the configured custom parsing rule is searched, then the Flink streaming processing technology is used to dynamically load and run the streaming parsing function to realize decoding of the business data into the standardized device business data of the target platform, and finally the standardized device business data is delivered to the rule engine to realize data flow according to certain rules and destinations.
[0107] In some embodiments, when the source device identifier is migrated, the migration area is also set in the device identifier migration task, that is, the original device identifier is migrated to the migration area corresponding to the target platform, so as to realize point-to-point connection of the source IoT platform and the target platform.
[0108] S103, check whether the source device identifier and the target device identifier on the target platform are consistent in format, and if the source device identifier and the target device identifier are inconsistent, go to S104.
[0109] In the embodiment, since the format of the identifier may change or the migration area may change during migration, the target device identifier needs to be cleaned and checked to check whether the target device identifier meets the format requirements of the target platform.
[0110] If the source device identifier and the target device identifier are consistent, it means that the target device identifier has completed migration.
[0111] S104, convert the target device identifier, and create the converted target device identifier on the target platform.
[0112] In some embodiments, for the inconsistent target device identifier of the source device identifier, the target device identifier needs to be cleaned according to the source device identifier and the parsing rule of the target platform, and the inconsistent target device identifier is corrected according to the standardized target device identifier, so as to complete the migration of the source device identifier.
[0113] After all the source device identifiers are converted into the device identifier format conforming to the target new platform, the converted target device identifiers need to be created in the migration area, so that the data of the subsequent source Internet of Things device is uploaded to the target platform, and the migration of the device identifier is completed.
[0114] In some embodiments, after S104, the following can also be included:
[0115] Building a thing model based on the converted target device identifier;
[0116] Sending the thing model meeting the preset screening condition to the corresponding preset application interface to realize the migration of the application interface.
[0117] In the present embodiment, since there are terminal applications set for some source Internet of Things platforms, after the migration of the target device identifier is completed, the application interface linked by the source Internet of Things platform also needs to be migrated to the application interface of the target platform, so a thing model can be built on the target platform according to the converted target device identifier, and the thing model meeting the preset screening condition is linked to the application interface of the target platform through the interface call.
[0118] Specifically, according to the user-configured custom data conversion and the preset screening condition, the device data format meeting the application requirement is output, and then the data stream in the thing model is transferred to the general message queue, and then the message queue pushes the data in the thing model to the user application for the user business requirement.
[0119] In some other embodiments, the user can issue an instruction to the source Internet of Things platform through the application interface of the target platform.
[0120] In some other embodiments, since there can be differences in the device data format in the application interface of the target platform, the user can convert the issued data into the original message format required by the source Internet of Things device through the custom rule, to ensure the business availability and consistency of the source Internet of Things device.
[0121] Specifically, the custom rule conversion can include that the user issues device data such as configuration information and control instructions through the application interface provided by the target platform, fills in the topic and QoS of the data issuance in the application interface, the target platform checks whether the source Internet of Things device has the permission of the issuance topic and QoS, if the check fails, the device data issuance request is rejected, and if the check passes, the Flink streaming processing technology is used to dynamically load and run the streaming analysis function to encode the issued data into the standardized protocol message required by the source Internet of Things device side, then the protocol message is delivered to the protocol component, and finally the protocol component delivers the message to the source Internet of Things device, so that the issued data message received by the source Internet of Things device is completely consistent with that before the migration, and the device side does not need any modification.
[0122] In the embodiments of the present application, a device migration system is built for the device migration method of the Internet of Things, as shown in Figure 6 The device migration system of the Internet of Things can include a protocol component module, a device authentication module, a device identification migration module, a data analysis module, and a rule engine module.
[0123] The protocol component module is configured to provide connection access, device authentication, connection management, state management, and protocol message analysis for various types of devices (direct connection and gateway type) and various types of protocol devices of the Internet of Things.
[0124] The protocol component module analyzes and obtains the device identification in the protocol and interacts with the device authentication module to perform the legality authentication of the device.
[0125] The protocol component module analyzes the device message frame according to the protocol technical standard, obtains the service data of the device, and transmits the service data to the data analysis module to realize the uplink of the service data of the device of the Internet of Things. In addition, the user application calls the API interface to transmit the service data to the service data analysis module, and the service data analysis module transmits the service data to the protocol component module to be issued to the device according to the standard protocol, thereby realizing the downlink of the device data and completing the closed loop of the customer service interaction.
[0126] The device authentication module is configured to verify the legality of the device identity when the device of the Internet of Things is connected to the target platform.
[0127] If the device identity is verified to be legal, the device is allowed to perform the subsequent service process interaction. Otherwise, the device is considered to be an illegal device and is refused to log in and disconnected.
[0128] The device identification migration module is configured to provide a convenient device identification migration function for the user, to replace the user's time-consuming and laborious way of manually or by programming to realize the migration of the source device identification from the source Internet of Things platform to the target platform, and to provide a full or incremental synchronization mode to facilitate the effective management of the migrated device. At the same time, the module provides unified management of the migrated device, including at least one of device online monitoring and device permission management.
[0129] The data analysis module is configured to analyze the specific service data reported by the device of the Internet of Things through the protocol component module, wherein the specific service data can include at least one of the location information reported by the device, the running state reported by the device, the service data reported by the device, and the control instruction response reported by the device.
[0130] The rule engine module is used for processing the specific service data processed by the data parsing module, and then forwarding the data to the general message queue shown in the figure according to the user's policy configuration, so as to realize the real-time synchronization of the device service data.
[0131] Referring to Figure 7 The embodiments of the present application also provide an Internet of Things device migration apparatus 700, which can include:
[0132] The receiving module 701 is configured to receive a target operation of a user, the target operation being used for creating a device identifier migration task, selecting a source Internet of Things platform, and selecting a list of source device identifiers to be migrated.
[0133] The migration module 702 is configured to, in response to the target operation, migrate target device identifiers corresponding to the list of source device identifiers from the source Internet of Things platform to a target platform according to the device identifier migration task and the list of source device identifiers.
[0134] The inspection module 703 is configured to inspect whether the source device identifiers and the target device identifiers on the target platform are consistent in identifier format.
[0135] The conversion module 704 is configured to, in the case that the source device identifiers and the target device identifiers are inconsistent, convert the target device identifiers and create the converted target device identifiers on the target platform.
[0136] In an optional implementation, the receiving module 701 can also be configured to:
[0137] Obtain a working period of the Internet of Things device corresponding to the source device identifier.
[0138] Determine a migration time of the Internet of Things device corresponding to the source device identifier according to the working period, the migration time being a first idle period of the Internet of Things device corresponding to the source device identifier.
[0139] Trigger a migration task of the Internet of Things device corresponding to the source device identifier based on the migration time.
[0140] In an optional implementation, the migration module 702 can also be configured to:
[0141] Determine a device type of the Internet of Things device corresponding to the target device identifier based on the target device identifier.
[0142] Determine a data constraint condition of data transmission based on the device type.
[0143] Perform data format analysis on the target device identifier based on the data constraint condition and a preset analysis mode, to obtain a standard data format of the target device identifier.
[0144] In an optional implementation, the receiving module 701 can also be configured to:
[0145] obtain a first leisure period corresponding to the plurality of source IoT devices;
[0146] For each first leisure period, filter the same batch of source device identifiers to be migrated from the list of source devices to be migrated;
[0147] Group the target device identifiers according to the same batch of source device identifiers to be migrated, to obtain a plurality of groups of target device identifiers.
[0148] Migrate the target devices corresponding to the source device list in the source IoT platform to the target platform based on the identifier groups.
[0149] In an optional implementation, the receiving module 701 can also be configured to:
[0150] In response to a login authentication request of the preset test device, obtain a login message and a test device identifier of the preset test device, the preset test device being configured to output a test device identifier corresponding to the source device identifier;
[0151] Protocol analysis is performed on the login message to obtain a device authentication mode of the preset test device;
[0152] Device authentication is performed on the preset test device based on the device authentication mode;
[0153] In the case of successful device authentication, the verification device identifier is searched in the target query platform;
[0154] In the case where the verification device identifier is consistent with the test device identifier, the preset test device is logged in successfully.
[0155] In an optional implementation, the device authentication mode includes any one of a protocol interface authentication, a function authentication, and a combined authentication, wherein the combined authentication includes the protocol interface authentication and the function authentication.
[0156] In an optional implementation, the conversion module 704 can also be configured to:
[0157] Construct a thing model based on the converted target device identifier;
[0158] Send the thing model meeting the preset filtering condition to the corresponding preset application interface to realize migration of the application interface.
[0159] Figure 8 A hardware structure schematic diagram of an electronic device provided by an embodiment of the present application is shown.
[0160] The electronic device can include a processor 801 and a memory 802 having computer program instructions stored therein.
[0161] In particular, the processor 801 can include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits that embody the embodiments of the present application.
[0162] The memory 802 can include a mass storage for data or instructions. By way of example and not limitation, the memory 802 can include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc, a magneto-optical disc, magnetic tape, or a Universal Serial Bus (USB) drive or a combination of two or more of these. In one example, the memory 802 can include removable or non-removable (or fixed) media, where the memory 802 is a nonvolatile solid-state memory. The memory 802 can be internal or external to the integrated gateway disaster recovery device.
[0163] In one example, the memory 802 can be a read-only memory (ROM). In one example, the ROM can be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0164] The memory 802 can include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software that, when executed (by one or more processors), is operable to perform operations described with reference to the method of migrating an Internet of Things device according to the first aspect of the present disclosure.
[0165] The processor 801 implements the above-mentioned method of migrating an Internet of Things device by reading and executing computer program instructions stored in the memory 802. Figure 1 The processor 801 implements the above-mentioned method of migrating an Internet of Things device by reading and executing computer program instructions stored in the memory 802.
[0166] In one example, the electronic device can further include a communication interface 803 and a bus 804. Wherein, as shown, the processor 801, the memory 802, the communication interface 803 are connected through the bus 804 and complete the communication between each other. Figure 8 As shown, the processor 801, the memory 802, the communication interface 803 are connected through the bus 804 and complete the communication between each other.
[0167] The communication interface 803 is mainly configured to implement communication between the modules, devices, units and / or equipment in the embodiments of the present application.
[0168] The bus 804 includes hardware, software or both, which couples components of the electronic device to each other in a communicative manner. By way of example and not limitation, the bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or other suitable bus or combination of two or more of these. Where appropriate, the bus 804 can include one or more buses. Although the present embodiments describe and show a particular bus, the present application contemplates any suitable bus or interconnect.
[0169] The electronic device can execute the Internet of Things device migration method in the embodiments of the present application, thereby implementing the Internet of Things device migration method and device.
[0170] In addition, in combination with the Internet of Things device migration method in the above embodiments, the embodiments of the present application can provide a computer storage medium to implement. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by the processor to implement any one of the Internet of Things device migration methods in the above embodiments.
[0171] In an optional embodiment, in combination with the Internet of Things device migration method in the above embodiments, the embodiments of the present application can provide a computer program product to implement, and the instructions in the computer program product are executed by the processor of the electronic device, so that the electronic device can implement any one of the Internet of Things device migration methods in the above embodiments.
[0172] It is to be understood that the application is not limited to particular configurations and processes described herein and shown in the drawings. The detailed description is not to be taken as limiting the application. In the above embodiments, several specific steps are described and illustrated in order to provide a thorough understanding of the application. However, the application can be practiced with fewer or additional steps, and in a different order. The application is to be limited only by the claims.
[0173] The functions noted in the structural block diagrams above can be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, for example, they can be an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium, or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine-readable medium" includes any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. The code segments can be downloaded via computer networks such as the Internet, Intranet, etc.
[0174] It is also to be understood that the example embodiments described herein are based on a series of steps or apparatuses to describe some methods or systems. However, the application is not limited to the order of the steps described above, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.
[0175] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. Alternatively, computer program implemented steps can be implemented by special purpose logic circuitry, e.g., an FPGA or an ASIC, or by a combination of special purpose logic circuitry and computer hardware. Those skilled in the art will recognize that the present application is not limited to the specific implementations described herein, and thus features of the present application are not limited to any particular implementation, but extend to any and all implementations that would otherwise fall within the scope of the present application.
[0176] The above is only a specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be covered within the protection scope of the present application.
Claims
1. A method for migrating Internet of Things (IoT) devices, characterized in that, The method comprises the following steps: receiving a target operation of a user, the target operation being used to create a device identification migration task, select a source Internet of Things platform, and select a source device identification list to be migrated; in response to the target operation, migrating the source device identification corresponding to the source device identification list from the source Internet of Things platform to a target platform according to the device identification migration task and the source device identification list, to obtain a target device identification; checking whether the source device identification is consistent with the identification format of the target device identification on the target platform; in the case where the source device identification is not consistent with the target device identification, converting the target device identification and creating the converted target device identification on the target platform.
2. The method of claim 1, wherein, Before the step of responding to the target operation, the method further comprises the following steps: obtaining a working cycle of an Internet of Things device corresponding to the source device identification; determining a migration time of the Internet of Things device corresponding to the source device identification according to the working cycle, the migration time being a first idle cycle of the Internet of Things device corresponding to the source device identification; based on the migration time, triggering a migration task of the Internet of Things device corresponding to the source device identification.
3. The method of claim 1, wherein, After the step of migrating the target device identification corresponding to the source device list from the source Internet of Things platform to the target platform according to the device identification migration task and the source device identification list, the method further comprises the following steps: determining a device type of the Internet of Things device corresponding to the target device identification based on the target device identification; determining a data constraint condition of data transmission based on the device type; based on the data constraint condition and a preset analysis mode, performing data format analysis on the target device identification to obtain a standard data format of the target device identification.
4. The method of claim 2, wherein, Before the step of migrating the target device identification corresponding to the source device list from the source Internet of Things platform to the target platform according to the device identification migration task and the source device identification list, the method further comprises the following steps: obtaining a first idle cycle corresponding to a plurality of source Internet of Things devices; for each first idle cycle, screening the same batch of source device identifications to be migrated from the source device identification list to be migrated; grouping the target device identifications according to the same batch of source device identifications to be migrated, to obtain a plurality of target device identification groups; based on the identification groups, migrating the target devices corresponding to the source device list in the source Internet of Things platform to the target platform.
5. The method of claim 1, wherein, Before the step of receiving the target operation of the user, the method further comprises the following steps: in response to a login authentication request of a preset test device, obtaining a login packet and a test device identification of the preset test device, the preset test device being used to output a test device identification corresponding to a source device identification; performing protocol analysis on the login packet to obtain a device authentication mode of the preset test device; based on the device authentication mode, performing device authentication on the preset test device; in the case where the device authentication is successful, searching for a verification device identification in a target query platform; in the case where the verification device identification is consistent with the test device identification, the preset test device is logged in successfully.
6. The method of claim 5, wherein, The device authentication mode includes any one of a protocol interface authentication, a function authentication, and a combined authentication, wherein the combined authentication includes the protocol interface authentication and the function authentication.
7. The method of claim 1, wherein, After the converted target device identifier is created on the target platform, the method further includes: constructing a thing model based on the converted target device identifier; sending the thing model that meets the preset screening condition to a corresponding preset application interface to implement migration of the application interface.
8. An Internet of Things device migration apparatus, characterized by: The apparatus includes: a receiving module configured to receive a target operation of a user, the target operation being used to create a device identifier migration task, select a source Internet of Things platform, and select a list of source device identifiers to be migrated; a migration module configured to, in response to the target operation, migrate target device identifiers corresponding to the list of source device identifiers from the source Internet of Things platform according to the device identifier migration task and the list of source device identifiers; a verification module configured to verify whether the source device identifiers and the target device identifiers on the target platform are consistent in identifier format; a conversion module configured to, in a case where the source device identifiers and the target device identifiers are inconsistent, convert the target device identifiers and create converted target device identifiers on the target platform.
9. An electronic device, comprising: The device includes a processor and a memory storing computer program instructions; The processor, when executing the computer program instructions, implements the Internet of Things device migration method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions, when executed by a processor, implement the Internet of Things device migration method of any one of claims 1-7.
11. A computer program product, characterised in that, The instructions in the computer program product are executed by a processor of an electronic device, so that the electronic device performs the Internet of Things device migration method of any one of claims 1-7.
Citation Information
Patent Citations
Intelligent gateway data migration method and device, server and storage medium
CN112559245A
Data migration method, device and equipment and computer readable storage medium
CN115510017A