Visual version management and updating method and system
By setting up a version management database in the power distribution terminal management platform, calculating version hash values and adaptive scanning cycles, generating task codes, and performing data verification and difference assessment, the problems of inconsistent version management and inconvenient updates in existing technologies are solved. This achieves efficient version management and accurate data transmission, improving operational convenience and management efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-03-13
AI Technical Summary
Existing visual version management and update methods are difficult to achieve unified management and rapid updates for a large number of power distribution terminals. Traditional interfaces cannot intuitively show the relationship between versions and the scope of the impact of updates. Manual operation is prone to errors and lacks effective monitoring and feedback mechanisms.
By setting up a version management database, calculating version hash values, determining adaptive scanning cycles, generating task codes, and performing data verification and difference assessment, we can achieve effective version management, accurate data transmission, and intuitive display of changes.
It enables efficient version management and accurate data transmission, reduces the risk of data errors and loss, and improves operational convenience and management efficiency.
Smart Images

Figure CN121658053A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power distribution terminal management platform technology, and more specifically, to a visual version management and update method and system. Background Technology
[0002] In the field of power distribution terminal management platforms, research on visualized version management and updates typically involves using specialized version management tools to track the entire lifecycle of the software versions running on the power distribution terminals. By building a visualization module on the management platform interface, version information is presented in an intuitive way, such as using a version tree to show the iteration relationship of each version or a progress bar to display the update progress. During a version update, the terminal device's status is first checked. After confirming that it is ready for updating, the new version of the software is pushed to the power distribution terminal using network transmission technology. Simultaneously, key information during the update process is recorded for easy retrospective analysis and management. Its significance lies in improving the efficiency and accuracy of power distribution terminal software management, ensuring stable operation of each terminal and timely functional updates. With the increasing complexity of power distribution networks and the ever-increasing requirements for the reliability and functionality of terminal equipment, visualized version management and updates are crucial for ensuring the normal operation of power distribution terminals and improving the overall performance of the power distribution system.
[0003] Prior to this invention, existing visual version management and update methods primarily relied on simple file comparison tools to identify version differences, displayed version numbers using a basic interface, and required manual download and installation for updates. The technical challenge lies in achieving unified version management and rapid updates for a large number of power distribution terminals. Traditional interfaces cannot intuitively demonstrate the relationships between versions and the scope of update impact. Furthermore, manual operation is prone to errors, and the update process lacks effective monitoring and feedback mechanisms. The key lies in establishing an efficient version management database, developing a visual interactive interface, and constructing an automated and intelligent update push and monitoring system. Summary of the Invention
[0004] In view of the above problems, this invention proposes a visual version management and update method and system. By setting up a version management database, calculating version hash values, determining adaptive scanning cycles, generating task codes, and performing data verification and difference assessment, it achieves effective version management, accurate data transmission, and intuitive display of changes.
[0005] According to a first aspect of the present invention, a visual version management and update method is provided.
[0006] In one or more embodiments, preferably, the visual version management and update method includes:
[0007] Set up a version management database and label each version with a version number;
[0008] The visual color display is set according to the version number of each version;
[0009] Automatically set adaptive scan cycle and set task code during scan;
[0010] Compare data based on region settings and verify the accuracy of data headers;
[0011] Complete the data integrity verification;
[0012] Displaying data based on version changes.
[0013] In one or more embodiments, preferably, setting up a version management database and marking the version number of each version specifically includes:
[0014] Set up a version control database;
[0015] Calculate the version hash value using the first calculation formula;
[0016] Use the version hash value as the version number for each version;
[0017] The first calculation formula is:
[0018] Hash= SHA256(UserID|Timestamp|DataContent)
[0019] Among them, Hash is the version hash value, UserID is the user's unique identifier in UUID format, obtained from the system authentication module, Timestamp is the version submission timestamp in the format YYYY-MM-DDHH:MM:SS, DataContent is the complete data content in binary format, obtained from the input interface, and | is the bitwise OR operator.
[0020] In one or more embodiments, preferably, setting the visual color display according to the version number of each version specifically includes:
[0021] The color difference between the previous and current versions is calculated using the second calculation formula;
[0022] The specific color value is calculated using the third calculation formula;
[0023] The second calculation formula is:
[0024] Delta = 255 (1 - 0.5) (VersionSeq-1 ))
[0025] Where VersionSeq is the version serial number and Delta is the color difference between the previous and next versions;
[0026] The third calculation formula is:
[0027] R=0+Delta
[0028] G=128-Delta
[0029] B=0
[0030] VersionSeq is the version sequence number, which starts from 1 and increments to a maximum of 255.
[0031] In one or more embodiments, preferably, the automatic setting of the adaptive scan cycle and the setting of task codes during the scan process specifically include:
[0032] The adaptive scan cycle is calculated using the fourth calculation formula;
[0033] Calculate the task code using the fifth calculation formula;
[0034] The fourth calculation formula is:
[0035] T = T_base × (1 + log2(N+1))
[0036] Where T_base is the basic scan interval, a system configuration parameter, and N is the number of historical anomalies, obtained from monitoring log statistics;
[0037] The fifth calculation formula is:
[0038] Code=(UserID<<16)|(Timestamp%65535)
[0039] UserID is a 16-bit user identifier, ranging from 0 to 65535, read from the database; Timestamp is a Unix timestamp, obtained from the system clock; << is the left shift operator; | is the bitwise OR operator; and % is the modulo operator, which calculates the remainder after dividing two numbers. The expression means the remainder obtained by dividing Timestamp by 65535.
[0040] In one or more embodiments, preferably, the step of setting comparison data according to the region and verifying the accuracy of the data header specifically includes:
[0041] Separate data partitions are set up for protection, control, measurement, and waveform recording, and the partition address is calculated using the sixth calculation formula;
[0042] The seventh calculation formula is used to detect data tampering and transmission errors.
[0043] The sixth calculation formula is:
[0044] Addr=BaseAddr+(HeaderOffset%PartitionSize)
[0045] Where Addr is the partition address, BaseAddr is the partition start address, which is allocated by the memory management module, HeaderOffset is the current header offset, which is recorded in real time, and PartitionSize is the partition capacity, which is defined in the configuration file;
[0046] The seventh calculation formula is:
[0047] Checksum=(∑(data[i]×3 i ))%2 32
[0048] Where data[i] is the data content of the i-th byte, obtained from the input stream, 3 i ∑ represents the weighting coefficient, which increases exponentially with byte position. ∑ represents the summation operation. i is the index variable for summation, starting from 0 and ending at n, where n is the number of bytes in data minus 1, that is, n = len(data) - 1.
[0049] In one or more embodiments, preferably, the completion of the data integrity verification specifically includes:
[0050] Determine if the lengths of the sent and received data are the same;
[0051] Determine if there is a network interruption warning.
[0052] In one or more embodiments, preferably, the step of displaying according to version data changes specifically includes:
[0053] The eighth calculation formula is used to assess the degree of data change between versions;
[0054] The degree of numerical difference is calculated using the ninth calculation formula;
[0055] Displays the degree of data change and the degree of numerical difference;
[0056] The eighth calculation formula is:
[0057] DiffRatio=(B_changed / B_total)×100%
[0058] Where B_changed is the number of differing bits, calculated using a bit comparison algorithm; B_total is the total number of data bits, obtained from metadata; and DiffRatio is used to evaluate the degree of data change between versions.
[0059] Using the ninth calculation formula:
[0060] Opacity = 0.2 + 0.8 × (1 - e) (-ΔV / σ2) )
[0061] Where ΔV represents the numerical difference, calculated by DiffRatio÷100, σ is the smoothing coefficient and a visual experience parameter, and Opacity represents the degree of numerical difference.
[0062] According to a second aspect of the present invention, a visual version management and update system is provided.
[0063] In one or more embodiments, preferably, the visual version management and update system includes:
[0064] The version management database module is used to set up the version management database and mark the version number of each version.
[0065] Different versions of the module are distinguished, and the visual color display is set according to the version number of each version.
[0066] The timed scanning module is used to automatically set the adaptive scanning cycle and set the task code during the scanning process;
[0067] The dynamic data partitioning module is used to compare data based on region settings and verify the accuracy of the data header;
[0068] The data verification module is used to verify the integrity of the data.
[0069] The completion confirmation and display module is used to display information based on version data changes.
[0070] According to a third aspect of the present invention, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the method as described in any one of the first aspects of the present invention.
[0071] According to a fourth aspect of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method described in any one aspect of the present invention.
[0072] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0073] In this invention, version differences are displayed by visualizing colors, and the degree of data change and numerical difference are presented intuitively, enabling users to quickly understand and grasp version information, thereby improving operational convenience and management efficiency.
[0074] In this invention, by constructing a version management database and using hash values to mark versions, combined with data partitioning and verification mechanisms, precise data management and efficient traceability can be achieved, ensuring data integrity and accuracy, and reducing the risk of data errors and loss.
[0075] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0076] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0077] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0078] Figure 1 This is a flowchart of a visual version management and update method according to an embodiment of the present invention.
[0079] Figure 2 This is a flowchart illustrating the setting of a version management database and marking the version number of each version in a visual version management and update method according to an embodiment of the present invention.
[0080] Figure 3 This is a flowchart illustrating the process of setting a visual color display based on the version number of each version in a visual version management and update method according to an embodiment of the present invention.
[0081] Figure 4 This is a flowchart illustrating the automatic setting of adaptive scanning cycles and the setting of task codes during the scanning process in a visual version management and update method according to an embodiment of the present invention.
[0082] Figure 5 This is a flowchart illustrating the process of comparing data based on region settings and verifying the accuracy of data headers in a visual version management and update method according to an embodiment of the present invention.
[0083] Figure 6 This is a flowchart illustrating the completion of data integrity verification in a visual version management and update method according to an embodiment of the present invention.
[0084] Figure 7This is a flowchart illustrating the display of version data changes in a visual version management and update method according to an embodiment of the present invention.
[0085] Figure 8 This is a structural diagram of a visual version management and update system according to an embodiment of the present invention.
[0086] Figure 9 This is a structural diagram of an electronic device according to one embodiment of the present invention. Detailed Implementation
[0087] In some of the processes described in the specification, claims, and accompanying drawings of this invention, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.
[0088] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0089] In the field of power distribution terminal management platforms, research on visualized version management and updates typically involves using specialized version management tools to track the entire lifecycle of the software versions running on the power distribution terminals. By building a visualization module on the management platform interface, version information is presented in an intuitive way, such as using a version tree to show the iteration relationship of each version or a progress bar to display the update progress. During a version update, the terminal device's status is first checked. After confirming that it is ready for updating, the new version of the software is pushed to the power distribution terminal using network transmission technology. Simultaneously, key information during the update process is recorded for easy retrospective analysis and management. Its significance lies in improving the efficiency and accuracy of power distribution terminal software management, ensuring stable operation of each terminal and timely functional updates. With the increasing complexity of power distribution networks and the ever-increasing requirements for the reliability and functionality of terminal equipment, visualized version management and updates are crucial for ensuring the normal operation of power distribution terminals and improving the overall performance of the power distribution system.
[0090] Prior to this invention, existing visual version management and update methods primarily relied on simple file comparison tools to identify version differences, displayed version numbers using a basic interface, and required manual download and installation for updates. The technical challenge lies in achieving unified version management and rapid updates for a large number of power distribution terminals. Traditional interfaces cannot intuitively demonstrate the relationships between versions and the scope of update impact. Furthermore, manual operation is prone to errors, and the update process lacks effective monitoring and feedback mechanisms. The key lies in establishing an efficient version management database, developing a visual interactive interface, and constructing an automated and intelligent update push and monitoring system.
[0091] This invention provides a visual version management and update method and system. This solution achieves effective version management, accurate data transmission, and intuitive display of changes by setting up a version management database, calculating version hash values, determining adaptive scanning cycles, generating task codes, and performing data verification and difference assessment.
[0092] According to a first aspect of the present invention, a visual version management and update method is provided.
[0093] Figure 1 This is a flowchart of a visual version management and update method according to an embodiment of the present invention.
[0094] In one or more embodiments, preferably, the visual version management and update method includes:
[0095] S101. Set up the version management database and label each version with its version number;
[0096] S102. Set the visual color display according to the version number of each version;
[0097] S103. Automatically set the adaptive scanning cycle and set the task code during the scanning process;
[0098] S104. Compare data according to the regional settings and verify the accuracy of the data header;
[0099] S105. Complete the data integrity verification;
[0100] S106. Display based on version data changes.
[0101] In this embodiment of the invention, in a software version management scenario, a version management database is first established. UserIDs in UUID format are obtained from the system authentication module, DataContents are obtained from the input interface, and a version hash value is calculated and stored as the version number, combined with the version commit timestamp. Color differences and specific colors are calculated based on the version serial number to achieve visual differentiation of versions. An adaptive scanning cycle is determined based on the basic scanning interval and the number of historical anomalies, and a task code is generated using the UserID and Unix timestamp. Data is partitioned, and partition addresses and checksums are calculated to verify data integrity. Different version data are compared, the degree of change and numerical differences are assessed and displayed, ensuring efficient and accurate version management.
[0102] Figure 2 This is a flowchart illustrating the setting of a version management database and marking the version number of each version in a visual version management and update method according to an embodiment of the present invention.
[0103] like Figure 2 As shown, in one or more embodiments, preferably, the step of setting up a version management database and marking the version number of each version specifically includes:
[0104] S201. Set up a version control database;
[0105] S202. Calculate the version hash value using the first calculation formula;
[0106] S203. Use the version hash value as the version number for each version;
[0107] The first calculation formula is:
[0108] Hash= SHA256(UserID|Timestamp|DataContent)
[0109] Among them, Hash is the version hash value, UserID is the user's unique identifier in UUID format, obtained from the system authentication module, Timestamp is the version submission timestamp in the format YYYY-MM-DDHH:MM:SS, DataContent is the complete data content in binary format, obtained from the input interface, and | is the bitwise OR operator.
[0110] In this embodiment of the invention, the first step is to build a version management database. This database can be a relational database, such as MySQL, to store relevant information for each version. When it is necessary to manage a certain data version, the first step is to obtain the parameters required for the relevant calculations. The UserID is obtained through the system authentication module. This UserID is a unique identifier for the user that conforms to the UUID (Universally Unique Identifier) format. For example, the generated UUID is “550e8400-e29b-41d4-a716-446655440000”, and its function is to uniquely identify the user who performed the version submission operation. Next, the version submission timestamp is obtained and recorded in the format “YYYY-MM-DDHH:MM:SS”. Assuming the current version submission time is May 6, 2025, at 14:30:00, then the Timestamp is “2025-05-06 14:30:00”. At the same time, the complete data content in binary format, DataContent, is obtained from the input interface. For example, if the input is a piece of text data "Hello,World!", it is converted into binary format as DataContent.
[0111] Next, the version hash value is calculated using the first calculation formula: Hash=SHA256(UserID|Timestamp|DataContent). Here, "|" does not refer to bitwise OR, but rather to string concatenation, which concatenates UserID, Timestamp, and DataContent into a single string in sequence. For example, the concatenated string is "550e8400-e29b-41d4-a716-4466554400002025-05-0614:30:00Hello,World!". SHA256 is a secure hash algorithm. Performing a hash calculation on the concatenated string yields a fixed-length (usually 256-bit) hash value. For example, the calculated hash value is "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824". Finally, the calculated version hash value is used as the version number, and the version number, along with the corresponding UserID, Timestamp, DataContent, and other information, is stored in the previously configured version management database. This method enables effective management and unique identification of each version of the data, facilitating subsequent operations such as querying, comparing, and tracing different versions of the data.
[0112] Figure 3 This is a flowchart illustrating the process of setting a visual color display based on the version number of each version in a visual version management and update method according to an embodiment of the present invention.
[0113] like Figure 3 As shown, in one or more embodiments, preferably, the step of setting the visual color display according to the version number of each version specifically includes:
[0114] S301. Calculate the color difference between the previous and current versions using the second calculation formula;
[0115] S302. Calculate the specific color value using the third calculation formula;
[0116] The second calculation formula is:
[0117] Delta = 255 (1 - 0.5) (VersionSeq-1 ))
[0118] Where VersionSeq is the version serial number and Delta is the color difference between the previous and next versions;
[0119] The third calculation formula is:
[0120] R=0+Delta
[0121] G=128-Delta
[0122] B=0
[0123] VersionSeq is the version sequence number, which starts from 1 and increments to a maximum of 255.
[0124] In this embodiment of the invention, a version serial number, VersionSeq, is used to identify each version. It starts from 1 and increments, with a maximum value of 255. In this example, we choose VersionSeq as 3 for calculation to determine the visual color corresponding to this version. First, we use the second calculation formula Delta = 255 / (1 - 0.5^(VersionSeq - 1)) to calculate the color difference Delta between the previous and current versions. Here, VersionSeq represents the serial number of the current version, and Delta represents the degree of difference between the colors of the previous and current versions. Substituting VersionSeq = 3 into the formula, we first calculate the exponent 0.5^(3-1) = 0.5^2 = 0.25, then calculate the denominator 1 - 0.25 = 0.75, finally obtaining Delta = 255 / 0.75 = 340. However, since the range of color values is usually 0-255, we need to limit the value of Delta to this range, therefore we take Delta = 255. Second, we use the third calculation formula to calculate the specific color value. This formula is based on the RGB (Red, Green, Blue) color model, determining a color through three components: R, G, and B. The formula is as follows: -R = 0 + Delta: Represents the value of the red component, which is equal to Delta. Substituting Delta = 255, we get R = 255. -G = 128 - Delta: Represents the value of the green component, calculated by subtracting Delta from 128. Substituting Delta = 255, since the result is negative, and color values cannot be negative in the RGB model, G = 0. -B = 0: Represents the value of the blue component, which is fixed at 0. Therefore, when VersionSeq = 3, the calculated RGB color value is (255, 0, 0), representing red. We can apply this color to the interface of a version control system, for example, highlighting information related to version 3 in red, or using a red identifier to represent version 3 in the version list. This allows users to quickly distinguish different versions by color, thus enabling more efficient version management and viewing.
[0125] Figure 4 This is a flowchart illustrating the automatic setting of adaptive scanning cycles and the setting of task codes during the scanning process in a visual version management and update method according to an embodiment of the present invention.
[0126] like Figure 4 As shown, in one or more embodiments, preferably, the automatic setting of the adaptive scanning cycle and the setting of task codes during the scanning process specifically include:
[0127] S401. Calculate the adaptive scan cycle using the fourth calculation formula;
[0128] S402. Calculate the task code using the fifth calculation formula;
[0129] The fourth calculation formula is:
[0130] T = T_base × (1 + log2(N+1))
[0131] Where T_base is the basic scan interval, a system configuration parameter, and N is the number of historical anomalies, obtained from monitoring log statistics;
[0132] The fifth calculation formula is:
[0133] Code=(UserID<<16)|(Timestamp%65535)
[0134] UserID is a 16-bit user identifier, ranging from 0 to 65535, read from the database; Timestamp is a Unix timestamp, obtained from the system clock; << is the left shift operator; | is the bitwise OR operator; and % is the modulo operator, which calculates the remainder after dividing two numbers. The expression means the remainder obtained by dividing Timestamp by 65535.
[0135] In this embodiment of the invention, taking the automatic adjustment of the scanning strategy and generation of a unique task code by the monitoring system as an example, the specific implementation is as follows: First, the basic scanning interval is determined by the system configuration parameters (e.g., set to 60 seconds), and the number of historical anomalies is counted from the monitoring log (e.g., by parsing the log file, the number of device anomaly alarms in the past 24 hours is counted as 3). Based on the count of historical anomalies, the system automatically adjusts the scanning cycle, because the more historical anomalies, the more potential problems the system may have, requiring more frequent scanning. After calculation, the system adjusts the scanning cycle to 180 seconds. When a scanning task is triggered, a 16-bit user identifier is read from the database (e.g., the identifier for user A is 12345, with a value range of 0-65535), and the current Unix timestamp is obtained through the system clock (e.g., the real-time timestamp is 1683456789, which represents the number of seconds since January 1, 1970, 00:00:00 UTC). The system uses the user identifier and timestamp to generate a task code, which is the unique identifier for this scanning task. The final generated task code is 809358934. The generated 180-second scan cycle is used to control the execution frequency of the scan task. The task code serves as a unique identifier for this scan task and is used for logging, task tracking, and anomaly troubleshooting. Through this method, the system can dynamically adjust the scanning strategy based on historical anomalies and generate a unique code containing user information and time characteristics for each scan, achieving automated management and precise traceability of the scanning process.
[0136] Figure 5This is a flowchart illustrating the process of comparing data based on region settings and verifying the accuracy of data headers in a visual version management and update method according to an embodiment of the present invention.
[0137] like Figure 5 As shown, in one or more embodiments, preferably, the step of setting comparison data according to the region and verifying the accuracy of the data header specifically includes:
[0138] S501. Set up separate data partitions for protection, control, measurement and waveform recording, and calculate the partition address using the sixth calculation formula;
[0139] S502. Use the seventh calculation formula to detect data tampering and transmission errors;
[0140] The sixth calculation formula is:
[0141] Addr=BaseAddr+(HeaderOffset%PartitionSize)
[0142] Where Addr is the partition address, BaseAddr is the partition start address, which is allocated by the memory management module, HeaderOffset is the current header offset, which is recorded in real time, and PartitionSize is the partition capacity, which is defined in the configuration file;
[0143] The seventh calculation formula is:
[0144] Checksum=(∑(data[i]×3 i ))%2 32
[0145] Where data[i] is the data content of the i-th byte, obtained from the input stream, 3 i ∑ represents the weighting coefficient, which increases exponentially with byte position. ∑ represents the summation operation. i is the index variable for summation, starting from 0 and ending at n, where n is the number of bytes in data minus 1, that is, n = len(data) - 1.
[0146] In this embodiment of the invention, during data storage or transmission, data may be tampered with due to various factors (such as hardware failure, electromagnetic interference, software errors, etc.). By calculating the checksum, the receiving end can recalculate the checksum of the received data and compare it with the checksum sent by the sending end. If the two are inconsistent, it indicates that the data may have been tampered with during transmission or storage. This is because errors such as bit flipping may occur in data packets during network transmission. The checksum mechanism can detect these errors in a timely manner. For example, when the sending end sends data and the corresponding checksum, the receiving end calculates the checksum of the received data. If it is different from the sent checksum, it is known that an error has occurred during data transmission, and measures such as retransmission can be taken to ensure the accuracy of the data. Implementation principle: 1) Weighted summation: In the seventh calculation formula, each byte of data data[i] is multiplied by 3i for weighted summation. The advantage of doing this is that bytes at different positions contribute differently to the checksum, increasing the sensitivity of the check. Compared with simple summation check, weighted summation can more effectively detect errors in the data. 2) Modulo operation: Perform a %232 modulo operation on the weighted sum result to limit the checksum to a 32-bit range. This ensures that the checksum size is fixed, facilitating storage and transmission, while also reducing the computational load to some extent.
[0147] Figure 6 This is a flowchart illustrating the completion of data integrity verification in a visual version management and update method according to an embodiment of the present invention.
[0148] like Figure 6 As shown, in one or more embodiments, preferably, the completion of data integrity verification specifically includes:
[0149] S601. Determine whether the lengths of the sent and received data are the same;
[0150] S602. Determine if there is a network interruption message.
[0151] In this embodiment of the invention, when a client wants to send a file to the server, the client will calculate the length of the file to be sent. Assume the file to be sent by the client is a text file with the content "Hello, World! This is a test file for data integrity check.", and its length is calculated to be 52 characters. The client sends this file data to the server via the network. After receiving the data sent by the client, the server first calculates the length of the received data. If the data received by the server is also "Hello, World! This is a test file for data integrity check," and its length is also 52 characters, the same as the data length sent by the client, then it initially indicates that the data length has not changed due to loss or addition of content during transmission. Simultaneously, throughout the entire data transmission process, the system will monitor in real time for network interruption alerts. Network interruption alerts can be issued by network devices (such as routers and switches) or the network module of the operating system. For example, when the network line suddenly disconnects, the router will detect the connection interruption and send a network interruption alert to the system. If the system does not receive any network interruption alerts during this file transmission, it means that the network transmission is continuous, and there has been no data loss or corruption due to network interruption. The transmitted data is considered complete only if the sent and received data are of the same length and there is no network interruption warning. If the data lengths are inconsistent or a network interruption warning is issued, the system will determine that the data may be incomplete and may request the client to resend the file to ensure data integrity.
[0152] Figure 7 This is a flowchart illustrating the display of version data changes in a visual version management and update method according to an embodiment of the present invention.
[0153] like Figure 7 As shown, in one or more embodiments, preferably, the step of displaying according to version data changes specifically includes:
[0154] S701. Use the eighth calculation formula to assess the degree of data change between versions;
[0155] S702. Calculate the degree of numerical difference using the ninth calculation formula;
[0156] S703, Displaying the degree of data change and the degree of numerical difference;
[0157] The eighth calculation formula is:
[0158] DiffRatio=(B_changed / B_total)×100%
[0159] Where B_changed is the number of differing bits, calculated using a bit comparison algorithm; B_total is the total number of data bits, obtained from metadata; and DiffRatio is used to evaluate the degree of data change between versions.
[0160] Using the ninth calculation formula:
[0161] Opacity = 0.2 + 0.8 × (1 - e) (-ΔV / σ2) )
[0162] Where ΔV represents the numerical difference, calculated by DiffRatio÷100, σ is the smoothing coefficient and a visual experience parameter, and Opacity represents the degree of numerical difference.
[0163] In this embodiment of the invention, it is now necessary to compare the code data changes between versions 1.0 and 1.1 and visualize the changes. First, the total number of bits of code data for versions 1.0 and 1.1 is obtained from the system's metadata records, assuming this value is 10,000 bits. Simultaneously, an algorithm capable of comparing data bit by bit (bit comparison algorithm) is used to compare the code data of the two versions, and the difference in bits is statistically determined, assuming it is 500 bits. Based on the obtained difference in bits and total number of bits, the system calculates the degree of data change between versions. Dividing the difference in bits by the total number of bits and multiplying by 100%, we obtain a data change degree of 5% for version 1.1 relative to version 1.0. Next, based on the calculated degree of data change between versions, the system further calculates the degree of numerical difference. First, the numerical value of the degree of data change is divided by 100 to obtain a base value for the numerical difference, here 0.05. Then, a smoothing coefficient is set, which is a parameter pre-set based on visual experience, assuming it is set to 0.2. Using this base value and a set smoothing coefficient, a series of calculations (similar to calculations using a specific formula, but the formula is not elaborated here to avoid garbled text) are performed, ultimately yielding a numerical difference of 0.7704. Finally, the calculated inter-version data change percentage (5%) and numerical difference percentage (0.7704) are displayed. On the version control system interface, a bar chart can be used to display the data change percentage between different versions, with the height of the bar representing the magnitude of the change. For the numerical difference percentage, it can be applied to the transparency of the version identifier; for example, the version 1.1 identifier can be displayed with a transparency of 0.7704, allowing users to more intuitively perceive the differences between versions.
[0164] According to a second aspect of the present invention, a visual version management and update system is provided.
[0165] Figure 8 This is a structural diagram of a visual version management and update system according to an embodiment of the present invention.
[0166] In one or more embodiments, preferably, the visual version management and update system includes:
[0167] Version management database module 801 is used to set up the version management database and mark the version number of each version;
[0168] Module 802 differentiates between different versions and is used to set the visual color display according to the version number of each version.
[0169] The timed scanning module 803 is used to automatically set the adaptive scanning cycle and set the task code during the scanning process;
[0170] The data dynamic partitioning module 804 is used to compare data according to regional settings and verify the accuracy of the data header;
[0171] Data verification module 805 is used to perform data integrity verification;
[0172] The confirmation and display module 806 is used to display information based on version data changes.
[0173] In this embodiment of the invention, a system suitable for different structures is realized through a series of modular designs. This system can achieve closed-loop, reliable, and efficient execution through data acquisition, analysis, and control.
[0174] According to a third aspect of the present invention, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the method as described in any one of the first aspects of the present invention.
[0175] According to a fourth aspect of the present invention, an electronic device is provided. Figure 9 This is a structural diagram of an electronic device according to one embodiment of the present invention. Figure 9 The electronic device shown is a general-purpose visual version management and update device. (Refer to...) Figure 9 The electronic device includes multiple acquisition devices 901 and a processing device 902; wherein, different acquisition devices 901 monitor different areas of the target scene, and the monitoring area of the multiple acquisition devices covers the target scene;
[0176] Each acquisition device 901 is used to acquire images of the target scene and identify the position information of moving targets in the acquired images;
[0177] The processing device 902 includes a processor 903, a communication interface 904, a memory 905, and a communication bus 906, wherein the processor 903, the communication interface 904, and the memory 905 communicate with each other via the communication bus 906.
[0178] Memory 905 is used to store computer programs;
[0179] When the processor 903 executes the computer program stored in the memory 905, it implements the steps of the visual version management and update method described above in any of the embodiments of the present invention.
[0180] The communication bus 906 mentioned in the above processing device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 906 can be divided into address bus, data bus, control bus, etc. For ease of illustration, it is represented by only one line in the figure, but this does not mean that there is only one bus or one type of bus.
[0181] Communication interface 904 is used for communication between the above-mentioned processing device and other devices.
[0182] The memory 905 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory 905 may also be at least one storage device located remotely from the aforementioned processor 903.
[0183] The processor 903 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0184] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0185] In this invention, version differences are displayed by visualizing colors, and the degree of data change and numerical difference are presented intuitively, enabling users to quickly understand and grasp version information, thereby improving operational convenience and management efficiency.
[0186] In this invention, by constructing a version management database and using hash values to mark versions, combined with data partitioning and verification mechanisms, precise data management and efficient traceability can be achieved, ensuring data integrity and accuracy, and reducing the risk of data errors and loss.
[0187] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0188] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0189] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0190] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0191] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A visual version management and update method, characterized in that, The method includes: Set up a version management database and label each version with a version number; The visual color display is set according to the version number of each version; Automatically set adaptive scan cycle and set task code during scan; Compare data based on region settings and verify the accuracy of data headers; Complete the data integrity verification; Displaying data based on version changes.
2. The visual version management and update method as described in claim 1, characterized in that, The setting up of the version management database and marking each version with a version number specifically includes: Set up a version control database; Calculate the version hash value using the first calculation formula; Use the version hash value as the version number for each version; The first calculation formula is: Hash= SHA256(UserID|Timestamp|DataContent); Among them, Hash is the version hash value, UserID is the user's unique identifier in UUID format, obtained from the system authentication module, Timestamp is the version submission timestamp in the format YYYY-MM-DDHH:MM:SS, DataContent is the complete data content in binary format, obtained from the input interface, and | is the bitwise OR operator.
3. The visual version management and update method as described in claim 1, characterized in that, The setting of visual color displays based on the version number of each version specifically includes: The color difference between the previous and current versions is calculated using the second calculation formula; The specific color value is calculated using the third calculation formula; The second calculation formula is: Delta=255\(1-0.5 (VersionSeq-1 )); Where VersionSeq is the version serial number and Delta is the color difference between the previous and next versions; The third calculation formula is: R = 0 + Delta; G = 128 - Delta; B=0; VersionSeq is the version sequence number, which starts from 1 and increments to a maximum of 255.
4. The visual version management and update method as described in claim 1, characterized in that, The automatic setting of the adaptive scanning cycle and the setting of task codes during the scanning process specifically include: The adaptive scan cycle is calculated using the fourth calculation formula; Calculate the task code using the fifth calculation formula; The fourth calculation formula is: T = T_base × (1 + log2(N+1)); Where T_base is the basic scan interval, a system configuration parameter, and N is the number of historical anomalies, obtained from monitoring log statistics; The fifth calculation formula is: Code=(UserID<<16)|(Timestamp%65535); UserID is a 16-bit user identifier, ranging from 0 to 65535, read from the database; Timestamp is a Unix timestamp, obtained from the system clock; << is the left shift operator; | is the bitwise OR operator; and % is the modulo operator, which calculates the remainder after dividing two numbers. The expression means the remainder obtained by dividing Timestamp by 65535.
5. The visual version management and update method as described in claim 1, characterized in that, The step of setting comparison data based on the region and verifying the accuracy of the data header specifically includes: Separate data partitions are set up for protection, control, measurement, and waveform recording, and the partition address is calculated using the sixth calculation formula; The seventh calculation formula is used to detect data tampering and transmission errors. The sixth calculation formula is: Addr=BaseAddr+(HeaderOffset%PartitionSize); Where Addr is the partition address, BaseAddr is the partition start address, which is allocated by the memory management module, HeaderOffset is the current header offset, which is recorded in real time, and PartitionSize is the partition capacity, which is defined in the configuration file; The seventh calculation formula is: Checksum=(∑(data[i]×3 i ))%2 32 ; Where data[i] is the data content of the i-th byte, obtained from the input stream, 3 i ∑ represents the weighting coefficient, which increases exponentially with byte position. ∑ represents the summation operation. i is the index variable for summation, starting from 0 and ending at n, where n is the number of bytes in data minus 1, that is, n = len(data) - 1.
6. The visual version management and update method as described in claim 1, characterized in that, The integrity verification of the completed data specifically includes: Determine if the lengths of the sent and received data are the same; Determine if there is a network interruption warning.
7. The visual version management and update method as described in claim 1, characterized in that, The display based on version data changes specifically includes: The eighth calculation formula is used to assess the degree of data change between versions; The degree of numerical difference is calculated using the ninth calculation formula; Displays the degree of data change and the degree of numerical difference; The eighth calculation formula is: DiffRatio=(B_changed / B_total)×100%; Where B_changed is the number of differing bits, calculated using a bit comparison algorithm; B_total is the total number of data bits, obtained from metadata; and DiffRatio is used to evaluate the degree of data change between versions. Using the ninth calculation formula: Opacity=0.2+0.8×(1-e (-ΔV / σ2) ); Where ΔV represents the numerical difference, calculated by DiffRatio÷100, σ is the smoothing coefficient and a visual experience parameter, and Opacity represents the degree of numerical difference.
8. A visual version management and update system, characterized in that, The system is used to implement the method as described in any one of claims 1-7, the system comprising: The version management database module is used to set up the version management database and mark the version number of each version. Different versions of the module are distinguished, and the visual color display is set according to the version number of each version. The timed scanning module is used to automatically set the adaptive scanning cycle and set the task code during the scanning process; The dynamic data partitioning module is used to compare data based on region settings and verify the accuracy of the data header; The data verification module is used to verify the integrity of the data. The completion confirmation and display module is used to display information based on version data changes.
9. A computer-readable storage medium storing computer program instructions thereon, characterized in that, The computer program instructions, when executed by a processor, implement the method as described in any one of claims 1-7.
10. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-7.