CN110224855B - Registration method and device of micro service instance, computer equipment and storage medium - Google Patents

Registration method and device of micro service instance, computer equipment and storage medium Download PDF

Info

Publication number
CN110224855B
CN110224855B CN201910394799.XA CN201910394799A CN110224855B CN 110224855 B CN110224855 B CN 110224855B CN 201910394799 A CN201910394799 A CN 201910394799A CN 110224855 B CN110224855 B CN 110224855B
Authority
CN
China
Prior art keywords
micro
instance
service
service instance
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
CN201910394799.XA
Other languages
Chinese (zh)
Other versions
CN110224855A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910394799.XA priority Critical patent/CN110224855B/en
Publication of CN110224855A publication Critical patent/CN110224855A/en
Application granted granted Critical
Publication of CN110224855B publication Critical patent/CN110224855B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/108Network architectures or network communication protocols for network security for controlling access to devices or network resources when the policy decisions are valid for a limited amount of time

Abstract

The application discloses a registration method and a registration device of a micro-service instance, computer equipment and a storage medium, wherein the registration method of the micro-service instance comprises the following steps: the registration center acquires a specified service code started when the first micro-service instance starts registration; decrypting the specified service code, and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, wherein the first reference micro-service instance is a micro-service instance which finishes registration in a registration center through the specified service code; judging whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance or not; and if so, registering the first micro-service instance through the decrypted specified service code. And the reference micro-service instance is introduced to provide a verification standard for the micro-service instance registered under the specified service code, and the verification is compared with context and uri in the reference micro-service instance information, so that the verification is accurate and effective on the premise of minimum data calculation amount.

Description

Registration method and device of microservice instance, computer equipment and storage medium
Technical Field
The present application relates to the field of micro services, and in particular, to a method and an apparatus for registering a micro service instance, a computer device, and a storage medium.
Background
ZooKeeper is an open source distributed coordination service, an open source implementation of Google Chubby. The distributed application may implement functions such as data publish/subscribe, load balancing, naming services, distributed coordination/notification, cluster management, Master election, configuration maintenance, name services, distributed synchronization, distributed locks, and distributed queues based on ZooKeeper. At present, service instances can be registered in the Zookeeper through service codes without a verification process, so that wrong service instances can be registered under the existing correct service codes, a consumer uses the wrong service instances, and the service quality of calling data for the consumer is reduced.
Disclosure of Invention
The main purpose of the present application is to provide a method for registering a microservice instance, which aims to solve the technical problem that the accuracy of writing microservice instance data into Zookeeper cannot be ensured in the prior art.
The application provides a registration method of a micro-service instance, which comprises the following steps:
the method comprises the steps that a registration center obtains a specified service code started when a first micro-service instance starts registration, wherein the specified service code is encrypted through a preset encryption algorithm;
decrypting the specified service code, and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, wherein the first reference micro-service instance is a micro-service instance which is registered in the registration center through the specified service code;
judging whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance;
and if so, registering the first micro-service instance through the decrypted specified service code.
Preferably, the instance information at least includes a context and an uri, the uri is an interface address of the micro service instance, the context is a text association relationship between all micro service instances under the same service code, and the step of determining whether the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance includes:
judging whether a first uri of the first micro-service instance is consistent with a second uri of the first reference micro-service instance or not;
if the first uri of the first micro service instance is consistent with the second uri of the first reference micro service instance, judging whether the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance;
and if the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance, judging that the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance, otherwise, judging that the instance information of the first micro service instance is inconsistent with the instance information of the first reference micro service instance.
Preferably, before the step of decrypting the specified service code and invoking the first reference microservice instance corresponding to the decrypted specified service code according to the decrypted specified service code, the method includes:
judging whether a historical micro-service instance corresponding to the specified service code exists or not, wherein the historical micro-service instance comprises all micro-service instances which are registered through the specified service code;
if yes, screening the appointed microservice example with the earliest registration time corresponding to the appointed service code from the historical microservice example;
and setting the specified micro-service instance as the first reference micro-service instance.
Preferably, after the step of determining whether the instance information of the first microservice instance is consistent with the instance information of the first reference microservice instance, the method includes:
if the instance information of the first micro-service instance is inconsistent with the instance information of the first reference micro-service instance, terminating the registration of the first micro-service instance according to the specified service code;
and identifying the first micro-service instance as the error information corresponding to the specified service code and storing the error information.
Preferably, after the step of identifying and storing the first micro-service instance as the error information corresponding to the specified service code, the method includes:
and feeding back the error information to a first terminal corresponding to a designated operator and/or a second terminal corresponding to a designated developer through a designated communication mode.
Preferably, after the step of feeding back the error information to the first terminal corresponding to the designated operator and/or the second terminal corresponding to the designated developer through the designated communication method, the method includes:
judging whether a calling instruction for calling the micro-service instance corresponding to the specified service code by a consuming third party is received;
if yes, shielding the error information;
and sending the micro-service examples corresponding to the specified service codes except the error information to the consumption third party.
Preferably, after the step of masking the error information, the method further includes:
judging whether feedback information aiming at the error information sent by the first terminal and/or the second terminal is received or not;
if feedback information aiming at the error information and sent by the first terminal and/or the second terminal is received, judging whether the feedback information comprises the designated operator and/or the designated developer, and confirming the correctness of the micro service instance carrying the error information identification;
and if the feedback information comprises the correctness confirmation of the micro service instance carrying the error information identification, the shielding is removed, the error information of the first micro service instance identification is cancelled, and an instruction for receiving the registration of the first micro service instance under the specified service code is generated.
The application also provides a registration device of the micro-service instance, which is integrated in a registration center and comprises:
the acquisition module is used for acquiring a specified service code started when the first micro-service instance starts registration;
the calling module is used for decrypting the specified service code and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, wherein the first reference micro-service instance is a micro-service instance which is registered in the registration center through the specified service code;
the first judging module is used for judging whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance;
and the receiving module is used for registering the first micro-service instance through the decrypted specified service code if the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance.
The present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the method and the system, the benchmark micro-service instance is introduced so as to provide a verification standard for the micro-service instance under the specified service code and improve the accuracy of writing the micro-service instance data into the registration platform; when the microservice instances register in the registry, the registry calls the reference microservice instances under the specified service codes so as to ensure that the registered microservice instances are correct after information comparison. The method verifies whether the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance by comparing whether the context and the uri in the micro service instance information are consistent, thereby ensuring the accuracy and the effectiveness of verification on the premise of minimum data calculation amount and having practical application value. The method takes the appointed micro-service instance with the earliest registration time in the historical micro-service instance as a reference micro-service instance, so that under the premise that the default first micro-service instance registered to the appointed service code is correct, other micro-service instances registered to the appointed service code all use the first micro-service instance registered to the appointed service code as the reference during registration to realize the ordered operation of the registered micro-service instances in a registration center, so that when the micro-service instances change, the current data call of a third party is not influenced, the corresponding micro-service instances under the appointed service code are ensured to belong to the same service field by introducing the reference micro-service instance, the classification management of the registered data is realized by the service codes to ensure that the third party does not generate errors during data call, and all data of the related service fields can be obtained at one time according to the service codes, and the efficiency of data calling is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for registering a microservice instance according to an embodiment of the present application;
FIG. 2 is a diagram illustrating a registration apparatus of a microservice instance according to an embodiment of the present application;
fig. 3 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, a method for registering a microservice instance according to an embodiment of the present application includes:
s1: the registration center obtains a specified service code started when the first micro-service instance starts registration, wherein the specified service code is encrypted through a preset encryption algorithm.
In the embodiment, when the micro-service instance of the third party calling the service party is consumed, the instance information of the called micro-service instance and the like need to be known to perform effective calling, but the instance information of the micro-service instance is dynamically changed. Due to automatic expansion or updating of the micro-service instance, the instance information of the micro-service instance is changed, so that unified management is inconvenient, and errors are prone to occur. In this embodiment, by introducing the registry, all the microservice instances can be registered in the registry, the registry coordinates the invocation of all the microservice instances registered in the registry, and the registry can query the instance information corresponding to the microservice instances. Data of the registry is public and transparent, no authority limit exists, wrong data writing of the micro service instance cannot be avoided, the registry writes the wrong data of the micro service instance when the registry is deployed in an intranet environment, most of the data writing is caused by misuse of service codes, even if the service codes of other types of micro service instances are used, the registry of the embodiment takes Zookeeper as an example. In the embodiment, the service code is encrypted by an AES encryption algorithm, and the Zookeeper receives the micro-service instance and then obtains the decrypted specified service code by decryption, so that the security of the micro-service instance is improved, and the security of a registry is ensured.
S2: and decrypting the specified service code, and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, wherein the first reference micro-service instance is a micro-service instance which is registered in the registration center through the specified service code.
In the embodiment, the reference micro-service instance is introduced so as to provide a verification standard for the micro-service instance under the specified service code, and the accuracy of writing the micro-service instance data into the registration platform is improved. When the microservice instances start registration in the registry, the registry calls the reference microservice instances under the specified service codes so as to ensure that the registered microservice instances are correct after information comparison. In this embodiment, the first reference microservice instance corresponds to the designated service code, and the "first" is only used for distinguishing and not for limiting, and similar terms in other places in the present application have the same functions and are not described in detail.
S3: and judging whether the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance.
The instance information of this embodiment includes, but is not limited to, the IP address, port, context, uri of the microservice instance, and the context, uri of all microservice instances registered to the registry by the same service code should be consistent to verify the correctness of the microservice instance to be written into the registry.
In the embodiment, the correctness of the service instance information is verified, and the service instance data is subjected to format verification and uri connectivity verification provided by the service instance. Service instances are as per restful:// ip: the fixed format of port/contextUri & timestamp assembles the data. Ip is a network Ip address of the micro service instance, a port is a port for providing service for the micro service instance, context is a context of a web container of the micro service instance, uri is an interface combination provided by the micro service instance, and timestamp is a timestamp for starting the micro service instance. And after receiving the implementation information, the Zookeeper analyzes and checks the implementation information according to a fixed format to determine the authenticity of the instance information.
S4: and if the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance, registering the first micro-service instance through the decrypted specified service code.
In the embodiment, the correctness of the micro service instance to be registered is verified, and the micro service instance judged to be correct is written into the specified service code, so that a third party can be consumed to effectively call the micro service instance under the specified service code, and the correctness, the integrity and the effectiveness of calling data are ensured.
Further, the step S3 of determining whether the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance includes:
s301: and judging whether the first uri of the first micro-service instance is consistent with the second uri of the first reference micro-service instance.
The embodiment determines the association of the first micro service instance and the first reference micro service instance in the existing form by comparing the interface address of the first micro service instance to be registered with the interface address of the first reference service instance corresponding to the service code.
S302: and if the first uri of the first micro service instance is consistent with the second uri of the first reference micro service instance, judging whether the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance.
After determining the relevance of the first micro-service instance and the first reference micro-service instance in the form, the embodiment further determines that the first micro-service instance and the first reference micro-service instance have substantial relevance according to further analyzing the context corresponding to the first micro-service instance and the first reference micro-service instance. The context corresponding to the first micro-service instance and the first reference micro-service instance refers to the relevance of the context contents of the two micro-service instances, and the consistency of the context corresponding to the first micro-service instance and the first reference micro-service instance can be judged by key word recognition or semantic recognition. For example, whether the total quantity of the included same or similar keywords reaches a preset total quantity threshold or not is counted, or whether the keyword proportion reaches a proportion threshold or not is counted, and if yes, it is determined that the context corresponding to the first micro-service instance is consistent with the context corresponding to the first reference micro-service instance. For another example, whether the semantic correlation degree of the first micro-service instance and the first reference micro-service instance reaches a preset threshold is judged through the semantic recognition model, and if yes, it is judged that the context corresponding to the first micro-service instance and the first reference micro-service instance is consistent.
S303: and if the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance, judging that the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance, otherwise, judging that the instance information of the first micro service instance is inconsistent with the instance information of the first reference micro service instance.
In the embodiment, whether context and uri in the instance information are consistent or not is preferably compared to verify whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance or not, so that the verification effectiveness of the micro-service instance to be registered is ensured on the premise of minimum data calculation amount, the accuracy and the effectiveness of the micro-service instance to be registered are ensured, and the method has practical application value. According to other embodiments of the application, on the premise of comparing whether context and uri in the instance information are consistent or not, verification of other instance information is added, such as IP addresses and ports, so that verification accuracy is further increased, and accuracy, effectiveness and pertinence of a consuming third party calling a micro-service instance of a registry are improved.
Further, before the step S2 of decrypting the specified service code and invoking the first reference microservice instance corresponding to the decrypted specified service code according to the decrypted specified service code, the method includes:
s201: and judging whether a historical micro-service instance corresponding to the specified service code exists or not, wherein the historical micro-service instance comprises all micro-service instances which are registered by the specified service code.
In the embodiment, registration of a plurality of related micro-service instances is allowed under the same service code, so that the requirement of expanding the micro-service instances due to business expansion, data updating and the like is met. For example, if the current service expansion needs to expand three micro-service instances under the specified service code into five micro-service instances, two new micro-service instances corresponding to the newly expanded service are received under the specified service code. All the microservice instances registered under the specified service code are historical microservice instances for the microservice instance to be registered newly.
S202: and if the historical micro-service instances corresponding to the specified service codes exist, screening the specified micro-service instances with the earliest registration time corresponding to the specified service codes from the historical micro-service instances.
S203: setting the specified microservice instance as the first reference microservice instance.
In the embodiment, the specified micro-service instance with the earliest registration time in the historical micro-service instances is taken as the reference micro-service instance, so that the first micro-service instance registered to the specified service code is defaulted to be correct, other micro-service instances registered to the specified service code are all taken as the reference when registered, so as to realize the ordered operation of the registered micro-service instances of the registration center, so that when the micro-service instances change, the current calling of a third party is not influenced, the corresponding micro-service instances under the specified service code belong to the same service field by introducing the reference micro-service instance, and the classified management of the registration data is realized by the service code, so as to ensure that the third party does not generate errors when calling the data, and all related data can be obtained at one time according to the service code, and the efficiency of data calling is improved. When the first micro-service instance registered in the specified service code is changed, other micro-service instances registered in the specified service code are also changed according to the first micro-service instance registered in the specified service code.
Further, after the step S3 of determining whether the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance, the method includes:
s31: and if the instance information of the first micro-service instance is inconsistent with the instance information of the first reference micro-service instance, terminating the registration of the first micro-service instance according to the specified service code.
The embodiment rejects the micro-service instances with inconsistent instance information to register under the specified service code, so as to enhance the management of data and improve the correctness of the registered data.
S32: and identifying the first micro-service example as the error information corresponding to the specified service code and storing the error information.
In the embodiment, the micro-service instances with inconsistent registration information are labeled with 'error information', so that differentiation and effective management are realized.
Further, after the step S332 of identifying and storing the first micro-service instance as the error information corresponding to the specified service code, the method includes:
s33: and feeding back the error information to a first terminal corresponding to a designated operator and/or a second terminal corresponding to a designated developer through a designated communication mode.
In the embodiment, the error information is fed back to the designated operator or the designated developer in a communication mode of a mail or a short message, so that the data developer can know the data calling condition of the micro service instance in time, and an effective intermediate data management and control and data contact platform is established for the data developer and the consuming third party. The calling condition of the micro-service instance data can be fed back to the data development room side in time to assist management of related designated operators and/or designated developers, for example, the total occurrence times of error data are gathered regularly and used as performance assessment data of the designated operators and/or the designated developers.
Further, after the step S33 of feeding back the error information to the first terminal corresponding to the designated operator and/or the second terminal corresponding to the designated developer through the designated communication method, the method includes:
s34: and judging whether a calling instruction for calling the micro-service instance corresponding to the specified service code by a third party is received.
The registration platform of this embodiment determines that a call instruction is received by monitoring whether a call window is triggered, and if a call interface is triggered, determines a specifically called microservice instance by analyzing a service code carried in the call instruction.
S35: and if receiving a calling instruction for calling the micro service instance corresponding to the specified service code by a third party, shielding the error information.
In the embodiment, whether the specified service code contains the micro-service instance carrying the 'error information' identifier is analyzed, and if so, the shielding operation is executed to ensure that the micro-service instance carrying the 'error information' identifier cannot be obtained when the consumption third party calls the micro-service instance corresponding to the specified service code, so that the effectiveness of the consumption third party for calling data is improved, the data service quality is improved, and the satisfaction degree and the trust degree of the consumption third party are improved.
S36: and sending the micro-service examples corresponding to the specified service codes except the error information to the consumption third party.
Further, after the step S35 of masking the error information, the method includes:
and S35a, judging whether feedback information aiming at the error information sent by the first terminal and/or the second terminal is received.
The embodiment feeds back the micro-service instance identified by the error information to the specified operator and/or the specified developer so as to obtain further confirmation from the specified operator and/or the specified developer.
And S35b, if feedback information aiming at the error information and sent by the first terminal and/or the second terminal is received, judging whether the feedback information comprises the designated operator and/or the designated developer, and confirming the correctness of the microservice instance carrying the error information identification.
In the embodiment, the contents of the confirmation information contained in the feedback information are analyzed, so as to further confirm whether the micro-service instance identified by the "error information" is wrong or correct, so as to reasonably operate the micro-service instance identified by the "error information" and meet the requirement on special service expansion. For example, the content of the confirmation information included in the feedback information is that if the micro-service instance carrying the "error information" identifier is confirmed to be erroneous, the shielding is continuously maintained, and the error reason is marked; if the content of the confirmation information contained in the feedback information is that the micro-service instance carrying the error information identification is confirmed to be correct, the error information of the micro-service instance is cancelled, and shielding is cancelled to receive the registration of the first micro-service instance under the appointed service code, so that a consuming third party can call the first micro-service instance when calling.
And S35c, if the feedback information includes the correctness confirmation of the micro service instance carrying the error information identification, the shielding is removed, the error information of the first micro service instance identification is cancelled, and an instruction for receiving the registration of the first micro service instance under the specified service code is generated.
In the embodiment, the reference micro-service instance is introduced so as to provide a verification standard for the micro-service instance under the specified service code and improve the accuracy of the micro-service instance data when the micro-service instance data is written into the registration platform; when the microservice instances start registration in the registry, the registry calls the reference microservice instances under the specified service codes so as to ensure that the registered microservice instances are correct after information comparison. In the embodiment, whether the context and the uri in the micro-service instance information are consistent or not is compared to verify whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance or not, so that on the premise of minimum data calculation amount, the verification accuracy and validity are ensured, and the micro-service instance verification method has practical application value. In the embodiment, the specified micro-service instance with the earliest registration time in the historical micro-service instance is used as the reference micro-service instance, so that under the premise that the default first micro-service instance registered to the specified service code is correct, other micro-service instances registered to the specified service code are based on the micro-service instance registered to the specified service code first during registration, the ordered operation of the registered micro-service instances in the registration center is realized, so that when the micro-service instances change, the current data call of a consuming third party is not influenced, the corresponding micro-service instances under the specified service code are ensured to belong to the same service field by introducing the reference micro-service instance, the classified management of the registered data is realized through the service codes, so that the consuming third party is ensured not to generate errors during data call, and all data of the related service fields can be obtained at one time according to the service codes, and the efficiency of data calling is improved.
Referring to fig. 2, an apparatus for registering a microservice instance according to an embodiment of the present application includes:
the acquisition module 1 is used for the registry to acquire a specified service code started when the first micro-service instance starts registration, wherein the specified service code is encrypted through a preset encryption algorithm.
In the embodiment, when the micro-service instance of the third party calling the service party is consumed, the instance information of the called micro-service instance and the like need to be known to perform effective calling, but the instance information of the micro-service instance is dynamically changed. Due to automatic expansion or updating of the micro-service instances, the instance information of the micro-service instances is changed, so that unified management is inconvenient, and errors are prone to occur. In this embodiment, by introducing the registry, all the microservice instances can be registered in the registry, the registry coordinates the invocation of all the microservice instances registered in the registry, and the registry can query the instance information corresponding to the microservice instances. Data of the registry is public and transparent, and is not limited by permission, wrong data writing of the micro-service instance cannot be avoided, and the wrong data writing of the micro-service instance occurs when the registry is deployed in an intranet environment, which is mostly caused by misuse of service codes, namely the service codes of other types of micro-service instances are used, and the registry of the embodiment takes Zookeeper as an example. In this embodiment, the service code is encrypted by an AES encryption algorithm, and the Zookeeper obtains the decrypted specific service code by decrypting after receiving the micro-service instance, so as to improve the security of the micro-service instance and ensure the security of the registry.
And the calling module 2 is used for decrypting the specified service code and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, wherein the first reference micro-service instance is a micro-service instance which is registered in the registration center through the specified service code.
In the embodiment, the reference micro-service instance is introduced so as to provide a verification standard for the micro-service instance under the specified service code, and the accuracy of writing the micro-service instance data into the registration platform is improved. When the microservice instances start registration in the registry, the registry calls the reference microservice instances under the specified service codes so as to ensure that the registered microservice instances are correct after information comparison. In this embodiment, the first reference microservice instance corresponds to the specified service code, and the "first" is only used for distinguishing and is not used for limitation, and similar terms in other places of the present application have the same functions and are not repeated.
And the first judging module 3 is configured to judge whether the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance.
The instance information of this embodiment includes, but is not limited to, the IP address, port, context, uri of the microservice instance, and the context, uri of all microservice instances registered to the registry by the same service code should be consistent to verify the correctness of the microservice instance to be written into the registry.
In the embodiment, the correctness of the service instance information is verified, and the service instance data is subjected to format verification and uri connectivity verification provided by the service instance. Service instances are as per restful:// ip: the fixed format of port/contextUri & timestamp assembles the data. Ip is a network Ip address of the micro-service instance, a port is a port for providing services for the micro-service instance, context is a web container context of the micro-service instance, uri is an interface combination provided by the micro-service instance, and timestamp is a timestamp for starting the micro-service instance. And after receiving the implementation information, the Zookeeper analyzes and checks the implementation information according to a fixed format to determine the authenticity of the instance information.
And the receiving module 4 is used for registering the first micro-service instance through the decrypted specified service code if the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance.
The embodiment writes the micro-service instance judged to be correct into the specified service code by verifying the correctness of the micro-service instance to be registered so as to facilitate a consuming third party to effectively call the micro-service instance under the specified service code and ensure the correctness, the integrity and the effectiveness of calling data.
Further, the instance information at least includes context and uri, the uri is an interface address of the micro-service instance, the context is a text association relationship between all micro-service instances under the same service code, and the first determining module 3 includes:
and the first judging unit is used for judging whether a first uri of the first micro service instance is consistent with a second uri of the first reference micro service instance.
The embodiment compares the interface address of the first micro-service instance to be registered with the interface address of the first reference service instance corresponding to the service code to determine the association between the first micro-service instance and the first reference micro-service instance in the existing form.
And the second judging unit is used for judging whether the context corresponding to the first micro-service instance is consistent with the context corresponding to the first reference micro-service instance or not if the first uri of the first micro-service instance is consistent with the second uri of the first reference micro-service instance.
After determining the formal relevance between the first micro-service instance and the first reference micro-service instance, the embodiment further determines that the substantial relevance exists between the first micro-service instance and the first reference micro-service instance according to the context corresponding to the first micro-service instance and the first reference micro-service instance. The context corresponding to the first micro-service instance and the first reference micro-service instance refers to the relevance of the context contents of the two micro-service instances, and the consistency of the context corresponding to the first micro-service instance and the first reference micro-service instance can be judged by key word recognition or semantic recognition. For example, whether the total number of the keywords which are the same or similar reaches a preset total number threshold or not is counted, or whether the keyword proportion reaches a proportion threshold or not is counted, and if yes, it is determined that the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance. For another example, whether the semantic correlation between the first micro service instance and the first reference micro service instance reaches a preset threshold is judged through the semantic recognition model, and if yes, it is judged that the context corresponding to the first micro service instance and the first reference micro service instance is consistent.
And the judging unit is used for judging that the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance if the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance, or else, the instance information is inconsistent.
In the embodiment, whether context and uri in the instance information are consistent or not is preferably compared to verify whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance or not, so that the verification effectiveness of the micro-service instance to be registered is ensured on the premise of minimum data calculation amount, the accuracy and the effectiveness of the micro-service instance to be registered are ensured, and the method has practical application value. According to other embodiments of the application, on the premise of comparing whether context and uri in the instance information are consistent or not, verification of other instance information is added, such as IP addresses and ports, so that verification accuracy is further increased, and accuracy, effectiveness and pertinence of a consuming third party calling a micro-service instance of a registry are improved.
Further, the registration apparatus of the microservice instance includes:
and the second judgment module is used for judging whether historical micro-service instances corresponding to the specified service codes exist or not, wherein the historical micro-service instances comprise all micro-service instances which are registered through the specified service codes.
In the embodiment, registration of a plurality of related micro-service instances is allowed under the same service code, so that the requirement of expanding the micro-service instances due to business expansion, data updating and the like is met. For example, if the current service expansion needs to expand three micro-service instances under the specified service code into five micro-service instances, two new micro-service instances corresponding to the newly expanded service are received under the specified service code. All the microservice instances registered under the specified service code are historical microservice instances for the microservice instance to be registered newly.
And the screening module is used for screening the specified micro-service instance with the earliest registration time corresponding to the specified service code from the historical micro-service instance if the historical micro-service instance corresponding to the specified service code exists.
A setting module for setting the designated microservice instance as the first reference microservice instance.
In the embodiment, the specified micro-service instance with the earliest registration time in the historical micro-service instances is taken as the reference micro-service instance, so that the first micro-service instance registered to the specified service code is defaulted to be correct, other micro-service instances registered to the specified service code are all taken as the reference when registered, so as to realize the ordered operation of the registered micro-service instances of the registration center, so that when the micro-service instances change, the current calling of a third party is not influenced, the corresponding micro-service instances under the specified service code belong to the same service field by introducing the reference micro-service instance, and the classified management of the registration data is realized by the service code, so as to ensure that the third party does not generate errors when calling the data, and all related data can be obtained at one time according to the service code, and the efficiency of data calling is improved. When the first micro-service instance registered in the specified service code is changed, other micro-service instances registered in the specified service code are also changed according to the first micro-service instance registered in the specified service code.
Further, a registration apparatus for a microservice instance according to another embodiment of the present application includes:
and the rejection module is used for terminating the registration of the first micro-service instance according to the specified service code if the instance information of the first micro-service instance is inconsistent with the instance information of the first reference micro-service instance.
The embodiment rejects the micro-service instances with inconsistent instance information to register under the specified service code, so as to enhance the management of data and improve the correctness of the registered data.
And the identification module is used for identifying the first micro-service instance as the error information corresponding to the specified service code and storing the error information.
In the embodiment, the micro-service instances with inconsistent registration information are labeled with 'error information', so that differentiation and effective management are realized.
Further, the registration apparatus of the microservice instance includes:
and the feedback module is used for feeding the error information back to the first terminal corresponding to the designated operator and/or the second terminal corresponding to the designated developer in a designated communication mode.
In the embodiment, the error information is fed back to the designated operator or the designated developer in a communication mode of a mail or a short message, so that the data developer can know the data calling condition of the micro service instance in time, and an effective intermediate data management and control and data contact platform is established for the data developer and the consuming third party. The calling condition of the micro-service instance data can be fed back to the data development room side in time to assist management of related designated operators and/or designated developers, for example, the total occurrence times of error data are gathered regularly and used as performance assessment data of the designated operators and/or the designated developers.
Further, the registration apparatus of the microservice instance includes:
and the third judgment module is used for judging whether a calling instruction for calling the micro-service instance corresponding to the specified service code by a third party is received.
The registration platform of this embodiment determines that a call instruction is received by monitoring whether a call window is triggered, and if a call interface is triggered, determines a specifically called microservice instance by analyzing a service code carried in the call instruction.
And the shielding module is used for shielding the error information if a calling instruction of a third party for calling the micro service instance corresponding to the specified service code is received.
In the embodiment, whether the specified service code contains the micro-service instance carrying the 'error information' identifier is analyzed, and if so, the shielding operation is executed to ensure that the micro-service instance carrying the 'error information' identifier cannot be obtained when the consumption third party calls the micro-service instance corresponding to the specified service code, so that the effectiveness of the consumption third party for calling data is improved, the data service quality is improved, and the satisfaction degree and the trust degree of the consumption third party are improved.
And the sending module is used for sending the micro-service examples corresponding to the specified service codes except the error information to the consumption third party.
Further, the registration apparatus of the microservice instance includes:
and the fourth judging module is used for judging whether feedback information aiming at the error information sent by the first terminal and/or the second terminal is received.
The embodiment feeds back the micro-service instance identified by the error information to the specified operator and/or the specified developer so as to obtain further confirmation from the specified operator and/or the specified developer.
A fifth determining module, configured to determine, if feedback information for the error information sent by the first terminal and/or the second terminal is received, whether the feedback information includes the designated operator and/or the designated developer, and confirm the correctness of the microservice instance carrying the error information identifier.
In the embodiment, the contents of the confirmation information contained in the feedback information are analyzed, so as to further confirm whether the micro-service instance identified by the "error information" is wrong or correct, so as to reasonably operate the micro-service instance identified by the "error information" and meet the requirement on special service expansion. For example, the content of the confirmation information included in the feedback information is that if the micro-service instance carrying the "error information" identifier is confirmed to be erroneous, the shielding is continuously kept, and the error reason is marked; if the content of the confirmation information contained in the feedback information is that the micro-service instance carrying the error information identification is confirmed to be correct, identifying the error information of the micro-service instance is cancelled, and shielding is cancelled to receive that the first micro-service instance is registered under the appointed service code, so that a consuming third party can invoke the first micro-service instance when invoking.
And the revocation module is used for removing the shielding and revoking the error information of the first micro-service instance identifier if the feedback information comprises the correctness confirmation of the micro-service instance carrying the error information identifier, and generating an instruction for receiving the registration of the first micro-service instance under the specified service code.
Referring to fig. 3, an embodiment of the present application further provides a computer device, where the computer device may be a server, and an internal structure of the computer device may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store all data required for the registration process of the microservice instance. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program when executed by a processor implements a registration method for microservice instances.
The processor executes the registration method of the microservice instance, and the registration method comprises the following steps: the method comprises the steps that a registration center obtains a specified service code started when a first micro-service instance starts registration, wherein the specified service code is encrypted through a preset encryption algorithm; decrypting the specified service code, and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, wherein the first reference micro-service instance is a micro-service instance which is registered in the registration center through the specified service code; judging whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance or not; and if so, registering the first micro-service instance through the decrypted specified service code.
The computer equipment introduces the reference micro-service instance so as to provide a verification standard for the micro-service instance under the specified service code and improve the accuracy of the micro-service instance data when the data is written into the registration platform; when the microservice instances register in the registry, the registry calls the reference microservice instances under the specified service codes so as to ensure that the registered microservice instances are correct after information comparison. Whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance is verified by comparing whether the context and the uri in the micro-service instance information are consistent or not, so that the verification accuracy and validity are guaranteed on the premise of minimum data calculation amount, and the method has practical application value.
In one embodiment, the step of judging, by the processor, whether the instance information of the first microservice instance is consistent with the instance information of the first reference microservice instance includes: judging whether a first uri of the first micro-service instance is consistent with a second uri of the first reference micro-service instance; if the first uri of the first micro service instance is consistent with the second uri of the first reference micro service instance, judging whether the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance; and if the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance, judging that the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance, otherwise, judging that the instance information of the first micro service instance is inconsistent with the instance information of the first reference micro service instance.
In an embodiment, before the step of decrypting the specified service code and invoking the first reference microservice instance corresponding to the decrypted specified service code according to the decrypted specified service code, the processor includes: judging whether a historical micro-service instance corresponding to the specified service code exists or not, wherein the historical micro-service instance comprises all micro-service instances which are registered through the specified service code; if so, screening the appointed micro-service instance with the earliest registration time corresponding to the appointed service code from the historical micro-service instance; and setting the specified micro-service instance as the first reference micro-service instance.
In one embodiment, after the step of determining whether the instance information of the first microservice instance is consistent with the instance information of the first reference microservice instance, the processor includes: if the instance information of the first micro-service instance is inconsistent with the instance information of the first reference micro-service instance, terminating the registration of the first micro-service instance according to the specified service code; and identifying the first micro-service example as the error information corresponding to the specified service code and storing the error information.
In one embodiment, after the step of identifying and storing the first micro-service instance as the error information corresponding to the specific service code by the processor, the method includes: and feeding back the error information to a first terminal corresponding to a designated operator and/or a second terminal corresponding to a designated developer through a designated communication mode.
In an embodiment, after the step of feeding back the error information to the first terminal corresponding to the designated operator and/or the second terminal corresponding to the designated developer through a designated communication method by the processor, the method includes: judging whether a calling instruction for calling the micro-service instance corresponding to the specified service code by a consuming third party is received; if yes, shielding the error information; and sending the micro-service examples corresponding to the specified service codes except the error information to the consumption third party.
In an embodiment, after the step of masking the error information by the processor, the method includes: judging whether feedback information aiming at the error information sent by the first terminal and/or the second terminal is received or not; if feedback information aiming at the error information and sent by the first terminal and/or the second terminal is received, judging whether the feedback information comprises the specified operator and/or the specified developer, and confirming the correctness of the micro-service instance carrying the error information identification; and if the feedback information comprises the correctness confirmation of the micro service instance carrying the error information identification, the shielding is removed, the error information of the first micro service instance identification is cancelled, and an instruction for receiving the registration of the first micro service instance under the specified service code is generated.
It will be understood by those skilled in the art that the structure shown in fig. 3 is only a block diagram of a part of the structure related to the present application, and does not constitute a limitation to the computer device to which the present application is applied.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a registration method for a microservice instance, and the method includes: the method comprises the steps that a registration center obtains a specified service code started when a first micro-service instance starts registration, wherein the specified service code is encrypted through a preset encryption algorithm; decrypting the specified service code, and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, wherein the first reference micro-service instance is a micro-service instance which is registered in the registration center through the specified service code; judging whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance; and if so, registering the first micro-service instance through the decrypted specified service code.
The computer readable storage medium introduces the reference micro service instance so as to provide a verification standard for the micro service instance under the specified service code and improve the accuracy of writing the micro service instance data into the registration platform; when the microservice instances start registration in the registry, the registry calls the reference microservice instances under the specified service codes so as to ensure that the registered microservice instances are correct after information comparison. Whether the instance information of the first micro service instance is consistent with the instance information of the first reference micro service instance is verified by comparing whether the context and the uri in the micro service instance information are consistent, so that the verification accuracy and validity are ensured on the premise of minimum data calculation amount, and the method has practical application value.
In one embodiment, the step of judging, by the processor, whether the instance information of the first microservice instance is consistent with the instance information of the first reference microservice instance includes: judging whether a first uri of the first micro-service instance is consistent with a second uri of the first reference micro-service instance; if the first uri of the first micro service instance is consistent with the second uri of the first reference micro service instance, judging whether the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance; if the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance, the instance information of the first micro service instance is judged to be consistent with the instance information of the first reference micro service instance, otherwise, the instance information is inconsistent.
In an embodiment, before the step of decrypting the specified service code and invoking the first reference microservice instance corresponding to the decrypted specified service code according to the decrypted specified service code, the processor includes: judging whether a historical micro-service instance corresponding to the specified service code exists or not, wherein the historical micro-service instance comprises all micro-service instances which are registered through the specified service code; if so, screening the appointed micro-service instance with the earliest registration time corresponding to the appointed service code from the historical micro-service instance; and setting the specified micro-service instance as the first reference micro-service instance.
In one embodiment, after the step of determining whether the instance information of the first microservice instance is consistent with the instance information of the first reference microservice instance, the processor includes: if the instance information of the first micro-service instance is inconsistent with the instance information of the first reference micro-service instance, terminating the registration of the first micro-service instance according to the specified service code; and identifying the first micro-service example as the error information corresponding to the specified service code and storing the error information.
In one embodiment, after the step of identifying and storing the first micro-service instance as the error information corresponding to the specified service code by the processor, the method includes: and feeding back the error information to a first terminal corresponding to a designated operator and/or a second terminal corresponding to a designated developer through a designated communication mode.
In an embodiment, after the step of feeding back the error information to the first terminal corresponding to the designated operator and/or the second terminal corresponding to the designated developer through a designated communication method by the processor, the method includes: judging whether a calling instruction for calling the micro-service instance corresponding to the specified service code by a consuming third party is received; if yes, shielding the error information; and sending the micro-service examples corresponding to the specified service codes except the error information to the consumption third party.
In an embodiment, after the step of masking the error information by the processor, the method includes: judging whether feedback information aiming at the error information sent by the first terminal and/or the second terminal is received or not; if feedback information aiming at the error information and sent by the first terminal and/or the second terminal is received, judging whether the feedback information comprises the specified operator and/or the specified developer, and confirming the correctness of the micro-service instance carrying the error information identification; and if the feedback information comprises the correctness confirmation of the micro service instance carrying the error information identification, the shielding is removed, the error information of the first micro service instance identification is cancelled, and an instruction for receiving the registration of the first micro service instance under the specified service code is generated.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), dual data rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A method for registering micro-service instances, comprising:
the method comprises the steps that a registration center obtains a specified service code started when a first micro-service instance starts registration, wherein the specified service code is encrypted through a preset encryption algorithm;
decrypting the specified service code, and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, wherein the first reference micro-service instance is a micro-service instance which is registered in the registration center through the specified service code;
judging whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance or not;
and if so, registering the first micro-service instance through the decrypted specified service code.
2. The method of claim 1, wherein the instance information at least includes a context and an uri, the uri is an interface address of the microservice instance, the context is a text association relationship between all microservice instances under the same service code, and the step of determining whether the instance information of the first microservice instance is consistent with the instance information of the first reference microservice instance comprises:
judging whether a first uri of the first micro-service instance is consistent with a second uri of the first reference micro-service instance;
if the first uri of the first micro service instance is consistent with the second uri of the first reference micro service instance, judging whether the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance;
if the context corresponding to the first micro service instance is consistent with the context corresponding to the first reference micro service instance, the instance information of the first micro service instance is judged to be consistent with the instance information of the first reference micro service instance, otherwise, the instance information is inconsistent.
3. The method of claim 1, wherein the step of decrypting the specific service code and invoking the first reference microservice instance corresponding to the decrypted specific service code according to the decrypted specific service code is preceded by the step of decrypting the specific service code and invoking the first reference microservice instance corresponding to the decrypted specific service code, comprising:
judging whether a historical micro-service instance corresponding to the specified service code exists or not, wherein the historical micro-service instance comprises all micro-service instances which are registered through the specified service code;
if yes, screening the appointed microservice example with the earliest registration time corresponding to the appointed service code from the historical microservice example;
setting the specified microservice instance as the first reference microservice instance.
4. The method of claim 1, wherein after the step of determining whether the instance information of the first microservice instance is consistent with the instance information of the first reference microservice instance, the method comprises:
if the instance information of the first micro-service instance is inconsistent with the instance information of the first reference micro-service instance, terminating the registration of the first micro-service instance according to the specified service code;
and identifying the first micro-service example as the error information corresponding to the specified service code and storing the error information.
5. The method for registering the microservice instance according to claim 4, wherein the step of identifying and storing the error information corresponding to the first microservice instance as the specified service code is followed by:
and feeding back the error information to a first terminal corresponding to a designated operator and/or a second terminal corresponding to a designated developer through a designated communication mode.
6. The method for registering the microservice instance according to claim 5, wherein after the step of feeding back the error information to the first terminal corresponding to the designated operator and/or the second terminal corresponding to the designated developer through the designated communication mode, the method comprises:
judging whether a calling instruction for calling the micro-service instance corresponding to the specified service code by a consuming third party is received;
if yes, shielding the error information;
and sending the micro-service examples corresponding to the specified service codes except the error information to the consumption third party.
7. The method of claim 6, wherein the step of masking the error message is followed by the steps of:
judging whether feedback information aiming at the error information sent by the first terminal and/or the second terminal is received or not;
if feedback information aiming at the error information and sent by the first terminal and/or the second terminal is received, judging whether the feedback information comprises the designated operator and/or the designated developer, and confirming the correctness of the micro-service instance carrying the error information identification;
and if the feedback information comprises the correctness confirmation of the micro service instance carrying the error information identification, the shielding is removed, the error information of the first micro service instance identification is cancelled, and an instruction for receiving the registration of the first micro service instance under the specified service code is generated.
8. A device for registering micro-service instances, integrated in a registration center, comprising:
the acquisition module is used for acquiring a specified service code started when the first micro-service instance starts registration, wherein the specified service code is encrypted through a preset encryption algorithm;
the calling module is used for decrypting the specified service code and calling a first reference micro-service instance corresponding to the decrypted specified service code according to the decrypted specified service code, wherein the first reference micro-service instance is a micro-service instance which is registered in the registration center through the specified service code;
the first judgment module is used for judging whether the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance;
and the receiving module is used for registering the first micro-service instance through the decrypted specified service code if the instance information of the first micro-service instance is consistent with the instance information of the first reference micro-service instance.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program performs the steps of the method according to any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201910394799.XA 2019-05-13 2019-05-13 Registration method and device of micro service instance, computer equipment and storage medium Active CN110224855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910394799.XA CN110224855B (en) 2019-05-13 2019-05-13 Registration method and device of micro service instance, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910394799.XA CN110224855B (en) 2019-05-13 2019-05-13 Registration method and device of micro service instance, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110224855A CN110224855A (en) 2019-09-10
CN110224855B true CN110224855B (en) 2022-07-22

Family

ID=67820964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910394799.XA Active CN110224855B (en) 2019-05-13 2019-05-13 Registration method and device of micro service instance, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110224855B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111200560B (en) * 2019-12-26 2023-04-07 中国平安人寿保险股份有限公司 Microservice registration method, microservice registration device, microservice registration equipment and storage medium
CN111190734B (en) * 2019-12-30 2023-08-18 杭州涂鸦信息技术有限公司 Micro-service routing method and system and readable storage medium
CN111371840B (en) * 2020-02-14 2021-05-11 平安科技(深圳)有限公司 Micro-service deployment method, device, computer equipment and storage medium
CN111431970B (en) * 2020-02-29 2023-05-26 深圳壹账通智能科技有限公司 Resource allocation method, device, equipment and storage medium based on micro-service architecture
FR3108746B1 (en) * 2020-03-27 2022-04-01 Bull Sas Method and system for discovering and registering new microservices for a unified governance platform of a plurality of supercomputing solutions
CN112235364A (en) * 2020-09-29 2021-01-15 石家庄市善理通益科技有限公司 Business cascade expansion method of talkback service cluster and execution unit thereof
CN112287329A (en) * 2020-10-29 2021-01-29 平安科技(深圳)有限公司 Service instance checking method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107786379A (en) * 2017-11-15 2018-03-09 四川省龙逸凤集网络科技有限公司 A kind of layering cloud management platform based on micro services framework
CN108418862A (en) * 2018-01-31 2018-08-17 金蝶软件(中国)有限公司 Micro services management method and system based on artificial intelligence service cloud platform
CN109246251A (en) * 2018-11-13 2019-01-18 杭州数梦工场科技有限公司 A kind of micro services call method, device, system, equipment and readable storage medium storing program for executing
US10212041B1 (en) * 2016-03-04 2019-02-19 Avi Networks Traffic pattern detection and presentation in container-based cloud computing architecture
CN109669703A (en) * 2018-12-25 2019-04-23 鼎信信息科技有限责任公司 Micro services information configuring methods, device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9749428B2 (en) * 2014-10-21 2017-08-29 Twilio, Inc. System and method for providing a network discovery service platform
US10860390B2 (en) * 2017-06-28 2020-12-08 Intel Corporation Microservices architecture

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10212041B1 (en) * 2016-03-04 2019-02-19 Avi Networks Traffic pattern detection and presentation in container-based cloud computing architecture
CN107786379A (en) * 2017-11-15 2018-03-09 四川省龙逸凤集网络科技有限公司 A kind of layering cloud management platform based on micro services framework
CN108418862A (en) * 2018-01-31 2018-08-17 金蝶软件(中国)有限公司 Micro services management method and system based on artificial intelligence service cloud platform
CN109246251A (en) * 2018-11-13 2019-01-18 杭州数梦工场科技有限公司 A kind of micro services call method, device, system, equipment and readable storage medium storing program for executing
CN109669703A (en) * 2018-12-25 2019-04-23 鼎信信息科技有限责任公司 Micro services information configuring methods, device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于微服务架构的MOOC平台重构;侯海平;《九江学院学报(自然科学版)》;20170920(第03期);全文 *
基于微服务架构的电力云服务平台;杨俊伟等;《电力信息与通信技术》;20170115(第01期);全文 *

Also Published As

Publication number Publication date
CN110224855A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
CN110224855B (en) Registration method and device of micro service instance, computer equipment and storage medium
CN111314306A (en) Interface access method and device, electronic equipment and storage medium
CN111343142B (en) Data processing method and device based on block chain network and storage medium
CN112632575A (en) Authority management method and device of business system, computer equipment and storage medium
CN109413040B (en) Message authentication method, device, system and computer readable storage medium
CN110673881B (en) Configuration management method and device for micro-service cluster and computer equipment
CN110135129B (en) Code segment protection method and device, computer equipment and storage medium
CN110224833B (en) Bill data processing method and system
CN110334126B (en) Timing task processing method and device based on Spring MVC and computer equipment
CN110688661A (en) Method and device for preventing dynamic link library file hijacking and computer equipment
CN110597918A (en) Account management method and device and computer readable storage medium
CN111027295A (en) Data processing method, data processing device, computer equipment and storage medium
CN112613993B (en) Transaction data processing method and device, computer equipment and storage medium
CN112016106A (en) Authentication calling method, device, equipment and readable storage medium of open interface
CN110908778A (en) Task deployment method, system and storage medium
CN110597541A (en) Interface updating processing method, device, equipment and storage medium based on block chain
CN108062714B (en) Annuity data sending method and device, computer equipment and storage medium
CN111597543A (en) Wide-area process access authority authentication method and system based on block chain intelligent contract
CN109543457B (en) Method and device for controlling calling between intelligent contracts
CN108376154B (en) System base table synchronization method and device, computer equipment and storage medium
CN111224939A (en) Task request intercepting method and device, computer equipment and storage medium
CN108062713B (en) Annuity data file obtaining method and device, computer equipment and storage medium
CN114003432A (en) Parameter checking method and device, computer equipment and storage medium
CN113468276A (en) Trusted data acquisition method and device of on-chain prediction machine and electronic equipment
CN110602051B (en) Information processing method based on consensus protocol and related device

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
GR01 Patent grant