Disclosure of Invention
The embodiment of the invention provides a software development method based on data security, which aims to solve the technical problems.
In order to achieve the above technical object, an embodiment of the present invention provides a software development method based on data security, including the following steps:
initializing and generating an intelligent contract, wherein the intelligent contract comprises: the management terminal manages and authorizes the software development terminals and defines the attributes of the nodes;
writing intelligent contracts into a management terminal and a plurality of software development terminals, wherein the software development terminals and the management terminal are computing nodes;
the management terminal carries out first asymmetric encryption on each independent programming task information to obtain an encrypted information abstract, and broadcasts the independent programming task and the encrypted information abstract to all software development terminals;
each software development terminal decrypts the received encrypted message digest by using first asymmetric decryption to obtain a task message digest to be confirmed, and performs the Hash algorithm on the received independent programming task message to obtain a verification digest; when the verification abstract is the same as the abstract of the task information to be confirmed, adding a request to obtain independent programming task information in the independent programming task information to form feedback information, obtaining the feedback information and second information by using second asymmetric encryption, and broadcasting the feedback information and the second information to the management terminal and other software development terminals;
the management terminal applies a Hash algorithm to the feedback information to obtain first information, encrypts the first information into second information by using a private key corresponding to the software development terminal, and broadcasts the feedback information and the second information to the software development terminal;
the management terminal obtains first information and feedback information to be verified by using second asymmetric decryption, when the first information is the same as the feedback information to be verified, the feedback information is added with the information agreeing to be obtained and the electronic tag of the software development terminal to form programming task distribution information, the distribution encryption information is obtained by performing third asymmetric encryption on the task distribution information, and the distribution encryption information is broadcasted to the software development terminal; then reducing the calculation difficulty parameter of the consensus algorithm;
and after the software development terminal and the management terminal obtain a calculation result corresponding to the reduced calculation difficulty parameter through a consensus algorithm of the reduced calculation difficulty parameter, performing asymmetric encryption and asymmetric decryption verification on the task allocation information, forming a new block on the task allocation information, linking up the new block, and creating an encrypted block.
Further, the intelligent contract further comprises the following steps:
the method comprises the steps that when a management terminal applies for registration at a software development terminal, a random number is generated, the generated random number is encrypted by RSA, and an electronic tag, a public key and a private key which are uniquely corresponding to the software development terminal are generated;
when the management terminal is initialized, a random number is generated, and the generated random number is encrypted by RSA to generate an electronic tag, a public key and a private key which are uniquely corresponding to the management terminal; the electronic tag, the public key and the private key correspond to each other; and the electronic tag and the public key broadcast to the software development terminal and the management terminal.
Further, the hash algorithm is SHA-256.
Further, each of the individual programming task information is decomposed by compiling content and requirements.
Further, the independent programming task information includes: a main program framework, a software sub-operation main program framework, a software operation functional module, a software identification information coding module and a functional module which are operated independently from each other call an interrupt subprogram module.
Further, the first asymmetric encryption is: obtaining a verification abstract by applying a Hash algorithm to each independent programming task information, and then encrypting the verification abstract by applying a private key corresponding to a management terminal to obtain an encrypted information abstract;
the first asymmetric decryption is: and decrypting the received encrypted message digest by using a public key corresponding to the management terminal to obtain a task message digest to be confirmed, and obtaining a verification digest by using a Hash algorithm on the received independent programming task message.
Further, the second asymmetric encryption is: applying a Hash algorithm to the feedback information to obtain first information, and encrypting the first information into second information by using a private key corresponding to the software development terminal;
the second asymmetric decryption is: performing Hash operation on the received feedback information to obtain first information; decrypting the received second information by using the public key corresponding to the software development terminal to obtain feedback information to be verified;
further, the content string information of the block includes header information, task allocation information, and time stamp information of a previous block.
Further, the consensus algorithm is as follows: calculating the content character string information through a Hash algorithm to obtain a first layer of Hash calculation number; then, the first layer of Hash calculation number is calculated again by using a Hash algorithm to obtain a second layer of Hash calculation number; the calculation difficulty parameter is the number N of 0 in the first N binary numbers of the second layer of hash calculation numbers.
Further, the calculation difficulty parameter is calculated by a preset winding efficiency time T, and the calculation formula is as follows: n is log2Y, wherein Y ═ T × M; and M is the sum of the calculation times of all the nodes.
Has the advantages that: compared with the prior art, the method has the advantages that the software program assembly operation in software development is distributed to a block chain system; the block chain system comprises a plurality of software development terminals and a management terminal which form a basic architecture model; then, confirming the received task allocation information through independent issuing of each independent programming task information and multiple asymmetric encryption and decryption methods, and then, rapidly performing block uplink operation on the task allocation information after calculating a calculation result corresponding to a calculation difficulty parameter from a block chain system by actively reducing the calculation difficulty parameter of a consensus algorithm; therefore, safety check and operation record can be carried out on the distributed task information; after the post-compilation is facilitated, the corresponding operation object can be found quickly during testing, and the programming efficiency is improved.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
The embodiment of the invention provides a software development method based on data security, which comprises the following steps:
initializing and generating an intelligent contract;
writing intelligent contracts into a plurality of software development terminals and management terminals, wherein the software development terminals and the management terminals are computing nodes; the software development terminal and the management terminal form a block chain system for the computing nodes; of course, the blockchain system is prior art, which consists of a data layer, a network layer, a consensus layer, a stimulus layer, a contract layer, and an application layer. The data layer encapsulates bottom data blocks and related data encryption, time stamp and other technologies; the network layer comprises a distributed networking mechanism, a data transmission mechanism, a data verification mechanism and the like; the consensus layer mainly encapsulates various consensus algorithms of the network nodes; the incentive layer integrates economic factors into a block chain technology system, and mainly comprises an economic incentive issuing mechanism, an economic incentive distributing mechanism and the like; the contract layer mainly encapsulates various scripts, algorithms and intelligent contracts and is the basis of the programmable characteristic of the block chain; the application layer encapsulates various application scenarios and cases of the blockchain.
The method for generating the intelligent contract by initialization specifically comprises the following steps: the method comprises the steps that when a management terminal applies for registration at a software development terminal, a random number is generated, the generated random number is encrypted by RSA, and an electronic tag, a public key and a private key which are uniquely corresponding to the software development terminal are generated; the public key can be used to decrypt the data encrypted by the private key.
When the management terminal is initialized, a random number is generated, and an electronic tag, a public key and a private key which are uniquely corresponding to the management terminal can be generated by using RSA encryption to generate the random number; the electronic tag, the public key and the private key correspond to each other; the electronic tag and the public key broadcast to a software development terminal and a management terminal; the multi-stage association retrieval and hash value matching module realizes multi-stage association retrieval and hash value matching verification of related data.
The electronic tag and the public key broadcast to a software development terminal and a management terminal; the shared encryption information can be read by the public key; the multi-level associated retrieval and hash value matching module realizes multi-level associated retrieval and hash value matching verification of related data; the node attributes are defined when forming a blockchain system; acquiring historical allocation task recording tables of all associated nodes, wherein a timestamp is inevitably carried by the generation of a new block, and hash values of all generated blocks of the node are arranged from near to far according to a time sequence, namely the historical allocation task recording tables; the intelligent contracts are distributed through P2P and stored in a block chain, the intelligent contracts comprise preset response conditions, contract trigger conditions and response operations, and data exchange is carried out among the nodes of the block chain according to the intelligent contracts;
the management terminal carries out asymmetric encryption on each independent programming task information to obtain an encrypted information abstract, and broadcasts the independent programming task and the encrypted information abstract to the software development terminal;
the software development terminal decrypts the received encrypted message digest by using asymmetric decryption to obtain a task message digest to be confirmed, and performs the Hash algorithm on the received independent programming task message to obtain a verification digest; when the verification abstract is the same as the abstract of the task information to be confirmed, adding a request to the independent programming task information to obtain the independent programming task information; forming feedback information; then, applying a Hash algorithm to the feedback information to obtain first information, encrypting the first information into second information by using a private key corresponding to the software development terminal, and broadcasting the feedback information and the second information to the software development terminal and the management terminal;
the management terminal carries out Hash operation on the received feedback information to obtain first information; decrypting the received second information by using the public key corresponding to the software development terminal to obtain feedback information to be verified; when the first information is the same as the feedback information to be verified, adding the information agreeing to be obtained and the electronic tag of the software development terminal into the feedback information to form programming task distribution information, obtaining distribution encryption information by the task distribution information through asymmetric encryption, and broadcasting the distribution encryption information to the software development terminal; then, calculating difficulty parameters by reducing a consensus algorithm;
and after the software development terminal and the management terminal obtain a calculation result corresponding to the calculation difficulty parameter through a consensus algorithm for reducing the calculation difficulty parameter, after asymmetric encryption and asymmetric decryption verification is carried out on the task allocation information, forming a new block of the task allocation information, linking the task allocation information, and creating an encrypted block.
The asymmetric decryption is: and decrypting the received encrypted message digest by using a public key corresponding to the management terminal to obtain a task message digest to be confirmed, and performing the Hash algorithm on the received independent programming task message to obtain a verification digest. The asymmetric encryption is that a verification abstract is obtained by applying a Hash algorithm to each independent programming task information, and then the verification abstract is encrypted by applying a private key corresponding to the management terminal to obtain an encrypted information abstract.
The content string information of the block includes header information, task assignment information, and time stamp information of a previous block. The independent programming tasks comprise a main program framework, a software sub-operation main program framework, a software operation functional module, a software identification information coding module and a functional module calling interrupt subprogram module which are operated independently. Each of the individual programming task information is decomposed by compiling content and requirements.
The consensus algorithm is as follows: i.e., a programmable protocol that all blocks recognize and comply with. When more than half of nodes in the block chain are defined to follow a safety consensus mechanism, the block chain is safe and reliable;
when a new block is added into a block chain as a node, solving a difficult Hash algorithm mathematic problem and broadcasting a result to the nodes in the block chain; verifying the broadcast result by all nodes in the block chain, and counting the number of the nodes passing the verification; judging whether the number of the verified nodes exceeds half, if so, allowing the block to be added into a block chain as a node; if not, the node is refused to join the block chain. The Hash algorithm mathematic problem is an SHA-256 mathematic problem, and the content character string information is calculated through the SHA-256 mathematic problem to obtain a first layer of Hash calculation number; then, the first layer of Hash calculation number is calculated again by using SHA-256 to obtain a second layer of Hash calculation number; the calculation difficulty parameter is the number N of 0 in the first N binary numbers of the second layer of hash calculation numbers. By actively defining the first N of the second layer hash calculation number, the uplink speed of a new block containing task allocation information can be effectively controlled; thereby controlling the computational pressure and efficiency of the blockchain system; the specific calculation method of the calculation difficulty is as follows: presetting the uplink efficiency time T, N ═ log2Y, wherein Y ═ T × M; and M is the sum of the calculation times of all the nodes. The N value is defined according to the manager, so that the efficiency of the manager for programming and uplink is improved.
And when all the software development terminals receiving the tasks finish the tasks, extracting the software assembly content in the blocks and carrying out software assembly. Due to asymmetric encryption and decryption during task distribution, the preparation of the software development terminal for receiving the programming task is improved, and the safety of the task distribution is improved; when the software assembly has errors, the software development terminal can be quickly called to obtain the uplink information according to the distribution records in the block, so that the accuracy and the safety of the process inquiry in programming are improved.
The terminal device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The terminal device may include, but is not limited to, a processor, a memory. It will be understood by those skilled in the art that the terminal device, which is not limiting to terminal devices, may include more or fewer components than those shown, or some components may be combined, or different components, for example, the terminal device may also include input output devices, network access devices, buses, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be an internal storage unit of the terminal device, such as a hard disk or a memory of the terminal device. The memory may also be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device. Further, the memory may also include both an internal storage unit of the terminal device and an external storage device. The memory is used for storing the computer program and other programs and data required by the terminal equipment. The memory may also be used to temporarily store data that has been output or is to be output.
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. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
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.