Construction and deployment optimization method and device of front-end project, terminal and storage medium

Through the combination of quantum computing platform and blockchain network, the problems of low efficiency and poor security in front-end engineering construction and deployment are solved, and an efficient, secure and flexible deployment process is achieved, which improves the stability and security of the system.

CN120276961APending Publication Date: 2025-07-08JIANGSU RONGHUI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510412363.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

When facing hyper-large-scale projects, the existing front-end engineering construction and deployment methods have problems such as low efficiency, poor security and insufficient flexibility, which are difficult to meet the needs of rapid iterative development, affecting the efficiency and quality of software development.

Method used

The quantum computing platform is used to process construction tasks, generate dynamic key pairs through the quantum key distribution protocol for secure signatures, use the distributed verification nodes of the blockchain network to verify the deployment packages, and ensure the effectiveness of the deployment packages through a consensus mechanism, and introduce a rollback mechanism and a retry mechanism to ensure the stability of the deployment.

Benefits of technology

It significantly improves the efficiency and security of construction and deployment, ensures the authenticity and integrity of deployment packages, reduces maintenance costs, improves the reliability and credibility of the system, and can quickly return to a stable state.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276961A_ABST
    Figure CN120276961A_ABST
Patent Text Reader

Abstract

The invention discloses a front-end project construction and deployment optimization method and device, a terminal and a storage medium. The method comprises the steps that a front-end project generates a construction task, sends the construction task to a quantum computing platform, processes the construction task according to a preset quantum algorithm, and generates a deployment package; sending the deployment packet to a plurality of distributed verification nodes of a preset block chain network, and performing block chain verification on the deployment packet to obtain a block chain verification result; the block chain network performs consensus judgment through a preset consensus mechanism and obtains a consensus judgment result, when the consensus judgment result is passing, the deployment corresponding to the deployment packet is valid, and otherwise, the deployment is invalid; when the deployment is valid, the deployment process is completed according to the current deployment packet, when the deployment is invalid, a rollback mechanism is triggered, and after the rollback mechanism is completed, redeployment is performed according to a preset retry mechanism until the deployment is valid. According to the method provided by the invention, an efficient, safe and flexible front-end development process is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of front-end engineering technology, and in particular to an optimization method, device, terminal, and storage medium for the construction and deployment of front-end engineering. Background Art

[0002] In modern Web project development, the development of single-page applications (SPAs) in the front-end and back-end separation mode is widely used. Currently, there are common defects in the construction and deployment of single-page applications. During construction, the entire front-end engineering code is packaged into a whole with the help of a packaging tool (such as webpack). As the project scale increases, the packaging time significantly extends. During deployment, the entire project needs to be republished, which not only affects the normal operation of existing functions but also depends on all developers to complete code submission and functional testing. It lacks flexibility and is difficult to meet the requirements of rapid iterative development, hindering the improvement of software development efficiency and quality.

[0003] Therefore, the construction and deployment of front-end engineering are key links in modern software development, which directly affect the delivery efficiency and quality of software products. Moreover, with the rapid development of Internet technology, various front-end frameworks and technology stacks emerge in an endless stream, significantly increasing the complexity of front-end engineering.

[0004] To meet the growing demands, the industry has been continuously exploring new technologies and methods to improve the speed, stability, and security of construction and deployment, thereby reducing operation and maintenance costs and enhancing the user experience. In the traditional front-end engineering construction and deployment process, the method of combining automated scripts with continuous integration tools is usually adopted. These methods mainly include using tools such as Webpack or Rollup for code packaging, using Jenkins or GitLab CI / CD to implement pipeline job management, and relying on SSH or FTP to upload the final product to the server environment.

[0005] However, there are still some deficiencies in the above traditional methods. In the face of ultra-large-scale projects, the existing construction and deployment strategies often fail to achieve ideal performance indicators. Therefore, how to further optimize the construction and deployment process of front-end engineering has become an urgent problem to be solved. Summary of the Invention

[0006] To solve the problems of low efficiency, poor security, and insufficient flexibility existing in the traditional front-end engineering construction and deployment, and to achieve an efficient, secure, and flexible front-end development process, this application provides an optimization method, device, terminal, and storage medium for the construction and deployment of front-end engineering.

[0007] In the first aspect, this application provides an optimization method for the construction and deployment of front-end engineering, adopting the following technical means: An optimization method for the construction and deployment of front-end engineering includes the following steps: The front-end engineering generates a build task, and the build task includes dependency analysis, code optimization, and packaging tasks. The build task is sent to a quantum computing platform, and the build task is processed according to a preset quantum algorithm to generate a deployment package; The deployment package is sent to multiple distributed verification nodes of a preset blockchain network. Each distributed verification node performs blockchain verification on the deployment package to obtain a blockchain verification result, and records the blockchain verification result in the blockchain network; The blockchain network performs a consensus judgment through a preset consensus mechanism and obtains a consensus judgment result. When the consensus judgment result is passed, the deployment corresponding to the deployment package is valid; otherwise, the deployment is invalid; When the deployment is valid, the deployment process is completed according to the current deployment package. When the deployment is invalid, a rollback mechanism is triggered. After the rollback mechanism is completed, redeployment is performed according to a preset retry mechanism until the deployment is valid.

[0008] By adopting the above technical means, the build task is processed by means of a quantum computing platform to improve the speed of the build process. Multiple distributed verification nodes on the blockchain network perform verification to ensure the authenticity and integrity of the deployment package. The consensus mechanism of the blockchain network makes an accurate judgment on the validity of the deployment package, reducing the maintenance cost and technical risks, and significantly improving the build and deployment efficiency and security of the front-end engineering.

[0009] Preferably, the step of sending the build task to a quantum computing platform, processing the build task according to a preset quantum algorithm, and generating a deployment package specifically includes the following steps: Generate a dynamic key pair through a quantum key distribution protocol, and use the private key in the dynamic key pair to perform quantum-secure signature on the build task; Analyze the metadata attributes of the build task, identify the task type of the build task according to the metadata attributes, and obtain the identification result. The identification result includes any one of the dependency analysis, the code optimization, and the packaging tasks. According to the identification result, dynamically load the corresponding quantum algorithm from a preset algorithm library to process the build task and generate a deployment package.

[0010] By adopting the above technical means, a dynamic key pair is generated through a quantum key distribution protocol and a quantum-secure signature is performed on the build task, ensuring the security of the build task during transmission, preventing unauthorized access and tampering, and improving the security and reliability of the build task; by identifying the task type and dynamically loading a suitable quantum algorithm, the resource utilization rate is improved, and it is also ensured that different types of build tasks can obtain the optimal processing strategy.

[0011] Preferably, sending the deployment package to multiple distributed verification nodes of a preset blockchain network, and each of the distributed verification nodes performs blockchain verification on the deployment package, which specifically includes the following steps: Each of the distributed verification nodes decompresses and preliminarily verifies the deployment package through a preset verification function. The steps of the preliminary verification include: performing a primary preliminary verification on the file format of the decompressed deployment package. When the primary preliminary verification passes, calculating the file hash value of the deployment package, comparing the file hash value with a pre-stored standard hash value. If the comparison passes, the preliminary verification passes; otherwise, the preliminary verification fails. If the preliminary verification passes, code verification is performed on the code of the deployment package according to a preset code analysis algorithm. The code analysis algorithm includes static code analysis and dynamic code analysis. The syntax structure of the code is scanned through the static code analysis, and the behavior of the code during runtime is monitored through the dynamic code analysis.

[0012] By adopting the above technical means, decompressing and preliminarily verifying the deployment package can quickly screen out deployment packages that do not meet the file format requirements or have damaged file integrity, avoid unnecessary resource waste in the follow-up, improve the overall verification efficiency. By introducing a file hash value comparison mechanism, the content consistency and security of the deployment package are further guaranteed, and the risks caused by malicious tampering or transmission errors are prevented.

[0013] Preferably, the blockchain network performs a consensus judgment through a preset consensus mechanism and obtains a consensus judgment result. When the consensus judgment result is passed, the deployment corresponding to the deployment package is valid; otherwise, the deployment is invalid. The specific steps include: The blockchain network performs a consensus judgment through a preset consensus mechanism, and the consensus mechanism includes a primary consensus judgment and a deep consensus judgment. Performing the primary consensus judgment on the blockchain network. The primary consensus judgment includes collecting and summarizing the verification results of each of the distributed verification nodes. Each verification result includes pass or reject. If the pass rate of all the verification results of the distributed verification nodes obtained by summarization exceeds a preset consensus threshold, the result of the primary consensus judgment is passed; otherwise, the result of the primary consensus judgment is not passed. If the primary consensus judgment passes, the front-end project is updated according to the deployment package.

[0014] By adopting the above technical means, a primary consensus judgment mechanism is introduced. By summarizing and counting the verification results of distributed verification nodes, it is ensured that only deployment packages with a certain passing rate can be regarded as valid, thereby improving the reliability and security of the entire system.

[0015] Preferably, the following steps are further included: If the result of the primary consensus judgment fails, perform a deep consensus judgment on the distributed verification nodes that failed. The deep consensus judgment includes selecting a subset of verification nodes based on a preset random algorithm and performing a deep verification on the subset of verification nodes. If the proportion of the number of nodes that pass the deep verification in the subset of verification nodes exceeds the preset deep verification node threshold, then the deep consensus judgment passes, and the overall consensus judgment passes; otherwise, the consensus judgment fails and the deployment fails. If the consensus judgment passes, update the front-end project according to the deployment package.

[0016] By adopting the above technical means, by performing a deep consensus judgment on the distributed verification nodes that failed, using a random algorithm to select a subset of verification nodes and performing a deep verification, the possibility of misjudgment can be effectively reduced, thereby ensuring the security and reliability of the deployment process.

[0017] Preferably, when the deployment is effective, complete the deployment process according to the current deployment package. When the deployment is invalid, trigger a rollback mechanism. After the rollback mechanism is completed, redeploy according to a preset retry mechanism until the deployment is effective. Specifically, the following steps are included: When the consensus judgment fails, read the hash snapshot of the last successful deployment from the blockchain network and locate the corresponding target code version; roll back to the target code version according to the dependency relationship in the snapshot. After the rollback is completed, calculate the current Merkle root hash, compare the Merkle root hash with the hash snapshot stored in the blockchain network and obtain a comparison result. When the comparison result is consistent, the rollback is successful.

[0018] By adopting the above technical means, the automatic rollback and verification functions in case of deployment failure are realized, improving the reliability of the entire system.

[0019] Preferably, after the rollback is successful, the following steps are further included: Obtain historical verification data, where the historical verification data includes the accuracy rate of each distributed verification node. Select multiple distributed verification nodes from the historical verification data based on the accuracy rate to form a retry node subset. Perform retry verification based on the retry node subset and a preset retry verification mechanism until the deployment package passes the retry verification. If the retry verification passes, update the front-end project according to the deployment package.

[0020] By adopting the above technical means, after a successful rollback, high-confidence nodes are selected from the accuracy rates of distributed verification nodes in the historical verification data to form a retry node subset, thereby improving the reliability and efficiency of retry verification. At the same time, by applying a preset retry verification mechanism to these selected nodes, it is ensured that the deployment package can pass strict verification, and finally the safe and stable update of the front-end project is achieved.

[0021] In a second aspect, the present application provides an optimization device for the construction and deployment of a front-end project, adopting the following technical means: An optimization device for the construction and deployment of a front-end project includes the following modules: A deployment package generation module for generating a construction task for the front-end project. The construction task includes dependency analysis, code optimization, and packaging tasks. Send the construction task to a quantum computing platform, and process the construction task according to a preset quantum algorithm to generate a deployment package. A blockchain verification module for sending the deployment package to multiple distributed verification nodes of a preset blockchain network. Each distributed verification node performs blockchain verification on the deployment package to obtain a blockchain verification result, and records the blockchain verification result in the blockchain network. A consensus judgment module for the blockchain network to perform consensus judgment through a preset consensus mechanism and obtain a consensus judgment result. When the consensus judgment result is passed, the deployment corresponding to the deployment package is valid; otherwise, the deployment is invalid. A retry verification module for, when the deployment is valid, completing the deployment process according to the current deployment package; when the deployment is invalid, triggering a rollback mechanism. After the rollback mechanism is completed, redeploy according to a preset retry mechanism until the deployment is valid.

[0022] By adopting the above technical means, using a quantum computing platform to accelerate task processing, ensuring the security and reliability of the deployment package through a blockchain network, and the rollback and retry mechanisms in case of deployment failure, thereby improving the stability and security of the entire system.

[0023] In summary, the present application has at least the following beneficial effects: 1. This application processes the construction tasks through a quantum computing platform, significantly improving the processing speed and efficiency of dependency analysis, code optimization, and packaging tasks, and is particularly suitable for the rapid construction of ultra-large-scale projects.

[0024] 2. By leveraging the distributed verification mechanism of the blockchain network, this application ensures the security and integrity of the deployment package, effectively preventing data tampering and enhancing the reliability and credibility of the system.

[0025] 3. By introducing a combination of a rollback mechanism and a retry mechanism, this application can quickly restore to a stable state in case of deployment failure and ensure the deployment success rate through multiple attempts, improving the stability and fault tolerance of the entire process. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flowchart of the method for optimizing the construction and deployment of the front-end project in this embodiment; Figure 2 is the architecture of the method for optimizing the construction and deployment of the front-end project in this embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0027] This application provides a method, device, terminal, and storage medium for optimizing the construction and deployment of a front-end project. To make the objectives, technical solutions, and advantages of this application clearer, the following will further elaborate on the embodiments of this application.

[0028] The following further describes in detail an embodiment of the method for optimizing the construction and deployment of a front-end project of this application with reference to the accompanying drawings of the specification.

[0029] Before implementing this application, it is necessary to build the overall architecture: build a quantum computing platform, equip it with quantum computer hardware, and adapt the quantum computing interface and related software systems of the front-end construction tool. The front-end construction tool in this embodiment is webpack.

[0030] At the same time, build a blockchain network and set up multiple distributed verification nodes on servers in different geographical locations or different teams.

[0031] A method for optimizing the construction and deployment of a front-end project of this application, as Figure 1 shown, includes the following steps: S1. The front-end project generates construction tasks, which include dependency analysis, code optimization, and packaging tasks. Send the construction tasks to the quantum computing platform and process the construction tasks according to a preset quantum algorithm to generate a deployment package, which specifically includes the following steps: S11. The front-end project generates construction tasks.

[0032] During the front-end engineering development process, when a certain stage of code writing is completed and the project is integrated and prepared for deployment, a front-end build tool (such as webpack) will generate build tasks based on the project's configuration file and project structure. These build tasks cover dependency analysis, code optimization, and packaging tasks.

[0033] S12. Generate a dynamic key pair through a quantum key distribution protocol, and use the private key in the dynamic key pair to perform quantum-secure signature on the build task. In this embodiment, after the build task is sent to the quantum computing platform, the quantum computing platform uses the quantum key distribution protocol: BB84 protocol to generate a dynamic key pair.

[0034] Quantum key distribution is based on the uncertainty principle of quantum mechanics and can generate theoretically absolutely secure keys. The private key in the generated dynamic key pair is used to perform quantum-secure signature on the build task to ensure the integrity and non-repudiation of the build task during transmission and processing.

[0035] S13. Analyze the metadata attributes of the build task, identify the task type of the build task based on the metadata attributes and obtain the identification result. The identification result includes any one of dependency analysis, code optimization, and packaging tasks. Dynamically load the corresponding quantum algorithm from a preset algorithm library based on the identification result to process the build task and generate a deployment package.

[0036] In this embodiment, after the quantum computing platform receives the build task, it first analyzes the metadata attributes of the task. The metadata attributes contain various information about the task, such as the source of the task, the code modules involved, and the task priority. By analyzing these metadata, the platform can identify the specific type of the build task and determine whether it is a dependency analysis, code optimization, or packaging task.

[0037] In this embodiment, the dependency analysis task accelerates the retrieval of file dependencies by triggering the Grover algorithm, the code optimization task generates a resource allocation plan by calling the quantum annealing algorithm to optimize resource allocation, and the packaging task performs encryption verification by activating the Shor algorithm.

[0038] Then, the quantum computing platform dynamically loads the corresponding quantum algorithm from a preset algorithm library based on the identification result. Create a temporary container in the quantum computing platform, inject the quantum gate operation sequence of the selected quantum algorithm and execute it to generate a deployment package.

[0039] The above steps improve the utilization rate of quantum computing resources in the main process through the dynamic selection mechanism of quantum algorithms, and can reduce the algorithm mis-matching rate.

[0040] S2. Send the deployment package to multiple distributed verification nodes of a preset blockchain network. Perform blockchain verification on the deployment package through each distributed verification node to obtain a blockchain verification result, and record the blockchain verification result in the blockchain network. The specific steps are as follows: S21. Send the deployment package to multiple distributed verification nodes of the blockchain network for blockchain verification. The blockchain verification includes preliminary verification and code verification.

[0041] Each distributed verification node decompresses and performs a preliminary verification on the deployment package through a preset verification function.

[0042] The steps of the preliminary verification include: perform a primary preliminary verification on the file format of the decompressed deployment package.

[0043] In this embodiment, the verification function is the primary checkpoint to ensure the security and integrity of the deployment package. Its core operations include two key steps: file header information check (i.e., a primary preliminary verification) and hash value comparison.

[0044] The process of file header information check is as follows: When the deployment package arrives at the verification node, the verification function first reads the file header information of the deployment package. The file header is equivalent to the "identity nameplate" of the deployment package, which stores key metadata such as file format, version, compression method, etc. The verification function will carefully check this metadata according to the pre-set front-end engineering file format standard. Once it is found that the file header information does not conform to the standard, the verification function will immediately determine that the deployment package has an incorrect format, terminate the subsequent verification process, and feedback an error message to the blockchain network through the verification node.

[0045] S212. When the primary preliminary verification passes, calculate the file hash value of the deployment package, and compare the file hash value with the pre-stored standard hash value. If the comparison passes, the preliminary verification passes; otherwise, the preliminary verification fails.

[0046] After completing the file header information check and confirming that it is correct, the verification function will enter the hash value comparison link, calculate the file hash value and compare it with the pre-stored standard hash value to ensure file integrity and prevent the file from being tampered with during transmission.

[0047] In the hash value comparison link, a specific hash algorithm (SHA-256 in this embodiment) is used to calculate the entire deployment package to generate a unique file hash value. At the same time, during the front-end engineering construction phase, when the deployment package is first generated, its corresponding standard hash value has been calculated and stored in a secure location. In this embodiment, it is stored in a specific block of the blockchain.

[0048] The verification function precisely compares the currently calculated file hash value with the pre-stored standard hash value. If the two are exactly the same, it indicates that the deployment package has not been tampered with during transmission, its integrity is guaranteed, and the preliminary verification passes; if the comparison result is inconsistent, it means that the deployment package may have been maliciously tampered with or data loss occurred during transmission, the preliminary verification fails, and the verification function simultaneously feedbacks the abnormal situation to the blockchain network to prevent subsequent deployment processes.

[0049] S22. If the preliminary verification passes, code verification is performed on the code of the deployment package according to a preset code analysis algorithm. The code analysis algorithm includes static code analysis and dynamic code analysis. The syntax structure of the code is scanned through static code analysis, and the behavior of the code during runtime is monitored through dynamic code analysis.

[0050] A code analysis algorithm that combines static and dynamic code analysis is used to comprehensively check the code.

[0051] Through static code analysis, the syntax structure of the code is scanned to detect potential syntax errors, logical errors, and code specification issues. In this embodiment, static code analysis is used to check whether there are undefined variables in the code and whether function calls are correct.

[0052] Through dynamic code analysis, the code is run in a sandbox environment to monitor the behavior of the code during runtime, such as memory usage, resource loading, network requests, etc., so as to verify the correctness of the code function and its compatibility with the existing system.

[0053] For example, in this embodiment, dynamic code analysis is used to simulate the operation process of users on the front-end page to check whether the interactive functions of the page are normal and whether data requests can be correctly returned.

[0054] S3. The blockchain network conducts a consensus judgment through a preset consensus mechanism and obtains a consensus judgment result. When the consensus judgment result is passed, the deployment corresponding to the deployment package is valid; otherwise, the deployment is invalid. The specific steps are as follows: S31. The blockchain network conducts a consensus judgment through a preset consensus mechanism. The consensus mechanism includes a primary consensus judgment and a deep consensus judgment.

[0055] S32. First, a primary consensus judgment is performed on the blockchain network.

[0056] The primary consensus judgment includes collecting the verification results of each distributed verification node and summarizing them. Each verification result includes pass or reject. If the passing rate of the verification results of all distributed verification nodes obtained by summarization exceeds the preset consensus threshold, the result of the primary consensus judgment is passed; otherwise, the result of the primary consensus judgment is not passed.

[0057] In this embodiment, the consensus threshold is set to 70%. That is, when the passing rate is greater than 70%, the result of the primary consensus judgment is passed. At this time, it can be directly determined that the deployment is effective, and the blockchain network updates the front-end project according to the deployment package and starts the subsequent deployment process.

[0058] S33. If the primary consensus judgment passes, update the front-end project according to the deployment package.

[0059] S34. If the result of the primary consensus judgment is not passed, perform a deep consensus judgment on the distributed verification nodes that have not passed. The deep consensus judgment includes selecting a subset of verification nodes based on a preset random algorithm. In this embodiment, the preset random algorithm is a cryptographically secure random number generation algorithm. This random algorithm ensures the randomness and fairness of the selection process and avoids interference from human factors.

[0060] Perform a deep verification on the subset of verification nodes. The content of the deep verification is similar to the code verification process of the previous verification nodes, and some additional check items are added to improve the accuracy of the check. In this embodiment, the deep verification also includes a more in-depth vulnerability scan of the code and checks the performance of the code in a high-concurrency scenario.

[0061] If the proportion of the number of nodes that pass the deep verification in the subset of verification nodes exceeds the preset deep verification node threshold, the deep consensus judgment passes and the overall consensus judgment passes; otherwise, the consensus judgment fails and the deployment fails.

[0062] In this embodiment, the deep verification node threshold is set to 2 / 3. That is, when the proportion of the number of nodes that pass the deep verification exceeds 2 / 3, the deep consensus judgment passes.

[0063] S35. If the consensus judgment passes, update the front-end project according to the deployment package.

[0064] When the blockchain network fails to reach the preset consensus threshold in the primary consensus judgment, in this embodiment, that is, when the passing rate is not greater than 70%, the system automatically initiates the deep consensus judgment process. The core goal of this process is to randomly select some trusted nodes for more stringent verification to ensure a secure consensus can still be reached in the presence of potential malicious nodes or network anomalies.

[0065] S4. When the deployment is effective, complete the deployment process according to the current deployment package; when the deployment is ineffective, trigger the rollback mechanism. After the rollback mechanism is completed, redeploy according to the preset retry mechanism until the deployment is effective. The specific steps are as follows: S41. When the consensus judgment fails, trigger the rollback mechanism, read the hash snapshot of the last successful deployment from the blockchain network, and locate the corresponding target code version.

[0066] After each successful deployment, the system generates a hash snapshot of key data such as the code of the current version, the dependency graph, and the environment configuration parameters in the form of a Merkle tree structure and stores it in the blockchain network. Therefore, the hash snapshot records all the key information at the time of successful deployment, including the code version, dependencies, etc.

[0067] S42. Locate the corresponding target code version through the hash snapshot, and according to the directed acyclic graph (DAG) dependencies in the snapshot, uninstall the current version components in reverse, and roll back the environment and code of the front-end project to the target code version in the original topological order.

[0068] S43. After the rollback is completed, calculate the current Merkle root hash. The Merkle root hash is a way of calculating a hash value used to verify data integrity, which is obtained by calculating the relevant data of the current code and environment.

[0069] Compare the calculated Merkle root hash with the Merkle root hash in the hash snapshot stored in the blockchain network to obtain the comparison result. When the comparison result is consistent, the rollback is successful; otherwise, the rollback fails, and the reason needs to be further investigated and the rollback needs to be retried.

[0070] S44. After the rollback is successful, start the retry mechanism.

[0071] First, obtain the historical verification data, which is stored in the blockchain network or a dedicated database. The historical verification data includes the accuracy rate of each distributed verification node.

[0072] The accuracy rate is calculated by statistically analyzing the consistency between the historical verification results of the node and the final correct result. For example, if a node has 80 consistent verification results with the final correct result in the past 100 verifications, then the accuracy rate of this node is 80%.

[0073] Select multiple distributed verification nodes from the historical verification data according to the accuracy rate to form a retry node subset. The selection process preferentially selects nodes with high accuracy rates to improve the reliability of the retry verification.

[0074] Perform retry verification based on the retry node subset and the preset retry verification mechanism. The retry verification mechanism is similar to the previous verification process. In this embodiment, compared with the previous verification process, the retry verification mechanism appropriately adjusts the verification parameters according to the historical verification data, including increasing the verification time and enhancing the strictness of the verification rules.

[0075] Continuously perform retry verification until the deployment package passes the retry verification. If the retry verification passes, update the front-end project according to the deployment package to complete the entire deployment process.

[0076] As can be seen from the above function introduction, an optimization device for the construction and deployment of a front-end project in this application has built a complete deployment and verification system for the front-end project, improved the intelligence and automation level of the front-end project construction, enhanced the security and stability of the front-end design, and promoted the sustainable, rapid and healthy development of the economic society.

[0077] Based on the same inventive concept, the embodiment of this application also discloses an optimization device for the construction and deployment of a front-end project, including the following modules: The deployment package generation module is used to generate a construction task for the front-end project. The construction task includes dependency analysis, code optimization, and packaging tasks. The construction task is sent to the quantum computing platform, and the construction task is processed according to a preset quantum algorithm to generate a deployment package. The blockchain verification module is used to send the deployment package to multiple distributed verification nodes of a preset blockchain network, perform blockchain verification on the deployment package through each distributed verification node to obtain a blockchain verification result, and record the blockchain verification result in the blockchain network. The consensus judgment module is used for the blockchain network to perform consensus judgment through a preset consensus mechanism and obtain a consensus judgment result. When the consensus judgment result is passed, the deployment corresponding to the deployment package is valid; otherwise, the deployment is invalid. The re-verification module is used to complete the deployment process according to the current deployment package when the deployment is valid, trigger a rollback mechanism when the deployment is invalid, and re-deploy according to a preset retry mechanism until the deployment is valid after the rollback mechanism is completed.

[0078] In a specific implementable manner, the deployment package generation module includes the following units: The first deployment package generation unit is used to generate a dynamic key pair through the quantum key distribution protocol, and perform quantum-secure signature on the construction task using the private key in the dynamic key pair. The second deployment package generation unit is used to parse the metadata attributes of the construction task, identify the task type of the construction task according to the metadata attributes and obtain an identification result. The identification result includes any one of dependency analysis, code optimization, and packaging tasks. According to the identification result, the corresponding quantum algorithm is dynamically loaded from a preset algorithm library to process the construction task.

[0079] In a specific implementable manner, the blockchain verification module includes the following units: The first blockchain verification unit is used for each distributed verification node to decompress and perform preliminary verification on the deployment package through a preset verification function. The steps of the preliminary verification include: performing a preliminary verification on the file format of the decompressed deployment package. After the preliminary verification passes once, calculate the file hash value of the deployment package, and compare the file hash value with the pre-stored standard hash value. If the comparison passes, the preliminary verification passes; otherwise, the preliminary verification fails. If the preliminary verification passes, perform code verification on the code of the deployment package according to the preset code analysis algorithm. The second blockchain verification unit, where the code analysis algorithm used includes static code analysis and dynamic code analysis. Through static code analysis, scan the syntax structure of the code, and through dynamic code analysis, monitor the behavior of the code during runtime.

[0080] In a specific implementable manner, the consensus judgment module includes the following units: The first consensus judgment unit is used for the blockchain network to perform consensus judgment through the preset consensus mechanism. The consensus mechanism includes primary consensus judgment and in-depth consensus judgment. Perform primary consensus judgment on the blockchain network. The primary consensus judgment includes collecting and summarizing the verification results of each distributed verification node. Each verification result includes pass or reject. If the pass rate of the verification results of all distributed verification nodes obtained by summarization exceeds the preset consensus threshold, the result of the primary consensus judgment is pass; otherwise, the result of the primary consensus judgment is fail. If the primary consensus judgment passes, update the front-end project according to the deployment package.

[0081] The second consensus judgment unit is used for when the result of the primary consensus judgment is fail, performing in-depth consensus judgment on the distributed verification nodes that failed. The in-depth consensus judgment includes selecting a subset of verification nodes based on the preset random algorithm and performing in-depth verification on the subset of verification nodes. If the proportion of the number of nodes that pass the in-depth verification in the subset of verification nodes exceeds the preset in-depth verification node threshold, the in-depth consensus judgment passes, and the overall consensus judgment passes; otherwise, the consensus judgment fails, and the deployment fails. If the consensus judgment passes, update the front-end project according to the deployment package.

[0082] In a specific implementable manner, the re-verification module includes the following units: The first re-verification unit is used for when the consensus judgment fails, reading the hash snapshot of the most recent successful deployment from the blockchain network and locating the corresponding target code version; according to the dependency relationship in the snapshot, roll back to the target code version. The second re-verification unit is used for when the rollback is completed, calculating the current Merkle root hash, comparing the Merkle root hash with the hash snapshot stored in the blockchain network and obtaining the comparison result. When the comparison result is consistent, the rollback is successful.

[0083] The third re-verification unit is used to obtain historical verification data, where the historical verification data includes the accuracy rate of each distributed verification node. Multiple distributed verification nodes are selected from the historical verification data according to the accuracy rate to form a retry node subset, and re-verification is performed according to the retry node subset and a preset re-verification mechanism until the deployment package passes the re-verification. If the re-verification passes, the front-end project is updated according to the deployment package.

[0084] Based on the same inventive concept as above, an embodiment of the present application also discloses a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, the code set or the instruction set can be loaded and executed by a processor to implement the front-end project construction and deployment optimization method provided in the above method embodiment.

[0085] Also based on the same inventive concept as above, an embodiment of the present application also discloses a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, the code set or the instruction set is loaded and executed by a processor to implement the front-end project construction and deployment optimization method as described above.

[0086] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in the computer-readable storage medium, and the computer-readable storage medium includes, for example: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks or optical discs that can store program codes.

[0087] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for optimizing the construction and deployment of a front-end project, characterized in that, It includes the following steps: The front-end project generates a build task, which includes dependency analysis, code optimization, and packaging tasks. The build task is sent to the quantum computing platform, and the build task is processed according to a preset quantum algorithm to generate a deployment package; The deployment package is sent to multiple distributed verification nodes of a preset blockchain network. Each distributed verification node performs blockchain verification on the deployment package to obtain a blockchain verification result, and records the blockchain verification result in the blockchain network; The blockchain network performs a consensus judgment through a preset consensus mechanism and obtains a consensus judgment result. When the consensus judgment result is passed, the deployment corresponding to the deployment package is valid; otherwise, the deployment is invalid; When the deployment is valid, the deployment process is completed according to the current deployment package. When the deployment is invalid, a rollback mechanism is triggered. After the rollback mechanism is completed, redeployment is performed according to a preset retry mechanism until the deployment is valid.

2. The construction and deployment optimization method of the front-end project according to claim 1, characterized in that The step of sending the build task to the quantum computing platform and processing the build task according to a preset quantum algorithm to generate a deployment package specifically includes the following steps: Generate a dynamic key pair through the quantum key distribution protocol, and use the private key in the dynamic key pair to perform quantum-secure signature on the build task; Parse the metadata attributes of the build task, identify the task type of the build task according to the metadata attributes, and obtain the identification result. The identification result includes any one of the dependency analysis, the code optimization, and the packaging tasks. According to the identification result, the corresponding quantum algorithm is dynamically loaded from a preset algorithm library to process the build task to generate a deployment package.

3. The construction and deployment optimization method of the front-end project according to claim 1, characterized in that The step of sending the deployment package to multiple distributed verification nodes of a preset blockchain network, and each distributed verification node performs blockchain verification on the deployment package specifically includes the following steps: Each distributed verification node decompresses and performs a preliminary verification on the deployment package through a preset verification function; The steps of the preliminary verification include: performing a first preliminary verification on the file format of the decompressed deployment package. When the first preliminary verification passes, calculate the file hash value of the deployment package, and compare the file hash value with a pre-stored standard hash value. If the comparison passes, the preliminary verification passes; otherwise, the preliminary verification fails; If the preliminary verification passes, perform code verification on the code of the deployment package according to a preset code analysis algorithm; The code analysis algorithm includes static code analysis and dynamic code analysis. The syntax structure of the code is scanned through the static code analysis, and the behavior of the code during runtime is monitored through the dynamic code analysis.

4. The construction and deployment optimization method for the front-end project according to claim 1, characterized in that The blockchain network performs a consensus judgment through a preset consensus mechanism and obtains a consensus judgment result. When the consensus judgment result is passed, the deployment corresponding to the deployment package is valid; otherwise, the deployment is invalid. Specifically, it includes the following steps: The blockchain network performs a consensus judgment through a preset consensus mechanism. The consensus mechanism includes a primary consensus judgment and a deep consensus judgment; Perform the primary consensus judgment on the blockchain network. The primary consensus judgment includes collecting the verification results of each distributed verification node and summarizing them. Each verification result includes pass or reject. If the passing rate of the verification results of all the distributed verification nodes obtained by summarization exceeds a preset consensus threshold, the result of the primary consensus judgment is pass; otherwise, the result of the primary consensus judgment is fail. If the primary consensus judgment passes, update the front-end project according to the deployment package.

5. The construction and deployment optimization method of the front-end project according to claim 4, characterized in that It further includes the following steps: If the result of the primary consensus judgment is fail, perform a deep consensus judgment on the distributed verification nodes that fail. The deep consensus judgment includes selecting a subset of verification nodes based on a preset random algorithm and performing a deep verification on the subset of verification nodes. If the proportion of the number of nodes that pass the deep verification in the subset of verification nodes exceeds a preset deep verification node threshold, the deep consensus judgment passes, and the overall consensus judgment passes; otherwise, the consensus judgment fails and the deployment fails. If the consensus judgment passes, update the front-end project according to the deployment package.

6. The construction and deployment optimization method of the front-end project according to claim 4, characterized in that When the deployment is valid, complete the deployment process according to the current deployment package. When the deployment is invalid, trigger a rollback mechanism. After the rollback mechanism is completed, redeploy according to a preset retry mechanism until the deployment is valid. Specifically, it includes the following steps: When the consensus judgment fails, read the hash snapshot of the most recent successful deployment from the blockchain network and locate the corresponding target code version; roll back to the target code version according to the dependency relationship in the snapshot. After the rollback is completed, calculate the current Merkle root hash, compare the Merkle root hash with the hash snapshot stored in the blockchain network to obtain a comparison result. When the comparison result is consistent, the rollback is successful.

7. The construction and deployment optimization method for the front-end project according to claim 6, characterized in that, After the rollback is successful, it further includes the following steps: Obtain historical verification data, where the historical verification data includes the accuracy rate of each distributed verification node. Select multiple distributed verification nodes from the historical verification data according to the accuracy rate to form a subset of retry nodes, and perform retry verification according to the subset of retry nodes and a preset retry verification mechanism until the deployment package passes the retry verification. If the retry verification passes, update the front-end project according to the deployment package.

8. An apparatus for optimizing the construction and deployment of a front-end project, characterized in that, It includes the following modules: A deployment package generation module, which is used to generate a build task for the front-end project. The build task includes dependency analysis, code optimization, and packaging tasks. Send the build task to a quantum computing platform and process the build task according to a preset quantum algorithm to generate a deployment package. A blockchain verification module, which is used to send the deployment package to multiple distributed verification nodes of a preset blockchain network, perform blockchain verification on the deployment package through each distributed verification node to obtain a blockchain verification result, and record the blockchain verification result in the blockchain network. A consensus judgment module, which is used for the blockchain network to perform consensus judgment through a preset consensus mechanism and obtain a consensus judgment result. When the consensus judgment result is passed, the deployment corresponding to the deployment package is valid; otherwise, the deployment is invalid. A re-verification module, which is used to complete the deployment process according to the current deployment package when the deployment is valid, trigger a rollback mechanism when the deployment is invalid, and re-deploy according to a preset retry mechanism until the deployment is valid after the rollback mechanism is completed.

9. An intelligent terminal, characterized in that, It includes a memory and a processor. At least one instruction, at least one program, a code set or an instruction set is stored in the memory. The at least one instruction, at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for optimizing the construction and deployment of the front-end project as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, At least one instruction, at least one program, a code set or an instruction set is stored in the readable storage medium. The at least one instruction, at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for optimizing the construction and deployment of the front-end project as described in any one of claims 1 to 7.