CN111651171B - Interface version deployment method and device, electronic equipment and storage medium - Google Patents

Interface version deployment method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111651171B
CN111651171B CN202010505804.2A CN202010505804A CN111651171B CN 111651171 B CN111651171 B CN 111651171B CN 202010505804 A CN202010505804 A CN 202010505804A CN 111651171 B CN111651171 B CN 111651171B
Authority
CN
China
Prior art keywords
interface version
configuration information
node
version configuration
interface
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
CN202010505804.2A
Other languages
Chinese (zh)
Other versions
CN111651171A (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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010505804.2A priority Critical patent/CN111651171B/en
Publication of CN111651171A publication Critical patent/CN111651171A/en
Application granted granted Critical
Publication of CN111651171B publication Critical patent/CN111651171B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/1854Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with non-centralised forwarding system, e.g. chaincast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

According to the interface version deployment method and device, the electronic equipment and the storage medium, after the second node receives the information of the interface version configuration information request uplink broadcast by the first node, whether the interface version configuration information meets the preset target condition is verified, and a verification result is broadcast; and the second node acquires the verification result of the verification node, determines that the verification result is the number of the nodes passing the verification, issues an interface version deployment instruction under the condition that the number is not less than a threshold value, and broadcasts a message that interface version configuration information is valid, so that the rest nodes in the alliance chain issue the interface version deployment instruction, wherein the interface version deployment instruction is used for indicating a user to perform interface version deployment on the node. By applying the technical scheme, the interface version configuration information is ensured to be interface version configuration information which is not deployed in history, and a user can be timely instructed to deploy the interface version of the node, so that the aim of deploying a new interface version in time by each node is fulfilled.

Description

Interface version deployment method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic information, and in particular, to a method and an apparatus for deploying an interface version, an electronic device, and a storage medium.
Background
With the development of company business, the version of the externally provided API interface needs to be updated. Since a company has multiple different data centers, new API interface versions need to be deployed to multiple different data center nodes.
In the prior art, a large number of different interface versions to be deployed are usually placed in a single data center node, and after a preset fixed time period or a certain number of interface versions are reached, the interface versions are released to other data center nodes to be deployed, so that the other nodes cannot deploy new interface versions in time.
Disclosure of Invention
The application provides a method and a device, and aims to solve the problem of how to realize that nodes of each data center can deploy a new interface version in time.
In order to achieve the above object, the present application provides the following technical solutions:
a method of interface version deployment, comprising:
after receiving the information of requesting uplink of the interface version configuration information broadcasted by the first node, the second node executes a first operation; the first node is any one node in a pre-constructed alliance chain, the second node is any one node except the first node in the alliance chain, the first node broadcasts the interface version configuration information to request uplink information under the condition that the first node receives the interface version configuration information, and the first operation is as follows: verifying whether the interface version configuration information meets a preset target condition or not, and broadcasting a verification result; the target condition at least comprises that the historical interface version configuration information stored in the alliance chain does not comprise the interface version configuration information; any one of the historical interface version configuration information is historical deployed interface version configuration information;
the second node obtains a verification result of a verification node, determines that the verification result is the number of nodes passing verification, issues an interface version deployment instruction under the condition that the number is not smaller than a threshold value, and broadcasts a message that the interface version configuration information is valid, so that after receiving the message that the interface version configuration information is valid, the rest of nodes in the alliance chain issue the interface version deployment instruction, wherein the interface version deployment instruction is used for instructing a user to perform interface version deployment on the node, and the verification node does not include the first node.
The above method, optionally, further includes: and the second node stores the interface version configuration information into the alliance chain when determining that the verification result is that the number of the nodes passing the verification is not less than a threshold value.
Optionally, in the method, when the first node receives the interface version configuration information, broadcasting a message that requests uplink by using the interface version configuration information, where the message includes:
the first node generates a first transaction corresponding to the interface version configuration information and broadcasts a message of uplink of the first transaction request; the first transaction at least comprises the interface version configuration information and a hash value corresponding to the interface version configuration information.
Optionally, in the method described above, the verifying, by the second node, whether the interface version configuration information meets a preset target condition includes:
judging whether the hash value included in the first transaction exists in the hash values of all transactions stored in the alliance chain, if not, determining that the interface version configuration information is not included in the historical interface version configuration information stored in the alliance chain, and determining that the interface version configuration information meets the target condition.
Optionally, in the above method, the target condition further includes that the interface version configuration information is information that has not been tampered;
the second node verifies whether the interface version configuration information meets a preset target condition, and the method further comprises the following steps:
the second node carries out hash operation on the interface version configuration information included in the first transaction to obtain a first hash value;
judging whether the first hash value is the same as the hash value included in the first transaction, and if so, determining that the interface version configuration information is not tampered information; and determining that the interface version configuration information meets the target condition.
Optionally, the method described above, where the issuing an interface version deployment instruction includes:
and marking the state of the interface version configuration information as a state to be updated, and enabling an intelligent contract to issue the interface version deployment instruction, wherein the intelligent contract is pre-deployed in each node of the alliance chain.
An apparatus for interface version deployment, applied to a node, includes:
a first unit, configured to execute a first operation after receiving a message for requesting uplink from interface version configuration information broadcast by a first node; the first node is any one node in a pre-constructed alliance chain, and under the condition that the first node receives the interface version configuration information, the first node broadcasts the interface version configuration information to request uplink information, and the first operation is that: verifying whether the interface version configuration information meets a preset target condition or not, and broadcasting a verification result; the target condition at least comprises that the historical interface version configuration information stored in the alliance chain does not comprise the interface version configuration information; any one of the historical interface version configuration information is historical deployed interface version configuration information;
a second unit, configured to obtain a verification result of a verification node, determine that the verification result is the number of nodes that pass verification, issue an interface version deployment instruction when the number is not less than a threshold, and broadcast a message that the interface version configuration information is valid, so that each of the remaining nodes in the federation chain issues the interface version deployment instruction after receiving the message that the interface version configuration information is valid, where the interface version deployment instruction is used to instruct a user to perform interface version deployment on the node, and the verification node does not include the first node.
Optionally, the apparatus in the foregoing may further be configured to, when it is determined that the verification result is that the number of nodes that pass verification is not less than a threshold, store the interface version configuration information in the federation chain.
An electronic device comprises a memory for storing a program and a processor for executing the program to implement the above method for interface version deployment.
A storage medium is used for storing a program, and when the program runs on a computer, the program realizes the method for deploying the interface version.
According to the method and the device, the first node broadcasts the interface version configuration information to request the uplink information under the condition that the first node receives the interface version configuration information, and because the first node is any node in the alliance chain, after any node of the alliance chain receives the interface version configuration information, each second node of the alliance chain can acquire the interface version configuration information received by the whole network in real time, so that the nodes of the whole network can share the interface version configuration information in real time, and the timeliness of the subsequent interface version configuration information deployment is improved;
because the target condition at least includes that the historical interface version configuration information stored in the federation chain does not include the interface version configuration information, and any one piece of historical interface version configuration information is the historically deployed interface version configuration information, the second node broadcasts that the verification result is that the verification is passed, which indicates that the interface version configuration information sent by the first node is determined by the second node to be the historically undeployed interface version configuration information, so that the verification result is that the number of the nodes passing the verification is not less than the threshold, which indicates that the nodes in the federation chain reach the consensus that the verification is passed, in such a case, the second node issues the interface version deployment instruction and broadcasts a message that the interface version configuration information is valid, so that all nodes in the federation chain issue the interface version deployment instruction, which not only can ensure that the interface version configuration information is the historically undeployed interface version configuration information, but also can timely instruct the user to deploy the interface version to the node, thereby achieving the goal of deploying a new interface version by each node.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method for deploying an interface version according to an embodiment of the present application;
fig. 2 is a flowchart of a method for deploying an interface version according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an apparatus for interface version deployment according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
Fig. 1 is a method for deploying an interface version according to an embodiment of the present application, which may include the following steps:
s101, the first node receives interface version configuration information.
And the version administrator inputs the interface version configuration information into the first node under the condition that the interface version needs to be updated. The first node is any one of all nodes of a pre-constructed alliance chain, and the interface version configuration information comprises a version number and version revision contents.
S102, the first node generates a first transaction corresponding to the interface version configuration information and transmits a message of uplink in a first transaction request in a whole network broadcast area.
The method specifically comprises the following steps: the first node performs Hash operation on the interface version configuration information to generate a Hash value corresponding to the interface version configuration information, encrypts the Hash value by adopting a pre-configured private key to generate a digital signature, and sends the Hash value to the timestamp server, so that the timestamp server binds the Hash value and returns the Hash value to the first node after signing the Hash value and the date and time record to generate a timestamp.
The first node packages the interface version configuration information, the hash value, the timestamp and the digital signature into a first transaction, and broadcasts a message of a first transaction request uplink in the whole network.
S103, after receiving the information of the first transaction request uplink, the second node verifies the first transaction and broadcasts a verification result.
The second node is any one of the nodes of the federation chain except the first node. And the second node verifies the first transaction by performing hash operation on the interface version configuration information included in the first transaction to obtain a first hash value, if the first hash value is consistent with the hash value in the first transaction, determining that the interface version configuration information is complete, effective and not tampered information, and otherwise, determining that the first transaction fails to be verified. And after the first hash value is determined to be consistent with the hash value in the first transaction, comparing the hash value of the first transaction with the hash values of all transactions stored in the alliance chain, if the hash values of all transactions stored in the alliance chain do not have the hash value of the first transaction, determining that the first transaction is verified, otherwise, determining that the first transaction is not verified.
In this embodiment, if the first hash value is inconsistent with the hash value in the first transaction, which indicates that the interface version configuration information is tampered, information that the first transaction verification fails is broadcast to the nodes in the whole network, and if the hash value of the first transaction already exists in the federation chain, which indicates that the node has deployed the interface version configuration information in the first transaction, and does not need to be deployed again, information that the first transaction verification fails is broadcast to the nodes in the whole network, which indicates that the interface version configuration information has been deployed.
And if the hash value of the first transaction does not exist in the alliance chain and the interface version configuration information is not tampered, sending the information that the first transaction passes verification to the nodes of the whole network, and representing that the nodes agree to deploy the interface version configuration information.
It should be noted that the second node is any node except the first node, and in this embodiment, after the first node requests uplink information for the first transaction in the whole network broadcast area, each second node in the alliance chain needs to perform step S103.
And S104, the second node determines whether the first transaction is valid according to the received verification result broadcasted by other nodes, and if the first transaction is invalid, the step S105 is executed. If valid, S106 is performed.
In this embodiment, each node of the federation chain can perform effective and stable communication with each other. And after receiving the verification result of the first transaction broadcast by each node, the second nodes count the number of the nodes with the broadcast verification result of passing the verification, and determine that the first transaction is valid under the condition that the number of the nodes (including the second nodes) with the broadcast verification result of passing the verification is equal to the number of all the second nodes of the alliance chain, otherwise, determine that the first transaction is invalid.
And S105, the second node takes the first transaction as an invalid transaction.
In this embodiment, if the number of nodes that verify the first transaction is smaller than the number of all the second nodes, which indicates that there is at least one second node that does not verify the first transaction, the first transaction is regarded as an invalid transaction, and the uplink processing is not performed on the first transaction.
S106, the second node marks the state of the interface version configuration information of the first transaction as a state to be updated, triggers the intelligent contract to issue a version deployment instruction, and packages the first transaction into blocks to be uploaded to a alliance chain.
The intelligent contract is pre-deployed in each node of the union chain, and the second node marks the state of the first transaction as a state to be updated, so that the intelligent contract issues a deployment version instruction. The release of the deployment version instruction is to remind operation and maintenance personnel to deploy the interface version configuration information according to the deployment version instruction, and the deployment version instruction comprises a version number and version revision content.
The second node packs the first transaction into blocks and uploads the blocks to the alliance chain, so that each node searches the hash value corresponding to the interface version configuration information from the alliance chain in the later period, secondary deployment is avoided, and meanwhile, the block chain can be used for permanently and irreparably recording the interface version configuration information.
S107, the second node broadcasts the effective message of the first transaction in the whole network.
The second node broadcasts the message that the first transaction is valid in the whole network, which is equivalent to publishing the message for deploying the interface version configuration information included in the first transaction in the whole network.
And S108, after the other nodes of the alliance chain receive the message that the first transaction is valid, marking the state of the interface version configuration information of the first transaction as a state to be updated, and triggering the intelligent contract to issue a version deployment instruction.
In the method provided by this embodiment, after the first node receives the interface version configuration information, a first transaction corresponding to the interface version configuration information is generated, and a cochain message of the first transaction is broadcast to the entire network, so that the node of the entire network performs consensus verification on the interface version configuration information, and after the consensus verification passes, the node of the entire network automatically triggers an intelligent contract to issue a version deployment instruction, so that operation and maintenance personnel can deploy the interface version configuration information in time according to the version deployment instruction, thereby implementing that each node can rapidly and synchronously deploy the interface version configuration information.
Furthermore, because the information carried in the intelligent contract release version deployment instruction is the interface version configuration information in the first transaction, the consistency of the interface version configuration information deployed by each node can be ensured.
Furthermore, the interface version configuration information is stored in the block chain of each node, so that the problem that the interface version configuration information is only deployed in the central node and data is lost when the central node fails can be solved.
Furthermore, the safety and reliability of the uplink interface version configuration information can be ensured by using the non-tamper property and traceability of the block link data of the block link.
The flow of the method for deploying the interface version provided by the foregoing embodiment may be summarized as the flow shown in fig. 2.
S201, a first node broadcasts an interface version configuration information request uplink message.
The first node is any one node of the alliance chain, and under the condition that the first node receives the interface version configuration information, the first node broadcasts the interface version configuration information to request uplink information. The interface version configuration information includes a version number, and version revision contents.
The first node may implement the method for requesting uplink information by using the ul version configuration information: the first node generates a first transaction corresponding to the interface version configuration information and broadcasts a message of a first transaction request uplink, wherein the first transaction comprises the interface version configuration information, a hash value corresponding to the interface version configuration information, a timestamp and a data signature. The specific implementation manner of the first transaction corresponding to the interface version configuration information generated by the first node may refer to S102 of the foregoing example.
S202, after receiving the information of the interface version configuration information request uplink, the second node verifies whether the interface version configuration information meets the preset target condition or not, and broadcasts the verification result.
The second node is any node except the first node in the alliance chain, and after receiving the information that the interface version configuration information request uplink broadcasted by the first node, the second node verifies the interface version configuration information and broadcasts the verification result.
And the second node verifies the interface version configuration information to verify whether the interface version configuration information meets a preset target condition. The target conditions include: interface version configuration information is not included in historical interface version configuration information stored in a federation chain, wherein any one piece of historical interface version configuration information is historical deployed interface version configuration information. Correspondingly, the process of the second node verifying whether the interface version configuration information meets the preset target condition is as follows: judging whether the hash value included in the first transaction exists in the hash values of all transactions stored in the alliance chain, if not, determining that the historical interface version configuration information stored in the alliance chain does not include the interface version configuration information, and determining that the interface version configuration information meets the target condition.
It should be noted that, in this embodiment, the transactions stored in the federation chain are transactions generated according to the historical interface version configuration information, and any one transaction includes the historical interface version configuration information and the hash value corresponding to the historical interface version configuration information. And if the hash values corresponding to any two interface version configuration information are the same, the two interface version configuration information are the same information.
In this embodiment, the target condition may further include: the interface version configuration information is information which is not tampered. Correspondingly, the second node verifies the interface version configuration information, and besides verifying whether the historical interface version configuration information stored in the federation chain includes the interface version configuration information, the method further includes: and the second node performs hash operation on the interface version configuration information included in the first transaction to obtain a first hash value, judges whether the first hash value is the same as the hash value included in the first transaction, determines that the interface version configuration information is not tampered if the first hash value is the same as the hash value included in the first transaction, and determines that the interface version configuration information is tampered if the first hash value is not the same as the hash value included in the first transaction.
It should be noted that, in this embodiment, after the first node broadcasts the interface version configuration information to request uplink information, each second node in the alliance chain needs to perform step S202.
S203, the second node obtains the verification result of the verification node, determines that the verification result is the number of the nodes passing the verification, issues an interface version deployment instruction under the condition that the number is not less than the threshold value, stores the interface version configuration information into the alliance chain, and broadcasts a message that the interface version configuration information is valid.
It should be noted that, in order to ensure the safety and reliability of the interface version configuration information, it is preset that the first node receiving the interface version configuration information does not participate in the verification process of the interface version configuration information, so the verification node does not include the first node.
In this embodiment, after the first node broadcasts the interface version configuration information to request the uplink message, each second node (also referred to as a verification node) in the federation chain executes the verification process and broadcasts the verification result, so that all nodes in the federation chain can acquire the verification result of each verification node.
It should be noted that, in this embodiment, in order to ensure the safety and reliability of the interface version configuration information, it is predefined that the message for broadcasting the validity of the interface version configuration information is only the second node, so that the problem that the first node receiving the interface version configuration information maliciously determines the validity of the interface version configuration information by itself, which may result in the failure to ensure the safety and reliability of the interface version configuration information, can be prevented.
The specific implementation manner of this step is that the second node obtains the verification result of each verification node after receiving the verification result broadcasted by each verification node, determines the number of all nodes whose verification results pass verification in combination with the verification result of itself, and marks the state of the interface version configuration information as a state to be updated under the condition that the number is equal to the total number of all second nodes, that is, under the condition that the verification results of all second nodes in the federation chain pass verification, so that the intelligent contract issues the interface version deployment instruction, packages the first transaction as a block and adds the block into the federation chain, and broadcasts a message that the interface version configuration information is valid. The intelligent contracts are pre-deployed in each node of the alliance chain, the interface version deployment instruction is used for indicating a user to perform interface version deployment on the node, and the interface version deployment instruction comprises interface version configuration information.
Because the interface version configuration information is included in the first transaction, the first transaction is packaged into blocks to be added into the alliance chain, and the interface version configuration information can be stored into the alliance chain. Meanwhile, the interface version configuration information is stored in the alliance chain, so that secondary deployment of the interface version configuration information by a subsequent node can be avoided.
S204, after each node in the alliance chain receives the message that the interface version configuration information is valid, an interface version deployment instruction is issued.
In this step, after receiving the message that the interface version configuration information is valid, each of the other nodes in the federation chain marks the state of the interface version configuration information as a state to be updated, so that the intelligent contract issues an interface version deployment instruction to instruct a user to perform interface version deployment on the node.
In the method provided in this embodiment, when the first node receives the interface version configuration information, the first node broadcasts the interface version configuration information to request the uplink message, and because the first node is any node in the alliance chain, after any node in the alliance chain receives the interface version configuration information, each second node in the alliance chain can know the interface version configuration information received in the whole network in real time, so that the nodes in the whole network can share the interface version configuration information in real time, and the timeliness of subsequent deployment of the interface version configuration information is improved.
Because the target condition at least includes that the historical interface version configuration information stored in the federation chain does not include the interface version configuration information, and any one piece of historical interface version configuration information is the historically deployed interface version configuration information, the second node broadcasts that the verification result is that the verification is passed, which indicates that the interface version configuration information sent by the first node is determined by the second node to be the historically undeployed interface version configuration information, so that the verification result is that the number of the nodes passing the verification is not less than the threshold, which indicates that the nodes in the federation chain reach the consensus that the verification is passed, in such a case, the second node issues the interface version deployment instruction and broadcasts a message that the interface version configuration information is valid, so that all nodes in the federation chain issue the interface version deployment instruction, which not only can ensure that the interface version configuration information is the historically undeployed interface version configuration information, but also can timely instruct the user to deploy the interface version to the node, thereby achieving the goal of deploying a new interface version by each node.
Furthermore, because the information carried in the version deployment instruction is the interface version configuration information in the first transaction, the consistency of the interface version part configuration information deployed by each node can be ensured.
Furthermore, the interface version configuration information is stored in the block chain of each node, so that the problem that the interface version configuration information is only deployed in the central node and data is lost when the central node fails can be solved.
Furthermore, the safety and reliability of the uplink interface version configuration information can be ensured by using the non-tamper property and traceability of the block link data of the block link.
An embodiment of the present application further provides an apparatus 300 for interface version deployment, which is applied to a node, and a schematic structural diagram of the apparatus is shown in fig. 3, where the apparatus includes:
a first unit 301, configured to execute a first operation after receiving a message for requesting uplink from interface version configuration information broadcast by a first node; the first node is any one node in a pre-constructed alliance chain, and under the condition that the first node receives the interface version configuration information, the first node broadcasts the interface version configuration information to request uplink information, and the first operation is as follows: verifying whether the interface version configuration information meets a preset target condition, and broadcasting a verification result; the target condition at least comprises interface version configuration information which is not included in historical interface version configuration information stored in the alliance chain; any historical interface version configuration information is historical deployed interface version configuration information;
a second unit 302, configured to obtain a verification result of a verification node, determine that the verification result is the number of nodes that pass verification, issue an interface version deployment instruction when the number is not less than a threshold, and broadcast a message that interface version configuration information is valid, so that after each of the other nodes in the federation chain receives the message that interface version configuration information is valid, issue an interface version deployment instruction, where the interface version deployment instruction is used to instruct a user to perform interface version deployment on the node, and the verification node does not include the first node.
The apparatus 300 further includes a third unit 303, configured to broadcast an interface version configuration information request uplink message when the interface version configuration information is received, where the specific implementation manner is as follows: generating a first transaction corresponding to the interface version configuration information, and broadcasting a message of uplink of the first transaction request; the first transaction at least comprises the interface version configuration information and a hash value corresponding to the interface version configuration information.
The apparatus 300 further includes a fourth unit 304, configured to issue an interface version deployment instruction after receiving the message that the interface version configuration information is valid.
The second unit 302 is further configured to store the interface version configuration information into the federation chain when it is determined that the verification result is that the number of nodes that pass the verification is not less than the threshold.
The specific implementation manner of the first unit 301 for verifying whether the interface version configuration information meets the preset target condition is as follows: judging whether the hash value included in the first transaction exists in the hash values of all transactions stored in the alliance chain, if not, determining that the historical interface version configuration information stored in the alliance chain does not include the interface version configuration information, and determining that the interface version configuration information meets the target condition.
Optionally, the target condition further includes that the interface version configuration information is information that has not been tampered with; the first unit 301 is configured to verify whether the interface version configuration information meets a preset target condition, and further includes: performing hash operation on interface version configuration information included in the first transaction to obtain a first hash value; judging whether the first hash value is the same as the hash value included in the first transaction, and if so, determining that the interface version configuration information is not tampered information; and determining that the interface version configuration information meets the target condition.
The specific implementation manner of the second unit 302 issuing the interface version deployment instruction is as follows: and marking the state of the interface version configuration information as a state to be updated, and issuing an interface version deployment instruction by using the intelligent contract, wherein the intelligent contract is pre-deployed in each node of the union chain.
In the method provided in this embodiment, the first node broadcasts the interface version configuration information to request uplink information when receiving the interface version configuration information, and because the first node is any node in the alliance chain, after receiving the interface version configuration information, each second node in the alliance chain can acquire the interface version configuration information received over the entire network in real time, so that the nodes over the entire network can share the interface version configuration information in real time, and the timeliness of subsequently deploying the interface version configuration information is improved.
Because the target condition at least includes that the historical interface version configuration information stored in the federation chain does not include the interface version configuration information, and any one piece of historical interface version configuration information is the historically deployed interface version configuration information, the broadcast verification result is that the verification is passed, which indicates that the interface version configuration information sent by the first node is the historically undeployed interface version configuration information, so that the number of the nodes passing the verification is not less than the threshold value, which indicates that the nodes in the federation chain reach the consensus of passing the verification, in such a case, the interface version deployment instruction is issued, and the message with the valid interface version configuration information is broadcast, so that all the nodes in the federation chain issue the interface version deployment instruction, which can not only ensure that the interface version configuration information is the historically undeployed interface version configuration information, but also timely instruct the user to deploy the interface version to the node, thereby realizing the goal that each node deploys a new interface version in time.
Furthermore, because the information carried in the version deployment instruction is the interface version configuration information in the first transaction, the consistency of the interface version part configuration information deployed by each node can be ensured.
Furthermore, the interface version configuration information is stored in the block chain of each node, so that the problem that the interface version configuration information is only deployed in the central node and data is lost when the central node fails can be solved.
An embodiment of the present invention further provides an electronic device 400, a schematic structural diagram of which is shown in fig. 4, and the electronic device specifically includes: a processor 401 and a memory 402, the memory 402 being for storing programs; the processor 401 is configured to run a program to implement the method for deploying the interface version in the embodiment of the present application.
An embodiment of the present invention further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer is caused to execute the method for deploying the interface version in the embodiment of the present application.

Claims (10)

1. A method for interface version deployment, comprising:
after receiving the information of requesting uplink of the interface version configuration information broadcasted by the first node, the second node executes a first operation; the first node is any one node in a pre-constructed alliance chain, the second node is any one node except the first node in the alliance chain, the first node broadcasts the interface version configuration information to request uplink information under the condition that the first node receives the interface version configuration information, and the first operation is as follows: verifying whether the interface version configuration information meets a preset target condition or not, and broadcasting a verification result; the target condition at least comprises that the historical interface version configuration information stored in the alliance chain does not comprise the interface version configuration information; any one of the historical interface version configuration information is historical deployed interface version configuration information;
the second node obtains a verification result of a verification node, determines that the verification result is the number of nodes passing verification, issues an interface version deployment instruction under the condition that the number is not smaller than a threshold value, and broadcasts a message that the interface version configuration information is valid, so that after receiving the message that the interface version configuration information is valid, the rest of nodes in the alliance chain issue the interface version deployment instruction, wherein the interface version deployment instruction is used for instructing a user to perform interface version deployment on the node, and the verification node does not include the first node.
2. The method of claim 1, further comprising:
and the second node stores the interface version configuration information into the alliance chain when determining that the verification result is that the number of the nodes passing the verification is not less than a threshold value.
3. The method of claim 1, wherein the first node broadcasts an interface version configuration information request uplink message if the first node receives the interface version configuration information, comprising:
the first node generates a first transaction corresponding to the interface version configuration information and broadcasts a message of uplink of the first transaction request; the first transaction at least comprises the interface version configuration information and a hash value corresponding to the interface version configuration information.
4. The method of claim 3, wherein the second node verifying whether the interface version configuration information meets a preset target condition comprises:
judging whether the hash value included in the first transaction exists in the hash values of all transactions stored in the alliance chain, if not, determining that the interface version configuration information is not included in the historical interface version configuration information stored in the alliance chain, and determining that the interface version configuration information meets the target condition.
5. The method of claim 4, wherein the target condition further comprises that the interface version configuration information is information that has not been tampered with;
the second node verifies whether the interface version configuration information meets a preset target condition, and the method further comprises the following steps:
the second node performs hash operation on the interface version configuration information included in the first transaction to obtain a first hash value;
judging whether the first hash value is the same as the hash value included in the first transaction, and if so, determining that the interface version configuration information is not tampered information; and determining that the interface version configuration information meets the target condition.
6. The method of claim 1, wherein the issue interface version deploy instructions comprise:
and marking the state of the interface version configuration information as a state to be updated, and enabling an intelligent contract to issue the interface version deployment instruction, wherein the intelligent contract is pre-deployed in each node of the alliance chain.
7. An apparatus for interface version deployment, applied to a node, includes:
a first unit, configured to execute a first operation after receiving a message for requesting uplink from interface version configuration information broadcast by a first node; the first node is any one node in a pre-constructed alliance chain, and broadcasts the interface version configuration information to request uplink information under the condition that the first node receives the interface version configuration information, wherein the first operation is as follows: verifying whether the interface version configuration information meets a preset target condition or not, and broadcasting a verification result; the target condition at least comprises that the historical interface version configuration information stored in the alliance chain does not comprise the interface version configuration information; any one of the historical interface version configuration information is historical deployed interface version configuration information;
a second unit, configured to obtain a verification result of a verification node, determine that the verification result is the number of nodes that pass verification, issue an interface version deployment instruction when the number is not less than a threshold, and broadcast a message that the interface version configuration information is valid, so that each of the other nodes in the federation chain issues the interface version deployment instruction after receiving the message that the interface version configuration information is valid, where the interface version deployment instruction is used to instruct a user to perform interface version deployment on the node, and the verification node does not include the first node.
8. The apparatus of claim 7, wherein the second unit is further configured to store the interface version configuration information in the federation chain if it is determined that the verification result is that the number of nodes that pass verification is not less than a threshold.
9. An electronic device comprising a memory for storing a program and a processor for executing the program to implement the method of interface version deployment of any one of claims 1-6.
10. A storage medium for storing a program which, when executed on a computer, implements the method of interface version deployment of any one of claims 1 to 6.
CN202010505804.2A 2020-06-05 2020-06-05 Interface version deployment method and device, electronic equipment and storage medium Active CN111651171B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010505804.2A CN111651171B (en) 2020-06-05 2020-06-05 Interface version deployment method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010505804.2A CN111651171B (en) 2020-06-05 2020-06-05 Interface version deployment method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111651171A CN111651171A (en) 2020-09-11
CN111651171B true CN111651171B (en) 2023-03-31

Family

ID=72347415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010505804.2A Active CN111651171B (en) 2020-06-05 2020-06-05 Interface version deployment method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111651171B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535568B (en) * 2021-07-22 2023-09-05 工银科技有限公司 Verification method, device, equipment and medium for application deployment version

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881312A (en) * 2018-08-24 2018-11-23 北京京东尚科信息技术有限公司 Intelligent contract upgrade method, system and relevant device and storage medium
CN109542767A (en) * 2018-10-25 2019-03-29 平安科技(深圳)有限公司 Automated testing method, device, computer equipment and storage medium based on block chain
CN110334484A (en) * 2019-06-27 2019-10-15 腾讯科技(深圳)有限公司 A kind of copyright authentication method, apparatus, computer equipment and storage medium
CN110351363A (en) * 2019-07-12 2019-10-18 全链通有限公司 Data back up method, equipment and computer readable storage medium
CN110597541A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Interface updating processing method, device, equipment and storage medium based on block chain
CN110933189A (en) * 2020-02-10 2020-03-27 北京启迪区块链科技发展有限公司 Fabric-based block chain network deployment method, device, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190236562A1 (en) * 2018-01-31 2019-08-01 Salesforce.Com, Inc. Systems, methods, and apparatuses for implementing document interface and collaboration using quipchain in a cloud based computing environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881312A (en) * 2018-08-24 2018-11-23 北京京东尚科信息技术有限公司 Intelligent contract upgrade method, system and relevant device and storage medium
CN109542767A (en) * 2018-10-25 2019-03-29 平安科技(深圳)有限公司 Automated testing method, device, computer equipment and storage medium based on block chain
CN110334484A (en) * 2019-06-27 2019-10-15 腾讯科技(深圳)有限公司 A kind of copyright authentication method, apparatus, computer equipment and storage medium
CN110351363A (en) * 2019-07-12 2019-10-18 全链通有限公司 Data back up method, equipment and computer readable storage medium
CN110597541A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Interface updating processing method, device, equipment and storage medium based on block chain
CN110933189A (en) * 2020-02-10 2020-03-27 北京启迪区块链科技发展有限公司 Fabric-based block chain network deployment method, device, equipment and medium

Also Published As

Publication number Publication date
CN111651171A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN111427957B (en) Block chain voting information verification method, device, equipment and storage medium
JP2022500742A (en) Block processing method, blockchain node, block processing system and computer program
CN112688907B (en) Combined equipment remote proof mode negotiation method, related equipment and storage medium
US9338014B2 (en) Network system, certificate management method, and certificate management program
CN110602455A (en) Video storage system, video processing method, device, equipment and storage medium
CN112597485B (en) Information checking method, device and equipment based on block chain and storage medium
CN113254272A (en) Data processing method and device for block chain network, computer equipment and medium
CN111651171B (en) Interface version deployment method and device, electronic equipment and storage medium
CN109634615A (en) Dissemination method, verification method and the device of application installation package
CN114205139A (en) Computing resource management method, node, system and storage medium
CN110866265A (en) Data storage method, device and storage medium based on block chain
CN111338656A (en) Method and device for installing software package to target host and computer equipment
CN111311254A (en) Service processing method, device and system based on block chain
CN115357870B (en) Authorization control method and system based on software
CN111324912B (en) File checking method, system and computer readable storage medium
CN113129002A (en) Data processing method and equipment
CN113765963A (en) Data processing method, device, equipment and computer readable storage medium
CN111597537A (en) Block chain network-based certificate issuing method, related equipment and medium
CN111953633A (en) Access control method and access control device based on terminal environment
CN115473780A (en) Network target range distributed traffic generation method and device
CN112487470B (en) Information verification method, device, terminal equipment and computer readable storage medium
CN107148629B (en) Disposable Verification System
CN114422198A (en) Digital certificate processing method and device, electronic equipment and readable storage medium
CN114065301A (en) Clock environment credibility verification method, device, equipment and storage medium
CN114679466B (en) Consensus processing method, device, computer equipment and medium for block chain network

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