Micro-service management method, system and device for basic platform of Internet of Things, and storage medium
By uploading microservice information in the Internet of Things system and searching and calling it in the microservice center, the complex problem of microservice data link calls is solved, and management efficiency and system flexibility are improved.
Patent Information
- Application Number
- CN202411780341.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The data link calls of microservices in the Internet of Things system are complex. Different microservices are developed by different teams and use different technology stacks and data formats, which makes it difficult to integrate and interact with data, increasing the complexity of development and the possibility of errors.
By uploading microservice information when registering a microservice unit, and searching and calling when the microservice center receives the call instruction, the microservice call is used to use a textual data structure to establish a call buffer to improve call efficiency.
It improves the management standardization and efficiency of microservices, improves the utilization rate of microservices, avoids overlapping service functions or waste of resources, and enhances the flexibility and scalability of the system.
Smart Images

Figure CN119697245A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things basic platform construction, and in particular to a microservice management method, system, device and storage medium for an Internet of Things basic platform. Background Art
[0002] The Internet of Things (IoT) refers to the use of various devices and technologies such as information sensors, radio frequency identification technology, global positioning system, infrared sensors, laser scanners, etc. to collect real-time information on any object or process that needs to be monitored, connected, and interacted with, and to collect various required information such as sound, light, heat, electricity, mechanics, chemistry, biology, and location. Through various possible network access, it realizes ubiquitous connection between objects and objects, and between objects and people, and realizes intelligent perception, identification, and management of objects and processes.
[0003] Since IoT systems usually involve a large number of devices, sensors, and different types of data sources, their architecture is complex. Microservice architecture can split IoT systems into multiple small, independent services, each focusing on a specific function or task. This modular design makes IoT systems easier to manage and expand, and can better cope with the growing number of devices and data volume.
[0004] However, as the number of underlying microservices increases, the data chain calls of upper-level business systems to lower-level microservices will also become more complicated. Different microservices may be developed by different teams, using different technology stacks and data formats, which increases the difficulty of data integration and interaction. The upper-level business system needs to understand the interfaces and data structures of each microservice in order to call them correctly, which not only increases the complexity of development, but also easily leads to errors. Summary of the invention
[0005] The present invention provides a microservice management method, system, device and storage medium for an Internet of Things basic platform, which uses a textual data structure to call microservices. On the one hand, it improves the utilization rate of microservices and can better coordinate and utilize resources in scenarios where multiple microservices provide functions together, avoiding service function overlap or resource waste. The specific technical solution is as follows:
[0006] A microservice management method for an Internet of Things basic platform comprises the following steps:
[0007] Obtain the basic information of IoT infrastructure devices, set up protocol adaptation services, and connect IoT infrastructure devices to the IoT infrastructure platform through protocol adaptation services;
[0008] Establish IoT basic services on the IoT platform, establish microservice units based on IoT basic services, and register the microservice units in the microservice center;
[0009] Establish a data center and deploy a message queue service. The data center obtains data from the IoT platform through the message queue service.
[0010] When a microservice unit registers in the microservice center, it uploads its own microservice information;
[0011] When the microservice center receives an instruction to call a microservice, it obtains the microservice unit that needs to be called by the instruction, searches for the corresponding microservice unit in the microservice center according to the microservice information, and calls the corresponding microservice unit.
[0012] Preferably, the microservice information includes a microservice name, business logic, and data structure type.
[0013] Preferably, uploading the microservice information of the microservice unit itself includes the following steps:
[0014] Upload and store the microservice name, business logic, and data structure type of the microservice information in the server;
[0015] Classify microservice units according to microservice name or business logic;
[0016] A call cache area is established, and microservice information of microservice units classified according to microservice names or business logics is stored in the same call cache area.
[0017] Preferably, when the microservice center receives an instruction to call a microservice, it obtains the microservice unit required to be called by the instruction, searches for the corresponding microservice unit in the microservice center, and calls the corresponding microservice unit, including the following steps:
[0018] The microservice center determines the number and type of microservice units that need to be called based on the instructions for calling microservices;
[0019] The microservice center searches inside the microservice center according to the number and type of microservice units that need to be called to determine whether all the microservice units that need to be called exist;
[0020] When all the microservice units that need to be called exist, the microservice units are called according to the microservice information.
[0021] Preferably, when all microservice units to be called exist, calling the microservice units according to the microservice information includes the following steps:
[0022] Determine the number of calls to the microservice unit;
[0023] When a single microservice unit needs to be called, the corresponding microservice unit is found in the microservice center according to the microservice information and called, and the return value is obtained and sent to the service caller;
[0024] When multiple microservices need to be called, a call chain is established in the call cache area, and the microservice units that need to be called are called sequentially through the call chain;
[0025] Determine the data structure used by the call chain, merge the return value of each microservice after execution into the next call object, perform data conversion, and convert the current call result output into the next level call input.
[0026] Preferably, the basic information of the IoT infrastructure equipment is obtained and the protocol adaptation service is set, including determining the type of equipment that needs to access the IoT platform and selecting a communication protocol for the equipment that needs to access the IoT platform.
[0027] Preferably, the establishment of IoT basic services on the IoT platform includes establishing a basic management system, a device management system, a rule engine system, an operation and maintenance management system and an alarm center.
[0028] A microservice management method for an Internet of Things basic platform includes a first computing unit for obtaining basic information of an Internet of Things basic device and setting a protocol adaptation service, wherein the Internet of Things basic device is connected to the Internet of Things basic platform through the protocol adaptation service;
[0029] The second computing unit is used to establish an IoT basic service on the IoT platform, establish a microservice unit based on the IoT basic service, and register the microservice unit in the microservice center;
[0030] The third computing unit is used to establish a data middle platform and deploy a message queue service. The data middle platform obtains data from the IoT platform through the message queue service.
[0031] The fourth computing unit is used to upload the microservice information of the microservice unit itself when the microservice unit registers in the microservice center;
[0032] The fifth computing unit is used for, when the microservice center receives an instruction to call a microservice, obtaining the microservice unit required to be called by the instruction, searching for the corresponding microservice unit in the microservice center, and calling the corresponding microservice unit.
[0033] A microservice management device for an Internet of Things infrastructure platform, the device comprising a processor and a memory; the memory is used to store program codes and transmit the program codes to the processor;
[0034] The processor is used to execute the steps of the microservice management method for the Internet of Things basic platform described above according to the instructions in the program code.
[0035] A computer-readable storage medium is used to store program code, and the program code is used to execute the steps of the microservice management method of the Internet of Things basic platform described above.
[0036] Compared with the prior art, the present invention has the following beneficial effects:
[0037] The present invention makes the management of microservices more standardized and efficient by uploading microservice information when registering a microservice unit, and the microservice center searches and calls when receiving a call instruction. By setting a call cache area and calling microservices in a textual data structure, on the one hand, the utilization rate of microservices is improved, and resources can be better coordinated and utilized in scenarios where multiple microservices provide functions together, avoiding overlapping service functions or waste of resources. On the other hand, when it is necessary to dynamically implement a service interface, it can be quickly combined with an existing service unit through a configuration file for expansion, which greatly improves the flexibility and scalability of the system and can quickly respond to changing business needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0039] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0042] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0043] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0044] Example 1
[0045] A microservice management method for an Internet of Things basic platform comprises the following steps:
[0046] Obtain the basic information of IoT infrastructure devices, set up protocol adaptation services, and connect IoT infrastructure devices to the IoT infrastructure platform through protocol adaptation services;
[0047] Establish IoT basic services on the IoT platform, establish microservice units based on IoT basic services, and register the microservice units in the microservice center;
[0048] Establish a data center and deploy a message queue service. The data center obtains data from the IoT platform through the message queue service.
[0049] When a microservice unit registers in the microservice center, it uploads its own microservice information;
[0050] When the microservice center receives an instruction to call a microservice, it obtains the microservice unit that needs to be called by the instruction, searches for the corresponding microservice unit in the microservice center according to the microservice information, and calls the corresponding microservice unit.
[0051] When obtaining basic information about IoT infrastructure devices, you can collect basic information about IoT infrastructure devices by scanning the network, device broadcast information, or using intermediate devices (such as gateways). In addition to device model and hardware specifications, basic information can also include device geographic location information, installation time, maintenance records, etc., to better manage and maintain devices. For devices that are newly added to the network, an automatic discovery mechanism can be set up. Once a new device is online, the information collection process is immediately triggered and a notification is sent to the administrator.
[0052] When setting up the protocol adaptation service, common IoT communication protocols (such as HTTP, TCP, MQTT, Modbus, OPC-UA, etc.) are supported, and some protocols customized by specific industries or manufacturers can also be considered for adaptation. A protocol library can be established to continuously update and expand support for new protocols. The protocol adaptation service can have a dynamic configuration function, and adjust the protocol parameters in real time according to different device requirements and network environments to improve communication efficiency and stability.
[0053] The establishment of the IoT basic service can adopt a modular design to facilitate subsequent expansion and upgrade. Each basic service can be developed, tested and deployed as an independent module. During the registration process of the microservice unit, a verification mechanism can be added to ensure that the uploaded microservice information is accurate and complete. At the same time, a regular update mechanism can be set up to allow the microservice unit to report its own status changes to the microservice center in a timely manner.
[0054] The data center can adopt a distributed architecture to improve the data processing capability and reliability. Data encryption and backup mechanisms can be introduced to ensure data security. The message queue service can support multiple message formats and priority settings to meet the transmission requirements of different types of data. At the same time, the message queue can be monitored and managed to handle backlogged messages and faults in a timely manner.
[0055] When managing calls in the microservice center, the microservice center can establish a load balancing strategy to reasonably allocate call requests based on the load conditions and performance indicators of the microservice units, thereby improving the overall performance of the system.
[0056] Example 2
[0057] This embodiment differs from Embodiment 1 in that the microservice information includes a microservice name, business logic, and data structure type.
[0058] The microservice name is used to identify a microservice, making it easier to identify and call it in the system.
[0059] The business logic is used to describe the specific business functions performed by the microservice. For example, the business logic of the user management microservice may include operations such as user registration, login, and information modification.
[0060] The data structure type is used to clarify the data structure type processed by the microservice, such as a relational database table structure, a document data structure, a graph data structure, etc. This helps other components understand the format of the input data and output data expected by the microservice.
[0061] The content of the microservice information is the microservice name, business logic and data structure type, which makes the microservice easier to manage and call in the system and improves the maintainability and scalability of the microservice architecture.
[0062] The working principle of this embodiment is the same as that of Embodiment 1.
[0063] Example 3
[0064] The difference between this embodiment and embodiment 2 is that uploading the microservice information of the microservice unit itself includes the following steps:
[0065] Upload and store the microservice name, business logic, and data structure type of the microservice information in the server;
[0066] Classify microservice units according to microservice name or business logic;
[0067] A call cache area is established, and microservice information of microservice units classified according to microservice names or business logics is stored in the same call cache area.
[0068] The call cache area is a cache data structure, which can be a data structure such as an array, a hash table or a database; when the microservice center makes multiple calls to the microservice units, it calls the microservices in sequence according to the microservice information stored in the call cache area.
[0069] When registering with the server, the microservice unit uploads its own microservice information. The uploaded information includes key contents such as microservice name, business logic, and data structure type. This information is stored in the server for subsequent query and call. By uploading these detailed information, the server can fully understand the functions and characteristics of each microservice and provide basic data for subsequent classification and call.
[0070] Classify microservice units according to microservice name or business logic. The purpose of classification is to group microservices with similar functions or business logic into one category so that related microservices can be found more quickly when called. For example, if there are multiple microservices that are all involved in user management business logic, they can be grouped into one category. Alternatively, if the microservice names have a certain semantic relevance, they can also be classified based on the names.
[0071] The call cache area is established, and this cache area can adopt a variety of data structures, such as arrays, hash tables or databases. The role of the cache area is to store classified microservice information so that relevant information can be quickly obtained when the microservice needs to be called. The microservice information of the microservice units classified according to the microservice name or business logic is stored in the same call cache area. In this way, when a specific type of microservice needs to be called, the relevant information can be directly obtained from the corresponding cache area without traversing all microservices. If the cache area adopts an array structure, the microservices may be called in sequence according to the index order of the array; if it is a hash table, the microservice can be quickly located and called by a specific key value; if it is a database, an SQL query statement can be used to obtain the microservice information that needs to be called.
[0072] The working principle of this embodiment is the same as that of Embodiment 1.
[0073] Example 4
[0074] The difference between this embodiment and embodiment 3 is that when the microservice center receives an instruction to call a microservice, it obtains the microservice unit required to be called by the instruction, searches for the corresponding microservice unit in the microservice center, and calls the corresponding microservice unit, including the following steps:
[0075] The microservice center determines the number and type of microservice units that need to be called based on the instructions for calling microservices;
[0076] The microservice center searches inside the microservice center according to the number and type of microservice units that need to be called to determine whether all the microservice units that need to be called exist;
[0077] When all the microservice units that need to be called exist, the microservice units are called according to the microservice information.
[0078] When the microservice center receives an instruction to call a microservice, it first determines the number and type of microservice units to be called according to the instruction, so as to determine the business requirements contained in the instruction and determine which specific microservice units are needed to meet these requirements.
[0079] Next, the microservice center searches within itself according to the number and type of microservice units determined to determine whether all required microservice units are online and can be called. When it is determined that all microservice units that need to be called are online, the microservice center calls these units according to the microservice information. The microservice center communicates with each microservice unit and passes the business request to them. After receiving the request, each microservice unit will process it according to its own function and logic and return the result to the microservice center. The microservice center then integrates these results and returns them to the caller, thus completing the entire business process.
[0080] The working principle of this embodiment is the same as that of Embodiment 1.
[0081] Example 5
[0082] The difference between this embodiment and embodiment 4 is that when all microservice units to be called exist, calling the microservice units according to the microservice information includes the following steps:
[0083] Determine the number of calls to the microservice unit;
[0084] When a single microservice unit needs to be called, the corresponding microservice unit is found in the microservice center according to the microservice information and called, and the return value is obtained and sent to the service caller;
[0085] When multiple microservices need to be called, a call chain is established in the call cache area, and the microservice units that need to be called are called sequentially through the call chain;
[0086] Determine the data structure used by the call chain, merge the return value of each microservice after execution into the next call object, perform data conversion, and convert the current call result output into the next level call input.
[0087] When a single microservice unit needs to be called, the corresponding microservice unit is found in the microservice center according to the microservice information and called. The microservice information here includes the microservice name, business logic, and data structure type, etc. Through this information, the required microservice can be accurately located. After the microservice is called, the corresponding business logic is executed and a return value is generated. This return value is then sent to the service caller to complete the calling process of a single microservice.
[0088] When multiple microservices need to be called, a call chain is established in the call cache. The call cache stores microservice information classified by microservice name or business logic. This cache can be used to easily build a call chain. The microservice units that need to be called are called sequentially through the call chain. Each microservice in the call chain is triggered in sequence according to the predetermined order to execute their respective business logic. Determine the data structure used by the call chain. This data structure can be an array, a linked list, etc., which is used to store the information and call order of each microservice on the call chain.
[0089] The return value of each microservice after execution is merged into the next call object for data conversion. That is, the output result of the previous microservice is appropriately converted and used as the input parameter of the next microservice. In this way, data transmission and collaborative work between multiple microservices can be achieved.
[0090] The working principle of this embodiment is the same as that of Embodiment 1.
[0091] Example 6
[0092] This embodiment differs from Embodiment 5 in that the basic information of the IoT infrastructure equipment is obtained and the protocol adaptation service is set, including determining the type of equipment that needs to access the IoT platform and selecting a communication protocol for the equipment that needs to access the IoT platform.
[0093] The device type can be determined by the device's identification information, communication protocol characteristics, functional description, etc. A device type library can be established to continuously update and expand support for new device types. For unknown device types, automatic identification technology can be used to try to determine the device type by analyzing the device's communication behavior and data characteristics. The appropriate communication protocol can be selected based on factors such as device type, network environment, and data transmission requirements. A communication protocol evaluation model can be established to comprehensively consider factors such as protocol performance, reliability, and security to select the optimal communication protocol for the device.
[0094] By determining the types of devices that need to access the IoT platform and selecting communication protocols for them, the efficiency and stability of device access are improved, compatibility issues are reduced, the most appropriate communication protocol can be selected according to the characteristics of different devices, and the system performance and resource utilization are optimized.
[0095] The working principle of this embodiment is the same as that of Embodiment 1.
[0096] Example 7
[0097] The difference between this embodiment and Embodiment 6 is that the IoT basic service is established on the IoT platform, including establishing a basic management system, a device management system, a rule engine system, an operation and maintenance management system and an alarm center.
[0098] The basic management system provides basic platform functions such as user management, role management, menu management, tenant management, and permission management. It supports tenant configuration and asset allocation. It supports user login and personal center functions.
[0099] The equipment management system provides equipment dashboard, product management, product classification management, equipment management, equipment group management and other functional operations. It provides equipment access configuration management, object model, data analysis, equipment diagnosis and other functions. It provides real-time equipment operation status display and equipment historical data display.
[0100] The rule engine system is designed and arranged through visual drag and drop, and supports distributed execution of tasks. It supports the execution of configured scenarios according to timed schedules. It supports manually triggering scenarios. It supports triggering scenarios by satisfying conditions on the number of devices.
[0101] The operation and maintenance management system provides online configuration and hot update protocol management functions, supports the use of common encryption and authentication algorithms, and supports mutual identity authentication between devices and platforms. It provides network protocol component management functions corresponding to TCP, UDP, MQTT, CoAP, HTTP, WebSocket and other services. It provides remote firmware upgrade functions for devices.
[0102] The alarm center provides an alarm dashboard, configures the severity of alarm events, configures alarm data flow rules, and displays alarm records and alarm log information.
[0103] The working principle of this embodiment is the same as that of Embodiment 1.
[0104] Example 8
[0105] A microservice management method for an Internet of Things basic platform includes a first computing unit for obtaining basic information of an Internet of Things basic device and setting a protocol adaptation service, wherein the Internet of Things basic device is connected to the Internet of Things basic platform through the protocol adaptation service;
[0106] The second computing unit is used to establish an IoT basic service on the IoT platform, establish a microservice unit based on the IoT basic service, and register the microservice unit in the microservice center;
[0107] The third computing unit is used to establish a data middle platform and deploy a message queue service. The data middle platform obtains data from the IoT platform through the message queue service.
[0108] The fourth computing unit is used to upload the microservice information of the microservice unit itself when the microservice unit registers in the microservice center;
[0109] The fifth computing unit is used for, when the microservice center receives an instruction to call a microservice, obtaining the microservice unit required to be called by the instruction, searching for the corresponding microservice unit in the microservice center, and calling the corresponding microservice unit.
[0110] Example 9
[0111] A microservice management device for an Internet of Things infrastructure platform, the device comprising a processor and a memory; the memory is used to store program codes and transmit the program codes to the processor;
[0112] The processor is used to execute the steps of the microservice management method of the Internet of Things basic platform described above according to the instructions in the program code.
[0113] Example 10
[0114] A computer-readable storage medium is used to store program code, and the program code is used to execute the steps of the microservice management method of the Internet of Things basic platform described above.
[0115] In summary, the present invention has the following beneficial effects:
[0116] The present invention enables various IoT devices to access the platform by acquiring basic information of IoT infrastructure devices and setting up protocol adaptation services, greatly improving the compatibility and adaptability of the platform, and being able to accommodate devices of different specifications and different communication requirements, laying the foundation for building a large-scale IoT ecosystem.
[0117] Secondly, IoT basic services are established on the IoT platform and microservice units are constructed, and then registered. This method achieves a high degree of decoupling of system functions. Each microservice unit can be independently developed, deployed and maintained, greatly improving development efficiency and system stability. When a problem occurs in the system, the specific microservice unit can be quickly located for repair without affecting the operation of the entire system.
[0118] Thirdly, establishing a data center and deploying message queue services can efficiently acquire and process data. The data center can integrate and analyze data from different devices and microservices to provide strong support for decision-making. The message queue service ensures the reliability and real-time performance of data transmission, avoiding data loss and blockage.
[0119] Finally, by uploading microservice information when registering a microservice unit, and the microservice center searching and calling when receiving a call instruction, the management of microservices is more standardized and efficient. By setting a call cache area and calling microservices in a textual data structure, the utilization rate of microservices is improved on the one hand, and resources can be better coordinated and utilized in scenarios where multiple microservices provide functions together, avoiding overlapping service functions or waste of resources. On the other hand, when it is necessary to dynamically implement a service interface, it can be quickly combined with existing service units through configuration files for expansion, which greatly improves the flexibility and scalability of the system and can quickly respond to changing business needs.
[0120] In summary, this microservice management method for the IoT infrastructure platform can effectively improve the performance, stability, compatibility and scalability of the system, and provide strong technical support for the development of IoT applications.
[0121] Those of ordinary skill in the art will appreciate that the units of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0122] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored, etc.
[0123] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0124] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nlyMemory), random access memory (RAM, RandomAccessMemory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. A microservice management method for an Internet of Things basic platform, characterized in that: The following steps are involved: Obtain the basic information of IoT infrastructure devices, set up protocol adaptation services, and connect IoT infrastructure devices to the IoT infrastructure platform through protocol adaptation services; Establish IoT basic services on the IoT platform, establish microservice units based on IoT basic services, and register the microservice units in the microservice center; Establish a data center and deploy a message queue service. The data center obtains data from the IoT platform through the message queue service. When a microservice unit registers in the microservice center, it uploads its own microservice information; When the microservice center receives an instruction to call a microservice, it obtains the microservice unit that needs to be called by the instruction, searches for the corresponding microservice unit in the microservice center according to the microservice information, and calls the corresponding microservice unit.
2. According to claim 1, a microservice management method for an Internet of Things basic platform is characterized in that: The microservice information includes the microservice name, business logic and data structure type.
3. According to claim 1, a microservice management method for an Internet of Things basic platform is characterized in that: The uploading of the microservice information of the microservice unit itself includes the following steps: Upload and store the microservice name, business logic, and data structure type of the microservice information in the server; Classify microservice units according to microservice name or business logic; A call cache area is established, and microservice information of microservice units classified according to microservice names or business logics is stored in the same call cache area.
4. The microservice management method of an Internet of Things basic platform according to claim 1, characterized in that: When the microservice center receives an instruction to call a microservice, it obtains the microservice unit required to be called by the instruction, searches for the corresponding microservice unit in the microservice center, and calls the corresponding microservice unit, including the following steps: The microservice center determines the number and type of microservice units that need to be called based on the instructions for calling microservices; The microservice center searches inside the microservice center according to the number and type of microservice units that need to be called to determine whether all the microservice units that need to be called exist; When all the microservice units that need to be called exist, the microservice units are called according to the microservice information.
5. The microservice management method of an Internet of Things basic platform according to claim 1 is characterized in that: When all microservice units to be called exist, calling the microservice units according to the microservice information includes the following steps: Determine the number of calls to the microservice unit; When a single microservice unit needs to be called, the corresponding microservice unit is found in the microservice center according to the microservice information and called, and the return value is obtained and sent to the service caller; When multiple microservices need to be called, a call chain is established in the call cache area, and the microservice units that need to be called are called sequentially through the call chain; Determine the data structure used by the call chain, merge the return value of each microservice after execution into the next call object, perform data conversion, and convert the current call result output into the next level call input.
6. The microservice management method of an Internet of Things basic platform according to claim 1, characterized in that: The basic information of the IoT infrastructure equipment is obtained and the protocol adaptation service is set, including determining the type of equipment that needs to be connected to the IoT platform and selecting a communication protocol for the equipment that needs to be connected to the IoT platform.
7. The microservice management method of an Internet of Things basic platform according to claim 1, characterized in that: The establishment of IoT basic services on the IoT platform includes establishing a basic management system, a device management system, a rule engine system, an operation and maintenance management system, and an alarm center.
8. A microservice management method for an Internet of Things basic platform, comprising a first computing unit, for obtaining basic information of an Internet of Things basic device, setting a protocol adaptation service, and the Internet of Things basic device accessing the Internet of Things basic platform through the protocol adaptation service; The second computing unit is used to establish an IoT basic service on the IoT platform, establish a microservice unit based on the IoT basic service, and register the microservice unit in the microservice center; The third computing unit is used to establish a data middle platform and deploy a message queue service. The data middle platform obtains data from the IoT platform through the message queue service. The fourth computing unit is used to upload the microservice information of the microservice unit itself when the microservice unit registers in the microservice center; The fifth computing unit is used for, when the microservice center receives an instruction to call a microservice, obtaining the microservice unit required to be called by the instruction, searching for the corresponding microservice unit in the microservice center, and calling the corresponding microservice unit.
9. A microservice management device for an Internet of Things infrastructure platform, the device comprising a processor and a memory; the memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of the microservice management method of the Internet of Things basic platform according to claims 1-7 according to the instructions in the program code.
10. A computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the steps of the microservice management method of the Internet of Things basic platform described in claims 1-7.
Citation Information
Patent Citations
Method and device for constructing Internet of Things terminal access platform
CN111181991A
Internet of Things data collection system and method based on micro service, and medium
CN113783719A
Government affair data processing system based on micro service
CN115086376A
Internet of Things equipment servitization system
CN117201550A