A method for automatically checking software in and out of a warehouse MD5
By designing software configuration for inbound and outbound orders and using the AVIDM system to generate MD5 checksums, the uniqueness verification problem of compressed file packages was solved, enabling automatic verification and status control of software configuration items, thereby improving the reliability and process efficiency of the software product.
Patent Information
- Application Number
- CN202311673944.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-12-07
AI Technical Summary
The existing MD5 algorithm cannot effectively verify the uniqueness of compressed file packages in configuration management systems, leading to compatibility issues and inaccurate verification.
The software is designed to configure inbound and outbound orders. It generates MD5 checksums through the AVIDM system. The checksum is automatically generated when an order is received, and the consistency with the inbound file is automatically verified when an order is issued. A unique MD5 code is generated using modulo-2 arithmetic and multiple encryption algorithms.
It enables status control of software configuration items, improves the reliability of software products, prevents status errors in testing, evaluation and production, simplifies processes and improves the reliability of inspection.
Smart Images

Figure CN117668875B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of encryption and decryption, and specifically relates to a method for automatic MD5 verification of software entering and leaving the database. Background Technology
[0002] MD5 is an abbreviation for Message-Digest Algorithm 5, widely used in encryption and decryption technologies, and is often referred to as a file's "digital fingerprint." Every file, whether it's an executable program, image file, temporary file, or any other type of file, has one and only one unique MD5 hash value. Furthermore, if a file is modified, its MD5 hash will change. Therefore, we can verify whether a file has been tampered with by comparing the MD5 hashes of the same file.
[0003] MD5 is used to guarantee file versioning; each file corresponds to a unique MD5 value. If the compressed files don't match, the files cannot be verified. Compressed files contain the timestamps of the compressed files. When a tool generates a compressed file, each file is created a new one. Even if the file content is the same, the creation time will be different, resulting in different MD5 hashes for each compressed file. This characteristic means that directly applying MD5 to configuration management tools is ineffective because some configuration management items are often compressed files. The known and publicly available MD5 algorithms mentioned above are not applicable and cannot achieve the desired results. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] The technical problem to be solved by this invention is how to provide a method for automatic MD5 verification of software entering and leaving the database, so as to solve the technical difficulties such as compatibility with existing configuration management systems and the non-uniqueness of MD5 code values generated by the MD5 standard algorithm for compressed files.
[0006] (II) Technical Solution
[0007] To address the aforementioned technical problems, this invention proposes a method for automatic MD5 verification of software entering and leaving databases, comprising the following steps:
[0008] S1. Design software configuration inbound and outbound slips;
[0009] S2. For software configuration items that need to be put into the warehouse, first create an inbound order and associate the inbound configuration items with the AVIDM system;
[0010] S3. Based on the associated inbound configuration items, the system determines whether the document content in the inbound configuration items needs to generate an MD5 checksum.
[0011] S4. Download the files from the "Source Program" or "Executable Program" configuration items included in the database configuration items, perform modulo-2 sum calculation, and generate MD5 checksums.
[0012] S5. Update the configuration item record in the inbound order with the corresponding obtained MD5 checksum or error message to complete the software configuration item inbound.
[0013] S6. When issuing software configuration items, an issuance order needs to be created, and the software configuration items to be issued need to be selected.
[0014] S7. Select the inbound configuration item based on the outbound configuration item, and the system determines whether the document content in the configuration item needs to generate an MD5 checksum.
[0015] S8. Download the files in the "Source Program" or "Executable Program" configuration items included in the configuration items, perform modulo-2 sum calculation, and generate a new MD5 checksum;
[0016] S9. In the outbound order, the new MD5 checksum of the outbound configuration item is compared with the MD5 checksum of the inbound configuration item record, and the comparison result and outbound MD5 checksum of the corresponding configuration item are updated; when the document download is abnormal, an error message is given.
[0017] (III) Beneficial Effects
[0018] This invention proposes a method for automatic MD5 verification of software entering and leaving the database. This invention upgrades the existing configuration management tool module to automatically generate MD5 codes for configuration items when software products are entered into the database and automatically verify them when they are exported. This solves technical problems such as compatibility issues with existing configuration management systems and the non-uniqueness of MD5 code values generated by the MD5 standard algorithm for compressed files.
[0019] This invention improves the MD5 standard algorithm based on practical scientific research, formulates and implements a unique MD5 checksum generation method, and optimizes the human-computer interaction interface. Extensive testing and trials have been conducted. Upon entering the database, selecting the file to be added to configuration management automatically generates a checksum. Upon exiting the database, the system automatically verifies and judges the consistency with the entered file, realizing automatic MD5 verification for software exit. This strengthens the control of software configuration item entry and exit status, serving as a status verification function and preventing errors in software product testing, evaluation, production, and packaging, thus improving the reliability of the software product. This invention is simple to implement, optimizing the process and improving the reliability of the verification process with minimal increase in the workload of R&D and configuration management personnel. It is effective and meets application requirements. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating the software architecture design of the processing procedure of this invention.
[0021] Figure 2 This is a flowchart illustrating the software outline design for the processing procedure of this invention.
[0022] Figure 3 This is an example diagram of the automatic generation of MD5 codes during the data entry process of this invention.
[0023] Figure 4 This is an example diagram illustrating the automatic verification of MD5 code consistency during the outbound processing of this invention.
[0024] Figure 5 This is an example diagram illustrating the automatic verification of inconsistent MD5 codes during the outbound process of this invention.
[0025] Figure 6 This is a system architecture diagram of the present invention. Detailed Implementation
[0026] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.
[0027] The purpose of this invention is as follows:
[0028] 1) A reasonable solution was developed. The tool not only adapts to the existing AVIDM system and configuration management module, software architecture and file reading mode, but also handles and tests branches such as file acquisition anomalies caused by AVIDM system instability, the transition period problem of old documents without generated checksums, and inconsistent file checksum results, ensuring the effectiveness of the tool. Furthermore, the interface was optimized to achieve a user-friendly human-computer interaction.
[0029] 2) During the final warehousing process, front-end and back-end synchronous verification is adopted. If the encoding is inconsistent, the MD5 code value is regenerated based on the current product identifier and document identifier, which improves the efficiency of the program while ensuring the accuracy of the data.
[0030] 3) The compressed file is decompressed. The MD5 hash is generated by combining multiple fixed attributes of a single file and then performing a modulo-2 sum operation, which solves the problem that the MD5 hash generated for each compressed package of source program and executable program is not unique.
[0031] The purpose of this invention is to provide a method for automatic MD5 verification of software entering and leaving the database, solving the problem of MD5 code value verification of compressed file packages. Based on existing software configuration management tools, an automatic verification function module is developed to identify the MD5 code of the software product being used, further strengthening status control, and realizing the function of automatically generating MD5 codes for software configuration management items when entering the database, and automatically verifying the consistency between the MD5 code of the software and the entering file when leaving the database.
[0032] This invention solves the problem of automatic MD5 generation and verification based on existing configuration management tools.
[0033] Figure 1 This is an architectural diagram of the technical solution of this invention. (For example...) Figure 1 As shown, the present invention proposes a method for automatic MD5 verification of software entering and leaving the database, which includes the following steps:
[0034] S1. Design software configuration inbound and outbound orders. In this invention, the following data forms are created:
[0035] Software configuration entry form: Used to record the software configuration items that are entered into the warehouse, including the name of the configuration item, the configuration item identifier and version, and the MD5 checksum;
[0036] Software configuration outbound slip: Used to record the software configuration items outbound, including baseline name, baseline identifier and version number, configuration item name, configuration item identifier and version, comparison result, and MD5 checksum.
[0037] S2. For software configuration items that need to be added to the warehouse, first create an inbound order and associate it with the inbound configuration item in the AVIDM system.
[0038] S3. Based on the associated inbound configuration items, the system determines whether the document content in the inbound configuration items needs to generate an MD5 checksum.
[0039] S4. Download the files from the "Source Program" or "Executable Program" configuration items included in the database configuration items, perform modulo-2 sum calculation, and generate MD5 checksums.
[0040] If no file is downloaded within the specified number of attempts or the number of downloaded files is incomplete, the file download can be restarted based on the input count parameter (e.g., 5 times) until the file is completely downloaded. After that, the MD5 hash of each file is stored in an array, reordered using the bubble sort method, and a new string is generated after sorting. The new string is converted to a hexadecimal string and summed. The result of the summation is then moduloed, and finally, a new MD5 checksum is generated from the modulo operation result using the MD5 encryption algorithm (other encryption algorithm parameters can also be passed to generate the checksum, such as SHA1, SHA-256, SH-384, SHA-512, etc.).
[0041] If the file is not downloaded after the count parameter limit is reached, the download will stop and an error message indicating a file retrieval failure will be displayed.
[0042] S5. Update the configuration item record in the inbound order with the corresponding obtained MD5 checksum or error message to complete the software configuration item inbound.
[0043] S6. When issuing software configuration items, an issuance order needs to be created, and the software configuration items to be issued need to be selected.
[0044] S7. Select the already entered configuration item based on the outbound configuration item. The system then determines whether the document content in the configuration item needs to generate an MD5 checksum.
[0045] S8. Download the files in the "Source Program" or "Executable Program" configuration items, perform modulo-2 sum calculation, and generate MD5 checksums.
[0046] If the file is not downloaded within the specified number of attempts or the number of downloaded files is incomplete, the file download will be restarted according to the input count parameter (e.g., 5 attempts) until the file is completely downloaded. After that, the MD5 hash of the file is stored in an array, and the array is reordered using the bubble sort method. The sorted array generates a new string, which is then converted to a hexadecimal string and summed. The result of the summation is then modulo-calculated, and finally, the MD5 hash is used to generate a new MD5 checksum (other encryption algorithms can also be used to generate the checksum, such as SHA1, SHA-256, SH-384, SHA-512, etc.). Alternatively, the download will stop when the count parameter limit is reached, and a file retrieval error message will be returned.
[0047] S9. In the outbound order, the new MD5 checksum of the obtained outbound configuration item is compared with the MD5 checksum of the already received configuration item record, and the comparison result and outbound MD5 checksum of the corresponding configuration item are updated. An error message is given when a document download error occurs.
[0048] To better implement the above scheme, the downloaded file generates an MD5 checksum using modulo 2, which can be repeatedly generated at different times: if the number of generation attempts is within the maximum limit, the above process S4 or S8 is repeated until the MD5 checksum generation is complete, and then generation is triggered again when the file is added to or removed from the database. If an MD5 checksum is not generated within the specified number of attempts, generation must be stopped because continuous generation may affect the execution of other operations, and the MD5 checksum will be regenerated at the next trigger.
[0049] Figure 2 This is a flowchart illustrating the software overview of the processing procedure for this invention. First, it's necessary to create inbound and outbound orders to store configuration information for these items, such as... Figure 2As shown, the configuration item document is acquired according to the inbound and outbound configuration item information, and it is determined whether the document exists. If the document does not exist, a document acquisition failure is returned, and the count is incremented by 1 (index++). Re-acquisition is performed according to whether the maximum number of downloads is reached (index<maxnum). If the maximum number of times is not reached, the acquisition of the configuration item document continues; otherwise, a document acquisition failure prompt is returned, and the process ends. If the document exists, it is necessary to determine whether it is a "change order". The document acquisition method for a change order is different from that for an ordinary configuration item. The change order needs to acquire the changed configuration item content, while the ordinary document can directly acquire the content under the configuration item. After acquiring the configuration item, it is necessary to determine whether it is a document "source program" or "executive program" that needs to generate an MD5 check code. If not, the next document in the configuration item is continuously acquired. If it is the required document, the file set (fileList) contained in the document is acquired, all files are traversed, and it is determined whether it is a file that needs to generate an MD5 check code (non-essential files need to be excluded). If it is not a required file, it is determined whether there is a next file, and the loop continues. If the file type meets the requirement, the file that meets the requirement needs to be downloaded, and it is determined whether the file is downloaded completely. If the download is incomplete, the download operation needs to be repeated (dindex++) until the file is downloaded completely or the maximum number of downloads is reached (dindex<10). The downloaded file is generated into a check code by means of MD5 encryption. After the loop is executed, the MD5 check codes of all files are stored in an array and re-sorted, the sorted data is subjected to modulo-2 sum calculation to finally obtain a new MD5 check code. The inbound note directly receives the returned MD5 check code, and the outbound note needs to compare the newly generated MD5 check code with the MD5 check code of the inbound configuration item, and provide a comparison result.
[0050] Figure 3 is an example diagram of automatically generating an MD5 code during the inbound processing. When a software inbound application note is created, the document in AVIDM is selected as the configuration item for software inbound. After the configuration item is added, the system automatically determines whether to generate an MD5 check code value according to the configuration item name and the file type in the document. If the configuration item name contains "source program" or "executive program", the content is automatically backfilled in the MD5 check code column; otherwise, no content is filled.
[0051] Figure 4 is an example diagram of automatically verifying the consistency of MD5 codes during the outbound processing of the present invention. When a software outbound application note is created, the already-inbound configuration item is selected as the configuration item for software outbound. After the configuration item is added, the system automatically determines whether to generate an MD5 check code value according to the configuration item name and the file type in the document. If the configuration item name contains "source program" or "executive program", the comparison result column will be backfilled with the comparison results "consistent" and "inconsistent" (inconsistent cases such as Figure 5The generated MD5 checksum and MD5 checksum columns will be automatically filled in; otherwise, no content will be filled in. If an error occurs during file download, the comparison result column will display an error message.
[0052] This invention proposes a method for automatic MD5 verification of software entering and leaving the database. This invention upgrades the existing configuration management tool module to automatically generate MD5 codes for configuration items when software products are entered into the database and automatically verify them when they are exported. This solves technical problems such as compatibility issues with existing configuration management systems and the non-uniqueness of MD5 code values generated by the MD5 standard algorithm for compressed files.
[0053] This invention improves the MD5 standard algorithm based on practical scientific research, formulates and implements a unique MD5 checksum generation method, and optimizes the human-computer interaction interface. Extensive testing and trials have been conducted. Upon entering the database, selecting the file to be added to configuration management automatically generates a checksum. Upon exiting the database, the system automatically verifies and judges the consistency with the entered file, realizing automatic MD5 verification for software exit. This strengthens the control of software configuration item entry and exit status, serving as a status verification function and preventing errors in software product testing, evaluation, production, and packaging, thus improving the reliability of the software product. This invention is simple to implement, optimizing the process and improving the reliability of the verification process with minimal increase in the workload of R&D and configuration management personnel. It is effective and meets application requirements.
[0054] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for automatic MD5 verification of software input and output, characterized in that, The method includes the following steps: S1. Design software configuration inbound and outbound slips; S2. For software configuration items that need to be put into the warehouse, first create an inbound order and associate the inbound configuration items with the AVIDM system; S3. Based on the associated inbound configuration items, the system determines whether the document content in the inbound configuration items needs to generate an MD5 checksum. S4. Download the files from the "Source Program" or "Executable Program" configuration items included in the database configuration items, perform modulo-2 sum calculation, and generate MD5 checksums. S5. Update the configuration item record in the inbound order with the corresponding obtained MD5 checksum or error message to complete the software configuration item inbound. S6. When issuing software configuration items, an issuance order needs to be created, and the software configuration items to be issued need to be selected. S7. Select the inbound configuration item based on the outbound configuration item, and the system determines whether the document content in the configuration item needs to generate an MD5 checksum. S8. Download the files in the "Source Program" or "Executable Program" configuration items contained in the configuration items, perform modulo-2 sum calculation, and generate a new MD5 checksum. S9. In the outbound order, the new MD5 checksum of the outbound configuration item is compared with the MD5 checksum of the inbound configuration item record, and the comparison result and outbound MD5 checksum of the corresponding configuration item are updated. If a document download fails, an error message will be displayed. in, Step S4 specifically includes: if no file is downloaded within the specified number of attempts or the number of downloaded files is incomplete, the file download is restarted according to the input counting parameter; After the files are downloaded completely, the MD5 codes of individual files are stored in an array, reordered using the bubble sort method, and a new string is generated after sorting. The new string is converted into a hexadecimal string and summed. The result of the summation is then moduloed, and finally, a new MD5 checksum is generated from the modulo result using the MD5 encryption algorithm. If the file is not downloaded after the count parameter limit is reached, the download will stop and an error message indicating a file retrieval failure will be displayed.
2. The method for automatic MD5 verification of software input / output as described in claim 1, characterized in that, In step S1, the software configuration entry form is used to record the software configuration items that are entered into the warehouse, including: the name of the configuration item, the configuration item identifier and version, and the MD5 checksum; the software configuration exit form is used to record the software configuration items that are exited into the warehouse, including: the baseline name, the baseline identifier and version number, the name of the configuration item, the configuration item identifier and version, the comparison result, and the MD5 checksum.
3. The method for automatic MD5 verification of software input / output as described in claim 1, characterized in that, Step S8 specifically includes: if no file is downloaded within a specified number of attempts or the number of downloaded files is incomplete, the file download is restarted according to the input counting parameter until the file is completely downloaded; After the file is completely downloaded, its MD5 hash is stored in an array. The array is then reordered using a bubble sort algorithm, generating a new string. This new string is converted to hexadecimal and its sum is calculated. The result of this summation is then subjected to a modulo operation, and finally, the MD5 encryption algorithm is used to generate a new MD5 checksum. If the download stops after reaching the count parameter limit, return to the file and display an error message.
4. The method for automatic MD5 verification of software input / output as described in claim 1, characterized in that, The downloaded file generates an MD5 checksum through modulo-2 sum, and the generation is repeated at different timings: if the number of generations is within the specified maximum number of times, repeat the process of S4 or S8 above until the generation of the MD5 checksum is completed, and then wait for re-triggering of generation when warehousing or ex-warehousing is performed.
5. The method for automatic MD5 verification of software input / output as described in claim 4, characterized in that, If the MD5 checksum is not generated within the specified number of times, stop the generation, and re-generate the MD5 checksum when the next timing triggers.
6. The method for automatic MD5 verification of software entry and exit from the database as described in any one of claims 1-5, characterized in that, Acquire the configuration item document according to the information of the warehouse-in and warehouse-out configuration item, judge whether the document exists, if not, return a document acquisition failure, and increment the count at the same time, that is, index++, perform re-reading according to whether the maximum number of downloads is reached, that is, judge whether index<maxnum is true, if the maximum number of times is not reached, continue to acquire the configuration item document, otherwise, return a document acquisition failure prompt, and end the process.
7. The method for automatic MD5 verification of software input / output as described in claim 6, characterized in that, If the document exists, it is necessary to judge whether it is a "change order". A change order and an ordinary configuration item adopt different document acquisition manners: the change order needs to acquire the content of the changed configuration item, while for an ordinary document, the content under the configuration item can be directly acquired.
8. The method for automatic MD5 verification of software entry and exit from the database as described in claim 6, characterized in that, After acquiring the configuration item, it is necessary to judge whether it is a document "source program" or "executive program" that needs to generate an MD5 checksum. If not, continue to acquire the next document in the configuration item. If it is the required document, acquire the file set fileList included in the document, traverse all the files, judge whether they are files that need to generate an MD5 checksum. If the file is not a required file, judge whether there is a next file, and continue to execute the loop. If the file type meets the requirement, it is necessary to download the file that meets the requirement and judge whether the file is downloaded completely. If the download is incomplete, the download operation needs to be repeated, with dindex incremented, until the file is downloaded completely or the maximum number of downloads is reached. The downloaded file generates and returns a checksum through the MD5 encryption method. After the loop is executed, the MD5 checksums of all files are stored in an array and reordered, the sorted data is subjected to modulo-2 sum calculation, and a new MD5 checksum is finally obtained.
9. The method for automatic MD5 verification of software input / output as described in claim 8, characterized in that, The warehouse-in note directly receives the returned MD5 checksum, and for the warehouse-out note, the newly generated MD5 checksum needs to be compared with the MD5 checksum of the warehouse-in configuration item, and a comparison result is given.
Citation Information
Patent Citations
Method for generating and loading specific project files based on WPF (Windows Presentation Foundation) technology
CN106909672A
Software inventory control system
US6332217B1
