CN-114936116-B - Block chain service management method and block chain link point
Abstract
A block chain service management method and a block chain node are implemented by a block chain node, a first process and a second process are operated in the block chain node, the first process is a father process of the second process, the second process is used for providing first block chain service, the first process is used for monitoring a first port, the second process is used for obtaining access information through a buffer corresponding to the first port, the first process receives an exit message for indicating that the second process has exited, the first process responds to the exit message and starts a third process corresponding to the first block chain service, the third process obtains the access information through the buffer corresponding to the first port, and the third process is a child process of the first process.
Inventors
- REN YUNXIANG
Assignees
- 蚂蚁区块链科技(上海)有限公司
- 蚂蚁区块链科技(上海)有限公司
Dates
- Publication Date
- 20260421
- Application Date
- 20220530
- Priority Date
- 20220530
Claims (18)
- 1. A block chain service management method is executed by a block chain link point, wherein a first process and a second process are operated in the block chain node, the first process is a father process of the second process, the second process is used for providing a first block chain service, the first process is used for monitoring a first port, the attribute of the first process comprises the identification of a buffer zone corresponding to the first port, and the second process is used for acquiring access information for the first block chain service through the buffer zone, and the method comprises the following steps: The first process receives an exit message for indicating that the second process has exited; The first process responds to the exit message, and starts a third process corresponding to the first blockchain service, so that the third process accesses the buffer area through the identifier of the buffer area to acquire the access information, the third process is a subprocess of the first process, and the third process acquires the identifier based on inheritance of the first process.
- 2. The method of claim 1, wherein the first process is configured to snoop the first port, and the second process is configured to obtain access information for the first blockchain service through a buffer corresponding to the first port, comprising: The second process acquires the identification based on inheritance of the first process, finds the buffer zone according to the identification, and acquires access information from the buffer zone.
- 3. The method of claim 1, wherein the blockchain node corresponds to at least one physical node, the at least one physical node including a first physical node in which the first process and the second process are running.
- 4. A method according to claim 3, wherein the at least one physical node further comprises a second physical node having a fourth process and a fifth process running therein; the fourth process is a parent process of the fifth process, and the fifth process is used for providing the first blockchain service.
- 5. The method of claim 3, wherein a sixth process is also running in the first physical node, the sixth process being a sub-process of the first process, the sixth process for providing the first blockchain service.
- 6. The method of claim 1, further comprising: the first process waits for receiving first heartbeat information sent by a seventh process at a preset time, wherein the seventh process is a sub-process of the first process and is used for providing a second block chain service; if the first process does not receive the first heartbeat information at the preset time, The first process initiates an eighth process for providing the second blockchain service, the eighth process being a child of the first process.
- 7. The method of claim 6, wherein the first heartbeat information includes state information of a seventh process; the method further comprises the steps of: The first process determines whether the seventh process operates normally according to the state information; if not, the seventh process is terminated and an eighth process for providing the second blockchain service is started.
- 8. The method of claim 6, wherein the first heartbeat information includes response information to the second heartbeat information sent thereto by the seventh process for the first process.
- 9. A first process and a second process are operated in the blockchain node, the first process is a father process of the second process, the second process is used for providing a first blockchain service, the first process is used for monitoring a first port, the attribute of the first process comprises the identification of a buffer zone corresponding to the first port, the second process is used for acquiring access information for the first blockchain service through the buffer zone, and the first process is used for receiving an exit message for indicating that the second process has exited; The first process is further used for responding to the exit message, starting a third process corresponding to the first blockchain service, enabling the third process to access the buffer area through the identification of the buffer area, and acquiring access information, wherein the third process is a subprocess of the first process, and the third process acquires the identification based on inheritance of the first process.
- 10. The blockchain node of claim 9, wherein, The first process is specifically used for acquiring the identification of the buffer area corresponding to the first port when the first process listens to the first port, and the second process is specifically used for acquiring the identification based on inheritance of the first process when the second process acquires the access information through the buffer area corresponding to the first port and acquiring the access information through the buffer area corresponding to the first port according to the identification.
- 11. The blockchain node of claim 9, wherein the blockchain node corresponds to at least one physical node, the at least one physical node including a first physical node having the first and second processes running therein.
- 12. The blockchain node of claim 11, wherein, The at least one physical node further comprises a second physical node, and a fourth process and a fifth process are operated in the second physical node; the fourth process is a parent process of the fifth process, and the fifth process is used for providing the first blockchain service.
- 13. The blockchain node of claim 11, wherein a sixth process is also running in the first physical node, the sixth process being a sub-process of the first process, the sixth process for providing the first blockchain service.
- 14. The blockchain node of claim 9, wherein, The first process is also used for the first process, Waiting for receiving first heartbeat information sent by a seventh process at a preset time, wherein the seventh process is a sub-process of the first process and is used for providing a second block chain service; And if the first heartbeat information is not received in the preset time, starting an eighth process for providing the second blockchain service, wherein the eighth process is a sub-process of the first process.
- 15. The blockchain node of claim 14, wherein the first heartbeat information includes state information of a seventh process; The first process is further configured to, in response to a request, Determining whether the seventh process runs normally or not according to the state information; if not, the seventh process is terminated and an eighth process for providing the second blockchain service is started.
- 16. The blockchain node of claim 14, wherein the first heartbeat information includes response information for the second heartbeat information sent by the seventh process to the first process.
- 17. A computer readable storage medium having stored thereon a computer program or instructions which, when executed in a computer, cause the computer to perform the method of any of claims 1-8.
- 18. A computing device comprising a memory having stored therein a computer program or instructions, and a processor that when executed implements the method of any of claims 1-8.
Description
Block chain service management method and block chain link point Technical Field The embodiment of the specification belongs to the technical field of block chains, and particularly relates to a block chain service management method and a block chain node. Background Blockchains are novel application modes of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. In the block chain system, the data blocks are combined into a chain data structure in a sequential connection mode according to the time sequence, and the distributed account book which is not tamperable and counterfeit and is ensured in a cryptographic mode is formed. Because the blockchain has the characteristics of decentralization, non-tamperability of information, autonomy and the like, the blockchain is also more and more valued by people, and has been widely applied in a plurality of fields. Disclosure of Invention The invention aims to provide a block chain service management method and a block chain node, which achieve the effect of not losing access information to block chain service. The first aspect of the present disclosure provides a blockchain service management method, executed by a blockchain node, where a first process and a second process are running in the blockchain node, the first process is a parent process of the second process, the second process is used for providing a first blockchain service, the first process is used for listening to a first port, and the second process is used for obtaining access information through a buffer area corresponding to the first port, and the method includes: The first process receives an exit message for indicating that the second process has exited; And the first process responds to the exit message, and starts a third process corresponding to the first blockchain service, so that the third process obtains access information through the buffer zone, and the third process is a subprocess of the first process. A second aspect of the present disclosure provides a blockchain node, where a first process and a second process are running in the blockchain node, where the first process is a parent process of the second process, the second process is used to provide a first blockchain service, the first process is used to monitor a first port, the second process is used to obtain access information through a buffer area corresponding to the first port, and the first process is used to receive an exit message indicating that the second process has exited; The first process is further used for responding to the exit message and starting a third process corresponding to the first blockchain service, so that the third process obtains access information through a buffer area corresponding to the first port, and the third process is a subprocess of the first process. In a third aspect, there is provided a computer readable storage medium having stored thereon a computer program or instructions which, when executed in a computer, cause the computer to perform the method of the first aspect. In a fourth aspect, there is provided a computing device comprising a memory having stored therein a computer program or instructions, and a processor which when executed implements the method of the first aspect. With one or more of the methods, nodes, computing devices, storage media in the above aspects, the effect of not losing blockchain service access information may be achieved. Drawings In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. FIG. 1 illustrates a block chain architecture diagram in one embodiment; FIG. 2 is a block chain service management method according to one embodiment of the present disclosure; FIG. 3 is a flow chart of a blockchain service management method in an embodiment of the present disclosure; FIG. 4 is a schematic diagram of a blockchain node in an embodiment of the present disclosure; FIG. 5 is a schematic diagram of another blockchain node in an embodiment of the present disclosure; FIG. 6 is a schematic diagram of yet another blockchain node in an embodiment of the present disclosure; fig. 7 is a schematic diagram of a blockchain service management method according to another embodiment of the present disclosure. Detailed Description In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawi