CN111614725A - Service management method, device and equipment based on block chain development - Google Patents

Service management method, device and equipment based on block chain development Download PDF

Info

Publication number
CN111614725A
CN111614725A CN202010332448.9A CN202010332448A CN111614725A CN 111614725 A CN111614725 A CN 111614725A CN 202010332448 A CN202010332448 A CN 202010332448A CN 111614725 A CN111614725 A CN 111614725A
Authority
CN
China
Prior art keywords
service
server
address
request
preset
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.)
Pending
Application number
CN202010332448.9A
Other languages
Chinese (zh)
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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010332448.9A priority Critical patent/CN111614725A/en
Priority to PCT/CN2020/103392 priority patent/WO2021212677A1/en
Publication of CN111614725A publication Critical patent/CN111614725A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5076Update or notification mechanisms, e.g. DynDNS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The invention discloses a service management method, a device and equipment based on block chain development implementation, relates to the technical field of block chains, and is used for reducing development work caused by address configuration in a configuration file and improving monitoring efficiency of services in the block chains. The main technical scheme of the invention is as follows: receiving service registration information sent by a server, wherein the service registration information comprises a server IP address; inquiring whether a server address corresponding to the server IP address exists in a preset intelligent contract or not; if the service registration information does not exist, the service registration information is written into a block of the bottom-layer chain and a time state database by executing a preset intelligent contract, and the service registration information is synchronized to other nodes of the bottom-layer chain through a data synchronization mechanism of the bottom-layer chain; if present; a request is sent to the server address according to a preset time interval, and whether the service corresponding to the server IP address is alive or not is determined according to the time state corresponding to the server IP address in the time state database.

Description

Service management method, device and equipment based on block chain development
Technical Field
The invention relates to the technical field of block chains, in particular to a service management method, a service management device and service management equipment based on block chain development.
Background
The blockchain is a recording technology different from the traditional centralized accounting mode. Nodes participating in the blockchain system may not belong to the same organization and do not need to trust each other; the blockchain data is maintained by all nodes together, and each node participating in maintenance can obtain a copy of the complete record.
In the current architecture of a federation chain, there are multiple organizations, each with multiple microservices, access protocols, and expose the state of the services themselves. Storing this information via a configuration file requires multiple addresses to be configured, which is prone to errors. And the service state information needs additional codes to dynamically detect, thereby bringing redundant development work to business development.
Disclosure of Invention
The invention provides a service management method, a device and equipment based on block chain development, which are used for reducing development work caused by address configuration in a configuration file and improving monitoring efficiency of services in a block chain.
The embodiment of the invention provides a service management method based on block chain development, which is applied to a service management center in a block chain, wherein the management center registers and manages services sent by all servers, and the method comprises the following steps:
receiving service registration information sent by the server, wherein the service registration information comprises a server IP address;
inquiring whether a server address corresponding to the server IP address exists in a preset intelligent contract, wherein the preset intelligent contract is used for finishing the operation of increasing, deleting, modifying and checking the server address;
if the server address corresponding to the server IP address does not exist in the preset intelligent contract, the service registration information is written into a block and a time state database of a bottom chain by executing the preset intelligent contract, and the service registration information is synchronized to other nodes of the bottom chain by a data synchronization mechanism of the bottom chain;
if the preset intelligent contract has a server address corresponding to the server IP address; sending a request to the server address according to a preset time interval, and determining whether the service corresponding to the server IP address is alive according to the time state corresponding to the server IP address in the time state database.
The embodiment of the invention provides a service management device based on block chain development, which is applied to a service management center in a block chain, wherein the management center registers and manages services sent by all servers, and the device comprises:
the receiving module is used for receiving service registration information sent by the server, wherein the service registration information comprises a server IP address;
the query module is used for querying whether a server address corresponding to the server IP address exists in a preset intelligent contract, and the preset intelligent contract is used for completing the operation of increasing, deleting, modifying and checking the server address;
a write-in module, configured to write the service registration information into a block and a time state database of a bottom-layer chain by executing the preset intelligent contract if a server address corresponding to the server IP address does not exist in the preset intelligent contract, and synchronize the service registration information with other nodes of the bottom-layer chain through a data synchronization mechanism of the bottom-layer chain;
the determining module is used for determining whether a server address corresponding to the server IP address exists in the preset intelligent contract; sending a request to the server address according to a preset time interval, and determining whether the service corresponding to the server IP address is alive according to the time state corresponding to the server IP address in the time state database.
A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the service management method implemented based on blockchain development when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the service management method implemented based on blockchain development described above.
The method, the device and the equipment for realizing the service management based on the block chain development firstly receive the service registration information sent by the server, wherein the service registration information comprises the IP address of the server; inquiring whether a server address corresponding to the server IP address exists in a preset intelligent contract, wherein the preset intelligent contract is used for finishing the operation of increasing, deleting, modifying and checking the server address; if the server address corresponding to the server IP address does not exist, writing the service registration information into a block and a time state database of the bottom chain by executing a preset intelligent contract, and synchronizing the service registration information to other nodes of the bottom chain by a data synchronization mechanism of the bottom chain; if a server address corresponding to the server IP address exists; a request is sent to the server address according to a preset time interval, and whether the service corresponding to the server IP address is alive or not is determined according to the time state corresponding to the server IP address in the time state database. Compared with the existing method for managing the service in the block chain through the configuration file, the method and the system have the advantages that the service management center in the block chain is used for managing and registering the service sent by the server, and the request is sent to the address of the server according to the preset time interval so as to monitor the state of the service, so that the development work caused by the address configuration in the configuration file can be reduced, and the monitoring efficiency of the service in the block chain is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flowchart of a method for service management based on block chain development implementation according to an embodiment of the present invention;
FIG. 2 is a flow chart of determining whether a service corresponding to a server IP address is alive in an embodiment of the present invention;
FIG. 3 is a flow chart of a client obtaining services in an embodiment of the present invention;
FIG. 4 is a schematic block diagram of a service management apparatus implemented based on blockchain development according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment, as shown in fig. 1, a service management method implemented based on blockchain development is provided, which is applied to a service management center in a blockchain, where the management center registers and manages services sent by all servers, and includes the following steps:
s10, receiving the service registration information sent by the server.
The service registration information includes a server IP address, and the service registration information is related information of a service provided by a server, and may specifically include the server IP address, a weight, a probability of being selected by the server, and the like. Specifically, the server provides services to the outside through interfaces provided by the server and registered and discovered, where the interfaces are online, offline, discover, and the like. After the service in the server is started, the online interface of the server is called, so that the service registration information is sent to the service management center.
And S20, inquiring whether a server corresponding to the server IP address exists in the preset intelligent contract.
The preset intelligent contract is used for completing the operations of increasing, deleting, modifying and checking the IP address of the server; the preset intelligent contract is a pre-configured intelligent contract and is responsible for completing operations such as adding, deleting, modifying and the like of the IP address of the server.
And S30, if no server corresponding to the server IP address exists in the preset intelligent contract, writing the service registration information into the block and time state database of the bottom chain by executing the preset intelligent contract, and synchronizing the service registration information to other nodes of the bottom chain by a data synchronization mechanism of the bottom chain.
The time status database is configured to record a time status of a service corresponding to the server, that is, all time related to writing the blockchain service, such as write time of the service registration information, time of sending a request to the server after writing the service, and response time of the service.
S40, if a server corresponding to the server IP address exists in the preset intelligent contract; sending a request to the service according to a preset time interval, and determining whether the service is alive according to the time state corresponding to the server IP in the time state database.
The preset time interval may be set according to actual requirements, for example, the preset time interval may be set to 5 seconds, 6 seconds, 10 seconds, and the like, and the embodiment of the present invention is not particularly limited.
In the embodiment of the invention, after the preset intelligent contract of the bottom chain writes the IP address of the server into the local, namely, the IP address of the server is written into the block of the bottom chain and the time state database, a service registration notice is sent to the service monitoring module of the bottom chain, the service monitoring module starts a monitoring thread to monitor the state of the service in a quasi-real-time manner, namely, the service monitoring module sends a request to the service according to the preset time interval and determines whether the service is alive according to the return time of the request and the time state corresponding to the IP address of the server in the time state database.
The embodiment of the invention provides a service management method based on block chain development, which comprises the steps of firstly receiving service registration information sent by a server, wherein the service registration information comprises a server IP address; inquiring whether a server address corresponding to the server IP address exists in a preset intelligent contract, wherein the preset intelligent contract is used for finishing the operation of increasing, deleting, modifying and checking the server address; if the server address corresponding to the server IP address does not exist, writing the service registration information into a block and a time state database of the bottom chain by executing a preset intelligent contract, and synchronizing the service registration information to other nodes of the bottom chain by a data synchronization mechanism of the bottom chain; if a server address corresponding to the server IP address exists; a request is sent to the server address according to a preset time interval, and whether the service corresponding to the server IP address is alive or not is determined according to the time state corresponding to the server IP address in the time state database. Compared with the existing method for managing the service in the block chain through the configuration file, the method and the system have the advantages that the service management center in the block chain is used for managing and registering the service sent by the server, and the request is sent to the address of the server according to the preset time interval so as to monitor the state of the service, so that the development work caused by the address configuration in the configuration file can be reduced, and the monitoring efficiency of the service in the block chain is improved.
As shown in fig. 2, in an embodiment provided by the present invention, the step S40 of determining whether the service corresponding to the server IP address is alive according to the time status corresponding to the server IP in the time status database includes:
s401, if receiving the information returned by the service aiming at the request, determining that the service is alive.
Specifically, after a request is sent to a server address according to a preset time interval, if return information of the service to the request is received within a preset time, the service is determined to be still alive; if the returned information of the service to the service request is not received within the preset time, the step S402 is skipped to, and the number of times of not receiving the information returned by the service for the request is counted, so as to determine whether the service is stopped or not in the subsequent steps according to the counted number of times.
S402, if the information returned by the service aiming at the request is not received, counting the times of not receiving the information returned by the service aiming at the request.
Step S401 is a parallel step of step S402, and after sending a request to the service according to a preset time interval, if information returned by the service for the request is not received within a preset time, it is necessary to count the number of times that information returned by the service for the request is not received, and determine the state of the service in subsequent steps according to the counted number of times.
S403, if the number of times of not receiving the information returned by the service aiming at the request reaches a preset value, determining that the service is stopped.
The preset value may be specifically set according to an actual requirement, and specifically may be 5, 10, 15, and the like, and the embodiment of the present invention is not specifically limited.
S404, sending a request to the stopped service by taking the preset time interval as a reference and multiplying the time interval until the time interval for sending the request reaches the termination time interval.
In the embodiment of the present invention, after determining that the service is stopped, it is further necessary to continue to send a request to the stopped service to further determine the state of the service. Specifically, the method and the device use a preset time interval as a reference and send a request to the stopped service in a time interval multiplication mode, if return information aiming at the service is received in the preset time, the service is determined to be alive, the current time interval for sending the request is recovered to the preset time interval, and the state of the service is continuously monitored; and if the return information aiming at the service is not received within the preset time, continuing to send the request to the stopped service in a time interval multiplication mode until the time interval for sending the request reaches the termination time interval.
It should be noted that the default state of the service in the blockchain is alive, and if the snooping is not successful, that is, the sent service sending request does not respond more than 3 times, the state of the service can be marked as down. When the monitoring thread in the service monitoring module is not closed, the heartbeat signal is sent in a time interval multiplication mode so as to determine whether the service is connected or not until the time interval is 1 hour. It should be noted that the number of responses and the time interval may be configured according to actual situations, and the embodiment of the present invention is not specifically limited herein.
S405, when receiving the information returned by the service for the request, restoring the current time interval for sending the request to the preset time interval.
S406, when the information returned by the service for the request is received again, determining that the service is alive.
In an embodiment provided by the invention, before the service of the server is offline, an offline interface of the server needs to be called, then a preset intelligent contract deployed on a node is executed, relevant information of the corresponding service in the server, such as an IP address, a weight and the like, is deleted from a time state database, and the deleted information of the service can be automatically synchronized to other nodes of a bottom chain through a data synchronization mechanism of the bottom chain, so that distributed fault tolerance of registration discovery is realized; the preset intelligent contract of the bottom layer chain deletes the address of the server from the event state, a service deletion notice is sent to the service monitoring module, and the service monitoring module closes the corresponding monitoring thread, so that the operation of closing the corresponding service in the block chain is realized.
As shown in fig. 3, in an embodiment provided by the present invention, the method further includes:
s201, receiving a service acquisition request sent by a client.
Wherein, the service acquisition request comprises the identifier of the request service. Specifically, the client executes the preset intelligent contract of the node by calling a discover interface of the server.
S202, obtaining the server IP address corresponding to the identification of the request service according to a preset strategy.
And inquiring the time status database by executing a preset intelligent contract, and acquiring an alive service address list according to the status information of the storage service of the monitoring module, wherein if one node is down, the server can adaptively inquire other nodes so as to provide the IP address of the server.
It should be noted that, after receiving the service acquisition request, the service management center acquires the server IP address corresponding to the identifier of the requested service according to a preset policy. The service registration information also includes server weights. In the embodiment of the present invention, the preset policy includes at least one of server weight randomization, server weight round-robin, server minimum delay, and server minimum load balancing algorithm.
S203, the server IP address is sent to the client, so that the client can obtain and cache the service in the server according to the server IP address.
Note that, when a new service or an original service state in the server is changed, the new service or the original service state is notified to the client through an event. The client decides whether to reacquire the server IP address more than itself. The bottom layer chain also supports certificate verification, when the client side obtains the service list, the issued certificate is sent, the server firstly verifies the legality of the client side, and therefore the security of the framework is better.
In one embodiment provided by the present invention, the method further comprises: when a new service or the original service state is changed, notifying the client through an event; and the client determines whether to acquire the new service or the service with the changed state according to the event.
The embodiment of the invention provides a management method based on block chain service, which is applied to a service management center in a block chain, wherein the management center registers and manages all the services sent by servers, firstly, the management registration center acquires service registration information sent by the servers, the service registration information comprises server IP addresses, and then, the services in the servers are acquired through the server IP addresses; and sending a request to the service according to a preset time interval to determine whether the service is alive or not, and determining that the service is alive when receiving information returned by the service for the request. Compared with the service in the block chain managed by the configuration file at present, the service management center registers the service sent by the server and monitors the state of the service according to the preset time interval, so that the development work caused by configuring the address in the configuration file can be reduced and the monitoring efficiency of the service in the block chain is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a service management device implemented based on blockchain development is provided, and the service management device implemented based on blockchain development corresponds to the service management method implemented based on blockchain development in the above embodiment one to one. As shown in fig. 4, the service management apparatus implemented based on blockchain development includes: a receiving module 10, a querying module 20, a writing module 30 and a determining module 40. The functional modules are explained in detail as follows:
a receiving module 10, configured to receive service registration information sent by the server, where the service registration information includes a server IP address;
the query module 20 is configured to query whether a server address corresponding to the server IP address exists in a preset intelligent contract, where the preset intelligent contract is used to complete an operation of modifying and checking the server address;
a writing module 30, configured to write the service registration information into a block and a time state database of a bottom-layer chain by executing the preset intelligent contract if a server address corresponding to the server IP address does not exist in the preset intelligent contract, and synchronize the service registration information with other nodes of the bottom-layer chain through a data synchronization mechanism of the bottom-layer chain;
a determining module 40, configured to determine that a server address corresponding to the server IP address exists in the preset intelligent contract; sending a request to the server address according to a preset time interval, and determining whether the service corresponding to the server IP address is alive according to the time state corresponding to the server IP address in the time state database.
Specifically, the determining module 40 includes:
a determining unit 41, configured to determine that the service is alive if information returned by the service for the request is received;
a counting unit 42, configured to count the number of times that information returned by the service for the request is not received;
the determining unit 41 is further configured to determine that the service is stopped if the number of times of not receiving the information returned by the service for the request reaches a preset value.
Further, the apparatus further comprises:
a sending module 50, configured to send a request to the stopped service in a time interval multiplication manner with the preset time interval as a reference until a time interval for sending the request reaches a termination time interval;
a restoring module 60, configured to restore the current time interval for sending the request to the preset time interval when receiving information returned by the service for the request;
the determining module 40 is further configured to determine that the service is alive when information returned by the service for the request is received again.
The receiving module 10 is further configured to receive a service acquisition request sent by a client, where the service acquisition request includes an identifier of a requested service;
the determining module 40 is further configured to obtain, according to a preset policy, a server IP address corresponding to the identifier of the requested service;
the sending module 50 is further configured to send the server IP address to the client, so that the client obtains and caches the service in the server according to the server IP address.
Further, the preset strategy comprises at least one of server weight randomization, server weight round-robin, server minimum delay, and server minimum load balancing algorithm.
For specific limitations of the service management apparatus implemented based on blockchain development, reference may be made to the above limitations of the service management method implemented based on blockchain development, and details are not described herein again. The modules in the service management device implemented based on blockchain development may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing 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 internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing a plurality of pieces of historical test data, and each piece of historical test data corresponds to a test problem record. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a service management method implemented based on blockchain development.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
receiving service registration information sent by the server, wherein the service registration information comprises a server IP address;
inquiring whether a server address corresponding to the server IP address exists in a preset intelligent contract, wherein the preset intelligent contract is used for finishing the operation of increasing, deleting, modifying and checking the server address;
if the server address corresponding to the server IP address does not exist in the preset intelligent contract, the service registration information is written into a block and a time state database of a bottom chain by executing the preset intelligent contract, and the service registration information is synchronized to other nodes of the bottom chain by a data synchronization mechanism of the bottom chain;
if the preset intelligent contract has a server address corresponding to the server IP address; sending a request to the server address according to a preset time interval, and determining whether the service corresponding to the server IP address is alive according to the time state corresponding to the server IP address in the time state database.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving service registration information sent by the server, wherein the service registration information comprises a server IP address;
inquiring whether a server address corresponding to the server IP address exists in a preset intelligent contract, wherein the preset intelligent contract is used for finishing the operation of increasing, deleting, modifying and checking the server address;
if the server address corresponding to the server IP address does not exist in the preset intelligent contract, the service registration information is written into a block and a time state database of a bottom chain by executing the preset intelligent contract, and the service registration information is synchronized to other nodes of the bottom chain by a data synchronization mechanism of the bottom chain;
if the preset intelligent contract has a server address corresponding to the server IP address; sending a request to the server address according to a preset time interval, and determining whether the service corresponding to the server IP address is alive according to the time state corresponding to the server IP address in the time state database.
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 used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. 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), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A service management method based on a block chain is applied to a service management center in the block chain, and the service management center registers and manages services sent by all servers, and the method comprises the following steps:
receiving service registration information sent by the server, wherein the service registration information comprises a server IP address;
inquiring whether a server address corresponding to the server IP address exists in a preset intelligent contract, wherein the preset intelligent contract is used for finishing the operation of increasing, deleting, modifying and checking the server address;
if the server address corresponding to the server IP address does not exist in the preset intelligent contract, the service registration information is written into a block and a time state database of a bottom chain by executing the preset intelligent contract, and the service registration information is synchronized to other nodes of the bottom chain by a data synchronization mechanism of the bottom chain;
if the preset intelligent contract has a server address corresponding to the server IP address; sending a request to the server address according to a preset time interval, and determining whether the service corresponding to the server IP address is alive according to the time state corresponding to the server IP address in the time state database.
2. The method of claim 1, wherein determining whether the service corresponding to the server IP address survives according to the time status corresponding to the server IP in the time status database comprises:
if receiving the information returned by the service aiming at the request, determining that the service is alive;
if the information returned by the service aiming at the request is not received, counting the times of not receiving the information returned by the service aiming at the request;
and if the number of times of not receiving the information returned by the service aiming at the request reaches a preset value, determining that the service is stopped.
3. The method for service management based on blockchain development implementation of claim 2, wherein after said determining that the service is down, the method further comprises:
sending a request to the stopped service by taking the preset time interval as a reference and multiplying the time interval until the time interval for sending the request reaches a termination time interval;
when receiving information returned by the service for the request, restoring the time interval of the current request to the preset time interval;
and when the information returned by the service for the request is received again, determining that the service is alive.
4. The method for service management based on blockchain development implementation of claim 1, wherein the method further comprises:
receiving a service acquisition request sent by a client, wherein the service acquisition request comprises an identifier of a request service;
acquiring a server IP address corresponding to the identifier of the request service according to a preset strategy;
and sending the server IP address to the client so that the client can acquire and cache the service in the server according to the server IP address.
5. The method of claim 4, wherein the preset policy comprises at least one of server weight randomization, server weight round robin, server minimum delay, and server minimum load balancing algorithm.
6. A service management device realized based on block chain development is characterized in that the device is applied to a service management center in a block chain, the service management center registers and manages services sent by all servers, and the device comprises:
the receiving module is used for receiving service registration information sent by the server, wherein the service registration information comprises a server IP address;
the query module is used for querying whether a server address corresponding to the server IP address exists in a preset intelligent contract, and the preset intelligent contract is used for completing the operation of increasing, deleting, modifying and checking the server address;
a write-in module, configured to write the service registration information into a block and a time state database of a bottom-layer chain by executing the preset intelligent contract if a server address corresponding to the server IP address does not exist in the preset intelligent contract, and synchronize the service registration information with other nodes of the bottom-layer chain through a data synchronization mechanism of the bottom-layer chain;
the determining module is used for determining whether a server address corresponding to the server IP address exists in the preset intelligent contract; sending a request to the server address according to a preset time interval, and determining whether the service corresponding to the server IP address is alive according to the time state corresponding to the server IP address in the time state database.
7. The device for service management based on blockchain development implementation of claim 6, wherein the determining module comprises:
a determining unit, configured to determine that the service is alive if information returned by the service for the request is received;
the counting unit is used for counting the times of not receiving the information returned by the service aiming at the request;
the determining unit is further configured to determine that the service is stopped if the number of times that the information returned by the service for the request is not received reaches a preset value.
8. The device for service management based on blockchain development implementation of claim 6, wherein the device further comprises:
a sending module, configured to send a request to the stopped service in a time interval multiplication manner with the preset time interval as a reference until a time interval for sending the request reaches a termination time interval;
a recovery module, configured to recover, when receiving information returned by the service for the request, a current time interval for sending the request to the preset time interval;
the determining module is further configured to determine that the service is alive when information returned by the service for the request is received again.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements a service management method implemented based on block chain development as claimed in any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements a service management method implemented based on blockchain development according to any one of claims 1 to 5.
CN202010332448.9A 2020-04-24 2020-04-24 Service management method, device and equipment based on block chain development Pending CN111614725A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010332448.9A CN111614725A (en) 2020-04-24 2020-04-24 Service management method, device and equipment based on block chain development
PCT/CN2020/103392 WO2021212677A1 (en) 2020-04-24 2020-07-22 Service management method and apparatus implemented on the basis of blockchain development, and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010332448.9A CN111614725A (en) 2020-04-24 2020-04-24 Service management method, device and equipment based on block chain development

Publications (1)

Publication Number Publication Date
CN111614725A true CN111614725A (en) 2020-09-01

Family

ID=72197973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010332448.9A Pending CN111614725A (en) 2020-04-24 2020-04-24 Service management method, device and equipment based on block chain development

Country Status (2)

Country Link
CN (1) CN111614725A (en)
WO (1) WO2021212677A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413211A (en) * 2018-12-18 2019-03-01 陕西医链区块链集团有限公司 A kind of framework and its implementation of EOS block chain super node
KR101946557B1 (en) * 2018-05-15 2019-05-03 한국마필거래소(주) Method and system for registering and managing gene information using block chain
CN109889625A (en) * 2019-03-19 2019-06-14 全链通有限公司 Access method, equipment and the computer readable storage medium of server
WO2019144353A1 (en) * 2018-01-25 2019-08-01 深圳前海达闼云端智能科技有限公司 Blockchain-based data training method and device, storage medium and blockchain node
CN110554927A (en) * 2019-09-12 2019-12-10 北京笔新互联网科技有限公司 Micro-service calling method based on block chain
CN110839029A (en) * 2019-11-14 2020-02-25 腾讯科技(深圳)有限公司 Micro-service registration method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10565570B2 (en) * 2016-09-27 2020-02-18 The Toronto-Dominion Bank Processing network architecture with companion database
CN109981633B (en) * 2019-03-19 2021-05-11 全链通有限公司 Method, apparatus and computer-readable storage medium for accessing server
CN110995521B (en) * 2020-03-03 2021-02-19 支付宝(杭州)信息技术有限公司 Service providing method, device, equipment and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019144353A1 (en) * 2018-01-25 2019-08-01 深圳前海达闼云端智能科技有限公司 Blockchain-based data training method and device, storage medium and blockchain node
KR101946557B1 (en) * 2018-05-15 2019-05-03 한국마필거래소(주) Method and system for registering and managing gene information using block chain
CN109413211A (en) * 2018-12-18 2019-03-01 陕西医链区块链集团有限公司 A kind of framework and its implementation of EOS block chain super node
CN109889625A (en) * 2019-03-19 2019-06-14 全链通有限公司 Access method, equipment and the computer readable storage medium of server
CN110554927A (en) * 2019-09-12 2019-12-10 北京笔新互联网科技有限公司 Micro-service calling method based on block chain
CN110839029A (en) * 2019-11-14 2020-02-25 腾讯科技(深圳)有限公司 Micro-service registration method and device

Also Published As

Publication number Publication date
WO2021212677A1 (en) 2021-10-28

Similar Documents

Publication Publication Date Title
US11615195B2 (en) Systems and methods for providing multi-node resiliency for blockchain peers
CN109032824A (en) Database method of calibration, device, computer equipment and storage medium
CN108965381A (en) Implementation of load balancing, device, computer equipment and medium based on Nginx
CN110555041A (en) Data processing method, data processing device, computer equipment and storage medium
CN110602169B (en) Service calling method and device, computer equipment and storage medium
CN111131451A (en) Service processing system and service processing method
WO2020042427A1 (en) Reconciliation method and apparatus based on data fragments, computer device, and storage medium
CN111628886B (en) Method, device and computer equipment for building blockchain network in private cloud environment
CN111026767B (en) Block chain data storage method and device and hardware equipment
CN106452836B (en) main node setting method and device
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN113946427A (en) Task processing method, processor and storage medium for multi-operating system
CN111291063B (en) Master and backup copy election method, system, computer equipment and storage medium
CN113064732A (en) Distributed system and management method thereof
CN111614725A (en) Service management method, device and equipment based on block chain development
CN116346834A (en) Session synchronization method, device, computing equipment and computer storage medium
CN115580658A (en) Service access method and device, storage medium and electronic equipment
CN107291575B (en) Processing method and equipment for data center fault
CN114490681A (en) Service request response method and device and server cluster
CN111338848B (en) Failure application copy processing method and device, computer equipment and storage medium
CN113992630A (en) Network resource conflict processing method, device, equipment and storage medium
CN113596195A (en) Public IP address management method, device, main node and storage medium
CN110502460B (en) Data processing method and node
CN117478299B (en) Block chain consensus algorithm switching method, device and computer equipment
WO2023160278A1 (en) Request processing method and apparatus, and storage medium

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