CN115002195B - Service registration discovery method, system and medium of self-adaptive peer-to-peer mode - Google Patents

Service registration discovery method, system and medium of self-adaptive peer-to-peer mode Download PDF

Info

Publication number
CN115002195B
CN115002195B CN202210607516.7A CN202210607516A CN115002195B CN 115002195 B CN115002195 B CN 115002195B CN 202210607516 A CN202210607516 A CN 202210607516A CN 115002195 B CN115002195 B CN 115002195B
Authority
CN
China
Prior art keywords
service
connection
configuration information
request
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210607516.7A
Other languages
Chinese (zh)
Other versions
CN115002195A (en
Inventor
罗伟东
付凯
宋吾边
侯帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hexun Huagu Information Technology Co ltd
Original Assignee
Shenzhen Hexun Huagu Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Hexun Huagu Information Technology Co ltd filed Critical Shenzhen Hexun Huagu Information Technology Co ltd
Priority to CN202210607516.7A priority Critical patent/CN115002195B/en
Publication of CN115002195A publication Critical patent/CN115002195A/en
Application granted granted Critical
Publication of CN115002195B publication Critical patent/CN115002195B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/148Migration or transfer of sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a service registration discovery method, a system and a medium of a self-adaptive peer-to-peer mode, wherein the method comprises the following steps: the service request end sends the broadcast information to the service providing end, the service providing end judges whether the broadcast information is matched with the service configuration information, if so, the connection configuration information with the digital signature result is fed back to the corresponding service request end, the service request end receives the connection configuration information and performs signature verification, and if the verification passes, the service request end sends a service connection request to be connected with the establishment request provided by the corresponding service. By the method, the micro service architecture library is configured at the service request end and the service providing end at the same time, the service request end sends broadcast information to any service providing end, the service providing end establishes request connection with the corresponding service request end after receiving any broadcast, service registration discovery in a self-adaptive peer-to-peer mode is realized, abnormal system service caused by problems of service nodes or service node clusters is avoided, and service providing reliability of the service providing end is improved.

Description

Service registration discovery method, system and medium of self-adaptive peer-to-peer mode
Technical Field
The present invention relates to the field of computer micro-services, and in particular, to a service registration discovery method, system and medium in a self-adaptive peer-to-peer mode.
Background
With the development of computer technology, enterprises and institutions need to construct a large number of business service systems for implementing various businesses, and the advanced design of a micro-business architecture in the aspects of business division, application dependence decoupling, system splitting and the like solves the problems of insufficient system performance and high-efficiency processing of complex businesses in the business service systems, and is a current mainstream framework selection. The choice of building a micro-service architecture for use is an important issue as to how to perform service registration discovery, which is also the core function of the architecture.
The service registration discovery of the existing micro-service architecture mainly adopts a centralized management mode, and is deployed in a centralized manner by using a service node or a service node cluster mode. When the service node or the service node cluster breaks down, the service node or the service node cluster can not be switched to other normal service nodes or normal service node clusters in time to continue to perform service, so that the service can not be registered and found, and great influence and loss are brought to business of enterprises and institutions. Therefore, the micro service architecture in the prior art method has the problem that service registration discovery cannot be rapidly performed when the node is abnormal.
Disclosure of Invention
The embodiment of the invention provides a service registration discovery method, a system and a medium of a self-adaptive peer-to-peer mode, which aim to solve the problem that a micro service architecture in the prior art cannot quickly perform service registration discovery when a node is abnormal.
In a first aspect, an embodiment of the present invention provides a service registration discovery method in a self-adaptive peer-to-peer mode, where the method is applied to a service registration discovery system based on micro services, where the service registration discovery system based on micro services includes a service request end and a service providing end, where the service request end and the service providing end are connected by a network to implement transmission of data information;
the method comprises the following steps executed at the service request end:
transmitting broadcast information to at least one service provider; the broadcast information comprises a request end identifier and a service matching parameter;
If connection configuration information from any service provider is received, carrying out signature verification on the connection configuration information according to a preset signature verification rule to obtain a verification result of whether the connection configuration information passes or not;
If the verification result is passed, sending a service connection request to the service providing end corresponding to the connection configuration information according to the connection configuration information so as to establish a request connection with the corresponding service providing end;
The method further comprises the following steps performed at the service provider:
Judging whether the received broadcast information is matched with service configuration information, wherein the service configuration information is configuration information corresponding to the service providing end; the broadcast information comes from any service request end;
And if the broadcast information is matched with the service configuration information, feeding back the connection configuration information carrying the digital signature result to the service request terminal corresponding to the broadcast information.
In a second aspect, the embodiment of the present invention further provides a service registration discovery method in a self-adaptive peer-to-peer mode, where the method is applied to a service registration discovery system based on micro services, where the service registration discovery system based on micro services includes a service request end and a service providing end, where the service request end and the service providing end perform network bridging through a TCP gateway to implement transmission of data information;
the method comprises the following steps executed at the service request end:
sending broadcast information to the TCP gateway and forwarding the broadcast information to at least one service provider through the TCP gateway; the broadcast information comprises a request end identifier and a service name identifier;
If connection configuration information forwarded by the TCP gateway from any service provider is received, carrying out signature verification on the connection configuration information according to a preset signature verification rule to obtain a verification result of whether the connection configuration information passes or not;
if the verification result is passed, sending a service connection request to the TCP gateway according to the connection configuration information and forwarding the service connection request to the service providing end corresponding to the connection configuration information through the TCP gateway so as to establish request connection with the corresponding service providing end through the TCP gateway;
The method further comprises the following steps performed at the service provider:
Judging whether the received broadcast information is matched with the service configuration information or not; the service configuration information is configuration information corresponding to the service providing end, and the broadcast information is from any service request end;
And if the broadcast information is matched with the service configuration information, feeding back the connection configuration information carrying the digital signature result to the TCP gateway and forwarding the connection configuration information to the service request terminal corresponding to the broadcast information through the TCP gateway.
In a third aspect, an embodiment of the present invention provides a service registration discovery system in an adaptive peer-to-peer mode, where the system is configured in a service registration discovery system based on micro services, where the service registration discovery system based on micro services includes a service request end and a service providing end, where the service request end and the service providing end are connected by a network to implement transmission of data information;
The system comprises the following units configured at the service request end:
A broadcast information transmitting unit, configured to transmit broadcast information to at least one service provider; the broadcast information comprises a request end identifier and a service matching parameter;
The verification result acquisition unit is used for carrying out signature verification on the connection configuration information according to a preset signature verification rule if the connection configuration information from any service providing end is received, so as to obtain a verification result of whether the connection configuration information passes or not;
a request connection establishing unit, configured to send a service connection request to the service provider corresponding to the connection configuration information according to the connection configuration information if the verification result is passed, so as to establish a request connection with the corresponding service provider;
the system further comprises the following units configured at the service providing end:
the matching judging unit is used for judging whether the received broadcast information is matched with service configuration information, wherein the service configuration information is configuration information corresponding to the service providing end; the broadcast information comes from any service request end;
And the connection configuration information feedback unit is used for feeding back the connection configuration information carrying the digital signature result to the service request end corresponding to the broadcast information if the broadcast information is matched with the service configuration information.
In a fourth aspect, an embodiment of the present invention further provides a service registration discovery system in an adaptive peer-to-peer mode, where the system includes a service request end and a service provider end, where the service request end includes a first memory, a first processor, and a first computer program stored in the first memory and capable of running on the first processor, and the service provider end includes a second memory, a second processor, and a second computer program stored in the second memory and capable of running on the second processor, where the first processor executes the first computer program and the second processor jointly implements the service registration discovery method in the adaptive peer-to-peer mode in the first aspect or the second aspect when executing the second computer program.
In a fifth aspect, an embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores a first computer program and a second computer program, where the first computer program is executed by a first processor and the second computer program is executed by a second processor, to jointly implement the service registration discovery method in the adaptive peer mode described in the first aspect or the second aspect.
The embodiment of the invention provides a service registration discovery method, a system and a medium in a self-adaptive peer-to-peer mode, wherein a service request end sends broadcast information to a service providing end, the service providing end judges whether the broadcast information is matched with service configuration information, if so, the service providing end feeds back connection configuration information with a digital signature result to a corresponding service request end, the service request end receives the connection configuration information and performs signature verification, and if the verification passes, a service connection request is sent to be connected with an establishment request provided by a corresponding service. By the method, the micro service architecture library is configured at the service request end and the service providing end at the same time, the service request end sends broadcast information to any service providing end, the service providing end can establish request connection with the corresponding service request end after receiving any broadcast, service registration discovery in a self-adaptive peer-to-peer mode is realized, abnormal system service caused by problems of service nodes or service node clusters is avoided, and service providing reliability of the service providing end is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention;
Fig. 2 is an application scenario schematic diagram of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention;
Fig. 3 is a schematic diagram of another application scenario of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention;
fig. 4 is a schematic diagram of updating connection configuration of a service node in a service provider according to an embodiment of the present invention;
Fig. 5 is a schematic sub-flowchart of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention;
Fig. 6 is another schematic sub-flowchart of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention;
fig. 7 is a schematic diagram of another sub-flowchart of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention;
fig. 8 is another flow chart of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention;
fig. 9 is a schematic flow chart of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention;
Fig. 10 is a schematic flow chart of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention;
FIG. 11 is a schematic block diagram of an adaptive peer-to-peer mode service registration discovery system provided by an embodiment of the invention;
fig. 12 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1 and fig. 2, fig. 1 is a flowchart of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention, and fig. 2 is an application scenario diagram of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the present invention. In a specific application scenario, as shown in fig. 2, the service registration discovery method in the adaptive peer-to-peer mode is applied to a service registration discovery system 1 based on micro services, where the service registration discovery system 1 based on micro services includes a service request end 10 and a service providing end 20, the service request end 10 and the service providing end 20 are connected through a network to realize transmission of data information, the service request end 10 and the service providing end 20 belong to a local network segment, and the service registration discovery method in the adaptive peer-to-peer mode is executed through application software installed in the service request end 10 and the service providing end 20; the service request terminal 10 is a terminal device, such as a desktop computer, a notebook computer, a tablet computer, or a mobile phone, for performing a service registration discovery method of an adaptive peer-to-peer mode to request a service from the service provider 20, and the service provider 20 is a server for performing a service registration discovery method of an adaptive peer-to-peer mode to provide a service to the service request terminal 10, such as a cluster server based on a micro service framework and built in an enterprise or government department. In fig. 2, only one service request end 20 and service providing end 20 are illustrated to perform information transmission, and in practical application, the service providing end 20 may also establish communication connection with multiple service request ends 10 at the same time to implement data information transmission.
As shown in fig. 1, the method includes steps S110 to S150.
S110, a service request end sends broadcast information to at least one service providing end; the broadcast information includes a request end identification and a service matching parameter.
In the embodiment of the application, the service request end integrates the micro service framework library, the service request end can call the discovery function in the micro service framework library to send the broadcast information, and the service request end can send the broadcast information to one or more service providing ends, wherein the broadcast information defaults to UDP (user datagram protocol ) broadcast. The broadcast information includes a request end identifier and a service matching parameter, wherein the request end identifier is the identifier information uniquely corresponding to the service request end, and the service matching parameter is the matching parameter corresponding to the service currently required by the service request end.
S120, the service providing end judges whether the received broadcast information is matched with service configuration information, wherein the service configuration information is the configuration information corresponding to the service providing end; the broadcast information is from any one of the service requesting terminals.
The service providing end is a cluster server based on a micro-service framework, each cluster server is a service node cluster consisting of a plurality of service nodes, each service node can correspondingly provide a business processing service, and massive and multi-type service requests can be efficiently processed through the cluster servers. In the embodiment of the present application, one service provider provides services to the service request end, and in other embodiments, multiple service providers may be configured to provide services to the service request end simultaneously.
If one service provider receives the broadcast information from the service request end, it can judge whether the broadcast information brain is matched with the service configuration information of the service provider.
In one embodiment, as shown in FIG. 5, step S120 includes sub-steps S121 and S122.
S121, acquiring configuration values corresponding to each of the service matching parameters in the service configuration information.
One or more matching parameters can be set in the service matching parameters, for example, the matching parameters can be service type, processing type, unique identifier of service name, etc., the service configuration information contains various configuration information corresponding to the service providing end, and the configuration value corresponding to each matching parameter in the service matching parameters can be obtained from the service configuration information.
For example, a configuration value corresponding to a service type of a certain service provider is "identity information verification service", and a processing type is "picture".
S122, judging whether the configuration values are matched with the matching conditions of the matching parameters in the service matching parameters or not so as to judge whether the broadcast information is matched with the service configuration information or not.
The service matching parameters also comprise matching conditions corresponding to the matching parameters, whether the configuration values are matched with the matching conditions can be judged, namely whether the configuration values of the matching parameters are identical to the corresponding matching conditions or whether the configuration values of the matching parameters are within the range of the corresponding matching conditions is judged, if the configuration values of the matching parameters are identical to the corresponding matching conditions or within the range of the corresponding matching conditions, the broadcasting information is judged to be matched with the service configuration information, and otherwise, the broadcasting information is judged not to be matched with the service configuration information.
And S130, if the broadcast information is matched with the service configuration information, the service providing end feeds back the connection configuration information carrying the digital signature result to the service request end corresponding to the broadcast information.
If the broadcast information is matched with the service configuration information, the service provider can feed back the connection configuration information carrying the digital signature result to the corresponding service request end, at this time, TCP connection can be established through the request end identifier in the broadcast information and the service request end corresponding to the request end identifier, and the connection configuration information can be transmitted through the TCP connection.
In one embodiment, as shown in FIG. 6, step S130 includes sub-steps S131 and S132.
S131, carrying out trusted signature on the connection configuration parameters in the service configuration information according to a prestored micro-service digital certificate private key to obtain a corresponding digital signature result.
Specifically, service configuration information of the service provider can be obtained, wherein the service configuration information at least comprises a service name identifier, an IP link and a time stamp, the service name identifier is identification information uniquely corresponding to one service provider, the IP link is a link resource which is distributed by the service provider for information transmission and is used for information transmission by each service request end, and the service request end can establish request connection with a service node in the service provider through the IP link; and carrying out trusted signature on the connection configuration parameters in the service configuration information through a prestored micro-service digital certificate private key, thereby obtaining a digital signature result. For example, the signature can be implemented by using a Hash algorithm, and the obtained digital signature result can be a 16-system character string. In addition, the service configuration information may also include information such as the number of service nodes, the type of service nodes, and the like, which may also be added to the connection configuration parameters to perform a trusted signature.
And S132, combining the digital signature result and the connection configuration parameters to obtain the connection configuration information carrying the digital signature result, and feeding the connection configuration information back to the service request end corresponding to the broadcast information.
And combining the obtained digital signature result with the connection configuration parameters to obtain connection configuration information carrying the digital signature result and feeding the connection configuration information back to the service request end corresponding to the request end identifier in the broadcast information.
And S140, if the service request end receives the connection configuration information from any service providing end, carrying out signature verification on the connection configuration information according to a preset signature verification rule so as to obtain a verification result of whether the connection configuration information passes or not.
After the service request terminal receives the connection configuration information, the digital signature result and the connection configuration parameters in the connection configuration information can be subjected to signature verification according to a signature verification rule, and if the verification is correct, the obtained verification result is passed; if the verification is wrong, the obtained verification result is not passed.
In one embodiment, as shown in FIG. 7, step S140 includes sub-steps S141 and S142.
S141, signing the connection configuration parameters in the connection configuration information according to the micro-service digital certificate public key of the signature verification rule to obtain corresponding signature verification information.
The signature verification rule comprises a micro-service digital certificate public key, the connection configuration parameters in the connection configuration information can be signed through the micro-service digital certificate public key to obtain signature verification information, and the signing process through the micro-service digital certificate public key is the same as the trusted signing process through the micro-service digital certificate private key.
S142, judging whether the signature verification information is the same as the digital signature result or not so as to obtain a verification result of whether the signature verification information passes or not.
And judging whether the obtained signature verification information is the same as the digital signature result or not, thereby obtaining a corresponding verification result. If the signature verification information is the same as the digital signature result, the received connection configuration parameters are safe and reliable, and a verification result passing verification is obtained; if the signature verification information is different from the digital signature result, the received connection configuration parameters are not credible, and a verification result which is not verified is obtained.
And S150, if the verification result is passed, the service request end sends a service connection request to the service providing end corresponding to the connection configuration information according to the connection configuration information so as to establish request connection with the corresponding service providing end.
If the verification result is passed, the connection configuration parameters in the connection configuration information can be stored in the service request terminal, and the service request is carried out. Specifically, the connection configuration parameters in the connection configuration information include a service name identifier, an IP link and a timestamp, and the corresponding service provider can be determined through the service name identifier, and the service requester can generate a corresponding service connection request based on the IP link, and send the generated service connection request to a service provider corresponding to the service name identifier, so that a request connection corresponding to the IP link is established with a service node of the corresponding service provider through the service connection request. In the subsequent step, the service request end can send the service data to be processed to the service node of the service providing end through the established connection request, so as to process the service data to be processed through the service node, thereby realizing that the service providing end provides corresponding service for the service request end.
In an embodiment, the service provider is configured with a plurality of service nodes connected to each other, as shown in fig. 8, and the method further includes steps S151, S152, S153, and S154 executed at the service provider.
S151, each first service node sends an abnormality detection heartbeat packet to the second service node.
The service providing end consists of a plurality of service nodes, wherein the service nodes can be divided into a first service node and a second service node, the first service node is a service node which does not establish request connection with the service request end, and the second service node is a service node which establishes request connection with the service request end. In order to ensure that the service node which establishes the request connection with the service request end normally provides service, the first service node can send an abnormality detection heartbeat packet to the second service nodes, each first service node can send the abnormality detection heartbeat packet to all the second service nodes, the abnormality detection heartbeat packet can be sent in a mode of interval preset time, for example, if each interval is 0.1 second, the abnormality detection heartbeat packet is sent to the second service nodes once; and after the second service node receives the abnormal detection heartbeat packet, the second service node immediately feeds back detection feedback information to the first service node which sends the abnormal detection heartbeat packet.
And S152, if the first service node does not receive the detection feedback information corresponding to the abnormal detection heartbeat packet fed back by any second service node, determining the second service node without feedback of the detection feedback information as an abnormal service node.
Because the first service node and the second service node are both configured in the service providing end, when the second service node normally provides service, the interval time between the first service node sending the abnormal detection heartbeat packet and receiving the corresponding detection feedback information is usually in the ms level, and if the detection feedback information fed back by the second service node is not received before the next abnormal detection heartbeat packet is sent to a certain second service node, the second service node without feedback detection feedback information can be determined to be the abnormal service node.
In the process of determining the abnormal service node, a judgment can be performed based on a first service node, if a certain first service node does not receive detection feedback information fed back by a second service node before sending a next abnormal detection heartbeat packet, the second service node is determined to be the abnormal service node; the multiple abnormal service nodes may be integrated to perform integrated judgment, if the first service node exceeding the preset proportion does not receive the detection feedback information fed back by the second service node before sending the next abnormal detection heartbeat packet, the second service node is determined to be the abnormal service node, for example, the preset proportion may be set to 0.1, if the first service node exceeding the total number of the first service node by 0.1 times does not receive the detection feedback information fed back by the second service node before sending the next abnormal detection heartbeat packet, and the second service node is determined to be the abnormal service node.
And S153, carrying out configuration updating on the connection between the service nodes in the service providing end according to the abnormal service node.
If a certain service node in the service providing end is determined to be an abnormal service node, the abnormal service node can not normally provide service at the moment, and configuration updating can be carried out on connection between the service nodes, for example, other nodes are disconnected from the abnormal service node, so that configuration updating on connection between the service nodes in the service providing end is realized.
The specific implementation process is shown in fig. 4, in the initial state, the node 2 and the node 3 are connected with the node 1, the node 1 in fig. 4 is the determined abnormal service node, and at this time, the node 2 and the node 3 are disconnected with the node 1, so that configuration updating of connection between service nodes is realized.
S154, any service node is selected from the first service nodes to reestablish the request connection with the service request terminal, and the service node reestablished with the service request terminal is changed to be a second service node.
A service node may be arbitrarily selected from the first service nodes to reestablish a requested connection with the service request end, as shown in fig. 4, the node 3 is selected as a node for providing service to the service request end, and the requested connection with the service request end is switched to the node 3, that is, the service is continuously provided for the service request end through the node 3.
After a service node is selected to reestablish the requested connection with the service request terminal, the service node reestablished with the service request terminal can be changed to be a second service node. As shown in fig. 4, the changeable node 3 is a second service node at this time; returning to step S151, the anomaly detection heartbeat packet may be sent to the node 3 through the first service node.
In an embodiment, as shown in fig. 9, the method further includes steps S1541, S1542 and S1543 performed at the service provider, where steps S1541 to S1543 may be performed separately as steps juxtaposed with steps S151 to S154, and steps S1541 to S1543 may be performed as sub-steps of step S154.
S1541, if the number of service nodes of the service providing end is increased or decreased, acquiring the current configuration parameters and the historical configuration parameters of the service providing end; the current configuration parameters are connection configuration parameters after the service node is changed; the history configuration parameters are connection configuration parameters before the service node is changed.
When the service provider includes abnormal service nodes or the service nodes need to be added to expand the capacity of the service provider, the number of the service nodes of the service provider is changed to be increased or decreased, and at this time, the current configuration parameters and the historical configuration parameters of the service provider can be obtained. When the connection configuration parameters include information such as the number of service nodes and the type of the service nodes, the corresponding connection configuration parameters are necessarily changed due to the change of the service nodes, the connection configuration parameters before the change of the service nodes can be used as historical configuration parameters, and the connection configuration parameters after the change of the service nodes can be used as current configuration parameters.
S1542, carrying out trusted signature on the current configuration parameters according to the micro-service digital certificate private key to obtain a corresponding current signature result.
The service providing end can perform trusted signature on the current configuration parameters according to the private key of the micro-service digital certificate, so that a current signature result is obtained, and the specific operation process is the same as the process of obtaining the digital signature result.
S1543, combining the current signature result, the digital signature result corresponding to the historical configuration parameter and the current configuration parameter to obtain connection update configuration information, and feeding the connection update configuration information back to the service request end corresponding to the broadcast information.
The digital signature result corresponding to the historical configuration parameters is already existing in the service providing end, so that the digital signature result corresponding to the historical configuration parameters does not need to be acquired again, the current signature result, the digital signature result corresponding to the historical configuration parameters and the current configuration parameters can be combined, and the connection updating configuration information is obtained and fed back to the service requesting end corresponding to the broadcast information. The service request end can receive the connection updating configuration information, verify the historical configuration parameters according to the digital signature result, verify the current configuration parameters according to the current signature result, and the specific verification process is the same as the process of carrying out signature verification on the connection configuration information according to the preset signature verification rule in the steps, and the received connection updating configuration information can be ensured to be safe and reliable through the verification process; if the verification results of the historical configuration parameters and the current configuration parameters are passed, the service request end can reestablish the request connection with the service providing end by using the current configuration parameters in the connection updating configuration information.
Referring to fig. 3 and fig. 10, fig. 10 is a schematic flow chart of a service registration discovery method in an adaptive peer-to-peer mode according to an embodiment of the invention; fig. 3 is a schematic diagram of another application scenario of the service registration discovery method in the adaptive peer-to-peer mode according to the embodiment of the present invention. In a specific application scenario, as shown in fig. 3, the service registration discovery method in the adaptive peer-to-peer mode is applied to a service registration discovery system 1 based on micro service, where the service registration discovery system 1 based on micro service includes a service request end 10 and a service providing end 20, the service request end 10 and the service providing end 20 perform network bridging through a TCP gateway 30 to realize transmission of data information, at this time, the service request end 10 and the service providing end 20 belong to different local network segments, information sent by the service request end 10 needs to be forwarded to the service providing end 20 in other network segments through the TCP gateway 30, and cross-network access is implemented between the service request end 10 and the service providing end 20, and the service registration discovery method in the adaptive peer-to-peer mode is performed through application software installed in the service request end 10 and the service providing end 20; the service request terminal 10 is a terminal device, such as a desktop computer, a notebook computer, a tablet computer, or a mobile phone, for performing a service registration discovery method of an adaptive peer-to-peer mode to request a service from the service providing terminal 20, the service providing terminal 20 is a server for performing a service registration discovery method of an adaptive peer-to-peer mode to provide a service to the service request terminal 10, such as a cluster server based on a micro service framework built in an enterprise or government department, and the TCP gateway 30 may be a TCP discovery gateway device, such as a TCP gateway router, for implementing information cross-network transmission. In fig. 3, only one service request end 20 and service providing end 20 are illustrated to perform information transmission, and in practical application, the service providing end 20 may also establish communication connection with multiple service request ends 10 at the same time to implement data information transmission.
As shown in fig. 10, the method includes steps S210 to S250.
S210, a service request end sends broadcast information to the TCP gateway and forwards the broadcast information to at least one service providing end through the TCP gateway; the broadcast information includes a request end identifier and a service name identifier.
Because UDP broadcast only supports current local network segment broadcast, if the service request end and the service providing end belong to local network segments, cross-network access is needed, at this time, a TCP gateway can be configured, broadcast information sent by the service request end can be forwarded to the service providing end in other network segments through the TCP gateway, so as to realize broadcasting of the broadcast information, and finally realize service discovery.
S220, the service providing end judges whether the received broadcast information is matched with the service configuration information; the service configuration information is configuration information corresponding to the service providing end, and the broadcast information is from any service request end.
The specific implementation process of this step is the same as the above steps, and will not be described here again.
And S230, if the broadcast information is matched with the service configuration information, the service provider feeds back the connection configuration information carrying the digital signature result to the TCP gateway and forwards the connection configuration information to the service request end corresponding to the broadcast information through the TCP gateway.
The connection configuration information fed back by the service provider is firstly sent to the TCP gateway and is forwarded to the corresponding service request terminal through the TCP gateway.
And S240, if the connection configuration information forwarded by the TCP gateway from any service provider is received, the service request terminal performs signature verification on the connection configuration information according to a preset signature verification rule so as to obtain a verification result of whether the connection configuration information passes or not.
The specific implementation process of this step is the same as the above steps, and will not be described here again.
And S250, if the verification result is passed, the service request end sends a service connection request to the TCP gateway according to the connection configuration information and forwards the service connection request to the service providing end corresponding to the connection configuration information through the TCP gateway so as to establish request connection with the corresponding service providing end through the TCP gateway.
The service request end sends a service connection request to the TCP gateway, and the TCP gateway forwards the service connection request to the service providing end, so that a request connection is established between the service request end and the service providing end through the TCP gateway.
In the service registration discovery method of the adaptive peer-to-peer mode provided by the embodiment of the invention, the method comprises the following steps: the service request end sends the broadcast information to the service providing end, the service providing end judges whether the broadcast information is matched with the service configuration information, if so, the connection configuration information with the digital signature result is fed back to the corresponding service request end, the service request end receives the connection configuration information and performs signature verification, and if the verification passes, the service request end sends a service connection request to be connected with the establishment request provided by the corresponding service. By the method, the micro service architecture library is configured at the service request end and the service providing end at the same time, the service request end sends broadcast information to any service providing end, the service providing end can establish request connection with the corresponding service request end after receiving any broadcast, service registration discovery in a self-adaptive peer-to-peer mode is realized, abnormal system service caused by problems of service nodes or service node clusters is avoided, and service providing reliability of the service providing end is improved.
The embodiment of the invention also provides a service registration discovery system of an adaptive peer-to-peer mode, which can be configured in a service registration discovery system based on micro service, wherein the service registration discovery system based on micro service comprises a service request end and a service providing end, the service request end and the service providing end are connected in a network to realize the transmission of data information, and the service registration discovery system of the adaptive peer-to-peer mode is used for executing any embodiment of the service registration discovery method of the adaptive peer-to-peer mode. In particular, referring to fig. 11, fig. 11 is a schematic block diagram of a service registration discovery system in an adaptive peer-to-peer mode according to an embodiment of the present invention.
As shown in fig. 11, the service registration discovery system 100 of the adaptive peer mode includes the following elements configured at 10 of the service request end: a broadcast information transmitting unit 110 configured to transmit broadcast information to at least one of the service providers; the broadcast information comprises a request end identifier and a service matching parameter; the verification result obtaining unit 120 is configured to, if connection configuration information from any one of the service providing ends is received, perform signature verification on the connection configuration information according to a preset signature verification rule, so as to obtain a verification result that whether the connection configuration information passes or not; and the request connection establishing unit 130 is configured to send a service connection request to the service provider corresponding to the connection configuration information according to the connection configuration information if the verification result is passed, so as to establish a request connection with the corresponding service provider.
The service registration discovery system 100 of the adaptive peer-to-peer mode further includes the following elements configured in the service provider 20: a match determining unit 210, configured to determine whether the received broadcast information matches service configuration information, where the service configuration information is configuration information corresponding to the service provider; the broadcast information comes from any service request end; and a connection configuration information feedback unit 220, configured to, if the broadcast information is matched with the service configuration information, feed back connection configuration information carrying a digital signature result to the service request end corresponding to the broadcast information.
The service registration discovery system of the self-adaptive peer-to-peer mode provided by the embodiment of the invention applies the service registration discovery method of the self-adaptive peer-to-peer mode, the service request end sends broadcast information to the service providing end, the service providing end judges whether the broadcast information is matched with the service configuration information, if so, the connection configuration information with a digital signature result is fed back to the corresponding service request end, the service request end receives the connection configuration information and carries out signature verification, and if the verification passes, the service request end sends a service connection request to be connected with an establishment request provided by the corresponding service. By the method, the micro service architecture library is configured at the service request end and the service providing end at the same time, the service request end sends broadcast information to any service providing end, the service providing end can establish request connection with the corresponding service request end after receiving any broadcast, service registration discovery in a self-adaptive peer-to-peer mode is realized, abnormal system service caused by problems of service nodes or service node clusters is avoided, and service providing reliability of the service providing end is improved.
The service registration discovery method of the adaptive peer-to-peer mode may be implemented in the form of a computer program, and both a service request end and a service providing end in the service registration discovery system of the adaptive peer-to-peer mode may be implemented as a computer device, where the computer program may run on the computer device as shown in fig. 12. The service request end comprises a first memory, a first processor and a first computer program which is stored in the first memory and can run on the first processor, and the service request end comprises a second memory, a second processor and a second computer program which is stored in the second memory and can run on the second processor; the computer device implemented by the service request terminal can run the computer program corresponding to part of method steps executable at the service request terminal in the service registration discovery method of the adaptive peer-to-peer mode; the computer device implemented by the service provider is capable of running a computer program corresponding to part of the method steps executable at the service provider in the service registration discovery method of the adaptive peer-to-peer mode.
Referring to fig. 12, fig. 12 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device may be a service requester or a service provider for performing a service registration discovery method of an adaptive peer mode to enable service registration discovery of the adaptive peer mode.
With reference to fig. 12, the computer device 500 includes a processor 502, a memory, and a network interface 505, which are connected by a system bus 501, wherein the memory may include a storage medium 503 and an internal memory 504.
The storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform an adaptive peer-to-peer mode service registration discovery method, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform the service registration discovery method in an adaptive peer-to-peer mode.
The network interface 505 is used for network communication, such as providing for transmission of data information, etc. It will be appreciated by those skilled in the art that the structure shown in FIG. 12 is merely a block diagram of some of the structures associated with the present inventive arrangements and does not constitute a limitation of the computer device 500 to which the present inventive arrangements may be applied, and that a particular computer device 500 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
The processor 502 is configured to execute a computer program 5032 stored in a memory to implement the corresponding functions in the service registration discovery method of the adaptive peer-to-peer mode.
Those skilled in the art will appreciate that the embodiment of the computer device shown in fig. 12 is not limiting of the specific construction of the computer device, and in other embodiments, the computer device may include more or less components than those shown, or certain components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may include only a memory and a processor, and in such embodiments, the structure and function of the memory and the processor are consistent with the embodiment shown in fig. 12, and will not be described again.
It should be appreciated that in embodiments of the present invention, the Processor 502 may be a central processing unit (Central Processing Unit, CPU), the Processor 502 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a volatile or nonvolatile computer readable storage medium. The computer readable storage medium stores a first computer program and a second computer program, wherein the first computer program is configured in a service request end, the second computer program is configured in a service providing end, the service request end comprises a first processor, the service providing end comprises a second processor, and the steps included in the service registration discovery method of the adaptive peer-to-peer mode are jointly implemented when the first computer program is executed by the first processor and the second computer program is executed by the second processor.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device and unit described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein. Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units is merely a logical function division, there may be another division manner in actual implementation, or units having the same function may be integrated into one unit, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present invention.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention is essentially or part of what contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a computer-readable storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (7)

1. The service registration discovery method of the self-adaptive peer-to-peer mode is characterized by being applied to a service registration discovery system based on micro service, wherein the service registration discovery system based on micro service comprises a service request end and a service providing end, and the service request end and the service providing end are connected in a network manner to realize transmission of data information;
the method comprises the following steps executed at the service request end:
transmitting broadcast information to at least one service provider; the broadcast information comprises a request end identifier and a service matching parameter;
If connection configuration information from any service provider is received, carrying out signature verification on the connection configuration information according to a preset signature verification rule to obtain a verification result of whether the connection configuration information passes or not;
If the verification result is passed, sending a service connection request to the service providing end corresponding to the connection configuration information according to the connection configuration information so as to establish a request connection with the corresponding service providing end;
The method further comprises the following steps performed at the service provider:
Judging whether the received broadcast information is matched with service configuration information, wherein the service configuration information is configuration information corresponding to the service providing end; the broadcast information comes from any service request end;
if the broadcast information is matched with the service configuration information, feeding back connection configuration information carrying a digital signature result to the service request end corresponding to the broadcast information;
The feeding back connection configuration information carrying a digital signature result to the service request end corresponding to the broadcast information comprises the following steps:
performing trusted signature on the connection configuration parameters in the service configuration information according to a prestored micro-service digital certificate private key to obtain a corresponding digital signature result;
combining the digital signature result with the connection configuration parameters to obtain the connection configuration information carrying the digital signature result, and feeding the connection configuration information back to a service request end corresponding to the broadcast information;
The service provider is configured with a plurality of interconnected service nodes, and the method further comprises the following steps performed at the service provider:
Each first service node sends an abnormality detection heartbeat packet to a second service node; the first service node is a service node which does not establish a request connection with the service request terminal, and the second service node is a service node which establishes a request connection with the service request terminal;
If the first service node does not receive the detection feedback information corresponding to the abnormal detection heartbeat packet fed back by any second service node, determining that the second service node without feedback of the detection feedback information is an abnormal service node;
the service nodes are configured and updated according to the abnormal service nodes;
selecting any service node from the first service nodes to reestablish request connection with the service request terminal, and changing the service node reestablished to request connection with the service request terminal into a second service node;
The method further comprises the following steps performed at the service provider:
If the number of the service nodes of the service providing end is increased or decreased, acquiring the current configuration parameters and the historical configuration parameters of the service providing end; the current configuration parameters are connection configuration parameters after the service node is changed; the history configuration parameters are connection configuration parameters before the service node is changed;
performing trusted signing on the current configuration parameters according to the micro-service digital certificate private key to obtain a corresponding current signature result;
and combining the current signature result, the digital signature result corresponding to the historical configuration parameter and the current configuration parameter to obtain connection updating configuration information, and feeding the connection updating configuration information back to the service request end corresponding to the broadcast information.
2. The service registration discovery method of an adaptive peer-to-peer mode according to claim 1, wherein the performing signature verification on the connection configuration information according to a preset signature verification rule to obtain a verification result that whether the connection configuration information passes or not includes:
signing the connection configuration parameters in the connection configuration information according to the micro-service digital certificate public key of the signature verification rule to obtain corresponding signature verification information;
and judging whether the signature verification information is the same as the digital signature result or not so as to obtain a verification result of whether the signature verification information passes or not.
3. The service registration discovery method of an adaptive peer to peer mode according to claim 1, wherein the determining whether the received broadcast information matches the service configuration information comprises:
Acquiring configuration values corresponding to each of the service matching parameters in the service configuration information;
and judging whether the configuration values are matched with the matching conditions of the matching parameters in the service matching parameters or not so as to judge whether the broadcast information is matched with the service configuration information or not.
4. The service registration discovery method of the self-adaptive peer-to-peer mode is characterized by being applied to a service registration discovery system based on micro service, wherein the service registration discovery system based on micro service comprises a service request end and a service providing end, and the service request end and the service providing end are subjected to network bridging through a TCP gateway so as to realize the transmission of data information;
the method comprises the following steps executed at the service request end:
sending broadcast information to the TCP gateway and forwarding the broadcast information to at least one service provider through the TCP gateway; the broadcast information comprises a request end identifier and a service name identifier;
If connection configuration information forwarded by the TCP gateway from any service provider is received, carrying out signature verification on the connection configuration information according to a preset signature verification rule to obtain a verification result of whether the connection configuration information passes or not;
if the verification result is passed, sending a service connection request to the TCP gateway according to the connection configuration information and forwarding the service connection request to the service providing end corresponding to the connection configuration information through the TCP gateway so as to establish request connection with the corresponding service providing end through the TCP gateway;
The method further comprises the following steps performed at the service provider:
Judging whether the received broadcast information is matched with the service configuration information or not; the service configuration information is configuration information corresponding to the service providing end, and the broadcast information is from any service request end;
if the broadcast information is matched with the service configuration information, feeding back connection configuration information carrying a digital signature result to the TCP gateway and forwarding the connection configuration information to the service request end corresponding to the broadcast information through the TCP gateway;
Feeding back connection configuration information carrying a digital signature result to the TCP gateway and forwarding the connection configuration information to the service request end corresponding to the broadcast information through the TCP gateway, wherein the connection configuration information comprises the following steps:
performing trusted signature on the connection configuration parameters in the service configuration information according to a prestored micro-service digital certificate private key to obtain a corresponding digital signature result;
combining the digital signature result with the connection configuration parameters to obtain the connection configuration information carrying the digital signature result, and feeding the connection configuration information back to a service request end corresponding to the broadcast information;
The service provider is configured with a plurality of interconnected service nodes, and the method further comprises the following steps performed at the service provider:
Each first service node sends an abnormality detection heartbeat packet to a second service node; the first service node is a service node which does not establish a request connection with the service request terminal, and the second service node is a service node which establishes a request connection with the service request terminal;
If the first service node does not receive the detection feedback information corresponding to the abnormal detection heartbeat packet fed back by any second service node, determining that the second service node without feedback of the detection feedback information is an abnormal service node;
the service nodes are configured and updated according to the abnormal service nodes;
selecting any service node from the first service nodes to reestablish request connection with the service request terminal, and changing the service node reestablished to request connection with the service request terminal into a second service node;
The method further comprises the following steps performed at the service provider:
If the number of the service nodes of the service providing end is increased or decreased, acquiring the current configuration parameters and the historical configuration parameters of the service providing end; the current configuration parameters are connection configuration parameters after the service node is changed; the history configuration parameters are connection configuration parameters before the service node is changed;
performing trusted signing on the current configuration parameters according to the micro-service digital certificate private key to obtain a corresponding current signature result;
and combining the current signature result, the digital signature result corresponding to the historical configuration parameter and the current configuration parameter to obtain connection updating configuration information, and feeding the connection updating configuration information back to the service request end corresponding to the broadcast information.
5. The service registration discovery system based on the micro service comprises a service request end and a service providing end, wherein the service request end and the service providing end are connected in a network to realize the transmission of data information;
The system comprises the following units configured at the service request end:
A broadcast information transmitting unit, configured to transmit broadcast information to at least one service provider; the broadcast information comprises a request end identifier and a service matching parameter;
The verification result acquisition unit is used for carrying out signature verification on the connection configuration information according to a preset signature verification rule if the connection configuration information from any service providing end is received, so as to obtain a verification result of whether the connection configuration information passes or not;
a request connection establishing unit, configured to send a service connection request to the service provider corresponding to the connection configuration information according to the connection configuration information if the verification result is passed, so as to establish a request connection with the corresponding service provider;
the system further comprises the following units configured at the service providing end:
the matching judging unit is used for judging whether the received broadcast information is matched with service configuration information, wherein the service configuration information is configuration information corresponding to the service providing end; the broadcast information comes from any service request end;
A connection configuration information feedback unit, configured to, if the broadcast information is matched with the service configuration information, feed back connection configuration information carrying a digital signature result to the service request end corresponding to the broadcast information;
The feeding back connection configuration information carrying a digital signature result to the service request end corresponding to the broadcast information comprises the following steps:
performing trusted signature on the connection configuration parameters in the service configuration information according to a prestored micro-service digital certificate private key to obtain a corresponding digital signature result;
combining the digital signature result with the connection configuration parameters to obtain the connection configuration information carrying the digital signature result, and feeding the connection configuration information back to a service request end corresponding to the broadcast information;
The service provider is internally provided with a plurality of interconnected service nodes, and the service provider further executes the following steps:
Each first service node sends an abnormality detection heartbeat packet to a second service node; the first service node is a service node which does not establish a request connection with the service request terminal, and the second service node is a service node which establishes a request connection with the service request terminal;
If the first service node does not receive the detection feedback information corresponding to the abnormal detection heartbeat packet fed back by any second service node, determining that the second service node without feedback of the detection feedback information is an abnormal service node;
the service nodes are configured and updated according to the abnormal service nodes;
selecting any service node from the first service nodes to reestablish request connection with the service request terminal, and changing the service node reestablished to request connection with the service request terminal into a second service node;
The service provider also performs the following steps:
If the number of the service nodes of the service providing end is increased or decreased, acquiring the current configuration parameters and the historical configuration parameters of the service providing end; the current configuration parameters are connection configuration parameters after the service node is changed; the history configuration parameters are connection configuration parameters before the service node is changed;
performing trusted signing on the current configuration parameters according to the micro-service digital certificate private key to obtain a corresponding current signature result;
and combining the current signature result, the digital signature result corresponding to the historical configuration parameter and the current configuration parameter to obtain connection updating configuration information, and feeding the connection updating configuration information back to the service request end corresponding to the broadcast information.
6. A service registration discovery system in an adaptive peer mode, the system comprising a service request comprising a first memory, a first processor and a first computer program stored on the first memory and executable on the first processor, and a service provider comprising a second memory, a second processor and a second computer program stored on the second memory and executable on the second processor, wherein the first processor executes the first computer program and the second processor jointly implements the service registration discovery method in an adaptive peer mode as claimed in any one of claims 1 to 4 when the second processor executes the second computer program.
7. A computer readable storage medium, wherein the computer readable storage medium stores a first computer program and a second computer program, which when executed by a first processor and the second computer program is executed by a second processor jointly implement the service registration discovery method of an adaptive peer mode according to any one of claims 1 to 4.
CN202210607516.7A 2022-05-31 2022-05-31 Service registration discovery method, system and medium of self-adaptive peer-to-peer mode Active CN115002195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210607516.7A CN115002195B (en) 2022-05-31 2022-05-31 Service registration discovery method, system and medium of self-adaptive peer-to-peer mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210607516.7A CN115002195B (en) 2022-05-31 2022-05-31 Service registration discovery method, system and medium of self-adaptive peer-to-peer mode

Publications (2)

Publication Number Publication Date
CN115002195A CN115002195A (en) 2022-09-02
CN115002195B true CN115002195B (en) 2024-06-25

Family

ID=83031699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210607516.7A Active CN115002195B (en) 2022-05-31 2022-05-31 Service registration discovery method, system and medium of self-adaptive peer-to-peer mode

Country Status (1)

Country Link
CN (1) CN115002195B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118138522A (en) * 2024-05-07 2024-06-04 南京复创智能制造技术有限责任公司 Network route construction system and method based on industry chain data sharing

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981633A (en) * 2019-03-19 2019-07-05 全链通有限公司 Access method, equipment and the computer readable storage medium of server

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113162996B (en) * 2017-06-02 2023-03-24 华为技术有限公司 Service discovery method, registration center and equipment
CN110018962A (en) * 2019-04-11 2019-07-16 重庆猪八戒知识产权服务有限公司 Service adjustment method and system based on distributed service framework and registration center
CN112287329B (en) * 2020-10-29 2024-06-25 平安科技(深圳)有限公司 Service instance verification method and device, electronic equipment and storage medium
CN112988412B (en) * 2021-02-07 2023-06-27 中国联合网络通信集团有限公司 Edge caching method, base station and system based on block chain network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109981633A (en) * 2019-03-19 2019-07-05 全链通有限公司 Access method, equipment and the computer readable storage medium of server

Also Published As

Publication number Publication date
CN115002195A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
US20180337892A1 (en) Scalable proxy clusters
EP2209253B1 (en) A method, system, server and terminal for processing an authentication
CN107204901B (en) Computer system for providing and receiving state notice
US7640339B1 (en) Method and apparatus for monitoring a node in a distributed system
US9049241B2 (en) Peer discovery and secure communication in failover schemes
CN114363003B (en) BGP route identification method, device and equipment
US9699202B2 (en) Intrusion detection to prevent impersonation attacks in computer networks
US20100050235A1 (en) Methods and apparatus for reducing the effectiveness of chosen location attacks in a peer-to-peer overlay network
US20190166042A1 (en) Method for data transmitting, centralized controller, forwarding plane device and communication apparatus
CN110674096B (en) Node troubleshooting method, device and equipment and computer readable storage medium
CN112650721A (en) File storage method, device, system and equipment
CN115002195B (en) Service registration discovery method, system and medium of self-adaptive peer-to-peer mode
WO2020057445A1 (en) Communication system, method, and device
JP7279899B2 (en) Data collection method, data collection apparatus, data collection device and computer readable storage medium
US20190349436A1 (en) Methods, apparatus and systems for resuming transmission link
CN114090342A (en) Storage disaster tolerance link management method, message execution node and storage control cluster
US20200287784A1 (en) Priority based selection of time services
CN110971426A (en) Method for constructing group session, client and storage medium
WO2022083122A1 (en) Fault tolerance method and apparatus of network device system, computer device, and storage medium
CN116762318A (en) Architecture availability and synchronization
CN113949730A (en) Communication method and device of equipment
WO2021115554A1 (en) A service based interface for establishing distributed consensus
US11870672B2 (en) Self-election processes in managed subnets implementing modified swim protocols
US10938877B2 (en) Optimizing data transmission parameters of a proprietary network
JP4893464B2 (en) Connection forced release device, connection forced release method, and connection forced release program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant