Service registration method, device, equipment, medium and product

By receiving and encrypting the decryption service registration request in the service registration center, combined with token information verification, secure encrypted transmission and information security between the service party and the connector are realized, and the problems of information security and status monitoring in the prior art are solved. Ensures secure communication between the connector and server and real-time status monitoring.

CN119135662APending Publication Date: 2024-12-13CHINA CONSTRUCTION BANK +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411331823.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The prior art cannot effectively obtain the service status and information of the connector in the scenarios of the service provider and the connector, and cannot ensure the security of the information, especially when the connector is deployed in a distributed manner and the service provider and the service registration center are not on the same internal network. Down.

Method used

By receiving the service registration request of the connector in the service registration center, encrypting and decrypting the service instance information using the encryption algorithm, verifying it with token information, and implementing secure encryption transmission between the connector and the server through the Internet protocol to ensure the security of the information. At the same time, the connector is allowed to periodically report heartbeat information to monitor service status.

Benefits of technology

It realizes secure encrypted transmission between the connector and the server, ensures information security, and realizes service registration and real-time monitoring in the public network environment, solving the problems of information security and status monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135662A_ABST
    Figure CN119135662A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a service registration method and device, equipment, a medium and a product, and relates to the technical field of service management, the method is applied to a service registration center, and the method specifically comprises the following steps: receiving a service registration request sent by a connector; based on the connector identifier and service instance information, registering a connector service corresponding to the connector, the service instance information being obtained by decrypting the service registration information when the service registration information determines that the token information of the connector is valid; and sending a first notification message to the connector, wherein the first notification message is used for notifying the connector that the connector has registered the connector service corresponding to the connector. According to the embodiment of the invention, the method can be suitable for a scene of a server and the connector, achieves the safety encryption transmission between the connector and the server, and guarantees the information safety of the connector.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of service management technology, and in particular, relates to a service registration method, device, equipment, medium and product. Background Art

[0002] As the business scale continues to expand, a service provider will usually connect to multiple scenario parties through multiple connectors so that the service provider can provide targeted services to each scenario party based on the characteristics of each scenario party. However, since each connector is deployed on the server of the corresponding scenario party, it is difficult for the service provider to obtain the service status and related information of the connector.

[0003] However, in the prior art, in order to solve the problem that it is difficult for the above-mentioned service provider to obtain the service status and related information of the connector, the service status and related information of the connector are generally obtained through service registration and heartbeat reporting mechanism, but the above-mentioned technical solution is not applicable to the scenario between the service provider and the connector, and it cannot guarantee the information security of all connectors. Summary of the invention

[0004] The embodiments of the present application provide a service registration method, apparatus, device, medium and product, which can be adapted to the scenarios of service providers and connectors, and also implement secure encrypted transmission between the connector and the service end, thereby ensuring the information security of the connector.

[0005] In a first aspect, an embodiment of the present application provides a service registration method, which is applied to a service registration center, and the service registration center is deployed in a server. The method includes:

[0006] Receive a service registration request sent by a connector, the service registration request includes the token information of the connector, the connector identifier and the service registration information, the service registration information is obtained by encrypting the service instance information through a first encryption algorithm, the service instance information includes an Internet Protocol IP address, a port identifier and a service name, and the connector communicates with the server through the Internet Protocol;

[0007] Register the connector service corresponding to the connector based on the connector identifier and service instance information. The service instance information is obtained by the service registration center by decrypting the service registration information when the token information of the connector is determined to be valid.

[0008] A first notification message is sent to the connector, where the first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

[0009] In an optional implementation of the first aspect, before receiving the service registration request sent by the connector, the method further includes:

[0010] Receiving a login request sent by the connector, the login request is sent by the connector in response to the start instruction, the login request includes login information obtained by encrypting the first login credential of the connector using the public key of the server based on the second encryption algorithm;

[0011] When the login information is verified, the connector token information is sent to the connector.

[0012] In an optional implementation of the first aspect, when the login information is verified to be successful, before sending the token information of the connector to the connector, the method further includes:

[0013] Decrypt the login information using the private key of the server to obtain the first login credential of the connector, the first login credential of the connector is generated by the server and provided to the connector in a preset manner;

[0014] Get the connector's second login credentials from the server's database;

[0015] In the case where the first login credential is the same as the second login credential, it is determined that the login information verification has passed.

[0016] In an optional implementation of the first aspect, registering a connector service corresponding to the connector based on the connector identifier and the service instance information includes:

[0017] Use the connector ID and IP address as the key and the service instance information as the value, store them in the database in a preset format, and set the validity period of the connector service.

[0018] In an optional implementation of the first aspect, the method further includes:

[0019] Receive the heartbeat message sent by the connector that carries the connector's token information. The heartbeat message is used by the service registration center to remotely monitor the health status of the connector. The heartbeat message includes the connector identifier and IP address.

[0020] When it is determined that the token information of the connector is valid, based on the connector identifier and IP address included in the heartbeat information, the service instance information corresponding to both the connector identifier and the IP address is searched in the database, and the validity period of the service instance information is updated.

[0021] In an optional implementation of the first aspect, the heartbeat information further includes heartbeat time; and the method further includes:

[0022] Determine the time difference between the current time and the heartbeat time;

[0023] When the time difference is greater than a preset time threshold, a second notification message is sent to the operation and maintenance device, where the second notification message is used to notify the operation and maintenance device that the connector is in an unhealthy state.

[0024] In an optional implementation of the first aspect, the heartbeat information further includes heartbeat time; and the method further includes:

[0025] Determine the time difference between the current time and the heartbeat time;

[0026] When the time difference is greater than a preset time threshold, a heartbeat check request is sent to the connector through the check interface, and the heartbeat check request is used to determine the reason why the connector does not send heartbeat information within the preset time threshold.

[0027] In a second aspect, a service registration method is provided, which is applied to a connector, and the method includes:

[0028] Send a service registration request to the service registration center, the service registration request includes the token information of the connector, the connector identifier and the service registration information, the service registration information is obtained by encrypting the service instance information through the first encryption algorithm, the service instance information includes the Internet Protocol IP address, the port identifier and the service name, and the connector communicates with the server through the Internet Protocol;

[0029] When the service registration center successfully registers the connector service corresponding to the connector based on the connector identifier and service instance information, the service registration center receives the first notification message sent by the service registration center. The service instance information is obtained by the service registration center by decrypting the service registration information when the service registration center determines that the token information of the connector is valid. The first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

[0030] In an optional implementation manner of the second aspect, before sending the service registration request to the service registration center, the method further includes:

[0031] In response to the start instruction of the connector, a login request is sent to the service registration center, where the login request includes login information obtained by encrypting the first login credential of the connector using the public key of the server;

[0032] When the service registration center verifies the login information and passes it, the token information of the connector sent by the service registration center is received;

[0033] Get the connector ID and service instance information, encrypt the service instance information, and get the service registration information.

[0034] In an optional implementation of the second aspect, the method further includes:

[0035] Create a heartbeat sending thread;

[0036] Utilize the heartbeat sending thread to periodically send heartbeat information carrying the connector's token information to the service registration center. The heartbeat information is used by the service registration center to remotely monitor the health status of the connector. The heartbeat information includes the connector identifier and IP address. When the service registration center receives the heartbeat information carrying the connector's token information sent by the connector and determines that the connector's token information is valid, based on the connector identifier and IP address included in the heartbeat information, it searches the database for service instance information corresponding to the connector identifier and IP address, and updates the validity period of the service instance information.

[0037] In a third aspect, a service registration device is provided, which is applied to a service registration center, and the service registration center is deployed in a server. The device includes:

[0038] A receiving module, used to receive a service registration request sent by a connector, the service registration request includes the token information of the connector, the connector identifier and the service registration information, the service registration information is obtained by encrypting the service instance information through a first encryption algorithm, the service instance information includes an Internet Protocol IP address, a port identifier and a service name, and the connector communicates with the server through the Internet Protocol;

[0039] A registration module is used to register the connector service corresponding to the connector based on the connector identifier and service instance information. The service instance information is obtained by the service registration center by decrypting the service registration information when the token information of the connector is determined to be valid;

[0040] The sending module is used to send a first notification message to the connector, where the first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

[0041] In a fourth aspect, a service registration device is provided, which is applied to a connector, and the device includes:

[0042] A sending module is used to send a service registration request to a service registration center. The service registration request includes the token information of the connector, the connector identifier and the service registration information. The service registration information is obtained by encrypting the service instance information through a first encryption algorithm. The service instance information includes an Internet Protocol IP address, a port identifier and a service name. The connector communicates with the server through the Internet Protocol.

[0043] A receiving module is used to receive a first notification message sent by a service registration center when the service registration center successfully registers the connector service corresponding to the connector based on the connector identifier and service instance information. The service instance information is obtained by the service registration center by decrypting the service registration information when the service registration center determines that the token information of the connector is valid. The first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

[0044] In a fifth aspect, an electronic device is provided, comprising: a memory for storing computer program instructions; and a processor for reading and running the computer program instructions stored in the memory to execute the service registration method provided by any optional implementation method in the first aspect or the second aspect.

[0045] In a sixth aspect, a computer storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the service registration method provided by any optional implementation method in the first aspect or the second aspect is implemented.

[0046] In a seventh aspect, a computer program product is provided, the computer program product comprising a computer program, and when the computer program is executed by a processor, the service registration method provided by any optional implementation manner in the first aspect is implemented.

[0047] In an embodiment of the present application, a service registration request sent by a connector can be received. The service registration request may include the token information of the connector, the connector identifier, and the service registration information. The service registration information is encrypted by the first encryption algorithm to the service instance information. Then, when the service registration center determines that the token information of the connector is valid, the service instance information is obtained by decrypting the service registration information, and in combination with the connector identifier, the connector service corresponding to the connector is registered, and a first notification message is sent to the connector to notify the connector that the corresponding connector service has been successfully registered. In this way, not only is secure encrypted transmission between the connector and the server achieved, and the information security of the connector is guaranteed, but also because the above-mentioned connector and the server communicate through the Internet protocol, service registration is achieved in a public network environment, and it is also convenient for subsequent connectors to periodically report heartbeat information to the server, and the server can monitor the service status of the connector service in real time. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0049] Figure 1 This is an architecture diagram of the interaction between the server and the connector provided in the embodiment of the present application;

[0050] Figure 2 This is one of the flow charts of a service registration method provided in an embodiment of the present application;

[0051] Figure 3 This is the second flow chart of a service registration method provided in an embodiment of the present application;

[0052] Figure 4 This is a flow chart of a service registration method provided in an embodiment of the present application;

[0053] Figure 5 This is a fourth flow chart of a service registration method provided in an embodiment of the present application;

[0054] Figure 6 This is a flowchart of a service registration method provided in an embodiment of the present application;

[0055] Figure 7 It is a structural diagram of a service registration device provided in an embodiment of the present application;

[0056] Figure 8 This is a structural diagram of another service registration provided in an embodiment of the present application.

[0057] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are intended only to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application. In addition, it should be noted that the acquisition, storage, use, and processing of data in the technical solution of the present application are in compliance with the relevant provisions of national laws and regulations. It should also be noted that in the embodiments of the present application, some existing solutions in the industry such as software, components, and models may be mentioned, and they should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must have used the solution.

[0059] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" 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 includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0060] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0061] As described in the background technology, in a scenario where a service party connects to a scene party through a connector, since the connector is deployed on a server of the corresponding scene party, it is difficult for the service party to obtain the service status and related information of the connector.

[0062] However, in the prior art, in order to solve the problem that it is difficult for the service provider to obtain the service status and related information of the connector, the connector service is generally registered in the service registration center of the service provider, and the connector periodically sends heartbeats to the service registration center of the service provider, so that the service provider can obtain the service status and related information of the connector. However, the service registration and heartbeat reporting mechanism in the prior art is applicable to the situation where the service provider and the connector are in the same secure internal network environment. In the real scenario, the connectors are dispersedly deployed in each scenario and are not in the same internal network as the service registration center of the service provider. Therefore, the above technical solution is not applicable to the scenario of the service provider and the connector, and it cannot guarantee the information security of all connectors.

[0063] In order to solve the problems existing in the above-mentioned prior art, the embodiments of the present application provide a service registration method, apparatus, device, medium and product, which can receive a service registration request sent by a connector. The service registration request may include the token information of the connector, the connector identification and the service registration information. The service registration information is encrypted by the service instance information through a first encryption algorithm. Then, when the service registration center determines that the token information of the connector is valid, the service instance information is obtained by decrypting the service registration information, and in combination with the connector identification, the connector service corresponding to the connector is registered, and a first notification message is sent to the connector to notify the connector that the corresponding connector service has been successfully registered. In this way, not only is secure encrypted transmission between the connector and the server achieved, and the information security of the connector is guaranteed, but also because the above-mentioned connector and the server communicate through the Internet protocol, service registration is achieved in a public network environment, and it is also convenient for subsequent connectors to periodically report heartbeat information to the server, so as to achieve real-time monitoring of the service status of the connector service by the server.

[0064] Since the service registration method provided in the embodiment of the present application is applied to the interaction scenario between the server and the connector, based on this, in order to accurately describe the service registration method provided in the embodiment of the present application, before introducing the service registration method provided in the embodiment of the present application, first combine Figure 1 The architecture for interaction between the server and the connector involved in the embodiments of the present application is described in detail.

[0065] Figure 1 This is an architectural diagram of the interaction between the server and the connector provided in an embodiment of the present application.

[0066] like Figure 1 As shown, the architecture diagram includes multiple connectors 10 and a server 20, and the server 20 may include a gateway 21, a service registration center 22, and a database 23. Among them, multiple connectors 10 and the server 20 are connected, the gateway 21 is connected to the service registration center 22, and the service registration center 22 is connected to the database 23.

[0067] It should be noted that the multiple connectors 10 and the server 20 are not in the same intranet environment, that is, the multiple connectors 10 and the server 20 are in a public network environment, that is, the multiple connectors 10 are respectively linked to the server 20 through Internet protocol communication, and the Internet protocol can be Hypertext Transfer Protocol (Http) or Hypertext Transfer Protocol Secure (Https), which is not specifically limited here.

[0068] It should also be noted that when the connector is started, it can send a login request to the server. After being processed by the gateway and verified by the service registration center that the login request is successful, the connector token information can be sent to the connector.

[0069] On this basis, the connector can obtain the corresponding service instance information based on the connector's token information, and then obtain the service registration information by encrypting the service instance information, and send the connector's token information, connector identifier and service registration information to the service registration center in the form of a service registration request, so that the service registration center can register the corresponding connector service based on the connector's token information, connector identifier and service registration information, and after successful registration, send a corresponding notification message to the connector to notify the connector that the service registration is successful.

[0070] In addition, after the connector service is successfully registered, the connector can periodically send heartbeat information to the service registration request so that the service registration center can monitor the service status of the connector service and update the effective time of the connector service stored in the database.

[0071] Based on the above architecture, the service registration method provided by the embodiment of the present application is described in detail through specific embodiments in combination with the accompanying drawings.

[0072] like Figure 2 As shown, the execution subject of this method can be Figure 1 The service registration center 22 in the service registration center can be deployed in the server. The method can specifically include the following steps:

[0073] S210, receiving a service registration request sent by a connector.

[0074] In some embodiments, the service registration request may include the token information of the connector, the connector identifier, and the service registration information. The service registration information is obtained by encrypting the service instance information using a first encryption algorithm, wherein the first encryption algorithm may be an encryption algorithm preset according to actual experience or circumstances, and in addition, the service instance information may include an Internet Protocol IP address, a port identifier, and a service name.

[0075] In addition, the connector communicates with the server via an Internet protocol, which may be Http, Https, etc., and is not specifically limited here.

[0076] Specifically, the connector can obtain the service instance information, encrypt the service instance information to obtain the service registration information, and then combine the connector token information and the connector identifier to obtain the service registration request, and then send the service registration request to the service registration center. In this way, the service registration center can receive the service registration request sent by the connector.

[0077] S220: Register the connector service corresponding to the connector based on the connector identifier and the service instance information.

[0078] In some embodiments, the service instance information is obtained by the service registration center by decrypting the service registration information when the service registration center determines that the token information of the connector is valid.

[0079] Specifically, after receiving the service registration request sent by the connector, the service registration center can first determine whether the connector's token information is valid, because the service registration request includes the connector's token information, connector identifier and service registration information, and the service registration information is obtained by encrypting the service instance information using the first encryption algorithm. If the connector's token information is valid, the service registration center can obtain the service instance information by decrypting the service registration information, and then register the connector service corresponding to the connector based on the connector identifier and service instance information.

[0080] S230: Send a first notification message to the connector.

[0081] The first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

[0082] Specifically, after registering the connector service corresponding to the connector, the service registration center can send a first notification message to the connector to notify the connector that the connector service corresponding to the connector has been successfully registered.

[0083] In an embodiment of the present application, a service registration request sent by a connector can be received. The service registration request may include the token information of the connector, the connector identifier, and the service registration information. The service registration information is encrypted by the first encryption algorithm to the service instance information. Then, when the service registration center determines that the token information of the connector is valid, the service instance information is obtained by decrypting the service registration information, and in combination with the connector identifier, the connector service corresponding to the connector is registered, and a first notification message is sent to the connector to notify the connector that the corresponding connector service has been successfully registered. In this way, not only is secure encrypted transmission between the connector and the server achieved, and the information security of the connector is guaranteed, but also because the above-mentioned connector and the server communicate through the Internet protocol, service registration is achieved in a public network environment, and it is also convenient for subsequent connectors to periodically report heartbeat information to the server, and the server can monitor the service status of the connector service in real time.

[0084] In order to describe the service registration method provided by the embodiment of the present application in a more comprehensive and detailed manner, in one embodiment, Figure 3As shown, before the above S210, the service registration method provided in the embodiment of the present application may also include the following steps:

[0085] S310, receiving a login request sent by a connector.

[0086] In some embodiments, the login request is sent by the connector in response to a start instruction, wherein the start instruction may be a related instruction for starting the connector, which is not specifically limited here.

[0087] In addition, the login request may include login information obtained by encrypting the first login credentials of the connector using the public key of the server based on the second encryption algorithm. The second encryption algorithm may be pre-set based on actual experience or circumstances, and the second encryption algorithm may be an RSA encryption algorithm (Rivest-Shamir-Adleman, RSA), which is not specifically limited here. The first login credentials of the connector may include the login account and login password of the connector and other related information for login, which is not specifically limited here.

[0088] S320: When the login information is verified to be passed, the token information of the connector is sent to the connector.

[0089] Specifically, the service registration center can receive the login request sent by the connector before receiving the service registration request sent by the connector. Since the login request includes login information, the service registration center can first verify whether the login information is correct. If the verification passes, it means that the login information is correct, and the connector token information can be sent to the connector, so that the service instance information holding the valid token can be accepted and registered by the service registration center, and then obtain the authority to communicate with other services.

[0090] In this embodiment, before registering the connector service, the encrypted first login credential of the connector can be sent through the connector, and when the first login credential is verified by the service registration center, the connector token information is sent to the connector. In this way, the secure encrypted transmission between the connector and the server is guaranteed to a certain extent through verification, and the subsequent registration of the corresponding connector service is also convenient.

[0091] Based on the foregoing content, it can be known that, in the case where the login information is verified, before sending the connector's token information to the connector, it is necessary to determine that the login information is verified. Based on this, in order to be able to describe in detail the service registration method provided by the embodiment of the present application, in one embodiment, Figure 4 As shown, before S320, the method may include the following steps:

[0092] S410, decrypt the login information using the private key of the server to obtain the first login credential of the connector.

[0093] Among them, the first login credential of the connector is generated by the server and provided to the connection in a preset manner. The preset manner can be pre-set based on actual experience or circumstances. For example, the preset manner can be an email method, which is not specifically limited here.

[0094] S420, obtaining a second login credential of the connector from a database of the server.

[0095] S430: When the first login credential is the same as the second login credential, determine that the login information verification is successful.

[0096] Specifically, since the login information included in the login request received by the service registration center is obtained by encrypting the first login credential of the connector using the server's public key based on the second encryption algorithm, the service registration center needs to use the server's private key to decrypt the login information to obtain the first login credential of the connector. Since the first login credential of the connector is generated by the server and provided to the corresponding connector, the service registration center can obtain the second login credential of the connector from the server's database and determine whether the login information verification passes by judging whether the first login credential is the same as the second login credential.

[0097] More specifically, if the first login credential is the same as the second login credential, it means that the first login credential has not been tampered with during the transmission process, that is, the communication between the connector and the service registration center is relatively safe, and it can be determined that the login information verification has passed. On the contrary, if the first login credential is different from the second login credential, it means that the first login credential has been tampered with during the transmission process, that is, the communication between the connector and the service registration center is not safe, and it can be determined that the login information verification has failed.

[0098] In this embodiment, it is possible to determine whether the information sent by the connector has been tampered with during transmission by determining whether the obtained first login credentials of the connector are the same as the second login credentials of the connector stored in the database of the server. If the two are the same, it indicates that the information sent by the connector has not been tampered with during transmission, which ensures the security of public network communication between the connector and the service registration center to a certain extent.

[0099] In addition, in order to accurately and safely complete the connector service corresponding to the registered connector, in one embodiment, the above S120 may specifically include the following steps:

[0100] Use the connector ID and IP address as the key and the service instance information as the value, store them in the database in a preset format, and set the validity period of the connector service.

[0101] The preset form may be based on actual conditions, for example, the preset form may be in the form of a key-value. In addition, the above-mentioned validity period may refer to the validity period of the connector service, that is, if the validity period is exceeded, the connector service registered in the service registration center will also become invalid.

[0102] Specifically, the service registration center can use the connector identifier and IP address as the key and the service instance information as the value, store them in the database in a preset format, and set the validity period of the connector service.

[0103] In this embodiment, after obtaining the connector identifier and service instance information, the connector identifier and IP address are used as keys, and the service instance information is used as a value, and stored in the database in a preset form, and the effective time of the connector service is set. In this way, the registration of the connector service corresponding to the connector can be completed effectively and accurately.

[0104] Since the validity period of the connector service is limited, after the connector service of the registered connector ends, the connector needs to periodically send heartbeat information to the service registration center through the heartbeat reporting mechanism, so that the service registration center can monitor the status of the connector service and update the validity period of the connector service. Figure 5 As shown, the service registration method provided in the embodiment of the present application may also include the following steps:

[0105] S510: Receive a heartbeat message sent by a connector and carrying token information of the connector.

[0106] In some embodiments, the heartbeat information is used by the service registration center to remotely monitor the health status of the connector. In addition, the heartbeat information includes the connector identifier and IP address;

[0107] S520, when it is determined that the token information of the connector is valid, based on the connector identifier and IP address included in the heartbeat information, the service instance information corresponding to the connector identifier and IP address is searched in the database, and the validity period of the service instance information is updated.

[0108] Specifically, after the service registration center successfully registers the connector service of the connector and notifies the connector, the connector can periodically send heartbeat information to the service registration center. In this way, the service registration center can receive the heartbeat information sent by the connector carrying the connector's token information, and determine whether the connector's token information is valid. If the connector's token information is valid, the service registration center can find the service instance information corresponding to the connector identifier and IP address in the database based on the connector identifier and IP address included in the heartbeat information, and update the validity period of the service instance information.

[0109] It should also be noted that since the server communicates with multiple connectors, in order to facilitate viewing of the health status of each connector, a front-end interface can be built to visually view the status of the connector service of each connector connected to the server.

[0110] In this embodiment, it is possible to receive heartbeat information sent by the connector that carries the connector's token information, and when it is determined that the connector's token information is valid, update the validity period of the corresponding service instance information. In this way, not only can the status of the connector service be monitored, but the validity period of the connector service can also be updated when it is determined that the status of the connector service is healthy.

[0111] Considering that the connector has not reported the heartbeat information according to the cycle time or for a long time, the connector service may be in an unhealthy state, that is, it needs maintenance. Therefore, in order to be able to detect the abnormality of the connector service in a timely manner, the embodiment of the present application can add an early warning push function. Thus, in one embodiment, the above heartbeat information can also include the heartbeat time. Based on this, the service registration method involved above can also include the following steps:

[0112] Determine the time difference between the current time and the heartbeat time;

[0113] When the time difference is greater than a preset time threshold, a second notification message is sent to the operation and maintenance device.

[0114] The preset time threshold may be a time threshold preset based on actual experience or circumstances. In addition, the second notification message is used to notify the operation and maintenance device that the connector is in an unhealthy state.

[0115] Specifically, since the heartbeat information sent by the connector to the service registration center can include the heartbeat time, the service registration center can, after receiving the heartbeat information most recently sent by the connector, detect and determine the time difference between the current moment and the heartbeat time in real time, and judge the management of the time difference and the preset time threshold. If the time difference is greater than the preset time threshold, indicating that the connector has not sent heartbeat information for a long time, there may be a fault or it may be in an unhealthy state, the service registration center can send a second notification message to the operation and maintenance equipment to notify the operation and maintenance equipment that the connector is in an unhealthy state and needs maintenance.

[0116] It should be noted that, in the process of sending the second notification message to the operation and maintenance device, the service registration center in the embodiment of the present application can send the notification message to the operation and maintenance device in the form of email or text message, which will not be elaborated here.

[0117] In this embodiment, the time difference between the current moment and the heartbeat time can be determined in real time. When it is determined based on the time difference that the connector has not reported heartbeat information for a long time, it can be determined that the connector is in an unhealthy state, and then a notification message can be sent to the operation and maintenance equipment so that the connector can be repaired in time later.

[0118] In addition, since the service registration center in the prior art only unidirectionally receives the heartbeat report of the connector, it is difficult to determine the fault of the connector in a timely and accurate manner. Based on this, in one embodiment, the above heartbeat information may also include the heartbeat time. Thus, the service registration method provided in the embodiment of the present application may also include the following steps:

[0119] Determine the time difference between the current time and the heartbeat time;

[0120] When the time difference is greater than a preset time threshold, a heartbeat check request is sent to the connector through the check interface.

[0121] The preset time threshold may be preset based on actual experience or circumstances, and is not specifically limited here. In addition, the heartbeat check request is used to determine the reason why the connector does not send the heartbeat information within the preset time threshold.

[0122] Specifically, since the heartbeat information sent by the connector to the service registration center can include the heartbeat time, the service registration center can, after receiving the heartbeat information most recently sent by the connector, detect and determine the time difference between the current moment and the heartbeat time in real time, and judge the management of the time difference and the preset time threshold. If the time difference is greater than the preset time threshold, it means that the connector has not sent heartbeat information for a long time, and there may be a fault or it may be in an unhealthy state. The service registration center can actively send a heartbeat check request to the connector through the inspection interface to locate the reason why the connector has not sent heartbeat information for a long time.

[0123] In this embodiment, when it is determined that the connector has not sent heartbeat information for a long time, a check interface can be added between the server and the connector so that the service registration center can actively send a heartbeat check request to the connector through the check interface, so as to locate the reason why the connector is in an unhealthy state in a timely and accurate manner, thereby improving the heartbeat reporting mechanism.

[0124] In addition, the present application embodiment also provides a service registration method. Figure 6 As shown, the execution subject of the service registration method may be a connector. Based on this, the method may specifically include the following steps:

[0125] S610: Send a service registration request to a service registration center.

[0126] In some embodiments, the service registration request may include token information of the connector, a connector identifier, and service registration information. The service registration information is obtained by encrypting the service instance information using a first encryption algorithm.

[0127] The first encryption algorithm may be pre-set based on actual experience or circumstances, and is not specifically limited here. In addition, the service instance information includes an Internet Protocol IP address, a port identifier, and a service name.

[0128] It should also be noted that the connector communicates with the server through an Internet protocol. For example, the Internet protocol may be Hypertext Transfer Protocol (Http) or Hypertext Transfer Protocol Secure (Https), which is not specifically limited here.

[0129] S620: When the service registration center successfully registers the connector service corresponding to the connector based on the connector identifier and the service instance information, receive a first notification message sent by the service registration center.

[0130] In some embodiments, the above service instance information is obtained by the service registration center by decrypting the service registration information when the service registration center determines that the token information of the connector is valid.

[0131] In addition, the first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

[0132] Specifically, after obtaining its own token information, connector identifier and service instance information, the connector can first use the first encryption algorithm to encrypt the service instance information to obtain the service registration information, and then send the connector's token information, connector identifier and service registration information to the service registration center in the form of a service registration request.

[0133] In an embodiment of the present application, a service registration request can be sent to a service registration center, and the service registration request may include the token information of the connector, the connector identifier, and the service registration information. The service registration information is encrypted by the first encryption algorithm to the service instance information, and then when the service registration center determines that the token information of the connector is valid, the service instance information can be obtained by decrypting the service registration information, and after registering the connector service corresponding to the connector in combination with the connector identifier, the first notification message sent by the service registration center is received. In this way, not only the secure encrypted transmission between the connector and the server is realized, and the information security of the connector is guaranteed, but also because the above-mentioned connector and the server communicate through the Internet protocol, the service registration is realized in the public network environment, and it is also convenient for the subsequent connector to periodically report the heartbeat information to the server, and the server can realize the real-time monitoring of the service status of the connector service.

[0134] Since the service registration request includes the token information, connector identifier and service instance information of the connector, it is necessary to obtain the token information, connector identifier and service instance information of the connector before sending the service registration request to the service registration center. Based on this, in order to be able to describe the service registration method provided by the embodiment of the present application in more detail, in one embodiment, before the above S610, the service registration method provided by the embodiment of the present application may also include the following steps:

[0135] In response to the start instruction of the connector, a login request is sent to the service registration center;

[0136] When the service registration center verifies the login information and passes it, the token information of the connector sent by the service registration center is received;

[0137] Get the connector ID and service instance information, encrypt the service instance information, and get the service registration information.

[0138] The above-mentioned start instruction may be an instruction for starting the connector.

[0139] In addition, the login request may include login information obtained by encrypting the first login credentials of the connector using the public key of the server. The first login credentials may include the login account and login password of the connector, which are related credentials used by the connector to log in to the server.

[0140] Specifically, the connector can respond to the startup instruction of the connector and send a login request to the service registration center. After receiving the login request, the service registration center can verify the login information included in the login request. If the service registration center passes the verification of the login information included in the login request, it means that the relevant information transmitted by the connector in the process of sending the login request to the service registration center has not been tampered with, which ensures the data security between the connector and the service registration center. In this way, the service registration center can send the connector's token information to the connector. In this way, the connector can receive the connector's token information sent by the service registration center. On this basis, the connector can also obtain the connector identification and service instance information, and encrypt the service instance information to obtain the service registration information. Therefore, the connector can obtain the connector's token information, connector identification and service registration information before sending the service registration request to the service registration center.

[0141] In this embodiment, before registering the connector service, an encrypted first login credential of the connector can be sent through the connector, and when the first login credential is verified by the service registration center, the connector identifier, service registration information and connector token information can be obtained. In this way, the secure encrypted transmission between the connector and the server can be ensured, and the relevant information for service registration can be obtained, so as to facilitate the subsequent service registration in a public network environment.

[0142] In addition, in order to fully and in detail describe the service registration method provided in the embodiment of the present application, in one embodiment, the service registration method provided in the embodiment of the present application may also include the following steps:

[0143] Create a heartbeat sending thread;

[0144] A heartbeat sending thread is used to periodically send heartbeat messages carrying the connector's token information to the service registration center, so that when the service registration center receives the heartbeat message carrying the connector's token information sent by the connector and determines that the connector's token information is valid, the heartbeat information includes the connector identifier and IP address, and the service instance information corresponding to the connector identifier and IP address is found in the database, and the validity period of the service instance information is updated.

[0145] In some embodiments, the heartbeat information is used by the service registration center to remotely monitor the health status of the connector, and the heartbeat information includes the connector identifier and IP address.

[0146] Specifically, after the connector receives the first notification message sent by the service registration center, it indicates that the connector service of the connector has been successfully registered. In this way, the connector can create a heartbeat sending thread, and use the created heartbeat sending thread to periodically send heartbeat information carrying the connector's token information to the service registration center, so that the subsequent service registration center can receive the heartbeat information carrying the connector's token information sent by the connector, and determine that the connector's token information is valid. Based on the connector identifier and IP address included in the heartbeat information, it can find the service instance information corresponding to the connector identifier and IP address in the database, so as to update the validity time of the service instance information.

[0147] In this embodiment, a heartbeat sending thread can be created and used to periodically send heartbeat information carrying the connector's token information to the service registration center. In this way, the service registration center can update the validity period of the corresponding service instance information when it is determined that the connector's token information is valid. It can not only monitor the status of the connector service, but also update the validity period of the connector service when it is determined that the connector service is in a healthy state.

[0148] Based on the same inventive concept, the embodiment of the present application also provides a service registration device. The service registration device can be applied to a service registration center, which is deployed in a server. Figure 7 The resource management system provided in the embodiment of the present application is described in detail.

[0149] Figure 7 It is a structural diagram of a resource management system provided in an embodiment of the present application.

[0150] like Figure 7 As shown, the resource management system 700 may include:

[0151] The receiving module 710 is used to receive a service registration request sent by the connector, the service registration request includes the token information of the connector, the connector identifier and the service registration information, the service registration information is obtained by encrypting the service instance information by a first encryption algorithm, the service instance information includes an Internet Protocol IP address, a port identifier and a service name, and the connector communicates with the server through the Internet Protocol;

[0152] A registration module 720 is used to register a connector service corresponding to the connector based on the connector identifier and the service instance information, where the service instance information is obtained by the service registration center by decrypting the service registration information when the token information of the connector is determined to be valid;

[0153] The sending module 730 is used to send a first notification message to the connector, where the first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

[0154] In one embodiment, the receiving module is further used to receive a login request sent by the connector, the login request is sent by the connector in response to the start instruction, and the login request includes login information obtained by encrypting the first login credential of the connector using the public key of the server based on the second encryption algorithm;

[0155] The sending module is also used to send the token information of the connector to the connector when the login information is verified to be passed.

[0156] In one embodiment, the service registration device mentioned above further includes a decryption module, an acquisition module and a determination module.

[0157] A decryption module, used to decrypt the login information using the private key of the server to obtain a first login credential of the connector, the first login credential of the connector is generated by the server and provided to the connector in a preset manner;

[0158] An acquisition module, used for acquiring a second login credential of the connector from a database on the server side;

[0159] The determination module is used to determine that the login information verification has passed when the first login credential is the same as the second login credential.

[0160] In one embodiment, the registration module is specifically used to:

[0161] Use the connector ID and IP address as the key and the service instance information as the value, store them in the database in a preset format, and set the validity period of the connector service.

[0162] In one embodiment, the service registration device mentioned above further includes a search module.

[0163] A receiving module is used to receive the heartbeat information sent by the connector and carrying the connector's token information. The heartbeat information is used by the service registration center to remotely monitor the health status of the connector. The heartbeat information includes the connector identifier and IP address.

[0164] The search module is used to search for service instance information corresponding to the connector identifier and IP address in the database based on the connector identifier and IP address included in the heartbeat information when determining that the token information of the connector is valid, and to update the validity period of the service instance information.

[0165] In some embodiments, the heartbeat information also includes the heartbeat time; based on this, the above-mentioned service registration device also includes a determination module.

[0166] A determination module, used to determine the time difference between the current time and the heartbeat time;

[0167] The sending module is also used to send a second notification message to the operation and maintenance device when the time difference is greater than a preset time threshold, and the second notification message is used to notify the operation and maintenance device that the connector is in an unhealthy state.

[0168] In some embodiments, the heartbeat information also includes the heartbeat time; based on this, the above-mentioned service registration device also includes a determination module.

[0169] A determination module, used to determine the time difference between the current time and the heartbeat time;

[0170] The sending module is also used to send a heartbeat check request to the connector through the inspection interface when the time difference is greater than a preset time threshold. The heartbeat check request is used to determine the reason why the connector fails to send heartbeat information within the preset time threshold.

[0171] In an embodiment of the present application, a service registration request sent by a connector can be received. The service registration request may include the token information of the connector, the connector identifier, and the service registration information. The service registration information is encrypted by the first encryption algorithm to the service instance information. Then, when the service registration center determines that the token information of the connector is valid, the service instance information is obtained by decrypting the service registration information, and in combination with the connector identifier, the connector service corresponding to the connector is registered, and a first notification message is sent to the connector to notify the connector that the corresponding connector service has been successfully registered. In this way, not only is secure encrypted transmission between the connector and the server achieved, and the information security of the connector is guaranteed, but also because the above-mentioned connector and the server communicate through the Internet protocol, service registration is achieved in a public network environment, and it is also convenient for subsequent connectors to periodically report heartbeat information to the server, and the server can monitor the service status of the connector service in real time.

[0172] Each module in the resource management system provided in the embodiment of the present application can be implemented Figures 2 to 5 The method steps of any of the embodiments shown in the figure can achieve the corresponding technical effects, which will not be repeated here for the sake of brevity.

[0173] Based on the same inventive concept, the present application embodiment also provides a service registration device. The service registration device can be applied to a connector, specifically in combination with Figure 8 The resource management system provided in the embodiment of the present application is described in detail.

[0174] Figure 8 It is a structural diagram of a resource management system provided in an embodiment of the present application.

[0175] like Figure 8As shown, the resource management system 800 may include:

[0176] A sending module 810 is used to send a service registration request to a service registration center. The service registration request includes the token information of the connector, the connector identifier, and the service registration information. The service registration information is obtained by encrypting the service instance information through a first encryption algorithm. The service instance information includes an Internet Protocol IP address, a port identifier, and a service name. The connector communicates with the server through the Internet Protocol.

[0177] Receiving module 820 is used to receive a first notification message sent by the service registration center when the service registration center successfully registers the connector service corresponding to the connector based on the connector identifier and service instance information. The service instance information is obtained by the service registration center by decrypting the service registration information when the service registration center determines that the token information of the connector is valid. The first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

[0178] In one embodiment, the service registration module further includes an acquisition module.

[0179] The sending module is further used to send a login request to the service registration center in response to the startup instruction of the connector, the login request including login information obtained by encrypting the first login credential of the connector using the public key of the server;

[0180] The receiving module is further used to receive the token information of the connector sent by the service registration center when the service registration center verifies the login information.

[0181] The acquisition module is used to obtain the connector identifier and service instance information, encrypt the service instance information, and obtain the service registration information.

[0182] In one embodiment, the service registration device further includes a creation module.

[0183] Create a module to create a heartbeat sending thread;

[0184] A sending module is used to use a heartbeat sending thread to periodically send heartbeat information carrying the token information of the connector to a service registration center. The heartbeat information is used by the service registration center to remotely monitor the health status of the connector. The heartbeat information includes a connector identifier and an IP address, so that when the service registration center receives the heartbeat information carrying the token information of the connector sent by the connector and determines that the token information of the connector is valid, based on the connector identifier and IP address included in the heartbeat information, the service instance information corresponding to the connector identifier and the IP address is found in the database, and the validity period of the service instance information is updated.

[0185] In an embodiment of the present application, a service registration request can be sent to a service registration center, and the service registration request may include the token information of the connector, the connector identifier, and the service registration information. The service registration information is encrypted by the first encryption algorithm to the service instance information, and then when the service registration center determines that the token information of the connector is valid, the service instance information can be obtained by decrypting the service registration information, and after registering the connector service corresponding to the connector in combination with the connector identifier, the first notification message sent by the service registration center is received. In this way, not only the secure encrypted transmission between the connector and the server is realized, and the information security of the connector is guaranteed, but also because the above-mentioned connector and the server communicate through the Internet protocol, the service registration is realized in the public network environment, and it is also convenient for the subsequent connector to periodically report the heartbeat information to the server, and the server can realize the real-time monitoring of the service status of the connector service.

[0186] Each module in the resource management system provided in the embodiment of the present application can be implemented Figure 6 The method steps of the illustrated embodiment can achieve the corresponding technical effects, and for the sake of brevity, they will not be repeated here.

[0187] Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0188] The electronic device may include a processor 901 and a memory 902 storing computer program instructions.

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

[0190] The memory 902 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 902 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 902 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 902 is a non-volatile solid-state memory.

[0191] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0192] The processor 901 implements any one of the service registration methods in the above embodiments by reading and executing computer program instructions stored in the memory 902 .

[0193] In one example, the electronic device may further include a communication interface 903 and a bus 910. Fig. 9 As shown, the processor 901, the memory 902, and the communication interface 903 are connected via a bus 910 and communicate with each other.

[0194] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0195] Bus 910 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 910 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0196] In addition, in combination with the service registration method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the service registration method provided in the embodiment of the present application is implemented.

[0197] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the electronic device executes the service registration method provided in the embodiment of the present application.

[0198] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0199] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, 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 present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0200] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0201] Aspects of the present disclosure are described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable resource management system to produce a machine so that these instructions executed by the processor of the computer or other programmable resource management system enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0202] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A service registration method, It is characterized in that For a service registration center, the service registration center is deployed in a server, and the method includes: Receive a service registration request sent by a connector, the service registration request including token information of the connector, a connector identifier, and service registration information, the service registration information is obtained by encrypting service instance information using a first encryption algorithm, the service instance information includes an Internet Protocol IP address, a port identifier, and a service name, and the connector communicates with the server through the Internet Protocol; Registering a connector service corresponding to the connector based on the connector identifier and the service instance information, wherein the service instance information is obtained by the service registration center by decrypting the service registration information when determining that the token information of the connector is valid; A first notification message is sent to the connector, where the first notification message is used to notify the connector that a connector service corresponding to the connector has been registered.

2. The method according to claim 1, It is characterized in that Before receiving the service registration request sent by the connector, the method further includes: receiving a login request sent by the connector, the login request being sent by the connector in response to a start instruction, the login request comprising login information obtained by encrypting the first login credential of the connector using a public key of a server based on a second encryption algorithm; When the login information is verified to be passed, the token information of the connector is sent to the connector.

3. The method according to claim 2, It is characterized in that In the case where the verification of the login information is passed, before sending the token information of the connector to the connector, the method further includes: Decrypting the login information using the private key of the server to obtain a first login credential of the connector, where the first login credential of the connector is generated by the server and provided to the connector in a preset manner; Obtaining a second login credential of the connector from a database of the server; In a case where the first login credential is the same as the second login credential, it is determined that the login information verification has passed.

4. The method according to claim 1, It is characterized in that The registering the connector service corresponding to the connector based on the connector identifier and the service instance information includes: The connector identifier and the IP address are used as keys, and the service instance information is used as a value, and stored in a database in a preset format, and the effective time of the connector service is set.

5. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: Receive the heartbeat information sent by the connector and carrying the connector token information, the heartbeat information is used by the service registration center to remotely monitor the health status of the connector, and the heartbeat information includes the connector identifier and IP address; When it is determined that the token information of the connector is valid, based on the connector identifier and IP address included in the heartbeat information, the service instance information corresponding to the connector identifier and the IP address is searched in the database, and the validity period of the service instance information is updated.

6. The method according to claim 5, It is characterized in that The heartbeat information also includes the heartbeat time; the method also includes: Determine the time difference between the current time and the heartbeat time; When the time difference is greater than a preset time threshold, a second notification message is sent to the operation and maintenance device, where the second notification message is used to notify the operation and maintenance device that the connector is in an unhealthy state.

7. The method according to claim 5, It is characterized in that The heartbeat information also includes the heartbeat time; the method also includes: Determine the time difference between the current time and the heartbeat time; In the case where the time difference is greater than a preset time threshold, a heartbeat check request is sent to the connector through the check interface, and the heartbeat check request is used to determine the reason why the connector does not send heartbeat information within the preset time threshold.

8. A service registration method, It is characterized in that Applied to a connector, the method comprises: Sending a service registration request to a service registration center, the service registration request including token information of the connector, a connector identifier, and service registration information, the service registration information being obtained by encrypting service instance information using a first encryption algorithm, the service instance information including an Internet Protocol IP address, a port identifier, and a service name, the connector communicating with the server through the Internet Protocol; When the service registration center successfully registers the connector service corresponding to the connector based on the connector identifier and the service instance information, a first notification message sent by the service registration center is received. The service instance information is obtained by the service registration center by decrypting the service registration information when it is determined that the token information of the connector is valid. The first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

9. The method according to claim 8, It is characterized in that Before sending the service registration request to the service registration center, the method further includes: In response to the start-up instruction of the connector, a login request is sent to a service registration center, wherein the login request includes login information obtained by encrypting the first login credential of the connector using a public key of the server; When the service registration center verifies that the login information is passed, receiving the token information of the connector sent by the service registration center; Get the connector ID and service instance information, encrypt the service instance information, and get the service registration information.

10. The method according to claim 8, It is characterized in that The method further comprises: Create a heartbeat sending thread; A heartbeat sending thread is used to periodically send heartbeat information carrying the token information of the connector to the service registration center. The heartbeat information is used by the service registration center to remotely monitor the health status of the connector. The heartbeat information includes a connector identifier and an IP address, so that when the service registration center receives the heartbeat information carrying the token information of the connector sent by the connector and determines that the token information of the connector is valid, based on the connector identifier and IP address included in the heartbeat information, the service instance information corresponding to the connector identifier and the IP address is found in the database, and the validity period of the service instance information is updated.

11. A service registration device, It is characterized in that Applied to a service registration center, the service registration center is deployed in a server, and the device includes: A receiving module, configured to receive a service registration request sent by a connector, wherein the service registration request includes token information of the connector, a connector identifier, and service registration information, wherein the service registration information is obtained by encrypting service instance information using a first encryption algorithm, wherein the service instance information includes an Internet Protocol IP address, a port identifier, and a service name, and wherein the connector communicates with the server through an Internet Protocol; A registration module, used to register the connector service corresponding to the connector based on the connector identifier and the service instance information, wherein the service instance information is obtained by the service registration center by decrypting the service registration information when determining that the token information of the connector is valid; The sending module is used to send a first notification message to the connector, where the first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

12. A service registration device, It is characterized in that Applied to a connector, the device comprises: A sending module, used to send a service registration request to a service registration center, wherein the service registration request includes token information of the connector, a connector identifier, and service registration information, wherein the service registration information is obtained by encrypting service instance information using a first encryption algorithm, wherein the service instance information includes an Internet Protocol IP address, a port identifier, and a service name, and the connector communicates with the server through the Internet Protocol; A receiving module is used to receive a first notification message sent by a service registration center when the service registration center successfully registers the connector service corresponding to the connector based on the connector identifier and the service instance information. The service instance information is obtained by the service registration center by decrypting the service registration information when it is determined that the token information of the connector is valid. The first notification message is used to notify the connector that the connector service corresponding to the connector has been registered.

13. An electronic device, It is characterized in that The device includes: a processor and a database storing computer program instructions; The processor reads and executes the computer program instructions to implement the service registration method as described in any one of claims 1-10.

14. A computer storage medium, It is characterized in that The computer storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the service registration method according to any one of claims 1 to 10 is implemented.

15. A computer program product, It is characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, it is the service registration method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Registration method and device of micro-service instance, computer equipment and storage medium

    CN110224855A

  • Micro-service registration method and device

    CN110224998A

  • Distribution network automation master station mobile application service management method and system based on micro-service architecture

    CN110851278A

  • Token generation method and device, electronic equipment and storage medium

    CN114553570A

  • Service discovery and service registration method and device based on gateway

    CN114697231A